@contractspec/bundle.library 3.8.9 → 3.8.11

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.
Files changed (644) hide show
  1. package/.turbo/turbo-build.log +606 -594
  2. package/CHANGELOG.md +68 -0
  3. package/dist/application/context-storage/index.js +1 -28
  4. package/dist/application/index.js +13 -2133
  5. package/dist/application/mcp/cliMcp.js +4 -452
  6. package/dist/application/mcp/common.js +1 -193
  7. package/dist/application/mcp/contractsMcp.js +2 -549
  8. package/dist/application/mcp/contractsMcpResources.js +2 -123
  9. package/dist/application/mcp/contractsMcpTools.js +1 -199
  10. package/dist/application/mcp/docsMcp.catalog.js +3 -381
  11. package/dist/application/mcp/docsMcp.data.js +1 -147
  12. package/dist/application/mcp/docsMcp.js +6 -1039
  13. package/dist/application/mcp/docsMcp.prompts.js +6 -521
  14. package/dist/application/mcp/docsMcp.reference.js +3 -235
  15. package/dist/application/mcp/docsMcp.resources.js +3 -519
  16. package/dist/application/mcp/docsMcp.tools.js +3 -518
  17. package/dist/application/mcp/index.js +13 -2106
  18. package/dist/application/mcp/internalMcp.js +2 -410
  19. package/dist/application/mcp/normalizeMcpRequest.js +1 -21
  20. package/dist/application/mcp/providerRankingMcp.js +1 -530
  21. package/dist/bundles/LibraryBundle.js +1 -138
  22. package/dist/bundles/index.js +1 -138
  23. package/dist/components/docs/DocsIndexPage.js +2 -912
  24. package/dist/components/docs/advanced/AdvancedMCPPage.js +4 -271
  25. package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
  26. package/dist/components/docs/advanced/AdvancedRenderersPage.js +2 -118
  27. package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
  28. package/dist/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
  29. package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
  30. package/dist/components/docs/advanced/index.js +10 -1055
  31. package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
  32. package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
  33. package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
  34. package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
  35. package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
  36. package/dist/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
  37. package/dist/components/docs/architecture/index.js +20 -1340
  38. package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
  39. package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
  40. package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
  41. package/dist/components/docs/comparison/ComparisonOverviewPage.js +1 -202
  42. package/dist/components/docs/comparison/ComparisonWindmillPage.js +1 -254
  43. package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
  44. package/dist/components/docs/comparison/index.js +1 -1510
  45. package/dist/components/docs/docsManifest.js +1 -611
  46. package/dist/components/docs/docsManifest.test.d.ts +1 -0
  47. package/dist/components/docs/ecosystem/IntegrationsPage.js +2 -103
  48. package/dist/components/docs/ecosystem/PluginsPage.js +13 -179
  49. package/dist/components/docs/ecosystem/RegistryPage.js +7 -100
  50. package/dist/components/docs/ecosystem/TemplatesPage.js +3 -141
  51. package/dist/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
  52. package/dist/components/docs/ecosystem/index.js +23 -569
  53. package/dist/components/docs/examples/DocsExamplesPage.js +4 -124
  54. package/dist/components/docs/examples/ExampleShowcasePage.js +4 -244
  55. package/dist/components/docs/examples/exampleShowcaseData.js +4 -39
  56. package/dist/components/docs/examples/index.js +4 -330
  57. package/dist/components/docs/generated/docs-index.generated.js +1 -5
  58. package/dist/components/docs/generated/index.js +1 -74
  59. package/dist/components/docs/generated/loader.js +1 -74
  60. package/dist/components/docs/getting-started/CLIPage.js +4 -271
  61. package/dist/components/docs/getting-started/CompatibilityPage.js +1 -173
  62. package/dist/components/docs/getting-started/DataViewTutorialPage.js +4 -134
  63. package/dist/components/docs/getting-started/DeveloperToolsPage.js +1 -194
  64. package/dist/components/docs/getting-started/HelloWorldPage.js +5 -183
  65. package/dist/components/docs/getting-started/InstallationPage.js +3 -154
  66. package/dist/components/docs/getting-started/StartHerePage.js +2 -129
  67. package/dist/components/docs/getting-started/TroubleshootingPage.js +2 -168
  68. package/dist/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
  69. package/dist/components/docs/getting-started/getting-started.docblocks.js +4 -41
  70. package/dist/components/docs/getting-started/index.js +18 -1869
  71. package/dist/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
  72. package/dist/components/docs/guides/GuideConnectInRepoPage.d.ts +1 -0
  73. package/dist/components/docs/guides/GuideConnectInRepoPage.js +44 -0
  74. package/dist/components/docs/guides/GuideContractTypesPage.js +6 -541
  75. package/dist/components/docs/guides/GuideDocsPipelinePage.js +3 -207
  76. package/dist/components/docs/guides/GuideFirstModuleBundlePage.d.ts +1 -0
  77. package/dist/components/docs/guides/GuideFirstModuleBundlePage.js +76 -0
  78. package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
  79. package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.d.ts +1 -0
  80. package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +70 -0
  81. package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
  82. package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
  83. package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
  84. package/dist/components/docs/guides/GuidesIndexPage.js +2 -169
  85. package/dist/components/docs/guides/guides.docblocks.js +11 -75
  86. package/dist/components/docs/guides/index.d.ts +3 -0
  87. package/dist/components/docs/guides/index.js +213 -2428
  88. package/dist/components/docs/index.js +542 -24297
  89. package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
  90. package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
  91. package/dist/components/docs/integrations/IntegrationsGithubPage.js +3 -142
  92. package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -109
  93. package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
  94. package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
  95. package/dist/components/docs/integrations/IntegrationsMistralPage.js +5 -150
  96. package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
  97. package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
  98. package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
  99. package/dist/components/docs/integrations/IntegrationsPowensPage.js +4 -300
  100. package/dist/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
  101. package/dist/components/docs/integrations/IntegrationsResendPage.js +3 -102
  102. package/dist/components/docs/integrations/IntegrationsS3Page.js +4 -124
  103. package/dist/components/docs/integrations/IntegrationsSlackPage.js +3 -144
  104. package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
  105. package/dist/components/docs/integrations/IntegrationsStripePage.js +6 -327
  106. package/dist/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
  107. package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
  108. package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
  109. package/dist/components/docs/integrations/index.js +52 -3100
  110. package/dist/components/docs/intent/ContractFirstApiPage.js +2 -126
  111. package/dist/components/docs/intent/DeterministicCodegenPage.js +2 -148
  112. package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
  113. package/dist/components/docs/intent/OpenapiAlternativePage.js +3 -201
  114. package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
  115. package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
  116. package/dist/components/docs/intent/index.js +15 -1135
  117. package/dist/components/docs/intent/intent-pages.docblocks.js +1 -201
  118. package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
  119. package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
  120. package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
  121. package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
  122. package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
  123. package/dist/components/docs/knowledge/index.js +21 -1730
  124. package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
  125. package/dist/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
  126. package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
  127. package/dist/components/docs/libraries/LibrariesContentGenPage.js +2 -100
  128. package/dist/components/docs/libraries/LibrariesContractsPage.js +2 -284
  129. package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
  130. package/dist/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
  131. package/dist/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
  132. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
  133. package/dist/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
  134. package/dist/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
  135. package/dist/components/docs/libraries/LibrariesGrowthPage.js +3 -88
  136. package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
  137. package/dist/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
  138. package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
  139. package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -170
  140. package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
  141. package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
  142. package/dist/components/docs/libraries/LibrariesResiliencePage.js +4 -120
  143. package/dist/components/docs/libraries/LibrariesRuntimePage.js +2 -200
  144. package/dist/components/docs/libraries/LibrariesSLOPage.js +3 -116
  145. package/dist/components/docs/libraries/LibrariesSchemaPage.js +3 -273
  146. package/dist/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
  147. package/dist/components/docs/libraries/LibrariesTestingPage.js +3 -133
  148. package/dist/components/docs/libraries/LibrariesUIKitPage.js +2 -230
  149. package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
  150. package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
  151. package/dist/components/docs/libraries/index.js +54 -4147
  152. package/dist/components/docs/manifesto/ManifestoPage.js +1 -86
  153. package/dist/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
  154. package/dist/components/docs/ops/DistributedTracingOpsPage.js +2 -71
  155. package/dist/components/docs/ops/index.js +3 -202
  156. package/dist/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
  157. package/dist/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
  158. package/dist/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
  159. package/dist/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
  160. package/dist/components/docs/ops/ops-top.docs.js +2 -17
  161. package/dist/components/docs/ops/ops.docs.js +10 -302
  162. package/dist/components/docs/product/product.docblocks.js +5 -72
  163. package/dist/components/docs/reference/DocsMarkdownContent.js +2 -196
  164. package/dist/components/docs/reference/DocsReferenceContent.js +3 -256
  165. package/dist/components/docs/reference/DocsReferenceIndexClient.js +2 -127
  166. package/dist/components/docs/reference/DocsReferenceIndexPage.js +2 -206
  167. package/dist/components/docs/reference/DocsReferencePage.js +3 -265
  168. package/dist/components/docs/reference/docsMarkdownParser.js +2 -92
  169. package/dist/components/docs/reference/index.js +4 -470
  170. package/dist/components/docs/safety/SafetyAuditingPage.js +2 -350
  171. package/dist/components/docs/safety/SafetyMigrationsPage.js +2 -359
  172. package/dist/components/docs/safety/SafetyOverviewPage.js +1 -101
  173. package/dist/components/docs/safety/SafetyPDPPage.js +2 -301
  174. package/dist/components/docs/safety/SafetySecurityTrustPage.js +1 -206
  175. package/dist/components/docs/safety/SafetySigningPage.js +3 -90
  176. package/dist/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
  177. package/dist/components/docs/safety/index.js +7 -1480
  178. package/dist/components/docs/shared/StudioPrompt.js +1 -31
  179. package/dist/components/docs/specs/SpecsBuilderControlPlanePage.d.ts +1 -0
  180. package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +34 -0
  181. package/dist/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
  182. package/dist/components/docs/specs/SpecsConnectPage.d.ts +1 -0
  183. package/dist/components/docs/specs/SpecsConnectPage.js +8 -0
  184. package/dist/components/docs/specs/SpecsDataViewsPage.js +2 -260
  185. package/dist/components/docs/specs/SpecsModuleBundlesPage.d.ts +1 -0
  186. package/dist/components/docs/specs/SpecsModuleBundlesPage.js +67 -0
  187. package/dist/components/docs/specs/SpecsOverlaysPage.js +2 -372
  188. package/dist/components/docs/specs/SpecsOverviewPage.js +1 -186
  189. package/dist/components/docs/specs/SpecsPolicyPage.js +3 -420
  190. package/dist/components/docs/specs/SpecsWorkflowsPage.js +2 -312
  191. package/dist/components/docs/specs/index.d.ts +3 -0
  192. package/dist/components/docs/specs/index.js +109 -1702
  193. package/dist/components/docs/studio/StudioBYOKPage.js +1 -26
  194. package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -26
  195. package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -26
  196. package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -26
  197. package/dist/components/docs/studio/StudioOverviewPage.js +1 -157
  198. package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -26
  199. package/dist/components/docs/studio/index.js +1 -282
  200. package/dist/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
  201. package/dist/components/integrations/index.js +2 -600
  202. package/dist/components/integrations/molecules/IntegrationCard.js +1 -100
  203. package/dist/components/integrations/organisms/IntegrationMarketplace.js +1 -214
  204. package/dist/components/integrations/organisms/IntegrationSettings.js +2 -284
  205. package/dist/components/integrations/organisms/KnowledgeSourceList.js +1 -103
  206. package/dist/components/legal/PrivacyTemplate.js +1 -1025
  207. package/dist/components/legal/TermsTemplate.js +1 -941
  208. package/dist/components/legal/index.js +1 -1963
  209. package/dist/components/shared/FeatureGateNotice.js +1 -38
  210. package/dist/components/shared/index.js +1 -38
  211. package/dist/components/shell/WorkspaceHeader.js +1 -100
  212. package/dist/components/shell/WorkspaceProjectShellLayout.js +1 -222
  213. package/dist/components/shell/WorkspaceShellRenderer.js +1 -228
  214. package/dist/components/shell/WorkspaceSidebar.js +1 -68
  215. package/dist/components/shell/index.js +1 -287
  216. package/dist/components/templates/engine/index.js +1 -39
  217. package/dist/components/templates/index.js +11 -965
  218. package/dist/components/templates/messaging/ConversationList.js +2 -83
  219. package/dist/components/templates/messaging/MessageComposer.js +4 -150
  220. package/dist/components/templates/messaging/MessageThread.js +3 -83
  221. package/dist/components/templates/messaging/MessagingWorkspace.js +5 -265
  222. package/dist/components/templates/messaging/index.js +5 -269
  223. package/dist/components/templates/recipes/LanguageSwitcher.js +1 -16
  224. package/dist/components/templates/recipes/RecipeCard.js +1 -80
  225. package/dist/components/templates/recipes/RecipeDetail.js +1 -74
  226. package/dist/components/templates/recipes/RecipeList.js +3 -245
  227. package/dist/components/templates/recipes/index.js +3 -248
  228. package/dist/components/templates/todos/FilterBar.js +1 -107
  229. package/dist/components/templates/todos/TaskForm.js +2 -158
  230. package/dist/components/templates/todos/TaskItem.js +1 -77
  231. package/dist/components/templates/todos/TaskList.js +5 -449
  232. package/dist/components/templates/todos/index.js +5 -452
  233. package/dist/config/contractspec-blueprint.js +1 -123
  234. package/dist/config/contractspec-branding.js +1 -44
  235. package/dist/config/contractspec-routes.js +1 -24
  236. package/dist/config/index.js +1 -126
  237. package/dist/features/contracts-registry.js +1 -178
  238. package/dist/features/docs/docs.contracts.js +1 -17
  239. package/dist/features/docs/index.js +1 -17
  240. package/dist/features/docs.feature.js +1 -33
  241. package/dist/features/index.js +1 -315
  242. package/dist/features/mcp.feature.js +1 -30
  243. package/dist/features/presentations.feature.js +1 -33
  244. package/dist/features/registry.js +1 -116
  245. package/dist/index.js +556 -28580
  246. package/dist/infrastructure/elysia/index.js +1 -35
  247. package/dist/infrastructure/elysia/logger.js +1 -35
  248. package/dist/infrastructure/index.js +1 -35
  249. package/dist/libs/email/client.js +1 -114
  250. package/dist/libs/email/contact.js +12 -165
  251. package/dist/libs/email/newsletter.js +6 -167
  252. package/dist/libs/email/types.js +0 -2
  253. package/dist/libs/email/utils.js +2 -8
  254. package/dist/libs/email/waitlist-application.js +28 -209
  255. package/dist/libs/email/waitlist.js +6 -167
  256. package/dist/libs/email.js +46 -363
  257. package/dist/libs/posthog/client.js +1 -63
  258. package/dist/libs/posthog/native.js +1 -23
  259. package/dist/libs/posthog/server.js +1 -13
  260. package/dist/libs/pricing-examples.js +1 -18
  261. package/dist/node/application/context-storage/index.js +1 -28
  262. package/dist/node/application/index.js +13 -2133
  263. package/dist/node/application/mcp/cliMcp.js +4 -452
  264. package/dist/node/application/mcp/common.js +1 -193
  265. package/dist/node/application/mcp/contractsMcp.js +2 -549
  266. package/dist/node/application/mcp/contractsMcpResources.js +2 -123
  267. package/dist/node/application/mcp/contractsMcpTools.js +1 -199
  268. package/dist/node/application/mcp/docsMcp.catalog.js +3 -381
  269. package/dist/node/application/mcp/docsMcp.data.js +1 -147
  270. package/dist/node/application/mcp/docsMcp.js +6 -1039
  271. package/dist/node/application/mcp/docsMcp.prompts.js +6 -521
  272. package/dist/node/application/mcp/docsMcp.reference.js +3 -235
  273. package/dist/node/application/mcp/docsMcp.resources.js +3 -519
  274. package/dist/node/application/mcp/docsMcp.tools.js +3 -518
  275. package/dist/node/application/mcp/index.js +13 -2106
  276. package/dist/node/application/mcp/internalMcp.js +2 -410
  277. package/dist/node/application/mcp/normalizeMcpRequest.js +1 -21
  278. package/dist/node/application/mcp/providerRankingMcp.js +1 -530
  279. package/dist/node/bundles/LibraryBundle.js +1 -138
  280. package/dist/node/bundles/index.js +1 -138
  281. package/dist/node/components/docs/DocsIndexPage.js +2 -912
  282. package/dist/node/components/docs/advanced/AdvancedMCPPage.js +4 -271
  283. package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
  284. package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +2 -118
  285. package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
  286. package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
  287. package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
  288. package/dist/node/components/docs/advanced/index.js +10 -1055
  289. package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
  290. package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
  291. package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
  292. package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
  293. package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
  294. package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
  295. package/dist/node/components/docs/architecture/index.js +20 -1340
  296. package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
  297. package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
  298. package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
  299. package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +1 -202
  300. package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +1 -254
  301. package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
  302. package/dist/node/components/docs/comparison/index.js +1 -1510
  303. package/dist/node/components/docs/docsManifest.js +1 -611
  304. package/dist/node/components/docs/ecosystem/IntegrationsPage.js +2 -103
  305. package/dist/node/components/docs/ecosystem/PluginsPage.js +13 -179
  306. package/dist/node/components/docs/ecosystem/RegistryPage.js +7 -100
  307. package/dist/node/components/docs/ecosystem/TemplatesPage.js +3 -141
  308. package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
  309. package/dist/node/components/docs/ecosystem/index.js +23 -569
  310. package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -124
  311. package/dist/node/components/docs/examples/ExampleShowcasePage.js +4 -244
  312. package/dist/node/components/docs/examples/exampleShowcaseData.js +4 -39
  313. package/dist/node/components/docs/examples/index.js +4 -330
  314. package/dist/node/components/docs/generated/docs-index.generated.js +1 -5
  315. package/dist/node/components/docs/generated/index.js +1 -74
  316. package/dist/node/components/docs/generated/loader.js +1 -74
  317. package/dist/node/components/docs/getting-started/CLIPage.js +4 -271
  318. package/dist/node/components/docs/getting-started/CompatibilityPage.js +1 -173
  319. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +4 -134
  320. package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +1 -194
  321. package/dist/node/components/docs/getting-started/HelloWorldPage.js +5 -183
  322. package/dist/node/components/docs/getting-started/InstallationPage.js +3 -154
  323. package/dist/node/components/docs/getting-started/StartHerePage.js +2 -129
  324. package/dist/node/components/docs/getting-started/TroubleshootingPage.js +2 -168
  325. package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
  326. package/dist/node/components/docs/getting-started/getting-started.docblocks.js +4 -41
  327. package/dist/node/components/docs/getting-started/index.js +18 -1869
  328. package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
  329. package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +43 -0
  330. package/dist/node/components/docs/guides/GuideContractTypesPage.js +6 -541
  331. package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +3 -207
  332. package/dist/node/components/docs/guides/GuideFirstModuleBundlePage.js +75 -0
  333. package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
  334. package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +69 -0
  335. package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
  336. package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
  337. package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
  338. package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -169
  339. package/dist/node/components/docs/guides/guides.docblocks.js +11 -75
  340. package/dist/node/components/docs/guides/index.js +213 -2428
  341. package/dist/node/components/docs/index.js +542 -24297
  342. package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
  343. package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
  344. package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +3 -142
  345. package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -109
  346. package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
  347. package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
  348. package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +5 -150
  349. package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
  350. package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
  351. package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
  352. package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +4 -300
  353. package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
  354. package/dist/node/components/docs/integrations/IntegrationsResendPage.js +3 -102
  355. package/dist/node/components/docs/integrations/IntegrationsS3Page.js +4 -124
  356. package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +3 -144
  357. package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
  358. package/dist/node/components/docs/integrations/IntegrationsStripePage.js +6 -327
  359. package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
  360. package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
  361. package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
  362. package/dist/node/components/docs/integrations/index.js +52 -3100
  363. package/dist/node/components/docs/intent/ContractFirstApiPage.js +2 -126
  364. package/dist/node/components/docs/intent/DeterministicCodegenPage.js +2 -148
  365. package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
  366. package/dist/node/components/docs/intent/OpenapiAlternativePage.js +3 -201
  367. package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
  368. package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
  369. package/dist/node/components/docs/intent/index.js +15 -1135
  370. package/dist/node/components/docs/intent/intent-pages.docblocks.js +1 -201
  371. package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
  372. package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
  373. package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
  374. package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
  375. package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
  376. package/dist/node/components/docs/knowledge/index.js +21 -1730
  377. package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
  378. package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
  379. package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
  380. package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +2 -100
  381. package/dist/node/components/docs/libraries/LibrariesContractsPage.js +2 -284
  382. package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
  383. package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
  384. package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
  385. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
  386. package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
  387. package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
  388. package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +3 -88
  389. package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
  390. package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
  391. package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
  392. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -170
  393. package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
  394. package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
  395. package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +4 -120
  396. package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +2 -200
  397. package/dist/node/components/docs/libraries/LibrariesSLOPage.js +3 -116
  398. package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +3 -273
  399. package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
  400. package/dist/node/components/docs/libraries/LibrariesTestingPage.js +3 -133
  401. package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +2 -230
  402. package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
  403. package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
  404. package/dist/node/components/docs/libraries/index.js +54 -4147
  405. package/dist/node/components/docs/manifesto/ManifestoPage.js +1 -86
  406. package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
  407. package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +2 -71
  408. package/dist/node/components/docs/ops/index.js +3 -202
  409. package/dist/node/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
  410. package/dist/node/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
  411. package/dist/node/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
  412. package/dist/node/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
  413. package/dist/node/components/docs/ops/ops-top.docs.js +2 -17
  414. package/dist/node/components/docs/ops/ops.docs.js +10 -302
  415. package/dist/node/components/docs/product/product.docblocks.js +5 -72
  416. package/dist/node/components/docs/reference/DocsMarkdownContent.js +2 -196
  417. package/dist/node/components/docs/reference/DocsReferenceContent.js +3 -256
  418. package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +2 -127
  419. package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +2 -206
  420. package/dist/node/components/docs/reference/DocsReferencePage.js +3 -265
  421. package/dist/node/components/docs/reference/docsMarkdownParser.js +2 -92
  422. package/dist/node/components/docs/reference/index.js +4 -470
  423. package/dist/node/components/docs/safety/SafetyAuditingPage.js +2 -350
  424. package/dist/node/components/docs/safety/SafetyMigrationsPage.js +2 -359
  425. package/dist/node/components/docs/safety/SafetyOverviewPage.js +1 -101
  426. package/dist/node/components/docs/safety/SafetyPDPPage.js +2 -301
  427. package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +1 -206
  428. package/dist/node/components/docs/safety/SafetySigningPage.js +3 -90
  429. package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
  430. package/dist/node/components/docs/safety/index.js +7 -1480
  431. package/dist/node/components/docs/shared/StudioPrompt.js +1 -31
  432. package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +33 -0
  433. package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
  434. package/dist/node/components/docs/specs/SpecsConnectPage.js +7 -0
  435. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +2 -260
  436. package/dist/node/components/docs/specs/SpecsModuleBundlesPage.js +66 -0
  437. package/dist/node/components/docs/specs/SpecsOverlaysPage.js +2 -372
  438. package/dist/node/components/docs/specs/SpecsOverviewPage.js +1 -186
  439. package/dist/node/components/docs/specs/SpecsPolicyPage.js +3 -420
  440. package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +2 -312
  441. package/dist/node/components/docs/specs/index.js +109 -1702
  442. package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -26
  443. package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -26
  444. package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -26
  445. package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -26
  446. package/dist/node/components/docs/studio/StudioOverviewPage.js +1 -157
  447. package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -26
  448. package/dist/node/components/docs/studio/index.js +1 -282
  449. package/dist/node/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
  450. package/dist/node/components/integrations/index.js +2 -600
  451. package/dist/node/components/integrations/molecules/IntegrationCard.js +1 -100
  452. package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +1 -214
  453. package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -284
  454. package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +1 -103
  455. package/dist/node/components/legal/PrivacyTemplate.js +1 -1025
  456. package/dist/node/components/legal/TermsTemplate.js +1 -941
  457. package/dist/node/components/legal/index.js +1 -1963
  458. package/dist/node/components/shared/FeatureGateNotice.js +1 -38
  459. package/dist/node/components/shared/index.js +1 -38
  460. package/dist/node/components/shell/WorkspaceHeader.js +1 -100
  461. package/dist/node/components/shell/WorkspaceProjectShellLayout.js +1 -222
  462. package/dist/node/components/shell/WorkspaceShellRenderer.js +1 -228
  463. package/dist/node/components/shell/WorkspaceSidebar.js +1 -68
  464. package/dist/node/components/shell/index.js +1 -287
  465. package/dist/node/components/templates/engine/index.js +1 -39
  466. package/dist/node/components/templates/index.js +11 -965
  467. package/dist/node/components/templates/messaging/ConversationList.js +2 -83
  468. package/dist/node/components/templates/messaging/MessageComposer.js +4 -150
  469. package/dist/node/components/templates/messaging/MessageThread.js +3 -83
  470. package/dist/node/components/templates/messaging/MessagingWorkspace.js +5 -265
  471. package/dist/node/components/templates/messaging/index.js +5 -269
  472. package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -16
  473. package/dist/node/components/templates/recipes/RecipeCard.js +1 -80
  474. package/dist/node/components/templates/recipes/RecipeDetail.js +1 -74
  475. package/dist/node/components/templates/recipes/RecipeList.js +3 -245
  476. package/dist/node/components/templates/recipes/index.js +3 -248
  477. package/dist/node/components/templates/todos/FilterBar.js +1 -107
  478. package/dist/node/components/templates/todos/TaskForm.js +2 -158
  479. package/dist/node/components/templates/todos/TaskItem.js +1 -77
  480. package/dist/node/components/templates/todos/TaskList.js +5 -449
  481. package/dist/node/components/templates/todos/index.js +5 -452
  482. package/dist/node/config/contractspec-blueprint.js +1 -123
  483. package/dist/node/config/contractspec-branding.js +1 -44
  484. package/dist/node/config/contractspec-routes.js +1 -24
  485. package/dist/node/config/index.js +1 -126
  486. package/dist/node/features/contracts-registry.js +1 -178
  487. package/dist/node/features/docs/docs.contracts.js +1 -17
  488. package/dist/node/features/docs/index.js +1 -17
  489. package/dist/node/features/docs.feature.js +1 -33
  490. package/dist/node/features/index.js +1 -315
  491. package/dist/node/features/mcp.feature.js +1 -30
  492. package/dist/node/features/presentations.feature.js +1 -33
  493. package/dist/node/features/registry.js +1 -116
  494. package/dist/node/index.js +556 -28580
  495. package/dist/node/infrastructure/elysia/index.js +1 -35
  496. package/dist/node/infrastructure/elysia/logger.js +1 -35
  497. package/dist/node/infrastructure/index.js +1 -35
  498. package/dist/node/libs/email/client.js +1 -114
  499. package/dist/node/libs/email/contact.js +12 -165
  500. package/dist/node/libs/email/newsletter.js +6 -167
  501. package/dist/node/libs/email/types.js +0 -2
  502. package/dist/node/libs/email/utils.js +2 -8
  503. package/dist/node/libs/email/waitlist-application.js +28 -209
  504. package/dist/node/libs/email/waitlist.js +6 -167
  505. package/dist/node/libs/email.js +46 -363
  506. package/dist/node/libs/posthog/client.js +1 -63
  507. package/dist/node/libs/posthog/native.js +1 -23
  508. package/dist/node/libs/posthog/server.js +1 -13
  509. package/dist/node/libs/pricing-examples.js +1 -18
  510. package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
  511. package/dist/node/presentation/features/atoms/FeatureIcon/index.js +1 -97
  512. package/dist/node/presentation/features/atoms/index.js +1 -97
  513. package/dist/node/presentation/features/hooks/index.js +1 -397
  514. package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -289
  515. package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -75
  516. package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -147
  517. package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -28
  518. package/dist/node/presentation/features/index.js +1 -3063
  519. package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
  520. package/dist/node/presentation/features/molecules/FeatureCard/index.js +1 -366
  521. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
  522. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
  523. package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
  524. package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -92
  525. package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
  526. package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
  527. package/dist/node/presentation/features/molecules/index.js +1 -505
  528. package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -304
  529. package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
  530. package/dist/node/presentation/features/organisms/FeatureDetail/index.js +1 -154
  531. package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
  532. package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
  533. package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -302
  534. package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -302
  535. package/dist/node/presentation/features/organisms/FeatureOperationsList.js +1 -180
  536. package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -304
  537. package/dist/node/presentation/features/organisms/index.js +1 -1359
  538. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
  539. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
  540. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
  541. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
  542. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
  543. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
  544. package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
  545. package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
  546. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
  547. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
  548. package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
  549. package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
  550. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
  551. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
  552. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
  553. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
  554. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
  555. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
  556. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
  557. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
  558. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
  559. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
  560. package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
  561. package/dist/presentation/features/atoms/FeatureIcon/index.js +1 -97
  562. package/dist/presentation/features/atoms/index.js +1 -97
  563. package/dist/presentation/features/hooks/index.js +1 -397
  564. package/dist/presentation/features/hooks/useContractsRegistry.js +1 -289
  565. package/dist/presentation/features/hooks/useFeatureFilters.js +1 -75
  566. package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -147
  567. package/dist/presentation/features/hooks/useRelatedDocs.js +1 -28
  568. package/dist/presentation/features/index.js +1 -3063
  569. package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
  570. package/dist/presentation/features/molecules/FeatureCard/index.js +1 -366
  571. package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
  572. package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
  573. package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
  574. package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -92
  575. package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
  576. package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
  577. package/dist/presentation/features/molecules/index.js +1 -505
  578. package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -304
  579. package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
  580. package/dist/presentation/features/organisms/FeatureDetail/index.js +1 -154
  581. package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
  582. package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
  583. package/dist/presentation/features/organisms/FeatureEventsList.js +1 -302
  584. package/dist/presentation/features/organisms/FeatureFormsList.js +1 -302
  585. package/dist/presentation/features/organisms/FeatureOperationsList.js +1 -180
  586. package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -304
  587. package/dist/presentation/features/organisms/index.js +1 -1359
  588. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
  589. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
  590. package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
  591. package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
  592. package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
  593. package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
  594. package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
  595. package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
  596. package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
  597. package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
  598. package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
  599. package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
  600. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
  601. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
  602. package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
  603. package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
  604. package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
  605. package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
  606. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
  607. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
  608. package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
  609. package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
  610. package/package.json +109 -37
  611. package/src/components/docs/DocsIndexPage.tsx +55 -0
  612. package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +19 -0
  613. package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +34 -0
  614. package/src/components/docs/docsManifest.test.ts +70 -0
  615. package/src/components/docs/docsManifest.ts +71 -1
  616. package/src/components/docs/ecosystem/PluginsPage.tsx +24 -10
  617. package/src/components/docs/ecosystem/RegistryPage.tsx +11 -6
  618. package/src/components/docs/generated/docs-index._common.json +206 -273
  619. package/src/components/docs/generated/docs-index.control-plane.json +18 -0
  620. package/src/components/docs/generated/docs-index.defineExample.json +10 -0
  621. package/src/components/docs/generated/docs-index.manifest.json +22 -12
  622. package/src/components/docs/generated/docs-index.platform-acp.json +64 -0
  623. package/src/components/docs/generated/docs-index.platform-agent.json +89 -1
  624. package/src/components/docs/generated/docs-index.platform-context.json +48 -0
  625. package/src/components/docs/generated/docs-index.platform-control-plane.json +72 -0
  626. package/src/components/docs/generated/docs-index.platform-database.json +40 -0
  627. package/src/components/docs/generated/docs-index.platform-docs.json +64 -0
  628. package/src/components/docs/generated/docs-index.platform-provider-ranking.json +89 -1
  629. package/src/components/docs/generated/docs-index.pocket-family-office.json +8 -0
  630. package/src/components/docs/generated/docs-index.unknown.json +8 -0
  631. package/src/components/docs/guides/GuideConnectInRepoPage.tsx +184 -0
  632. package/src/components/docs/guides/GuideFirstModuleBundlePage.tsx +182 -0
  633. package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +230 -0
  634. package/src/components/docs/guides/GuidesIndexPage.tsx +21 -0
  635. package/src/components/docs/guides/index.ts +3 -0
  636. package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +210 -0
  637. package/src/components/docs/specs/SpecsConnectPage.tsx +162 -0
  638. package/src/components/docs/specs/SpecsModuleBundlesPage.tsx +223 -0
  639. package/src/components/docs/specs/SpecsOverlaysPage.tsx +20 -0
  640. package/src/components/docs/specs/SpecsOverviewPage.tsx +44 -0
  641. package/src/components/docs/specs/SpecsWorkflowsPage.tsx +9 -1
  642. package/src/components/docs/specs/index.ts +3 -0
  643. package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
  644. package/src/infrastructure/elysia/logger.ts +11 -3
@@ -1,121 +1,4 @@
1
- // src/components/docs/libraries/LibrariesAccessibilityPage.tsx
2
- import { CodeBlock, InstallCommand } from "@contractspec/lib.design-system";
3
- import Link from "@contractspec/lib.ui-link";
4
- import { ChevronRight } from "lucide-react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- function LibrariesAccessibilityPage() {
7
- return /* @__PURE__ */ jsxs("div", {
8
- className: "space-y-8",
9
- children: [
10
- /* @__PURE__ */ jsxs("div", {
11
- className: "space-y-4",
12
- children: [
13
- /* @__PURE__ */ jsx("h1", {
14
- className: "font-bold text-4xl",
15
- children: "@contractspec/lib.accessibility"
16
- }),
17
- /* @__PURE__ */ jsx("p", {
18
- className: "text-muted-foreground",
19
- children: "Stable exports of accessibility primitives for LSSM web apps, ensuring WCAG compliance and inclusive design."
20
- })
21
- ]
22
- }),
23
- /* @__PURE__ */ jsxs("div", {
24
- className: "space-y-4",
25
- children: [
26
- /* @__PURE__ */ jsx("h2", {
27
- className: "font-bold text-2xl",
28
- children: "Installation"
29
- }),
30
- /* @__PURE__ */ jsx(InstallCommand, {
31
- package: "@contractspec/lib.accessibility"
32
- })
33
- ]
34
- }),
35
- /* @__PURE__ */ jsxs("div", {
36
- className: "space-y-4",
37
- children: [
38
- /* @__PURE__ */ jsx("h2", {
39
- className: "font-bold text-2xl",
40
- children: "Exports"
41
- }),
42
- /* @__PURE__ */ jsxs("ul", {
43
- className: "space-y-2 text-muted-foreground",
44
- children: [
45
- /* @__PURE__ */ jsxs("li", {
46
- children: [
47
- /* @__PURE__ */ jsx("code", {
48
- className: "rounded bg-background/50 px-2 py-1",
49
- children: "SkipLink"
50
- }),
51
- ": A link to skip navigation, visible on focus"
52
- ]
53
- }),
54
- /* @__PURE__ */ jsxs("li", {
55
- children: [
56
- /* @__PURE__ */ jsx("code", {
57
- className: "rounded bg-background/50 px-2 py-1",
58
- children: "VisuallyHidden"
59
- }),
60
- ": Hide content visually but keep it for screen readers"
61
- ]
62
- }),
63
- /* @__PURE__ */ jsxs("li", {
64
- children: [
65
- /* @__PURE__ */ jsx("code", {
66
- className: "rounded bg-background/50 px-2 py-1",
67
- children: "SRLiveRegionProvider"
68
- }),
69
- ",",
70
- " ",
71
- /* @__PURE__ */ jsx("code", {
72
- className: "rounded bg-background/50 px-2 py-1",
73
- children: "useSRLiveRegion"
74
- }),
75
- ": Manage live region announcements"
76
- ]
77
- }),
78
- /* @__PURE__ */ jsxs("li", {
79
- children: [
80
- /* @__PURE__ */ jsx("code", {
81
- className: "rounded bg-background/50 px-2 py-1",
82
- children: "RouteAnnouncer"
83
- }),
84
- ": Announce page title/path changes on navigation"
85
- ]
86
- }),
87
- /* @__PURE__ */ jsxs("li", {
88
- children: [
89
- /* @__PURE__ */ jsx("code", {
90
- className: "rounded bg-background/50 px-2 py-1",
91
- children: "FocusOnRouteChange"
92
- }),
93
- ": Reset focus to body or main content on navigation"
94
- ]
95
- }),
96
- /* @__PURE__ */ jsxs("li", {
97
- children: [
98
- /* @__PURE__ */ jsx("code", {
99
- className: "rounded bg-background/50 px-2 py-1",
100
- children: "useReducedMotion"
101
- }),
102
- ": Detect if the user prefers reduced motion"
103
- ]
104
- })
105
- ]
106
- })
107
- ]
108
- }),
109
- /* @__PURE__ */ jsxs("div", {
110
- className: "space-y-4",
111
- children: [
112
- /* @__PURE__ */ jsx("h2", {
113
- className: "font-bold text-2xl",
114
- children: "Example: App Setup"
115
- }),
116
- /* @__PURE__ */ jsx(CodeBlock, {
117
- language: "tsx",
118
- code: `import {
1
+ import{CodeBlock as de,InstallCommand as Ke}from"@contractspec/lib.design-system";import pe from"@contractspec/lib.ui-link";import{ChevronRight as Ze}from"lucide-react";import{jsx as c,jsxs as g}from"react/jsx-runtime";function Je(){return g("div",{className:"space-y-8",children:[g("div",{className:"space-y-4",children:[c("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.accessibility"}),c("p",{className:"text-muted-foreground",children:"Stable exports of accessibility primitives for LSSM web apps, ensuring WCAG compliance and inclusive design."})]}),g("div",{className:"space-y-4",children:[c("h2",{className:"font-bold text-2xl",children:"Installation"}),c(Ke,{package:"@contractspec/lib.accessibility"})]}),g("div",{className:"space-y-4",children:[c("h2",{className:"font-bold text-2xl",children:"Exports"}),g("ul",{className:"space-y-2 text-muted-foreground",children:[g("li",{children:[c("code",{className:"rounded bg-background/50 px-2 py-1",children:"SkipLink"}),": A link to skip navigation, visible on focus"]}),g("li",{children:[c("code",{className:"rounded bg-background/50 px-2 py-1",children:"VisuallyHidden"}),": Hide content visually but keep it for screen readers"]}),g("li",{children:[c("code",{className:"rounded bg-background/50 px-2 py-1",children:"SRLiveRegionProvider"}),","," ",c("code",{className:"rounded bg-background/50 px-2 py-1",children:"useSRLiveRegion"}),": Manage live region announcements"]}),g("li",{children:[c("code",{className:"rounded bg-background/50 px-2 py-1",children:"RouteAnnouncer"}),": Announce page title/path changes on navigation"]}),g("li",{children:[c("code",{className:"rounded bg-background/50 px-2 py-1",children:"FocusOnRouteChange"}),": Reset focus to body or main content on navigation"]}),g("li",{children:[c("code",{className:"rounded bg-background/50 px-2 py-1",children:"useReducedMotion"}),": Detect if the user prefers reduced motion"]})]})]}),g("div",{className:"space-y-4",children:[c("h2",{className:"font-bold text-2xl",children:"Example: App Setup"}),c(de,{language:"tsx",code:`import {
119
2
  SRLiveRegionProvider,
120
3
  RouteAnnouncer,
121
4
  SkipLink
@@ -135,20 +18,7 @@ export function RootLayout({ children }) {
135
18
  </body>
136
19
  </html>
137
20
  );
138
- }`
139
- })
140
- ]
141
- }),
142
- /* @__PURE__ */ jsxs("div", {
143
- className: "space-y-4",
144
- children: [
145
- /* @__PURE__ */ jsx("h2", {
146
- className: "font-bold text-2xl",
147
- children: "Example: Live Announcements"
148
- }),
149
- /* @__PURE__ */ jsx(CodeBlock, {
150
- language: "tsx",
151
- code: `import { useSRLiveRegion } from '@contractspec/lib.accessibility';
21
+ }`})]}),g("div",{className:"space-y-4",children:[c("h2",{className:"font-bold text-2xl",children:"Example: Live Announcements"}),c(de,{language:"tsx",code:`import { useSRLiveRegion } from '@contractspec/lib.accessibility';
152
22
 
153
23
  export function TodoList() {
154
24
  const { announce } = useSRLiveRegion();
@@ -159,114 +29,7 @@ export function TodoList() {
159
29
  };
160
30
 
161
31
  return <button onClick={addTodo}>Add Todo</button>;
162
- }`
163
- })
164
- ]
165
- }),
166
- /* @__PURE__ */ jsxs("div", {
167
- className: "space-y-4",
168
- children: [
169
- /* @__PURE__ */ jsx("h2", {
170
- className: "font-bold text-2xl",
171
- children: "WCAG Compliance"
172
- }),
173
- /* @__PURE__ */ jsxs("p", {
174
- className: "text-muted-foreground",
175
- children: [
176
- "These components map directly to WCAG 2.1 Level AA requirements documented in ",
177
- /* @__PURE__ */ jsx("code", {
178
- children: "docs/accessibility_wcag_compliance_specs.md"
179
- }),
180
- ":"
181
- ]
182
- }),
183
- /* @__PURE__ */ jsxs("ul", {
184
- className: "list-inside list-disc space-y-2 text-muted-foreground",
185
- children: [
186
- /* @__PURE__ */ jsx("li", {
187
- children: "2.4.1 Bypass Blocks (SkipLink)"
188
- }),
189
- /* @__PURE__ */ jsx("li", {
190
- children: "4.1.3 Status Messages (LiveRegion)"
191
- }),
192
- /* @__PURE__ */ jsx("li", {
193
- children: "2.4.3 Focus Order (FocusOnRouteChange)"
194
- }),
195
- /* @__PURE__ */ jsx("li", {
196
- children: "2.3.3 Animation from Interactions (useReducedMotion)"
197
- })
198
- ]
199
- })
200
- ]
201
- }),
202
- /* @__PURE__ */ jsxs("div", {
203
- className: "flex items-center gap-4 pt-4",
204
- children: [
205
- /* @__PURE__ */ jsx(Link, {
206
- href: "/docs/libraries/design-system",
207
- className: "btn-ghost",
208
- children: "Previous: Design System"
209
- }),
210
- /* @__PURE__ */ jsxs(Link, {
211
- href: "/docs/libraries",
212
- className: "btn-primary",
213
- children: [
214
- "Back to Libraries ",
215
- /* @__PURE__ */ jsx(ChevronRight, {
216
- size: 16
217
- })
218
- ]
219
- })
220
- ]
221
- })
222
- ]
223
- });
224
- }
225
-
226
- // src/components/docs/libraries/LibrariesAiAgentPage.tsx
227
- import { CodeBlock as CodeBlock2, InstallCommand as InstallCommand2 } from "@contractspec/lib.design-system";
228
- import Link2 from "@contractspec/lib.ui-link";
229
- import { ChevronRight as ChevronRight2 } from "lucide-react";
230
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
231
- function LibrariesAiAgentPage() {
232
- return /* @__PURE__ */ jsxs2("div", {
233
- className: "space-y-8",
234
- children: [
235
- /* @__PURE__ */ jsxs2("div", {
236
- className: "space-y-4",
237
- children: [
238
- /* @__PURE__ */ jsx2("h1", {
239
- className: "font-bold text-4xl",
240
- children: "@contractspec/lib.ai-agent"
241
- }),
242
- /* @__PURE__ */ jsx2("p", {
243
- className: "text-lg text-muted-foreground",
244
- children: "Define AI agents in TypeScript, run them with deterministic tool calling, capture working memory, and route low-confidence decisions to human reviewers."
245
- })
246
- ]
247
- }),
248
- /* @__PURE__ */ jsxs2("div", {
249
- className: "space-y-4",
250
- children: [
251
- /* @__PURE__ */ jsx2("h2", {
252
- className: "font-bold text-2xl",
253
- children: "Installation"
254
- }),
255
- /* @__PURE__ */ jsx2(InstallCommand2, {
256
- package: "@contractspec/lib.ai-agent"
257
- })
258
- ]
259
- }),
260
- /* @__PURE__ */ jsxs2("div", {
261
- className: "space-y-3",
262
- children: [
263
- /* @__PURE__ */ jsx2("h2", {
264
- className: "font-bold text-2xl",
265
- children: "Define & register"
266
- }),
267
- /* @__PURE__ */ jsx2(CodeBlock2, {
268
- language: "typescript",
269
- code: `import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
32
+ }`})]}),g("div",{className:"space-y-4",children:[c("h2",{className:"font-bold text-2xl",children:"WCAG Compliance"}),g("p",{className:"text-muted-foreground",children:["These components map directly to WCAG 2.1 Level AA requirements documented in ",c("code",{children:"docs/accessibility_wcag_compliance_specs.md"}),":"]}),g("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[c("li",{children:"2.4.1 Bypass Blocks (SkipLink)"}),c("li",{children:"4.1.3 Status Messages (LiveRegion)"}),c("li",{children:"2.4.3 Focus Order (FocusOnRouteChange)"}),c("li",{children:"2.3.3 Animation from Interactions (useReducedMotion)"})]})]}),g("div",{className:"flex items-center gap-4 pt-4",children:[c(pe,{href:"/docs/libraries/design-system",className:"btn-ghost",children:"Previous: Design System"}),g(pe,{href:"/docs/libraries",className:"btn-primary",children:["Back to Libraries ",c(Ze,{size:16})]})]})]})}import{CodeBlock as me,InstallCommand as Ye}from"@contractspec/lib.design-system";import ue from"@contractspec/lib.ui-link";import{ChevronRight as Xe}from"lucide-react";import{jsx as f,jsxs as z}from"react/jsx-runtime";function $e(){return z("div",{className:"space-y-8",children:[z("div",{className:"space-y-4",children:[f("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.ai-agent"}),f("p",{className:"text-lg text-muted-foreground",children:"Define AI agents in TypeScript, run them with deterministic tool calling, capture working memory, and route low-confidence decisions to human reviewers."})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Installation"}),f(Ye,{package:"@contractspec/lib.ai-agent"})]}),z("div",{className:"space-y-3",children:[f("h2",{className:"font-bold text-2xl",children:"Define & register"}),f(me,{language:"typescript",code:`import { defineAgent, AgentRegistry } from '@contractspec/lib.contracts-spec/agent';
270
33
 
271
34
  const SupportBot = defineAgent({
272
35
  meta: {
@@ -285,20 +48,7 @@ const SupportBot = defineAgent({
285
48
  },
286
49
  });
287
50
 
288
- const registry = new AgentRegistry().register(SupportBot);`
289
- })
290
- ]
291
- }),
292
- /* @__PURE__ */ jsxs2("div", {
293
- className: "space-y-3",
294
- children: [
295
- /* @__PURE__ */ jsx2("h2", {
296
- className: "font-bold text-2xl",
297
- children: "Run with approvals"
298
- }),
299
- /* @__PURE__ */ jsx2(CodeBlock2, {
300
- language: "typescript",
301
- code: `import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
51
+ const registry = new AgentRegistry().register(SupportBot);`})]}),z("div",{className:"space-y-3",children:[f("h2",{className:"font-bold text-2xl",children:"Run with approvals"}),f(me,{language:"typescript",code:`import { createUnifiedAgent, ApprovalWorkflow } from '@contractspec/lib.ai-agent';
302
52
 
303
53
  const approvals = new ApprovalWorkflow();
304
54
  const agent = createUnifiedAgent(SupportBot, {
@@ -308,129 +58,7 @@ const agent = createUnifiedAgent(SupportBot, {
308
58
 
309
59
  const result = await agent.run(ticket.body);
310
60
  // Route low-confidence or manual-review flows through approvals when needed.
311
- `
312
- })
313
- ]
314
- }),
315
- /* @__PURE__ */ jsxs2("div", {
316
- className: "space-y-3",
317
- children: [
318
- /* @__PURE__ */ jsx2("h2", {
319
- className: "font-bold text-2xl",
320
- children: "What's inside"
321
- }),
322
- /* @__PURE__ */ jsxs2("ul", {
323
- className: "list-inside list-disc space-y-2 text-muted-foreground",
324
- children: [
325
- /* @__PURE__ */ jsxs2("li", {
326
- children: [
327
- /* @__PURE__ */ jsx2("code", {
328
- children: "createUnifiedAgent"
329
- }),
330
- ", ",
331
- /* @__PURE__ */ jsx2("code", {
332
- children: "ContractSpecAgent"
333
- }),
334
- ",",
335
- " ",
336
- /* @__PURE__ */ jsx2("code", {
337
- children: "UnifiedAgent"
338
- })
339
- ]
340
- }),
341
- /* @__PURE__ */ jsx2("li", {
342
- children: "MCP, operation-backed, memory, and subagent tool adapters"
343
- }),
344
- /* @__PURE__ */ jsxs2("li", {
345
- children: [
346
- /* @__PURE__ */ jsx2("code", {
347
- children: "InMemoryAgentMemory"
348
- }),
349
- " plus interfaces for custom stores"
350
- ]
351
- }),
352
- /* @__PURE__ */ jsxs2("li", {
353
- children: [
354
- /* @__PURE__ */ jsx2("code", {
355
- children: "ApprovalWorkflow"
356
- }),
357
- " + ",
358
- /* @__PURE__ */ jsx2("code", {
359
- children: "ApprovalStore"
360
- }),
361
- " for human-in-the-loop reviews"
362
- ]
363
- })
364
- ]
365
- })
366
- ]
367
- }),
368
- /* @__PURE__ */ jsxs2("div", {
369
- className: "flex items-center gap-4 pt-4",
370
- children: [
371
- /* @__PURE__ */ jsx2(Link2, {
372
- href: "/docs/libraries",
373
- className: "btn-ghost",
374
- children: "Back to Libraries"
375
- }),
376
- /* @__PURE__ */ jsxs2(Link2, {
377
- href: "/docs/libraries/support-bot",
378
- className: "btn-primary",
379
- children: [
380
- "Next: Support Bot ",
381
- /* @__PURE__ */ jsx2(ChevronRight2, {
382
- size: 16
383
- })
384
- ]
385
- })
386
- ]
387
- })
388
- ]
389
- });
390
- }
391
-
392
- // src/components/docs/libraries/LibrariesAnalyticsPage.tsx
393
- import { CodeBlock as CodeBlock3, InstallCommand as InstallCommand3 } from "@contractspec/lib.design-system";
394
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
395
- function LibrariesAnalyticsPage() {
396
- return /* @__PURE__ */ jsxs3("div", {
397
- className: "space-y-8",
398
- children: [
399
- /* @__PURE__ */ jsxs3("div", {
400
- className: "space-y-4",
401
- children: [
402
- /* @__PURE__ */ jsx3("h1", {
403
- className: "font-bold text-4xl",
404
- children: "@contractspec/lib.analytics"
405
- }),
406
- /* @__PURE__ */ jsx3("p", {
407
- className: "text-lg text-muted-foreground",
408
- children: "Work directly with telemetry events to understand conversion, retention, churn, and growth opportunities."
409
- })
410
- ]
411
- }),
412
- /* @__PURE__ */ jsxs3("div", {
413
- className: "space-y-4",
414
- children: [
415
- /* @__PURE__ */ jsx3("h2", {
416
- className: "font-bold text-2xl",
417
- children: "Installation"
418
- }),
419
- /* @__PURE__ */ jsx3(InstallCommand3, {
420
- package: "@contractspec/lib.analytics"
421
- })
422
- ]
423
- }),
424
- /* @__PURE__ */ jsxs3("div", {
425
- className: "space-y-3",
426
- children: [
427
- /* @__PURE__ */ jsx3("h2", {
428
- className: "font-bold text-2xl",
429
- children: "Funnels in memory"
430
- }),
431
- /* @__PURE__ */ jsx3(CodeBlock3, {
432
- language: "typescript",
433
- code: `import { FunnelAnalyzer } from '@contractspec/lib.analytics/funnel';
61
+ `})]}),z("div",{className:"space-y-3",children:[f("h2",{className:"font-bold text-2xl",children:"What's inside"}),z("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[z("li",{children:[f("code",{children:"createUnifiedAgent"}),", ",f("code",{children:"ContractSpecAgent"}),","," ",f("code",{children:"UnifiedAgent"})]}),f("li",{children:"MCP, operation-backed, memory, and subagent tool adapters"}),z("li",{children:[f("code",{children:"InMemoryAgentMemory"})," plus interfaces for custom stores"]}),z("li",{children:[f("code",{children:"ApprovalWorkflow"})," + ",f("code",{children:"ApprovalStore"})," for human-in-the-loop reviews"]})]})]}),z("div",{className:"flex items-center gap-4 pt-4",children:[f(ue,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),z(ue,{href:"/docs/libraries/support-bot",className:"btn-primary",children:["Next: Support Bot ",f(Xe,{size:16})]})]})]})}import{CodeBlock as oe,InstallCommand as xe}from"@contractspec/lib.design-system";import{jsx as G,jsxs as ee}from"react/jsx-runtime";function je(){return ee("div",{className:"space-y-8",children:[ee("div",{className:"space-y-4",children:[G("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.analytics"}),G("p",{className:"text-lg text-muted-foreground",children:"Work directly with telemetry events to understand conversion, retention, churn, and growth opportunities."})]}),ee("div",{className:"space-y-4",children:[G("h2",{className:"font-bold text-2xl",children:"Installation"}),G(xe,{package:"@contractspec/lib.analytics"})]}),ee("div",{className:"space-y-3",children:[G("h2",{className:"font-bold text-2xl",children:"Funnels in memory"}),G(oe,{language:"typescript",code:`import { FunnelAnalyzer } from '@contractspec/lib.analytics/funnel';
434
62
 
435
63
  const analyzer = new FunnelAnalyzer();
436
64
  const report = analyzer.analyze(events, {
@@ -440,93 +68,16 @@ const report = analyzer.analyze(events, {
440
68
  { id: 'submit', eventName: 'signup.submit' },
441
69
  { id: 'verified', eventName: 'account.verified' },
442
70
  ],
443
- });`
444
- })
445
- ]
446
- }),
447
- /* @__PURE__ */ jsxs3("div", {
448
- className: "space-y-3",
449
- children: [
450
- /* @__PURE__ */ jsx3("h2", {
451
- className: "font-bold text-2xl",
452
- children: "Cohorts & churn"
453
- }),
454
- /* @__PURE__ */ jsx3(CodeBlock3, {
455
- language: "typescript",
456
- code: `import { CohortTracker } from '@contractspec/lib.analytics/cohort';
71
+ });`})]}),ee("div",{className:"space-y-3",children:[G("h2",{className:"font-bold text-2xl",children:"Cohorts & churn"}),G(oe,{language:"typescript",code:`import { CohortTracker } from '@contractspec/lib.analytics/cohort';
457
72
  import { ChurnPredictor } from '@contractspec/lib.analytics/churn';
458
73
 
459
74
  const cohorts = new CohortTracker().analyze(events, { bucket: 'week', periods: 8 });
460
- const churn = new ChurnPredictor().score(events);`
461
- })
462
- ]
463
- }),
464
- /* @__PURE__ */ jsxs3("div", {
465
- className: "space-y-3",
466
- children: [
467
- /* @__PURE__ */ jsx3("h2", {
468
- className: "font-bold text-2xl",
469
- children: "Growth hypotheses"
470
- }),
471
- /* @__PURE__ */ jsx3(CodeBlock3, {
472
- language: "typescript",
473
- code: `import { GrowthHypothesisGenerator } from '@contractspec/lib.analytics/growth';
75
+ const churn = new ChurnPredictor().score(events);`})]}),ee("div",{className:"space-y-3",children:[G("h2",{className:"font-bold text-2xl",children:"Growth hypotheses"}),G(oe,{language:"typescript",code:`import { GrowthHypothesisGenerator } from '@contractspec/lib.analytics/growth';
474
76
 
475
77
  const ideas = new GrowthHypothesisGenerator().generate([
476
78
  { name: 'Activation rate', current: 0.42, previous: 0.55, target: 0.6 },
477
79
  { name: 'Expansion ARPU', current: 1.2, previous: 0.9 },
478
- ]);`
479
- })
480
- ]
481
- })
482
- ]
483
- });
484
- }
485
-
486
- // src/components/docs/libraries/LibrariesContentGenPage.tsx
487
- import { CodeBlock as CodeBlock4, InstallCommand as InstallCommand4 } from "@contractspec/lib.design-system";
488
- import Link3 from "@contractspec/lib.ui-link";
489
- import { ChevronRight as ChevronRight3 } from "lucide-react";
490
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
491
- function LibrariesContentGenPage() {
492
- return /* @__PURE__ */ jsxs4("div", {
493
- className: "space-y-8",
494
- children: [
495
- /* @__PURE__ */ jsxs4("div", {
496
- className: "space-y-4",
497
- children: [
498
- /* @__PURE__ */ jsx4("h1", {
499
- className: "font-bold text-4xl",
500
- children: "@contractspec/lib.content-gen"
501
- }),
502
- /* @__PURE__ */ jsx4("p", {
503
- className: "text-lg text-muted-foreground",
504
- children: "Feed a single ContentBrief and produce cohesive marketing assets without touching a CMS."
505
- })
506
- ]
507
- }),
508
- /* @__PURE__ */ jsxs4("div", {
509
- className: "space-y-4",
510
- children: [
511
- /* @__PURE__ */ jsx4("h2", {
512
- className: "font-bold text-2xl",
513
- children: "Installation"
514
- }),
515
- /* @__PURE__ */ jsx4(InstallCommand4, {
516
- package: "@contractspec/lib.content-gen"
517
- })
518
- ]
519
- }),
520
- /* @__PURE__ */ jsxs4("div", {
521
- className: "space-y-3",
522
- children: [
523
- /* @__PURE__ */ jsx4("h2", {
524
- className: "font-bold text-2xl",
525
- children: "One brief, many assets"
526
- }),
527
- /* @__PURE__ */ jsx4(CodeBlock4, {
528
- language: "typescript",
529
- code: `import {
80
+ ]);`})]})]})}import{CodeBlock as et,InstallCommand as tt}from"@contractspec/lib.design-system";import ge from"@contractspec/lib.ui-link";import{ChevronRight as at}from"lucide-react";import{jsx as A,jsxs as J}from"react/jsx-runtime";function ot(){return J("div",{className:"space-y-8",children:[J("div",{className:"space-y-4",children:[A("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.content-gen"}),A("p",{className:"text-lg text-muted-foreground",children:"Feed a single ContentBrief and produce cohesive marketing assets without touching a CMS."})]}),J("div",{className:"space-y-4",children:[A("h2",{className:"font-bold text-2xl",children:"Installation"}),A(tt,{package:"@contractspec/lib.content-gen"})]}),J("div",{className:"space-y-3",children:[A("h2",{className:"font-bold text-2xl",children:"One brief, many assets"}),A(et,{language:"typescript",code:`import {
530
81
  BlogGenerator,
531
82
  LandingPageGenerator,
532
83
  EmailCampaignGenerator,
@@ -546,153 +97,7 @@ const blog = await new BlogGenerator().generate(brief);
546
97
  const landing = await new LandingPageGenerator().generate(brief);
547
98
  const email = await new EmailCampaignGenerator().generate({ brief, variant: 'announcement' });
548
99
  const social = await new SocialPostGenerator().generate(brief);
549
- const seo = new SeoOptimizer().optimize(brief);`
550
- })
551
- ]
552
- }),
553
- /* @__PURE__ */ jsxs4("div", {
554
- className: "space-y-3",
555
- children: [
556
- /* @__PURE__ */ jsx4("h2", {
557
- className: "font-bold text-2xl",
558
- children: "When to use"
559
- }),
560
- /* @__PURE__ */ jsxs4("ul", {
561
- className: "list-inside list-disc space-y-2 text-muted-foreground",
562
- children: [
563
- /* @__PURE__ */ jsx4("li", {
564
- children: "Ship landing page refreshes whenever specs change."
565
- }),
566
- /* @__PURE__ */ jsx4("li", {
567
- children: "Automate release emails + nurture sequences per vertical."
568
- }),
569
- /* @__PURE__ */ jsx4("li", {
570
- children: "Create social snippets that stay on-message with the same brief."
571
- }),
572
- /* @__PURE__ */ jsx4("li", {
573
- children: "Generate SEO metadata + Schema.org markup alongside content."
574
- })
575
- ]
576
- })
577
- ]
578
- }),
579
- /* @__PURE__ */ jsxs4("div", {
580
- className: "flex items-center gap-4 pt-4",
581
- children: [
582
- /* @__PURE__ */ jsx4(Link3, {
583
- href: "/docs/libraries",
584
- className: "btn-ghost",
585
- children: "Back to Libraries"
586
- }),
587
- /* @__PURE__ */ jsxs4(Link3, {
588
- href: "/docs/libraries/support-bot",
589
- className: "btn-primary",
590
- children: [
591
- "Next: Support Bot ",
592
- /* @__PURE__ */ jsx4(ChevronRight3, {
593
- size: 16
594
- })
595
- ]
596
- })
597
- ]
598
- })
599
- ]
600
- });
601
- }
602
-
603
- // src/components/docs/libraries/LibrariesContractsPage.tsx
604
- import { CodeBlock as CodeBlock5, InstallCommand as InstallCommand5 } from "@contractspec/lib.design-system";
605
- import Link4 from "@contractspec/lib.ui-link";
606
- import { ChevronRight as ChevronRight4 } from "lucide-react";
607
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
608
- function LibrariesContractsPage() {
609
- return /* @__PURE__ */ jsxs5("div", {
610
- className: "space-y-8",
611
- children: [
612
- /* @__PURE__ */ jsxs5("div", {
613
- className: "space-y-4",
614
- children: [
615
- /* @__PURE__ */ jsx5("h1", {
616
- className: "font-bold text-4xl",
617
- children: "@contractspec/lib.contracts-spec"
618
- }),
619
- /* @__PURE__ */ jsx5("p", {
620
- className: "text-lg text-muted-foreground",
621
- children: "The core library for defining what your application can do. Unified specifications for Operations, Events, Presentations, and Features."
622
- })
623
- ]
624
- }),
625
- /* @__PURE__ */ jsxs5("div", {
626
- className: "space-y-4",
627
- children: [
628
- /* @__PURE__ */ jsx5("h2", {
629
- className: "font-bold text-2xl",
630
- children: "Installation"
631
- }),
632
- /* @__PURE__ */ jsx5(InstallCommand5, {
633
- package: [
634
- "@contractspec/lib.contracts-spec",
635
- "@contractspec/lib.schema"
636
- ]
637
- })
638
- ]
639
- }),
640
- /* @__PURE__ */ jsxs5("div", {
641
- className: "space-y-4",
642
- children: [
643
- /* @__PURE__ */ jsx5("h2", {
644
- className: "font-bold text-2xl",
645
- children: "What lives where"
646
- }),
647
- /* @__PURE__ */ jsxs5("ul", {
648
- className: "list-inside list-disc space-y-2 text-muted-foreground",
649
- children: [
650
- /* @__PURE__ */ jsxs5("li", {
651
- children: [
652
- /* @__PURE__ */ jsx5("strong", {
653
- children: "@contractspec/lib.contracts-spec"
654
- }),
655
- " (root): The core contracts definitions (OperationSpec, PresentationSpec, Registry)."
656
- ]
657
- }),
658
- /* @__PURE__ */ jsxs5("li", {
659
- children: [
660
- /* @__PURE__ */ jsx5("strong", {
661
- children: "@contractspec/lib.contracts-runtime-client-react"
662
- }),
663
- ": Browser-safe helpers (React renderers, client SDK). Import this for web/React Native."
664
- ]
665
- }),
666
- /* @__PURE__ */ jsxs5("li", {
667
- children: [
668
- /* @__PURE__ */ jsx5("strong", {
669
- children: "@contractspec/lib.contracts-runtime-server-rest"
670
- }),
671
- ": HTTP/MCP adapters, registries, integrations (Node-only)."
672
- ]
673
- }),
674
- /* @__PURE__ */ jsxs5("li", {
675
- children: [
676
- /* @__PURE__ */ jsx5("strong", {
677
- children: "@contractspec/lib.schema"
678
- }),
679
- ": Schema dictionary (SchemaModel, FieldType) for I/O definitions."
680
- ]
681
- })
682
- ]
683
- })
684
- ]
685
- }),
686
- /* @__PURE__ */ jsxs5("div", {
687
- className: "space-y-4",
688
- children: [
689
- /* @__PURE__ */ jsx5("h2", {
690
- className: "font-bold text-2xl",
691
- children: "Quick Example"
692
- }),
693
- /* @__PURE__ */ jsx5(CodeBlock5, {
694
- language: "typescript",
695
- code: `import { defineCommand } from '@contractspec/lib.contracts-spec';
100
+ const seo = new SeoOptimizer().optimize(brief);`})]}),J("div",{className:"space-y-3",children:[A("h2",{className:"font-bold text-2xl",children:"When to use"}),J("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[A("li",{children:"Ship landing page refreshes whenever specs change."}),A("li",{children:"Automate release emails + nurture sequences per vertical."}),A("li",{children:"Create social snippets that stay on-message with the same brief."}),A("li",{children:"Generate SEO metadata + Schema.org markup alongside content."})]})]}),J("div",{className:"flex items-center gap-4 pt-4",children:[A(ge,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),J(ge,{href:"/docs/libraries/support-bot",className:"btn-primary",children:["Next: Support Bot ",A(at,{size:16})]})]})]})}import{CodeBlock as it,InstallCommand as rt}from"@contractspec/lib.design-system";import fe from"@contractspec/lib.ui-link";import{ChevronRight as nt}from"lucide-react";import{jsx as o,jsxs as i}from"react/jsx-runtime";function ct(){return i("div",{className:"space-y-8",children:[i("div",{className:"space-y-4",children:[o("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.contracts-spec"}),o("p",{className:"text-lg text-muted-foreground",children:"The core library for defining what your application can do. Unified specifications for Operations, Events, Presentations, and Features."})]}),i("div",{className:"space-y-4",children:[o("h2",{className:"font-bold text-2xl",children:"Installation"}),o(rt,{package:["@contractspec/lib.contracts-spec","@contractspec/lib.schema"]})]}),i("div",{className:"space-y-4",children:[o("h2",{className:"font-bold text-2xl",children:"What lives where"}),i("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[i("li",{children:[o("strong",{children:"@contractspec/lib.contracts-spec"})," (root): The core contracts definitions (OperationSpec, PresentationSpec, Registry)."]}),i("li",{children:[o("strong",{children:"@contractspec/lib.contracts-runtime-client-react"}),": Browser-safe helpers (React renderers, client SDK). Import this for web/React Native."]}),i("li",{children:[o("strong",{children:"@contractspec/lib.contracts-runtime-server-rest"}),": HTTP/MCP adapters, registries, integrations (Node-only)."]}),i("li",{children:[o("strong",{children:"@contractspec/lib.schema"}),": Schema dictionary (SchemaModel, FieldType) for I/O definitions."]})]})]}),i("div",{className:"space-y-4",children:[o("h2",{className:"font-bold text-2xl",children:"Quick Example"}),o(it,{language:"typescript",code:`import { defineCommand } from '@contractspec/lib.contracts-spec';
696
101
  import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
697
102
 
698
103
  const CreateUserInput = new SchemaModel({
@@ -714,244 +119,7 @@ export const CreateUser = defineCommand({
714
119
  output: /* ... */,
715
120
  },
716
121
  policy: { auth: 'admin' },
717
- });`
718
- })
719
- ]
720
- }),
721
- /* @__PURE__ */ jsxs5("div", {
722
- className: "space-y-4",
723
- children: [
724
- /* @__PURE__ */ jsx5("h2", {
725
- className: "font-bold text-2xl",
726
- children: "Core Concepts"
727
- }),
728
- /* @__PURE__ */ jsxs5("ul", {
729
- className: "list-inside list-disc space-y-2 text-muted-foreground",
730
- children: [
731
- /* @__PURE__ */ jsxs5("li", {
732
- children: [
733
- /* @__PURE__ */ jsx5("strong", {
734
- children: "OperationSpec"
735
- }),
736
- ": Immutable description of an operation (Command or Query). Defines I/O, policy, and metadata."
737
- ]
738
- }),
739
- /* @__PURE__ */ jsxs5("li", {
740
- children: [
741
- /* @__PURE__ */ jsx5("strong", {
742
- children: "OperationSpecRegistry"
743
- }),
744
- ": Registry of specs + handlers. Use ",
745
- /* @__PURE__ */ jsx5("code", {
746
- className: "font-mono text-xs",
747
- children: "installOp"
748
- }),
749
- " ",
750
- "to attach a handler."
751
- ]
752
- }),
753
- /* @__PURE__ */ jsxs5("li", {
754
- children: [
755
- /* @__PURE__ */ jsx5("strong", {
756
- children: "CapabilitySpec"
757
- }),
758
- ": Canonical capability declaration (requires/provides)."
759
- ]
760
- }),
761
- /* @__PURE__ */ jsxs5("li", {
762
- children: [
763
- /* @__PURE__ */ jsx5("strong", {
764
- children: "PolicySpec"
765
- }),
766
- ": Declarative policy rules (ABAC/ReBAC, rate limits)."
767
- ]
768
- }),
769
- /* @__PURE__ */ jsxs5("li", {
770
- children: [
771
- /* @__PURE__ */ jsx5("strong", {
772
- children: "TelemetrySpec"
773
- }),
774
- ": Analytics definitions and privacy levels."
775
- ]
776
- }),
777
- /* @__PURE__ */ jsxs5("li", {
778
- children: [
779
- /* @__PURE__ */ jsx5("strong", {
780
- children: "PresentationSpec (V2)"
781
- }),
782
- ": Describes how data is rendered (Web Components, Markdown, Data)."
783
- ]
784
- })
785
- ]
786
- })
787
- ]
788
- }),
789
- /* @__PURE__ */ jsxs5("div", {
790
- className: "space-y-4",
791
- children: [
792
- /* @__PURE__ */ jsx5("h2", {
793
- className: "font-bold text-2xl",
794
- children: "Lifecycle"
795
- }),
796
- /* @__PURE__ */ jsxs5("ol", {
797
- className: "list-inside list-decimal space-y-2 text-muted-foreground",
798
- children: [
799
- /* @__PURE__ */ jsxs5("li", {
800
- children: [
801
- /* @__PURE__ */ jsx5("strong", {
802
- children: "Define"
803
- }),
804
- " the spec (I/O via SchemaModel or Zod)."
805
- ]
806
- }),
807
- /* @__PURE__ */ jsxs5("li", {
808
- children: [
809
- /* @__PURE__ */ jsx5("strong", {
810
- children: "Register"
811
- }),
812
- " it:",
813
- " ",
814
- /* @__PURE__ */ jsx5("code", {
815
- className: "font-mono text-xs",
816
- children: "installOp(registry, spec, handler)"
817
- }),
818
- "."
819
- ]
820
- }),
821
- /* @__PURE__ */ jsxs5("li", {
822
- children: [
823
- /* @__PURE__ */ jsx5("strong", {
824
- children: "Expose"
825
- }),
826
- " it via an adapter (REST, GraphQL, MCP)."
827
- ]
828
- }),
829
- /* @__PURE__ */ jsxs5("li", {
830
- children: [
831
- /* @__PURE__ */ jsx5("strong", {
832
- children: "Validate"
833
- }),
834
- " at runtime automatically."
835
- ]
836
- })
837
- ]
838
- })
839
- ]
840
- }),
841
- /* @__PURE__ */ jsxs5("div", {
842
- className: "space-y-4",
843
- children: [
844
- /* @__PURE__ */ jsx5("h2", {
845
- className: "font-bold text-2xl",
846
- children: "Adapters"
847
- }),
848
- /* @__PURE__ */ jsxs5("ul", {
849
- className: "space-y-2 text-muted-foreground",
850
- children: [
851
- /* @__PURE__ */ jsxs5("li", {
852
- children: [
853
- /* @__PURE__ */ jsx5("code", {
854
- className: "rounded bg-background/50 px-2 py-1",
855
- children: "server/rest-next-app"
856
- }),
857
- ": Next.js App Router adapter"
858
- ]
859
- }),
860
- /* @__PURE__ */ jsxs5("li", {
861
- children: [
862
- /* @__PURE__ */ jsx5("code", {
863
- className: "rounded bg-background/50 px-2 py-1",
864
- children: "server/provider-mcp"
865
- }),
866
- ": Model Context Protocol (MCP) for AI agents"
867
- ]
868
- }),
869
- /* @__PURE__ */ jsxs5("li", {
870
- children: [
871
- /* @__PURE__ */ jsx5("code", {
872
- className: "rounded bg-background/50 px-2 py-1",
873
- children: "server/graphql-pothos"
874
- }),
875
- ": GraphQL schema generator"
876
- ]
877
- })
878
- ]
879
- })
880
- ]
881
- }),
882
- /* @__PURE__ */ jsxs5("div", {
883
- className: "flex items-center gap-4 pt-4",
884
- children: [
885
- /* @__PURE__ */ jsxs5(Link4, {
886
- href: "/docs/libraries/schema",
887
- className: "btn-primary",
888
- children: [
889
- "Next: Schema ",
890
- /* @__PURE__ */ jsx5(ChevronRight4, {
891
- size: 16
892
- })
893
- ]
894
- }),
895
- /* @__PURE__ */ jsx5(Link4, {
896
- href: "/docs/specs/capabilities",
897
- className: "btn-ghost",
898
- children: "Core Concepts"
899
- })
900
- ]
901
- })
902
- ]
903
- });
904
- }
905
-
906
- // src/components/docs/libraries/LibrariesCostTrackingPage.tsx
907
- import { CodeBlock as CodeBlock6, InstallCommand as InstallCommand6 } from "@contractspec/lib.design-system";
908
- import Link5 from "@contractspec/lib.ui-link";
909
- import { ChevronRight as ChevronRight5 } from "lucide-react";
910
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
911
- function LibrariesCostTrackingPage() {
912
- return /* @__PURE__ */ jsxs6("div", {
913
- className: "space-y-8",
914
- children: [
915
- /* @__PURE__ */ jsxs6("div", {
916
- className: "space-y-4",
917
- children: [
918
- /* @__PURE__ */ jsx6("h1", {
919
- className: "font-bold text-4xl",
920
- children: "Cost Tracking Library"
921
- }),
922
- /* @__PURE__ */ jsxs6("p", {
923
- className: "text-lg text-muted-foreground",
924
- children: [
925
- /* @__PURE__ */ jsx6("code", {
926
- children: "@contractspec/lib.cost-tracking"
927
- }),
928
- " transforms raw telemetry into dollars: DB/API/compute costs per operation, budget alerts per tenant, and actionable optimization tips."
929
- ]
930
- })
931
- ]
932
- }),
933
- /* @__PURE__ */ jsxs6("div", {
934
- className: "space-y-4",
935
- children: [
936
- /* @__PURE__ */ jsx6("h2", {
937
- className: "font-bold text-2xl",
938
- children: "Installation"
939
- }),
940
- /* @__PURE__ */ jsx6(InstallCommand6, {
941
- package: "@contractspec/lib.cost-tracking"
942
- })
943
- ]
944
- }),
945
- /* @__PURE__ */ jsxs6("div", {
946
- className: "space-y-4",
947
- children: [
948
- /* @__PURE__ */ jsx6("h2", {
949
- className: "font-bold text-2xl",
950
- children: "Record Samples"
951
- }),
952
- /* @__PURE__ */ jsx6(CodeBlock6, {
953
- language: "typescript",
954
- code: `const tracker = new CostTracker();
122
+ });`})]}),i("div",{className:"space-y-4",children:[o("h2",{className:"font-bold text-2xl",children:"Core Concepts"}),i("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[i("li",{children:[o("strong",{children:"OperationSpec"}),": Immutable description of an operation (Command or Query). Defines I/O, policy, and metadata."]}),i("li",{children:[o("strong",{children:"OperationSpecRegistry"}),": Registry of specs + handlers. Use ",o("code",{className:"font-mono text-xs",children:"installOp"})," ","to attach a handler."]}),i("li",{children:[o("strong",{children:"CapabilitySpec"}),": Canonical capability declaration (requires/provides)."]}),i("li",{children:[o("strong",{children:"PolicySpec"}),": Declarative policy rules (ABAC/ReBAC, rate limits)."]}),i("li",{children:[o("strong",{children:"TelemetrySpec"}),": Analytics definitions and privacy levels."]}),i("li",{children:[o("strong",{children:"PresentationSpec (V2)"}),": Describes how data is rendered (Web Components, Markdown, Data)."]})]})]}),i("div",{className:"space-y-4",children:[o("h2",{className:"font-bold text-2xl",children:"Lifecycle"}),i("ol",{className:"list-inside list-decimal space-y-2 text-muted-foreground",children:[i("li",{children:[o("strong",{children:"Define"})," the spec (I/O via SchemaModel or Zod)."]}),i("li",{children:[o("strong",{children:"Register"})," it:"," ",o("code",{className:"font-mono text-xs",children:"installOp(registry, spec, handler)"}),"."]}),i("li",{children:[o("strong",{children:"Expose"})," it via an adapter (REST, GraphQL, MCP)."]}),i("li",{children:[o("strong",{children:"Validate"})," at runtime automatically."]})]})]}),i("div",{className:"space-y-4",children:[o("h2",{className:"font-bold text-2xl",children:"Adapters"}),i("ul",{className:"space-y-2 text-muted-foreground",children:[i("li",{children:[o("code",{className:"rounded bg-background/50 px-2 py-1",children:"server/rest-next-app"}),": Next.js App Router adapter"]}),i("li",{children:[o("code",{className:"rounded bg-background/50 px-2 py-1",children:"server/provider-mcp"}),": Model Context Protocol (MCP) for AI agents"]}),i("li",{children:[o("code",{className:"rounded bg-background/50 px-2 py-1",children:"server/graphql-pothos"}),": GraphQL schema generator"]})]})]}),i("div",{className:"flex items-center gap-4 pt-4",children:[i(fe,{href:"/docs/libraries/schema",className:"btn-primary",children:["Next: Schema ",o(nt,{size:16})]}),o(fe,{href:"/docs/specs/capabilities",className:"btn-ghost",children:"Core Concepts"})]})]})}import{CodeBlock as he,InstallCommand as lt}from"@contractspec/lib.design-system";import be from"@contractspec/lib.ui-link";import{ChevronRight as st}from"lucide-react";import{jsx as M,jsxs as F}from"react/jsx-runtime";function dt(){return F("div",{className:"space-y-8",children:[F("div",{className:"space-y-4",children:[M("h1",{className:"font-bold text-4xl",children:"Cost Tracking Library"}),F("p",{className:"text-lg text-muted-foreground",children:[M("code",{children:"@contractspec/lib.cost-tracking"})," transforms raw telemetry into dollars: DB/API/compute costs per operation, budget alerts per tenant, and actionable optimization tips."]})]}),F("div",{className:"space-y-4",children:[M("h2",{className:"font-bold text-2xl",children:"Installation"}),M(lt,{package:"@contractspec/lib.cost-tracking"})]}),F("div",{className:"space-y-4",children:[M("h2",{className:"font-bold text-2xl",children:"Record Samples"}),M(he,{language:"typescript",code:`const tracker = new CostTracker();
955
123
  tracker.recordSample({
956
124
  operation: 'orders.list',
957
125
  tenantId: 'acme',
@@ -959,207 +127,12 @@ tracker.recordSample({
959
127
  dbWrites: 4,
960
128
  computeMs: 180,
961
129
  externalCalls: [{ provider: 'stripe', cost: 0.02 }],
962
- });`
963
- })
964
- ]
965
- }),
966
- /* @__PURE__ */ jsxs6("div", {
967
- className: "space-y-4",
968
- children: [
969
- /* @__PURE__ */ jsx6("h2", {
970
- className: "font-bold text-2xl",
971
- children: "Budget Alerts"
972
- }),
973
- /* @__PURE__ */ jsx6(CodeBlock6, {
974
- language: "typescript",
975
- code: `const budgets = new BudgetAlertManager({
130
+ });`})]}),F("div",{className:"space-y-4",children:[M("h2",{className:"font-bold text-2xl",children:"Budget Alerts"}),M(he,{language:"typescript",code:`const budgets = new BudgetAlertManager({
976
131
  budgets: [{ tenantId: 'acme', monthlyLimit: 150 }],
977
132
  onAlert: ({ tenantId, total }) => notifyFinance(tenantId, total),
978
133
  });
979
134
 
980
- tracker.getTotals({ tenantId: 'acme' }).forEach((summary) => budgets.track(summary));`
981
- })
982
- ]
983
- }),
984
- /* @__PURE__ */ jsxs6("div", {
985
- className: "space-y-4",
986
- children: [
987
- /* @__PURE__ */ jsx6("h2", {
988
- className: "font-bold text-2xl",
989
- children: "Optimization Suggestions"
990
- }),
991
- /* @__PURE__ */ jsxs6("p", {
992
- className: "text-muted-foreground text-sm",
993
- children: [
994
- "Feed summaries into ",
995
- /* @__PURE__ */ jsx6("code", {
996
- children: "OptimizationRecommender"
997
- }),
998
- " to surface N+1 queries, compute-heavy steps, or expensive external calls. Store the generated suggestions in the new Prisma model to power Ops playbooks."
999
- ]
1000
- })
1001
- ]
1002
- }),
1003
- /* @__PURE__ */ jsxs6("div", {
1004
- className: "flex items-center gap-4 pt-4",
1005
- children: [
1006
- /* @__PURE__ */ jsx6(Link5, {
1007
- href: "/docs/libraries",
1008
- className: "btn-ghost",
1009
- children: "Back to Libraries"
1010
- }),
1011
- /* @__PURE__ */ jsxs6(Link5, {
1012
- href: "/docs/libraries/slo",
1013
- className: "btn-primary",
1014
- children: [
1015
- "Next: SLO ",
1016
- /* @__PURE__ */ jsx6(ChevronRight5, {
1017
- size: 16
1018
- })
1019
- ]
1020
- })
1021
- ]
1022
- })
1023
- ]
1024
- });
1025
- }
1026
-
1027
- // src/components/docs/libraries/LibrariesDataBackendPage.tsx
1028
- import { CodeBlock as CodeBlock7 } from "@contractspec/lib.design-system";
1029
- import Link6 from "@contractspec/lib.ui-link";
1030
- import { ChevronRight as ChevronRight6 } from "lucide-react";
1031
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1032
- function LibrariesDataBackendPage() {
1033
- return /* @__PURE__ */ jsxs7("div", {
1034
- className: "space-y-8",
1035
- children: [
1036
- /* @__PURE__ */ jsxs7("div", {
1037
- className: "space-y-4",
1038
- children: [
1039
- /* @__PURE__ */ jsx7("h1", {
1040
- className: "font-bold text-4xl",
1041
- children: "Data & Backend"
1042
- }),
1043
- /* @__PURE__ */ jsx7("p", {
1044
- className: "text-muted-foreground",
1045
- children: "A collection of robust, platform-agnostic libraries for building the backend infrastructure of your LSSM applications."
1046
- })
1047
- ]
1048
- }),
1049
- /* @__PURE__ */ jsxs7("div", {
1050
- className: "space-y-4",
1051
- children: [
1052
- /* @__PURE__ */ jsx7("h2", {
1053
- className: "font-bold text-2xl",
1054
- children: "Libraries"
1055
- }),
1056
- /* @__PURE__ */ jsxs7("div", {
1057
- className: "space-y-6",
1058
- children: [
1059
- /* @__PURE__ */ jsxs7("div", {
1060
- className: "card-subtle p-6",
1061
- children: [
1062
- /* @__PURE__ */ jsx7("h3", {
1063
- className: "font-bold text-lg",
1064
- children: "@contractspec/app.cli-database"
1065
- }),
1066
- /* @__PURE__ */ jsxs7("p", {
1067
- className: "mt-2 text-muted-foreground text-sm",
1068
- children: [
1069
- /* @__PURE__ */ jsx7("strong", {
1070
- children: "Prisma Wrapper & CLI"
1071
- }),
1072
- ". Provides a unified way to manage database schemas, migrations, and clients. Includes seeders and factory patterns for testing."
1073
- ]
1074
- })
1075
- ]
1076
- }),
1077
- /* @__PURE__ */ jsxs7("div", {
1078
- className: "card-subtle p-6",
1079
- children: [
1080
- /* @__PURE__ */ jsx7("h3", {
1081
- className: "font-bold text-lg",
1082
- children: "@contractspec/lib.bus"
1083
- }),
1084
- /* @__PURE__ */ jsxs7("p", {
1085
- className: "mt-2 text-muted-foreground text-sm",
1086
- children: [
1087
- /* @__PURE__ */ jsx7("strong", {
1088
- children: "Type-Safe Event Bus"
1089
- }),
1090
- ". Decouple your architecture with typed events. Supports in-memory dispatch for monoliths and can be extended for distributed message queues (Redis, SQS)."
1091
- ]
1092
- })
1093
- ]
1094
- }),
1095
- /* @__PURE__ */ jsxs7("div", {
1096
- className: "card-subtle p-6",
1097
- children: [
1098
- /* @__PURE__ */ jsx7("h3", {
1099
- className: "font-bold text-lg",
1100
- children: "@contractspec/lib.logger"
1101
- }),
1102
- /* @__PURE__ */ jsxs7("p", {
1103
- className: "mt-2 text-muted-foreground text-sm",
1104
- children: [
1105
- /* @__PURE__ */ jsx7("strong", {
1106
- children: "High-Performance Logging"
1107
- }),
1108
- ". Optimized for Bun and structured JSON output. Includes plugins for ElysiaJS to log HTTP requests automatically."
1109
- ]
1110
- })
1111
- ]
1112
- }),
1113
- /* @__PURE__ */ jsxs7("div", {
1114
- className: "card-subtle p-6",
1115
- children: [
1116
- /* @__PURE__ */ jsx7("h3", {
1117
- className: "font-bold text-lg",
1118
- children: "@contractspec/lib.error"
1119
- }),
1120
- /* @__PURE__ */ jsxs7("p", {
1121
- className: "mt-2 text-muted-foreground text-sm",
1122
- children: [
1123
- /* @__PURE__ */ jsx7("strong", {
1124
- children: "Standardized Errors"
1125
- }),
1126
- ". Use `AppError` with standard codes (NOT_FOUND, UNAUTHORIZED) to ensure consistent HTTP responses and error handling across services."
1127
- ]
1128
- })
1129
- ]
1130
- }),
1131
- /* @__PURE__ */ jsxs7("div", {
1132
- className: "card-subtle p-6",
1133
- children: [
1134
- /* @__PURE__ */ jsx7("h3", {
1135
- className: "font-bold text-lg",
1136
- children: "@contractspec/lib.exporter"
1137
- }),
1138
- /* @__PURE__ */ jsxs7("p", {
1139
- className: "mt-2 text-muted-foreground text-sm",
1140
- children: [
1141
- /* @__PURE__ */ jsx7("strong", {
1142
- children: "Data Export"
1143
- }),
1144
- ". Generate CSV and XML files from your data. Platform-agnostic and streaming-friendly."
1145
- ]
1146
- })
1147
- ]
1148
- })
1149
- ]
1150
- })
1151
- ]
1152
- }),
1153
- /* @__PURE__ */ jsxs7("div", {
1154
- className: "space-y-4",
1155
- children: [
1156
- /* @__PURE__ */ jsx7("h2", {
1157
- className: "font-bold text-2xl",
1158
- children: "Example: Unified Backend Flow"
1159
- }),
1160
- /* @__PURE__ */ jsx7(CodeBlock7, {
1161
- language: "typescript",
1162
- code: `import { logger } from '@contractspec/lib.logger';
135
+ tracker.getTotals({ tenantId: 'acme' }).forEach((summary) => budgets.track(summary));`})]}),F("div",{className:"space-y-4",children:[M("h2",{className:"font-bold text-2xl",children:"Optimization Suggestions"}),F("p",{className:"text-muted-foreground text-sm",children:["Feed summaries into ",M("code",{children:"OptimizationRecommender"})," to surface N+1 queries, compute-heavy steps, or expensive external calls. Store the generated suggestions in the new Prisma model to power Ops playbooks."]})]}),F("div",{className:"flex items-center gap-4 pt-4",children:[M(be,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),F(be,{href:"/docs/libraries/slo",className:"btn-primary",children:["Next: SLO ",M(st,{size:16})]})]})]})}import{CodeBlock as pt}from"@contractspec/lib.design-system";import ve from"@contractspec/lib.ui-link";import{ChevronRight as mt}from"lucide-react";import{jsx as h,jsxs as b}from"react/jsx-runtime";function ut(){return b("div",{className:"space-y-8",children:[b("div",{className:"space-y-4",children:[h("h1",{className:"font-bold text-4xl",children:"Data & Backend"}),h("p",{className:"text-muted-foreground",children:"A collection of robust, platform-agnostic libraries for building the backend infrastructure of your LSSM applications."})]}),b("div",{className:"space-y-4",children:[h("h2",{className:"font-bold text-2xl",children:"Libraries"}),b("div",{className:"space-y-6",children:[b("div",{className:"card-subtle p-6",children:[h("h3",{className:"font-bold text-lg",children:"@contractspec/app.cli-database"}),b("p",{className:"mt-2 text-muted-foreground text-sm",children:[h("strong",{children:"Prisma Wrapper & CLI"}),". Provides a unified way to manage database schemas, migrations, and clients. Includes seeders and factory patterns for testing."]})]}),b("div",{className:"card-subtle p-6",children:[h("h3",{className:"font-bold text-lg",children:"@contractspec/lib.bus"}),b("p",{className:"mt-2 text-muted-foreground text-sm",children:[h("strong",{children:"Type-Safe Event Bus"}),". Decouple your architecture with typed events. Supports in-memory dispatch for monoliths and can be extended for distributed message queues (Redis, SQS)."]})]}),b("div",{className:"card-subtle p-6",children:[h("h3",{className:"font-bold text-lg",children:"@contractspec/lib.logger"}),b("p",{className:"mt-2 text-muted-foreground text-sm",children:[h("strong",{children:"High-Performance Logging"}),". Optimized for Bun and structured JSON output. Includes plugins for ElysiaJS to log HTTP requests automatically."]})]}),b("div",{className:"card-subtle p-6",children:[h("h3",{className:"font-bold text-lg",children:"@contractspec/lib.error"}),b("p",{className:"mt-2 text-muted-foreground text-sm",children:[h("strong",{children:"Standardized Errors"}),". Use `AppError` with standard codes (NOT_FOUND, UNAUTHORIZED) to ensure consistent HTTP responses and error handling across services."]})]}),b("div",{className:"card-subtle p-6",children:[h("h3",{className:"font-bold text-lg",children:"@contractspec/lib.exporter"}),b("p",{className:"mt-2 text-muted-foreground text-sm",children:[h("strong",{children:"Data Export"}),". Generate CSV and XML files from your data. Platform-agnostic and streaming-friendly."]})]})]})]}),b("div",{className:"space-y-4",children:[h("h2",{className:"font-bold text-2xl",children:"Example: Unified Backend Flow"}),h(pt,{language:"typescript",code:`import { logger } from '@contractspec/lib.logger';
1163
136
  import { AppError } from '@contractspec/lib.error';
1164
137
  import { db } from '@contractspec/app.cli-database';
1165
138
  import { EventBus } from '@contractspec/lib.bus';
@@ -1177,96 +150,7 @@ export async function createUser(email: string) {
1177
150
  await EventBus.publish('user.created', { userId: user.id });
1178
151
 
1179
152
  return user;
1180
- }`
1181
- })
1182
- ]
1183
- }),
1184
- /* @__PURE__ */ jsxs7("div", {
1185
- className: "flex items-center gap-4 pt-4",
1186
- children: [
1187
- /* @__PURE__ */ jsxs7(Link6, {
1188
- href: "/docs/libraries/runtime",
1189
- className: "btn-primary",
1190
- children: [
1191
- "Next: Runtime ",
1192
- /* @__PURE__ */ jsx7(ChevronRight6, {
1193
- size: 16
1194
- })
1195
- ]
1196
- }),
1197
- /* @__PURE__ */ jsx7(Link6, {
1198
- href: "/docs/libraries",
1199
- className: "btn-ghost",
1200
- children: "Back to Libraries"
1201
- })
1202
- ]
1203
- })
1204
- ]
1205
- });
1206
- }
1207
-
1208
- // src/components/docs/libraries/LibrariesDataViewsPage.tsx
1209
- import { CodeBlock as CodeBlock8, InstallCommand as InstallCommand7 } from "@contractspec/lib.design-system";
1210
- import Link7 from "@contractspec/lib.ui-link";
1211
- import { ChevronRight as ChevronRight7 } from "lucide-react";
1212
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1213
- function LibrariesDataViewsPage() {
1214
- return /* @__PURE__ */ jsxs8("div", {
1215
- className: "space-y-8",
1216
- children: [
1217
- /* @__PURE__ */ jsxs8("div", {
1218
- className: "space-y-4",
1219
- children: [
1220
- /* @__PURE__ */ jsx8("h1", {
1221
- className: "font-bold text-4xl",
1222
- children: "DataViews Runtime Library"
1223
- }),
1224
- /* @__PURE__ */ jsxs8("p", {
1225
- className: "text-lg text-muted-foreground",
1226
- children: [
1227
- "The ",
1228
- /* @__PURE__ */ jsx8("code", {
1229
- children: "@contractspec/lib.contracts-spec/data-views"
1230
- }),
1231
- " and",
1232
- " ",
1233
- /* @__PURE__ */ jsx8("code", {
1234
- children: "@contractspec/lib.design-system"
1235
- }),
1236
- " libraries provide the runtime logic and UI components to render DataViews in your application."
1237
- ]
1238
- })
1239
- ]
1240
- }),
1241
- /* @__PURE__ */ jsxs8("div", {
1242
- className: "space-y-4",
1243
- children: [
1244
- /* @__PURE__ */ jsx8("h2", {
1245
- className: "font-bold text-2xl",
1246
- children: "Installation"
1247
- }),
1248
- /* @__PURE__ */ jsx8(InstallCommand7, {
1249
- package: [
1250
- "@contractspec/lib.contracts-spec",
1251
- "@contractspec/lib.design-system"
1252
- ]
1253
- })
1254
- ]
1255
- }),
1256
- /* @__PURE__ */ jsxs8("div", {
1257
- className: "space-y-4",
1258
- children: [
1259
- /* @__PURE__ */ jsx8("h2", {
1260
- className: "font-bold text-2xl",
1261
- children: "DataViewRenderer"
1262
- }),
1263
- /* @__PURE__ */ jsx8("p", {
1264
- className: "text-muted-foreground",
1265
- children: "The primary component for rendering any DataView. It automatically selects the correct layout (List, Table, Grid, Detail) based on the spec."
1266
- }),
1267
- /* @__PURE__ */ jsx8(CodeBlock8, {
1268
- language: "tsx",
1269
- code: `import { DataViewRenderer } from '@contractspec/lib.design-system';
153
+ }`})]}),b("div",{className:"flex items-center gap-4 pt-4",children:[b(ve,{href:"/docs/libraries/runtime",className:"btn-primary",children:["Next: Runtime ",h(mt,{size:16})]}),h(ve,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"})]})]})}import{CodeBlock as ye,InstallCommand as gt}from"@contractspec/lib.design-system";import Ne from"@contractspec/lib.ui-link";import{ChevronRight as ft}from"lucide-react";import{jsx as l,jsxs as v}from"react/jsx-runtime";function ht(){return v("div",{className:"space-y-8",children:[v("div",{className:"space-y-4",children:[l("h1",{className:"font-bold text-4xl",children:"DataViews Runtime Library"}),v("p",{className:"text-lg text-muted-foreground",children:["The ",l("code",{children:"@contractspec/lib.contracts-spec/data-views"})," and"," ",l("code",{children:"@contractspec/lib.design-system"})," libraries provide the runtime logic and UI components to render DataViews in your application."]})]}),v("div",{className:"space-y-4",children:[l("h2",{className:"font-bold text-2xl",children:"Installation"}),l(gt,{package:["@contractspec/lib.contracts-spec","@contractspec/lib.design-system"]})]}),v("div",{className:"space-y-4",children:[l("h2",{className:"font-bold text-2xl",children:"DataViewRenderer"}),l("p",{className:"text-muted-foreground",children:"The primary component for rendering any DataView. It automatically selects the correct layout (List, Table, Grid, Detail) based on the spec."}),l(ye,{language:"tsx",code:`import { DataViewRenderer } from '@contractspec/lib.design-system';
1270
154
  import { MyUserList } from './specs/users.data-view';
1271
155
 
1272
156
  export function UserPage() {
@@ -1278,100 +162,7 @@ export function UserPage() {
1278
162
  onPageChange={(page) => fetchPage(page)}
1279
163
  />
1280
164
  );
1281
- }`
1282
- }),
1283
- /* @__PURE__ */ jsx8("h3", {
1284
- className: "font-semibold text-xl",
1285
- children: "Props"
1286
- }),
1287
- /* @__PURE__ */ jsxs8("ul", {
1288
- className: "list-disc space-y-2 pl-6 text-muted-foreground",
1289
- children: [
1290
- /* @__PURE__ */ jsxs8("li", {
1291
- children: [
1292
- /* @__PURE__ */ jsx8("code", {
1293
- children: "spec"
1294
- }),
1295
- ": The DataViewSpec definition."
1296
- ]
1297
- }),
1298
- /* @__PURE__ */ jsxs8("li", {
1299
- children: [
1300
- /* @__PURE__ */ jsx8("code", {
1301
- children: "items"
1302
- }),
1303
- ": Array of data items to render."
1304
- ]
1305
- }),
1306
- /* @__PURE__ */ jsxs8("li", {
1307
- children: [
1308
- /* @__PURE__ */ jsx8("code", {
1309
- children: "filters"
1310
- }),
1311
- ": Current filter state object."
1312
- ]
1313
- }),
1314
- /* @__PURE__ */ jsxs8("li", {
1315
- children: [
1316
- /* @__PURE__ */ jsx8("code", {
1317
- children: "onFilterChange"
1318
- }),
1319
- ": Callback when filters change."
1320
- ]
1321
- }),
1322
- /* @__PURE__ */ jsxs8("li", {
1323
- children: [
1324
- /* @__PURE__ */ jsx8("code", {
1325
- children: "pagination"
1326
- }),
1327
- ": Object with ",
1328
- /* @__PURE__ */ jsx8("code", {
1329
- children: "page"
1330
- }),
1331
- ",",
1332
- " ",
1333
- /* @__PURE__ */ jsx8("code", {
1334
- children: "pageSize"
1335
- }),
1336
- ", ",
1337
- /* @__PURE__ */ jsx8("code", {
1338
- children: "total"
1339
- }),
1340
- "."
1341
- ]
1342
- }),
1343
- /* @__PURE__ */ jsxs8("li", {
1344
- children: [
1345
- /* @__PURE__ */ jsx8("code", {
1346
- children: "onPageChange"
1347
- }),
1348
- ": Callback when page changes."
1349
- ]
1350
- })
1351
- ]
1352
- })
1353
- ]
1354
- }),
1355
- /* @__PURE__ */ jsxs8("div", {
1356
- className: "space-y-4",
1357
- children: [
1358
- /* @__PURE__ */ jsx8("h2", {
1359
- className: "font-bold text-2xl",
1360
- children: "Query Generation"
1361
- }),
1362
- /* @__PURE__ */ jsxs8("p", {
1363
- className: "text-muted-foreground",
1364
- children: [
1365
- "The ",
1366
- /* @__PURE__ */ jsx8("code", {
1367
- children: "DataViewQueryGenerator"
1368
- }),
1369
- " utility helps translate DataView parameters (filters, sorting, pagination) into query arguments for your backend."
1370
- ]
1371
- }),
1372
- /* @__PURE__ */ jsx8(CodeBlock8, {
1373
- language: "typescript",
1374
- code: `import { DataViewQueryGenerator } from '@contractspec/lib.contracts-spec/data-views/query-generator';
165
+ }`}),l("h3",{className:"font-semibold text-xl",children:"Props"}),v("ul",{className:"list-disc space-y-2 pl-6 text-muted-foreground",children:[v("li",{children:[l("code",{children:"spec"}),": The DataViewSpec definition."]}),v("li",{children:[l("code",{children:"items"}),": Array of data items to render."]}),v("li",{children:[l("code",{children:"filters"}),": Current filter state object."]}),v("li",{children:[l("code",{children:"onFilterChange"}),": Callback when filters change."]}),v("li",{children:[l("code",{children:"pagination"}),": Object with ",l("code",{children:"page"}),","," ",l("code",{children:"pageSize"}),", ",l("code",{children:"total"}),"."]}),v("li",{children:[l("code",{children:"onPageChange"}),": Callback when page changes."]})]})]}),v("div",{className:"space-y-4",children:[l("h2",{className:"font-bold text-2xl",children:"Query Generation"}),v("p",{className:"text-muted-foreground",children:["The ",l("code",{children:"DataViewQueryGenerator"})," utility helps translate DataView parameters (filters, sorting, pagination) into query arguments for your backend."]}),l(ye,{language:"typescript",code:`import { DataViewQueryGenerator } from '@contractspec/lib.contracts-spec/data-views/query-generator';
1375
166
 
1376
167
  const generator = new DataViewQueryGenerator(MyUserList);
1377
168
  const query = generator.generate({
@@ -1379,154 +170,7 @@ const query = generator.generate({
1379
170
  filters: { role: 'admin' }
1380
171
  });
1381
172
 
1382
- // query.input contains { skip: 0, take: 20, role: 'admin' }`
1383
- })
1384
- ]
1385
- }),
1386
- /* @__PURE__ */ jsxs8("div", {
1387
- className: "flex items-center gap-4 pt-4",
1388
- children: [
1389
- /* @__PURE__ */ jsx8(Link7, {
1390
- href: "/docs/libraries",
1391
- className: "btn-ghost",
1392
- children: "Back to Libraries"
1393
- }),
1394
- /* @__PURE__ */ jsxs8(Link7, {
1395
- href: "/docs/libraries/data-backend",
1396
- className: "btn-primary",
1397
- children: [
1398
- "Next: Data & Backend ",
1399
- /* @__PURE__ */ jsx8(ChevronRight7, {
1400
- size: 16
1401
- })
1402
- ]
1403
- })
1404
- ]
1405
- })
1406
- ]
1407
- });
1408
- }
1409
-
1410
- // src/components/docs/libraries/LibrariesDesignSystemPage.tsx
1411
- import { CodeBlock as CodeBlock9, InstallCommand as InstallCommand8 } from "@contractspec/lib.design-system";
1412
- import Link8 from "@contractspec/lib.ui-link";
1413
- import { ChevronRight as ChevronRight8 } from "lucide-react";
1414
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1415
- function LibrariesDesignSystemPage() {
1416
- return /* @__PURE__ */ jsxs9("div", {
1417
- className: "space-y-8",
1418
- children: [
1419
- /* @__PURE__ */ jsxs9("div", {
1420
- className: "space-y-4",
1421
- children: [
1422
- /* @__PURE__ */ jsx9("h1", {
1423
- className: "font-bold text-4xl",
1424
- children: "@contractspec/lib.design-system"
1425
- }),
1426
- /* @__PURE__ */ jsxs9("p", {
1427
- className: "text-muted-foreground",
1428
- children: [
1429
- "High-level design system components, patterns, and layouts for LSSM applications. Built on top of ",
1430
- /* @__PURE__ */ jsx9("code", {
1431
- children: "@contractspec/lib.ui-kit"
1432
- }),
1433
- "."
1434
- ]
1435
- })
1436
- ]
1437
- }),
1438
- /* @__PURE__ */ jsxs9("div", {
1439
- className: "space-y-4",
1440
- children: [
1441
- /* @__PURE__ */ jsx9("h2", {
1442
- className: "font-bold text-2xl",
1443
- children: "Installation"
1444
- }),
1445
- /* @__PURE__ */ jsx9(InstallCommand8, {
1446
- package: "@contractspec/lib.design-system"
1447
- })
1448
- ]
1449
- }),
1450
- /* @__PURE__ */ jsxs9("div", {
1451
- className: "space-y-4",
1452
- children: [
1453
- /* @__PURE__ */ jsx9("h2", {
1454
- className: "font-bold text-2xl",
1455
- children: "What It Provides"
1456
- }),
1457
- /* @__PURE__ */ jsxs9("ul", {
1458
- className: "list-inside list-disc space-y-2 text-muted-foreground",
1459
- children: [
1460
- /* @__PURE__ */ jsxs9("li", {
1461
- children: [
1462
- /* @__PURE__ */ jsx9("strong", {
1463
- children: "Composite Components"
1464
- }),
1465
- ": Molecules and Organisms that solve common UI problems"
1466
- ]
1467
- }),
1468
- /* @__PURE__ */ jsxs9("li", {
1469
- children: [
1470
- /* @__PURE__ */ jsx9("strong", {
1471
- children: "Layouts"
1472
- }),
1473
- ": Ready-to-use page structures for dashboards, marketing sites, and lists"
1474
- ]
1475
- }),
1476
- /* @__PURE__ */ jsxs9("li", {
1477
- children: [
1478
- /* @__PURE__ */ jsx9("strong", {
1479
- children: "Data Views"
1480
- }),
1481
- ": Standardized renderers for lists, tables, and detail views"
1482
- ]
1483
- }),
1484
- /* @__PURE__ */ jsxs9("li", {
1485
- children: [
1486
- /* @__PURE__ */ jsx9("strong", {
1487
- children: "Forms"
1488
- }),
1489
- ": Zod-integrated form layouts and components"
1490
- ]
1491
- }),
1492
- /* @__PURE__ */ jsxs9("li", {
1493
- children: [
1494
- /* @__PURE__ */ jsx9("strong", {
1495
- children: "Code Display"
1496
- }),
1497
- ": Syntax-highlighted code blocks with package manager tabs"
1498
- ]
1499
- }),
1500
- /* @__PURE__ */ jsxs9("li", {
1501
- children: [
1502
- /* @__PURE__ */ jsx9("strong", {
1503
- children: "Platform Utilities"
1504
- }),
1505
- ": Hooks for responsive and adaptive design"
1506
- ]
1507
- }),
1508
- /* @__PURE__ */ jsxs9("li", {
1509
- children: [
1510
- /* @__PURE__ */ jsx9("strong", {
1511
- children: "Legal Templates"
1512
- }),
1513
- ": Compliant templates for Terms, Privacy, and GDPR"
1514
- ]
1515
- })
1516
- ]
1517
- })
1518
- ]
1519
- }),
1520
- /* @__PURE__ */ jsxs9("div", {
1521
- className: "space-y-4",
1522
- children: [
1523
- /* @__PURE__ */ jsx9("h2", {
1524
- className: "font-bold text-2xl",
1525
- children: "Example: App Layout"
1526
- }),
1527
- /* @__PURE__ */ jsx9(CodeBlock9, {
1528
- language: "tsx",
1529
- code: `import { AppLayout } from '@contractspec/lib.design-system';
173
+ // query.input contains { skip: 0, take: 20, role: 'admin' }`})]}),v("div",{className:"flex items-center gap-4 pt-4",children:[l(Ne,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),v(Ne,{href:"/docs/libraries/data-backend",className:"btn-primary",children:["Next: Data & Backend ",l(ft,{size:16})]})]})]})}import{CodeBlock as ie,InstallCommand as bt}from"@contractspec/lib.design-system";import ke from"@contractspec/lib.ui-link";import{ChevronRight as vt}from"lucide-react";import{jsx as t,jsxs as n}from"react/jsx-runtime";function yt(){return n("div",{className:"space-y-8",children:[n("div",{className:"space-y-4",children:[t("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.design-system"}),n("p",{className:"text-muted-foreground",children:["High-level design system components, patterns, and layouts for LSSM applications. Built on top of ",t("code",{children:"@contractspec/lib.ui-kit"}),"."]})]}),n("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Installation"}),t(bt,{package:"@contractspec/lib.design-system"})]}),n("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"What It Provides"}),n("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[n("li",{children:[t("strong",{children:"Composite Components"}),": Molecules and Organisms that solve common UI problems"]}),n("li",{children:[t("strong",{children:"Layouts"}),": Ready-to-use page structures for dashboards, marketing sites, and lists"]}),n("li",{children:[t("strong",{children:"Data Views"}),": Standardized renderers for lists, tables, and detail views"]}),n("li",{children:[t("strong",{children:"Forms"}),": Zod-integrated form layouts and components"]}),n("li",{children:[t("strong",{children:"Code Display"}),": Syntax-highlighted code blocks with package manager tabs"]}),n("li",{children:[t("strong",{children:"Platform Utilities"}),": Hooks for responsive and adaptive design"]}),n("li",{children:[t("strong",{children:"Legal Templates"}),": Compliant templates for Terms, Privacy, and GDPR"]})]})]}),n("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Example: App Layout"}),t(ie,{language:"tsx",code:`import { AppLayout } from '@contractspec/lib.design-system';
1530
174
  import { AppSidebar } from '@contractspec/lib.design-system';
1531
175
 
1532
176
  export function Layout({ children }) {
@@ -1535,20 +179,7 @@ export function Layout({ children }) {
1535
179
  {children}
1536
180
  </AppLayout>
1537
181
  );
1538
- }`
1539
- })
1540
- ]
1541
- }),
1542
- /* @__PURE__ */ jsxs9("div", {
1543
- className: "space-y-4",
1544
- children: [
1545
- /* @__PURE__ */ jsx9("h2", {
1546
- className: "font-bold text-2xl",
1547
- children: "Example: Zod Form"
1548
- }),
1549
- /* @__PURE__ */ jsx9(CodeBlock9, {
1550
- language: "tsx",
1551
- code: `import { ZodForm } from '@contractspec/lib.design-system';
182
+ }`})]}),n("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Example: Zod Form"}),t(ie,{language:"tsx",code:`import { ZodForm } from '@contractspec/lib.design-system';
1552
183
  import * as z from "zod";
1553
184
 
1554
185
  const schema = z.object({
@@ -1564,20 +195,7 @@ export function SignupForm() {
1564
195
  submitLabel="Submit"
1565
196
  />
1566
197
  );
1567
- }`
1568
- })
1569
- ]
1570
- }),
1571
- /* @__PURE__ */ jsxs9("div", {
1572
- className: "space-y-4",
1573
- children: [
1574
- /* @__PURE__ */ jsx9("h2", {
1575
- className: "font-bold text-2xl",
1576
- children: "Example: Code Block with Package Manager Tabs"
1577
- }),
1578
- /* @__PURE__ */ jsx9(CodeBlock9, {
1579
- language: "tsx",
1580
- code: `import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
198
+ }`})]}),n("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Example: Code Block with Package Manager Tabs"}),t(ie,{language:"tsx",code:`import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
1581
199
 
1582
200
  // For installation commands with package manager tabs
1583
201
  <InstallCommand package="my-package" />
@@ -1588,179 +206,7 @@ export function SignupForm() {
1588
206
  language="typescript"
1589
207
  code={\`const hello = "world";\`}
1590
208
  filename="example.ts"
1591
- />`
1592
- })
1593
- ]
1594
- }),
1595
- /* @__PURE__ */ jsxs9("div", {
1596
- className: "space-y-4",
1597
- children: [
1598
- /* @__PURE__ */ jsx9("h2", {
1599
- className: "font-bold text-2xl",
1600
- children: "Key Exports"
1601
- }),
1602
- /* @__PURE__ */ jsxs9("div", {
1603
- className: "grid gap-4 md:grid-cols-2",
1604
- children: [
1605
- /* @__PURE__ */ jsxs9("div", {
1606
- className: "card-subtle p-4",
1607
- children: [
1608
- /* @__PURE__ */ jsx9("h3", {
1609
- className: "mb-2 font-semibold",
1610
- children: "Organisms"
1611
- }),
1612
- /* @__PURE__ */ jsxs9("ul", {
1613
- className: "space-y-1 text-muted-foreground text-sm",
1614
- children: [
1615
- /* @__PURE__ */ jsx9("li", {
1616
- children: "AppLayout, AppHeader, AppSidebar"
1617
- }),
1618
- /* @__PURE__ */ jsx9("li", {
1619
- children: "MarketingLayout, HeroSection"
1620
- }),
1621
- /* @__PURE__ */ jsx9("li", {
1622
- children: "ListCardPage, ListTablePage"
1623
- })
1624
- ]
1625
- })
1626
- ]
1627
- }),
1628
- /* @__PURE__ */ jsxs9("div", {
1629
- className: "card-subtle p-4",
1630
- children: [
1631
- /* @__PURE__ */ jsx9("h3", {
1632
- className: "mb-2 font-semibold",
1633
- children: "Data & Forms"
1634
- }),
1635
- /* @__PURE__ */ jsxs9("ul", {
1636
- className: "space-y-1 text-muted-foreground text-sm",
1637
- children: [
1638
- /* @__PURE__ */ jsx9("li", {
1639
- children: "DataViewRenderer"
1640
- }),
1641
- /* @__PURE__ */ jsx9("li", {
1642
- children: "ZodForm"
1643
- }),
1644
- /* @__PURE__ */ jsx9("li", {
1645
- children: "FormLayout, FormDialog"
1646
- })
1647
- ]
1648
- })
1649
- ]
1650
- }),
1651
- /* @__PURE__ */ jsxs9("div", {
1652
- className: "card-subtle p-4",
1653
- children: [
1654
- /* @__PURE__ */ jsx9("h3", {
1655
- className: "mb-2 font-semibold",
1656
- children: "Code Display"
1657
- }),
1658
- /* @__PURE__ */ jsxs9("ul", {
1659
- className: "space-y-1 text-muted-foreground text-sm",
1660
- children: [
1661
- /* @__PURE__ */ jsx9("li", {
1662
- children: "CodeBlock (syntax highlighting)"
1663
- }),
1664
- /* @__PURE__ */ jsx9("li", {
1665
- children: "CommandTabs (package manager tabs)"
1666
- }),
1667
- /* @__PURE__ */ jsx9("li", {
1668
- children: "InstallCommand (convenience wrapper)"
1669
- }),
1670
- /* @__PURE__ */ jsx9("li", {
1671
- children: "CopyButton"
1672
- })
1673
- ]
1674
- })
1675
- ]
1676
- }),
1677
- /* @__PURE__ */ jsxs9("div", {
1678
- className: "card-subtle p-4",
1679
- children: [
1680
- /* @__PURE__ */ jsx9("h3", {
1681
- className: "mb-2 font-semibold",
1682
- children: "Providers"
1683
- }),
1684
- /* @__PURE__ */ jsx9("ul", {
1685
- className: "space-y-1 text-muted-foreground text-sm",
1686
- children: /* @__PURE__ */ jsx9("li", {
1687
- children: "PackageManagerProvider"
1688
- })
1689
- })
1690
- ]
1691
- })
1692
- ]
1693
- })
1694
- ]
1695
- }),
1696
- /* @__PURE__ */ jsxs9("div", {
1697
- className: "flex items-center gap-4 pt-4",
1698
- children: [
1699
- /* @__PURE__ */ jsx9(Link8, {
1700
- href: "/docs/libraries/ui-kit",
1701
- className: "btn-ghost",
1702
- children: "Previous: UI Kit"
1703
- }),
1704
- /* @__PURE__ */ jsxs9(Link8, {
1705
- href: "/docs/libraries/accessibility",
1706
- className: "btn-primary",
1707
- children: [
1708
- "Next: Accessibility ",
1709
- /* @__PURE__ */ jsx9(ChevronRight8, {
1710
- size: 16
1711
- })
1712
- ]
1713
- })
1714
- ]
1715
- })
1716
- ]
1717
- });
1718
- }
1719
-
1720
- // src/components/docs/libraries/LibrariesEvolutionPage.tsx
1721
- import { CodeBlock as CodeBlock10, InstallCommand as InstallCommand9 } from "@contractspec/lib.design-system";
1722
- import Link9 from "@contractspec/lib.ui-link";
1723
- import { ChevronRight as ChevronRight9 } from "lucide-react";
1724
- import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1725
- function LibrariesEvolutionPage() {
1726
- return /* @__PURE__ */ jsxs10("div", {
1727
- className: "space-y-8",
1728
- children: [
1729
- /* @__PURE__ */ jsxs10("div", {
1730
- className: "space-y-4",
1731
- children: [
1732
- /* @__PURE__ */ jsx10("h1", {
1733
- className: "font-bold text-4xl",
1734
- children: "@contractspec/lib.evolution"
1735
- }),
1736
- /* @__PURE__ */ jsx10("p", {
1737
- className: "text-lg text-muted-foreground",
1738
- children: "Analyze production telemetry, surface anomalies, and turn them into AI-reviewed spec proposals that can be approved, rolled out, or reverted."
1739
- })
1740
- ]
1741
- }),
1742
- /* @__PURE__ */ jsxs10("div", {
1743
- className: "space-y-4",
1744
- children: [
1745
- /* @__PURE__ */ jsx10("h2", {
1746
- className: "font-bold text-2xl",
1747
- children: "Installation"
1748
- }),
1749
- /* @__PURE__ */ jsx10(InstallCommand9, {
1750
- package: "@contractspec/lib.evolution"
1751
- })
1752
- ]
1753
- }),
1754
- /* @__PURE__ */ jsxs10("div", {
1755
- className: "space-y-3",
1756
- children: [
1757
- /* @__PURE__ */ jsx10("h2", {
1758
- className: "font-bold text-2xl",
1759
- children: "From telemetry to intent"
1760
- }),
1761
- /* @__PURE__ */ jsx10(CodeBlock10, {
1762
- language: "typescript",
1763
- code: `import { SpecAnalyzer } from '@contractspec/lib.evolution/analyzer';
209
+ />`})]}),n("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Key Exports"}),n("div",{className:"grid gap-4 md:grid-cols-2",children:[n("div",{className:"card-subtle p-4",children:[t("h3",{className:"mb-2 font-semibold",children:"Organisms"}),n("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[t("li",{children:"AppLayout, AppHeader, AppSidebar"}),t("li",{children:"MarketingLayout, HeroSection"}),t("li",{children:"ListCardPage, ListTablePage"})]})]}),n("div",{className:"card-subtle p-4",children:[t("h3",{className:"mb-2 font-semibold",children:"Data & Forms"}),n("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[t("li",{children:"DataViewRenderer"}),t("li",{children:"ZodForm"}),t("li",{children:"FormLayout, FormDialog"})]})]}),n("div",{className:"card-subtle p-4",children:[t("h3",{className:"mb-2 font-semibold",children:"Code Display"}),n("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[t("li",{children:"CodeBlock (syntax highlighting)"}),t("li",{children:"CommandTabs (package manager tabs)"}),t("li",{children:"InstallCommand (convenience wrapper)"}),t("li",{children:"CopyButton"})]})]}),n("div",{className:"card-subtle p-4",children:[t("h3",{className:"mb-2 font-semibold",children:"Providers"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:t("li",{children:"PackageManagerProvider"})})]})]})]}),n("div",{className:"flex items-center gap-4 pt-4",children:[t(ke,{href:"/docs/libraries/ui-kit",className:"btn-ghost",children:"Previous: UI Kit"}),n(ke,{href:"/docs/libraries/accessibility",className:"btn-primary",children:["Next: Accessibility ",t(vt,{size:16})]})]})]})}import{CodeBlock as re,InstallCommand as Nt}from"@contractspec/lib.design-system";import we from"@contractspec/lib.ui-link";import{ChevronRight as kt}from"lucide-react";import{jsx as k,jsxs as V}from"react/jsx-runtime";function wt(){return V("div",{className:"space-y-8",children:[V("div",{className:"space-y-4",children:[k("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.evolution"}),k("p",{className:"text-lg text-muted-foreground",children:"Analyze production telemetry, surface anomalies, and turn them into AI-reviewed spec proposals that can be approved, rolled out, or reverted."})]}),V("div",{className:"space-y-4",children:[k("h2",{className:"font-bold text-2xl",children:"Installation"}),k(Nt,{package:"@contractspec/lib.evolution"})]}),V("div",{className:"space-y-3",children:[k("h2",{className:"font-bold text-2xl",children:"From telemetry to intent"}),k(re,{language:"typescript",code:`import { SpecAnalyzer } from '@contractspec/lib.evolution/analyzer';
1764
210
  import { EvolutionPipeline } from '@contractspec/lib.observability';
1765
211
 
1766
212
  const analyzer = new SpecAnalyzer();
@@ -1775,20 +221,7 @@ pipeline.ingest({
1775
221
  success: false,
1776
222
  timestamp: new Date(),
1777
223
  errorCode: 'VALIDATION_FAILED',
1778
- });`
1779
- })
1780
- ]
1781
- }),
1782
- /* @__PURE__ */ jsxs10("div", {
1783
- className: "space-y-3",
1784
- children: [
1785
- /* @__PURE__ */ jsx10("h2", {
1786
- className: "font-bold text-2xl",
1787
- children: "Generate & approve suggestions"
1788
- }),
1789
- /* @__PURE__ */ jsx10(CodeBlock10, {
1790
- language: "typescript",
1791
- code: `import {
224
+ });`})]}),V("div",{className:"space-y-3",children:[k("h2",{className:"font-bold text-2xl",children:"Generate & approve suggestions"}),k(re,{language:"typescript",code:`import {
1792
225
  SpecGenerator,
1793
226
  SpecSuggestionOrchestrator,
1794
227
  InMemorySpecSuggestionRepository,
@@ -1802,20 +235,7 @@ const suggestion = generator.generateFromIntent(intentPattern, {
1802
235
  summary: 'Add PO number requirement for acme.corp',
1803
236
  });
1804
237
 
1805
- await orchestrator.submit(suggestion, sessionState);`
1806
- })
1807
- ]
1808
- }),
1809
- /* @__PURE__ */ jsxs10("div", {
1810
- className: "space-y-3",
1811
- children: [
1812
- /* @__PURE__ */ jsx10("h2", {
1813
- className: "font-bold text-2xl",
1814
- children: "Write approved specs back to git"
1815
- }),
1816
- /* @__PURE__ */ jsx10(CodeBlock10, {
1817
- language: "typescript",
1818
- code: `import { FileSystemSuggestionWriter } from '@contractspec/lib.evolution/approval';
238
+ await orchestrator.submit(suggestion, sessionState);`})]}),V("div",{className:"space-y-3",children:[k("h2",{className:"font-bold text-2xl",children:"Write approved specs back to git"}),k(re,{language:"typescript",code:`import { FileSystemSuggestionWriter } from '@contractspec/lib.evolution/approval';
1819
239
 
1820
240
  const writer = new FileSystemSuggestionWriter({
1821
241
  outputDir:
@@ -1826,164 +246,7 @@ await writer.write({
1826
246
  ...suggestion,
1827
247
  status: 'approved',
1828
248
  approvals: { reviewer: 'ops@contractspec', decidedAt: new Date() },
1829
- });`
1830
- })
1831
- ]
1832
- }),
1833
- /* @__PURE__ */ jsx10("div", {
1834
- className: "grid gap-4 md:grid-cols-2",
1835
- children: [
1836
- {
1837
- title: "Approvals by default",
1838
- description: "Every suggestion flows through @contractspec/lib.ai-agent's ApprovalWorkflow. Tune auto-approval thresholds per environment."
1839
- },
1840
- {
1841
- title: "Pluggable storage",
1842
- description: "Use the Prisma repository in production, in-memory for tests, or stream serialized suggestions into your own queue."
1843
- }
1844
- ].map((card) => /* @__PURE__ */ jsxs10("div", {
1845
- className: "card-subtle space-y-2 p-4",
1846
- children: [
1847
- /* @__PURE__ */ jsx10("h3", {
1848
- className: "font-semibold text-lg",
1849
- children: card.title
1850
- }),
1851
- /* @__PURE__ */ jsx10("p", {
1852
- className: "text-muted-foreground text-sm",
1853
- children: card.description
1854
- })
1855
- ]
1856
- }, card.title))
1857
- }),
1858
- /* @__PURE__ */ jsxs10("div", {
1859
- className: "flex items-center gap-4 pt-4",
1860
- children: [
1861
- /* @__PURE__ */ jsx10(Link9, {
1862
- href: "/docs/libraries",
1863
- className: "btn-ghost",
1864
- children: "Back to Libraries"
1865
- }),
1866
- /* @__PURE__ */ jsxs10(Link9, {
1867
- href: "/docs/libraries/observability",
1868
- className: "btn-primary",
1869
- children: [
1870
- "Next: Observability ",
1871
- /* @__PURE__ */ jsx10(ChevronRight9, {
1872
- size: 16
1873
- })
1874
- ]
1875
- })
1876
- ]
1877
- })
1878
- ]
1879
- });
1880
- }
1881
-
1882
- // src/components/docs/libraries/LibrariesGraphQLPage.tsx
1883
- import { CodeBlock as CodeBlock11, InstallCommand as InstallCommand10 } from "@contractspec/lib.design-system";
1884
- import Link10 from "@contractspec/lib.ui-link";
1885
- import { ChevronRight as ChevronRight10 } from "lucide-react";
1886
- import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1887
- function LibrariesGraphQLPage() {
1888
- return /* @__PURE__ */ jsxs11("div", {
1889
- className: "space-y-8",
1890
- children: [
1891
- /* @__PURE__ */ jsxs11("div", {
1892
- className: "space-y-4",
1893
- children: [
1894
- /* @__PURE__ */ jsx11("h1", {
1895
- className: "font-bold text-4xl",
1896
- children: "GraphQL Libraries"
1897
- }),
1898
- /* @__PURE__ */ jsx11("p", {
1899
- className: "text-muted-foreground",
1900
- children: "This suite of libraries enables seamless GraphQL integration, transforming your ContractSpecs into a type-safe Pothos schema, connecting with Prisma, and enabling Apollo Federation."
1901
- })
1902
- ]
1903
- }),
1904
- /* @__PURE__ */ jsxs11("div", {
1905
- className: "space-y-4",
1906
- children: [
1907
- /* @__PURE__ */ jsx11("h2", {
1908
- className: "font-bold text-2xl",
1909
- children: "Libraries"
1910
- }),
1911
- /* @__PURE__ */ jsxs11("div", {
1912
- className: "grid gap-4 md:grid-cols-1",
1913
- children: [
1914
- /* @__PURE__ */ jsxs11("div", {
1915
- className: "card-subtle p-6",
1916
- children: [
1917
- /* @__PURE__ */ jsx11("h3", {
1918
- className: "font-bold text-lg",
1919
- children: "@contractspec/lib.graphql-core"
1920
- }),
1921
- /* @__PURE__ */ jsx11("p", {
1922
- className: "mt-2 text-muted-foreground text-sm",
1923
- children: "The foundation. Provides a configured Pothos builder, common scalars (JSON, DateTime), and utilities for mapping ContractSpec I/O to Pothos types."
1924
- })
1925
- ]
1926
- }),
1927
- /* @__PURE__ */ jsxs11("div", {
1928
- className: "card-subtle p-6",
1929
- children: [
1930
- /* @__PURE__ */ jsx11("h3", {
1931
- className: "font-bold text-lg",
1932
- children: "@contractspec/lib.graphql-prisma"
1933
- }),
1934
- /* @__PURE__ */ jsx11("p", {
1935
- className: "mt-2 text-muted-foreground text-sm",
1936
- children: "Connects Pothos to Prisma. Automatically generates GraphQL types from your Prisma schema and optimizes queries to prevent N+1 issues."
1937
- })
1938
- ]
1939
- }),
1940
- /* @__PURE__ */ jsxs11("div", {
1941
- className: "card-subtle p-6",
1942
- children: [
1943
- /* @__PURE__ */ jsx11("h3", {
1944
- className: "font-bold text-lg",
1945
- children: "@contractspec/lib.graphql-federation"
1946
- }),
1947
- /* @__PURE__ */ jsx11("p", {
1948
- className: "mt-2 text-muted-foreground text-sm",
1949
- children: "Adds Apollo Federation V2 support. Allows your subgraph to define keys and entities, making it ready for a supergraph."
1950
- })
1951
- ]
1952
- })
1953
- ]
1954
- })
1955
- ]
1956
- }),
1957
- /* @__PURE__ */ jsxs11("div", {
1958
- className: "space-y-4",
1959
- children: [
1960
- /* @__PURE__ */ jsx11("h2", {
1961
- className: "font-bold text-2xl",
1962
- children: "Installation"
1963
- }),
1964
- /* @__PURE__ */ jsx11(InstallCommand10, {
1965
- package: [
1966
- "@contractspec/lib.graphql-core",
1967
- "@contractspec/lib.graphql-prisma",
1968
- "@contractspec/lib.graphql-federation"
1969
- ]
1970
- })
1971
- ]
1972
- }),
1973
- /* @__PURE__ */ jsxs11("div", {
1974
- className: "space-y-4",
1975
- children: [
1976
- /* @__PURE__ */ jsx11("h2", {
1977
- className: "font-bold text-2xl",
1978
- children: "Usage: Building a Schema"
1979
- }),
1980
- /* @__PURE__ */ jsx11("p", {
1981
- className: "text-muted-foreground",
1982
- children: "Here's how to assemble a federated GraphQL schema from your specs:"
1983
- }),
1984
- /* @__PURE__ */ jsx11(CodeBlock11, {
1985
- language: "typescript",
1986
- code: `import { builder } from '@contractspec/lib.graphql-core';
249
+ });`})]}),k("div",{className:"grid gap-4 md:grid-cols-2",children:[{title:"Approvals by default",description:"Every suggestion flows through @contractspec/lib.ai-agent's ApprovalWorkflow. Tune auto-approval thresholds per environment."},{title:"Pluggable storage",description:"Use the Prisma repository in production, in-memory for tests, or stream serialized suggestions into your own queue."}].map((E)=>V("div",{className:"card-subtle space-y-2 p-4",children:[k("h3",{className:"font-semibold text-lg",children:E.title}),k("p",{className:"text-muted-foreground text-sm",children:E.description})]},E.title))}),V("div",{className:"flex items-center gap-4 pt-4",children:[k(we,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),V(we,{href:"/docs/libraries/observability",className:"btn-primary",children:["Next: Observability ",k(kt,{size:16})]})]})]})}import{CodeBlock as Ct,InstallCommand as St}from"@contractspec/lib.design-system";import Ce from"@contractspec/lib.ui-link";import{ChevronRight as Lt}from"lucide-react";import{jsx as u,jsxs as y}from"react/jsx-runtime";function Rt(){return y("div",{className:"space-y-8",children:[y("div",{className:"space-y-4",children:[u("h1",{className:"font-bold text-4xl",children:"GraphQL Libraries"}),u("p",{className:"text-muted-foreground",children:"This suite of libraries enables seamless GraphQL integration, transforming your ContractSpecs into a type-safe Pothos schema, connecting with Prisma, and enabling Apollo Federation."})]}),y("div",{className:"space-y-4",children:[u("h2",{className:"font-bold text-2xl",children:"Libraries"}),y("div",{className:"grid gap-4 md:grid-cols-1",children:[y("div",{className:"card-subtle p-6",children:[u("h3",{className:"font-bold text-lg",children:"@contractspec/lib.graphql-core"}),u("p",{className:"mt-2 text-muted-foreground text-sm",children:"The foundation. Provides a configured Pothos builder, common scalars (JSON, DateTime), and utilities for mapping ContractSpec I/O to Pothos types."})]}),y("div",{className:"card-subtle p-6",children:[u("h3",{className:"font-bold text-lg",children:"@contractspec/lib.graphql-prisma"}),u("p",{className:"mt-2 text-muted-foreground text-sm",children:"Connects Pothos to Prisma. Automatically generates GraphQL types from your Prisma schema and optimizes queries to prevent N+1 issues."})]}),y("div",{className:"card-subtle p-6",children:[u("h3",{className:"font-bold text-lg",children:"@contractspec/lib.graphql-federation"}),u("p",{className:"mt-2 text-muted-foreground text-sm",children:"Adds Apollo Federation V2 support. Allows your subgraph to define keys and entities, making it ready for a supergraph."})]})]})]}),y("div",{className:"space-y-4",children:[u("h2",{className:"font-bold text-2xl",children:"Installation"}),u(St,{package:["@contractspec/lib.graphql-core","@contractspec/lib.graphql-prisma","@contractspec/lib.graphql-federation"]})]}),y("div",{className:"space-y-4",children:[u("h2",{className:"font-bold text-2xl",children:"Usage: Building a Schema"}),u("p",{className:"text-muted-foreground",children:"Here's how to assemble a federated GraphQL schema from your specs:"}),u(Ct,{language:"typescript",code:`import { builder } from '@contractspec/lib.graphql-core';
1987
250
  import { registerContractsOnBuilder } from '@contractspec/lib.contracts-runtime-server-graphql/graphql-pothos';
1988
251
  import { OperationSpecRegistry } from '@contractspec/lib.contracts-spec';
1989
252
  import { MySpecs } from './specs';
@@ -1997,116 +260,7 @@ registerContractsOnBuilder(builder, registry);
1997
260
 
1998
261
  // 3. Build and print schema
1999
262
  const schema = builder.toSchema();
2000
- console.log(printSchema(schema));`
2001
- })
2002
- ]
2003
- }),
2004
- /* @__PURE__ */ jsxs11("div", {
2005
- className: "space-y-4",
2006
- children: [
2007
- /* @__PURE__ */ jsx11("h2", {
2008
- className: "font-bold text-2xl",
2009
- children: "Features"
2010
- }),
2011
- /* @__PURE__ */ jsxs11("ul", {
2012
- className: "list-inside list-disc space-y-2 text-muted-foreground",
2013
- children: [
2014
- /* @__PURE__ */ jsxs11("li", {
2015
- children: [
2016
- /* @__PURE__ */ jsx11("strong", {
2017
- children: "Code-First"
2018
- }),
2019
- ": Define schema in TypeScript (Pothos), get SDL as artifact."
2020
- ]
2021
- }),
2022
- /* @__PURE__ */ jsxs11("li", {
2023
- children: [
2024
- /* @__PURE__ */ jsx11("strong", {
2025
- children: "Spec Integration"
2026
- }),
2027
- ": `registerContractsOnBuilder` automatically converts Command/Query specs into Mutations/Queries."
2028
- ]
2029
- }),
2030
- /* @__PURE__ */ jsxs11("li", {
2031
- children: [
2032
- /* @__PURE__ */ jsx11("strong", {
2033
- children: "Federation Ready"
2034
- }),
2035
- ": Just add `provider: 'federation'` to your config."
2036
- ]
2037
- })
2038
- ]
2039
- })
2040
- ]
2041
- }),
2042
- /* @__PURE__ */ jsxs11("div", {
2043
- className: "flex items-center gap-4 pt-4",
2044
- children: [
2045
- /* @__PURE__ */ jsxs11(Link10, {
2046
- href: "/docs/libraries/data-backend",
2047
- className: "btn-primary",
2048
- children: [
2049
- "Next: Data & Backend ",
2050
- /* @__PURE__ */ jsx11(ChevronRight10, {
2051
- size: 16
2052
- })
2053
- ]
2054
- }),
2055
- /* @__PURE__ */ jsx11(Link10, {
2056
- href: "/docs/libraries",
2057
- className: "btn-ghost",
2058
- children: "Back to Libraries"
2059
- })
2060
- ]
2061
- })
2062
- ]
2063
- });
2064
- }
2065
-
2066
- // src/components/docs/libraries/LibrariesGrowthPage.tsx
2067
- import { CodeBlock as CodeBlock12, InstallCommand as InstallCommand11 } from "@contractspec/lib.design-system";
2068
- import Link11 from "@contractspec/lib.ui-link";
2069
- import { ChevronRight as ChevronRight11 } from "lucide-react";
2070
- import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
2071
- function LibrariesGrowthPage() {
2072
- return /* @__PURE__ */ jsxs12("div", {
2073
- className: "space-y-8",
2074
- children: [
2075
- /* @__PURE__ */ jsxs12("div", {
2076
- className: "space-y-4",
2077
- children: [
2078
- /* @__PURE__ */ jsx12("h1", {
2079
- className: "font-bold text-4xl",
2080
- children: "@contractspec/lib.growth"
2081
- }),
2082
- /* @__PURE__ */ jsx12("p", {
2083
- className: "text-lg text-muted-foreground",
2084
- children: "Launch experiments without third-party SDKs. Register variants, assign users deterministically, track exposures, and compute significance."
2085
- })
2086
- ]
2087
- }),
2088
- /* @__PURE__ */ jsxs12("div", {
2089
- className: "space-y-4",
2090
- children: [
2091
- /* @__PURE__ */ jsx12("h2", {
2092
- className: "font-bold text-2xl",
2093
- children: "Installation"
2094
- }),
2095
- /* @__PURE__ */ jsx12(InstallCommand11, {
2096
- package: "@contractspec/lib.growth"
2097
- })
2098
- ]
2099
- }),
2100
- /* @__PURE__ */ jsxs12("div", {
2101
- className: "space-y-3",
2102
- children: [
2103
- /* @__PURE__ */ jsx12("h2", {
2104
- className: "font-bold text-2xl",
2105
- children: "Register + assign"
2106
- }),
2107
- /* @__PURE__ */ jsx12(CodeBlock12, {
2108
- language: "typescript",
2109
- code: `import { ExperimentRegistry, ExperimentRunner } from '@contractspec/lib.growth/experiments';
263
+ console.log(printSchema(schema));`})]}),y("div",{className:"space-y-4",children:[u("h2",{className:"font-bold text-2xl",children:"Features"}),y("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[y("li",{children:[u("strong",{children:"Code-First"}),": Define schema in TypeScript (Pothos), get SDL as artifact."]}),y("li",{children:[u("strong",{children:"Spec Integration"}),": `registerContractsOnBuilder` automatically converts Command/Query specs into Mutations/Queries."]}),y("li",{children:[u("strong",{children:"Federation Ready"}),": Just add `provider: 'federation'` to your config."]})]})]}),y("div",{className:"flex items-center gap-4 pt-4",children:[y(Ce,{href:"/docs/libraries/data-backend",className:"btn-primary",children:["Next: Data & Backend ",u(Lt,{size:16})]}),u(Ce,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"})]})]})}import{CodeBlock as Se,InstallCommand as It}from"@contractspec/lib.design-system";import Le from"@contractspec/lib.ui-link";import{ChevronRight as Tt}from"lucide-react";import{jsx as U,jsxs as x}from"react/jsx-runtime";function At(){return x("div",{className:"space-y-8",children:[x("div",{className:"space-y-4",children:[U("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.growth"}),U("p",{className:"text-lg text-muted-foreground",children:"Launch experiments without third-party SDKs. Register variants, assign users deterministically, track exposures, and compute significance."})]}),x("div",{className:"space-y-4",children:[U("h2",{className:"font-bold text-2xl",children:"Installation"}),U(It,{package:"@contractspec/lib.growth"})]}),x("div",{className:"space-y-3",children:[U("h2",{className:"font-bold text-2xl",children:"Register + assign"}),U(Se,{language:"typescript",code:`import { ExperimentRegistry, ExperimentRunner } from '@contractspec/lib.growth/experiments';
2110
264
 
2111
265
  const registry = new ExperimentRegistry().register({
2112
266
  key: 'pricing.cta',
@@ -2120,20 +274,7 @@ const registry = new ExperimentRegistry().register({
2120
274
  });
2121
275
 
2122
276
  const runner = new ExperimentRunner();
2123
- const assignment = runner.assign(registry.get('pricing.cta')!, 'user_123');`
2124
- })
2125
- ]
2126
- }),
2127
- /* @__PURE__ */ jsxs12("div", {
2128
- className: "space-y-3",
2129
- children: [
2130
- /* @__PURE__ */ jsx12("h2", {
2131
- className: "font-bold text-2xl",
2132
- children: "Track + analyze"
2133
- }),
2134
- /* @__PURE__ */ jsx12(CodeBlock12, {
2135
- language: "typescript",
2136
- code: `import { ExperimentTracker } from '@contractspec/lib.growth/tracker';
277
+ const assignment = runner.assign(registry.get('pricing.cta')!, 'user_123');`})]}),x("div",{className:"space-y-3",children:[U("h2",{className:"font-bold text-2xl",children:"Track + analyze"}),U(Se,{language:"typescript",code:`import { ExperimentTracker } from '@contractspec/lib.growth/tracker';
2137
278
  import { StatsEngine } from '@contractspec/lib.growth/stats';
2138
279
 
2139
280
  const tracker = new ExperimentTracker(new InMemoryTrackerStore());
@@ -2149,115 +290,11 @@ await tracker.recordSample({
2149
290
  const stats = new StatsEngine().summarize(
2150
291
  await tracker.getSamples(assignment.experimentKey, 'demo_booked'),
2151
292
  'demo_booked'
2152
- );`
2153
- })
2154
- ]
2155
- }),
2156
- /* @__PURE__ */ jsxs12("div", {
2157
- className: "flex items-center gap-4 pt-4",
2158
- children: [
2159
- /* @__PURE__ */ jsx12(Link11, {
2160
- href: "/docs/libraries",
2161
- className: "btn-ghost",
2162
- children: "Back to Libraries"
2163
- }),
2164
- /* @__PURE__ */ jsxs12(Link11, {
2165
- href: "/docs/libraries/analytics",
2166
- className: "btn-primary",
2167
- children: [
2168
- "Next: Analytics ",
2169
- /* @__PURE__ */ jsx12(ChevronRight11, {
2170
- size: 16
2171
- })
2172
- ]
2173
- })
2174
- ]
2175
- })
2176
- ]
2177
- });
2178
- }
2179
-
2180
- // src/components/docs/libraries/LibrariesMultiTenancyPage.tsx
2181
- import { CodeBlock as CodeBlock13, InstallCommand as InstallCommand12 } from "@contractspec/lib.design-system";
2182
- import Link12 from "@contractspec/lib.ui-link";
2183
- import { ChevronRight as ChevronRight12 } from "lucide-react";
2184
- import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
2185
- function LibrariesMultiTenancyPage() {
2186
- return /* @__PURE__ */ jsxs13("div", {
2187
- className: "space-y-8",
2188
- children: [
2189
- /* @__PURE__ */ jsxs13("div", {
2190
- className: "space-y-4",
2191
- children: [
2192
- /* @__PURE__ */ jsx13("h1", {
2193
- className: "font-bold text-4xl",
2194
- children: "Multi-Tenancy Library"
2195
- }),
2196
- /* @__PURE__ */ jsxs13("p", {
2197
- className: "text-lg text-muted-foreground",
2198
- children: [
2199
- "The ",
2200
- /* @__PURE__ */ jsx13("code", {
2201
- children: "@contractspec/lib.multi-tenancy"
2202
- }),
2203
- " library provides the core building blocks for secure SaaS applications."
2204
- ]
2205
- })
2206
- ]
2207
- }),
2208
- /* @__PURE__ */ jsxs13("div", {
2209
- className: "space-y-4",
2210
- children: [
2211
- /* @__PURE__ */ jsx13("h2", {
2212
- className: "font-bold text-2xl",
2213
- children: "Installation"
2214
- }),
2215
- /* @__PURE__ */ jsx13(InstallCommand12, {
2216
- package: "@contractspec/lib.multi-tenancy"
2217
- })
2218
- ]
2219
- }),
2220
- /* @__PURE__ */ jsxs13("div", {
2221
- className: "space-y-4",
2222
- children: [
2223
- /* @__PURE__ */ jsx13("h2", {
2224
- className: "font-bold text-2xl",
2225
- children: "Prisma RLS Middleware"
2226
- }),
2227
- /* @__PURE__ */ jsxs13("p", {
2228
- className: "text-muted-foreground",
2229
- children: [
2230
- "Automatically injects ",
2231
- /* @__PURE__ */ jsx13("code", {
2232
- children: "tenantId"
2233
- }),
2234
- " into all queries."
2235
- ]
2236
- }),
2237
- /* @__PURE__ */ jsx13(CodeBlock13, {
2238
- language: "typescript",
2239
- code: `import { createRlsMiddleware } from '@contractspec/lib.multi-tenancy/rls';
293
+ );`})]}),x("div",{className:"flex items-center gap-4 pt-4",children:[U(Le,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),x(Le,{href:"/docs/libraries/analytics",className:"btn-primary",children:["Next: Analytics ",U(Tt,{size:16})]})]})]})}import{CodeBlock as Re,InstallCommand as Bt}from"@contractspec/lib.design-system";import Ie from"@contractspec/lib.ui-link";import{ChevronRight as Pt}from"lucide-react";import{jsx as D,jsxs as Q}from"react/jsx-runtime";function Ot(){return Q("div",{className:"space-y-8",children:[Q("div",{className:"space-y-4",children:[D("h1",{className:"font-bold text-4xl",children:"Multi-Tenancy Library"}),Q("p",{className:"text-lg text-muted-foreground",children:["The ",D("code",{children:"@contractspec/lib.multi-tenancy"})," library provides the core building blocks for secure SaaS applications."]})]}),Q("div",{className:"space-y-4",children:[D("h2",{className:"font-bold text-2xl",children:"Installation"}),D(Bt,{package:"@contractspec/lib.multi-tenancy"})]}),Q("div",{className:"space-y-4",children:[D("h2",{className:"font-bold text-2xl",children:"Prisma RLS Middleware"}),Q("p",{className:"text-muted-foreground",children:["Automatically injects ",D("code",{children:"tenantId"})," into all queries."]}),D(Re,{language:"typescript",code:`import { createRlsMiddleware } from '@contractspec/lib.multi-tenancy/rls';
2240
294
  import { prisma } from './db';
2241
295
  import { getTenantId } from './context';
2242
296
 
2243
- prisma.$use(createRlsMiddleware(() => getTenantId()));`
2244
- })
2245
- ]
2246
- }),
2247
- /* @__PURE__ */ jsxs13("div", {
2248
- className: "space-y-4",
2249
- children: [
2250
- /* @__PURE__ */ jsx13("h2", {
2251
- className: "font-bold text-2xl",
2252
- children: "Provisioning Service"
2253
- }),
2254
- /* @__PURE__ */ jsx13("p", {
2255
- className: "text-muted-foreground",
2256
- children: "Automates the creation of new tenants, including database setup and default user creation."
2257
- }),
2258
- /* @__PURE__ */ jsx13(CodeBlock13, {
2259
- language: "typescript",
2260
- code: `import { TenantProvisioningService } from '@contractspec/lib.multi-tenancy/provisioning';
297
+ prisma.$use(createRlsMiddleware(() => getTenantId()));`})]}),Q("div",{className:"space-y-4",children:[D("h2",{className:"font-bold text-2xl",children:"Provisioning Service"}),D("p",{className:"text-muted-foreground",children:"Automates the creation of new tenants, including database setup and default user creation."}),D(Re,{language:"typescript",code:`import { TenantProvisioningService } from '@contractspec/lib.multi-tenancy/provisioning';
2261
298
 
2262
299
  const service = new TenantProvisioningService({ db: prisma });
2263
300
  await service.provision({
@@ -2265,144 +302,20 @@ await service.provision({
2265
302
  name: 'Acme Corp',
2266
303
  slug: 'acme',
2267
304
  ownerEmail: 'admin@acme.com'
2268
- });`
2269
- })
2270
- ]
2271
- }),
2272
- /* @__PURE__ */ jsxs13("div", {
2273
- className: "flex items-center gap-4 pt-4",
2274
- children: [
2275
- /* @__PURE__ */ jsx13(Link12, {
2276
- href: "/docs/libraries",
2277
- className: "btn-ghost",
2278
- children: "Back to Libraries"
2279
- }),
2280
- /* @__PURE__ */ jsxs13(Link12, {
2281
- href: "/docs/libraries/progressive-delivery",
2282
- className: "btn-primary",
2283
- children: [
2284
- "Next: Progressive Delivery ",
2285
- /* @__PURE__ */ jsx13(ChevronRight12, {
2286
- size: 16
2287
- })
2288
- ]
2289
- })
2290
- ]
2291
- })
2292
- ]
2293
- });
2294
- }
2295
-
2296
- // src/components/docs/libraries/LibrariesObservabilityPage.tsx
2297
- import { CodeBlock as CodeBlock14, InstallCommand as InstallCommand13 } from "@contractspec/lib.design-system";
2298
- import Link13 from "@contractspec/lib.ui-link";
2299
- import { ChevronRight as ChevronRight13 } from "lucide-react";
2300
- import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
2301
- function LibrariesObservabilityPage() {
2302
- return /* @__PURE__ */ jsxs14("div", {
2303
- className: "space-y-8",
2304
- children: [
2305
- /* @__PURE__ */ jsxs14("div", {
2306
- className: "space-y-4",
2307
- children: [
2308
- /* @__PURE__ */ jsx14("h1", {
2309
- className: "font-bold text-4xl",
2310
- children: "Observability Library"
2311
- }),
2312
- /* @__PURE__ */ jsxs14("p", {
2313
- className: "text-lg text-muted-foreground",
2314
- children: [
2315
- "The ",
2316
- /* @__PURE__ */ jsx14("code", {
2317
- children: "@contractspec/lib.observability"
2318
- }),
2319
- " library provides a thin wrapper around OpenTelemetry to simplify instrumentation."
2320
- ]
2321
- })
2322
- ]
2323
- }),
2324
- /* @__PURE__ */ jsxs14("div", {
2325
- className: "space-y-4",
2326
- children: [
2327
- /* @__PURE__ */ jsx14("h2", {
2328
- className: "font-bold text-2xl",
2329
- children: "Installation"
2330
- }),
2331
- /* @__PURE__ */ jsx14(InstallCommand13, {
2332
- package: "@contractspec/lib.observability"
2333
- })
2334
- ]
2335
- }),
2336
- /* @__PURE__ */ jsxs14("div", {
2337
- className: "space-y-4",
2338
- children: [
2339
- /* @__PURE__ */ jsx14("h2", {
2340
- className: "font-bold text-2xl",
2341
- children: "Tracing"
2342
- }),
2343
- /* @__PURE__ */ jsx14(CodeBlock14, {
2344
- language: "typescript",
2345
- code: `import { traceAsync, traceSync } from '@contractspec/lib.observability/tracing';
305
+ });`})]}),Q("div",{className:"flex items-center gap-4 pt-4",children:[D(Ie,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),Q(Ie,{href:"/docs/libraries/progressive-delivery",className:"btn-primary",children:["Next: Progressive Delivery ",D(Pt,{size:16})]})]})]})}import{CodeBlock as ae,InstallCommand as Et}from"@contractspec/lib.design-system";import Te from"@contractspec/lib.ui-link";import{ChevronRight as zt}from"lucide-react";import{jsx as N,jsxs as q}from"react/jsx-runtime";function Mt(){return q("div",{className:"space-y-8",children:[q("div",{className:"space-y-4",children:[N("h1",{className:"font-bold text-4xl",children:"Observability Library"}),q("p",{className:"text-lg text-muted-foreground",children:["The ",N("code",{children:"@contractspec/lib.observability"})," library provides a thin wrapper around OpenTelemetry to simplify instrumentation."]})]}),q("div",{className:"space-y-4",children:[N("h2",{className:"font-bold text-2xl",children:"Installation"}),N(Et,{package:"@contractspec/lib.observability"})]}),q("div",{className:"space-y-4",children:[N("h2",{className:"font-bold text-2xl",children:"Tracing"}),N(ae,{language:"typescript",code:`import { traceAsync, traceSync } from '@contractspec/lib.observability/tracing';
2346
306
 
2347
307
  await traceAsync('process_order', async (span) => {
2348
308
  span.setAttribute('order_id', order.id);
2349
309
  await db.save(order);
2350
- });`
2351
- })
2352
- ]
2353
- }),
2354
- /* @__PURE__ */ jsxs14("div", {
2355
- className: "space-y-4",
2356
- children: [
2357
- /* @__PURE__ */ jsx14("h2", {
2358
- className: "font-bold text-2xl",
2359
- children: "Metrics"
2360
- }),
2361
- /* @__PURE__ */ jsx14(CodeBlock14, {
2362
- language: "typescript",
2363
- code: `import { createCounter, createHistogram } from '@contractspec/lib.observability/metrics';
310
+ });`})]}),q("div",{className:"space-y-4",children:[N("h2",{className:"font-bold text-2xl",children:"Metrics"}),N(ae,{language:"typescript",code:`import { createCounter, createHistogram } from '@contractspec/lib.observability/metrics';
2364
311
 
2365
312
  const ordersCounter = createCounter('orders_total');
2366
313
  const latencyHistogram = createHistogram('request_duration_seconds');
2367
314
 
2368
315
  ordersCounter.add(1, { status: 'success' });
2369
- latencyHistogram.record(0.123);`
2370
- })
2371
- ]
2372
- }),
2373
- /* @__PURE__ */ jsxs14("div", {
2374
- className: "space-y-4",
2375
- children: [
2376
- /* @__PURE__ */ jsx14("h2", {
2377
- className: "font-bold text-2xl",
2378
- children: "Middleware"
2379
- }),
2380
- /* @__PURE__ */ jsx14("p", {
2381
- className: "text-muted-foreground",
2382
- children: "Automatically instrument your HTTP handlers:"
2383
- }),
2384
- /* @__PURE__ */ jsx14(CodeBlock14, {
2385
- language: "typescript",
2386
- code: `import { createTracingMiddleware } from '@contractspec/lib.observability/tracing/middleware';
316
+ latencyHistogram.record(0.123);`})]}),q("div",{className:"space-y-4",children:[N("h2",{className:"font-bold text-2xl",children:"Middleware"}),N("p",{className:"text-muted-foreground",children:"Automatically instrument your HTTP handlers:"}),N(ae,{language:"typescript",code:`import { createTracingMiddleware } from '@contractspec/lib.observability/tracing/middleware';
2387
317
 
2388
- app.use(createTracingMiddleware());`
2389
- })
2390
- ]
2391
- }),
2392
- /* @__PURE__ */ jsxs14("div", {
2393
- className: "space-y-4",
2394
- children: [
2395
- /* @__PURE__ */ jsx14("h2", {
2396
- className: "font-bold text-2xl",
2397
- children: "Anomaly Detection"
2398
- }),
2399
- /* @__PURE__ */ jsx14("p", {
2400
- className: "text-muted-foreground text-sm",
2401
- children: "Includes baseline calculation and anomaly detection helpers for auto-rollback without writing custom math."
2402
- }),
2403
- /* @__PURE__ */ jsx14(CodeBlock14, {
2404
- language: "typescript",
2405
- code: `import { AnomalyDetector, RootCauseAnalyzer, AlertManager } from '@contractspec/lib.observability';
318
+ app.use(createTracingMiddleware());`})]}),q("div",{className:"space-y-4",children:[N("h2",{className:"font-bold text-2xl",children:"Anomaly Detection"}),N("p",{className:"text-muted-foreground text-sm",children:"Includes baseline calculation and anomaly detection helpers for auto-rollback without writing custom math."}),N(ae,{language:"typescript",code:`import { AnomalyDetector, RootCauseAnalyzer, AlertManager } from '@contractspec/lib.observability';
2406
319
 
2407
320
  const detector = new AnomalyDetector({ errorRateDelta: 0.4 });
2408
321
  const analyzer = new RootCauseAnalyzer();
@@ -2412,78 +325,7 @@ const signals = detector.evaluate(point);
2412
325
  signals.forEach((signal) => {
2413
326
  const analysis = analyzer.analyze(signal, recentDeployments);
2414
327
  alertManager.notify(signal, analysis);
2415
- });`
2416
- })
2417
- ]
2418
- }),
2419
- /* @__PURE__ */ jsxs14("div", {
2420
- className: "flex items-center gap-4 pt-4",
2421
- children: [
2422
- /* @__PURE__ */ jsx14(Link13, {
2423
- href: "/docs/libraries",
2424
- className: "btn-ghost",
2425
- children: "Back to Libraries"
2426
- }),
2427
- /* @__PURE__ */ jsxs14(Link13, {
2428
- href: "/docs/libraries/slo",
2429
- className: "btn-primary",
2430
- children: [
2431
- "Next: SLO ",
2432
- /* @__PURE__ */ jsx14(ChevronRight13, {
2433
- size: 16
2434
- })
2435
- ]
2436
- })
2437
- ]
2438
- })
2439
- ]
2440
- });
2441
- }
2442
-
2443
- // src/components/docs/libraries/LibrariesOverlayEnginePage.tsx
2444
- import { CodeBlock as CodeBlock15, InstallCommand as InstallCommand14 } from "@contractspec/lib.design-system";
2445
- import Link14 from "@contractspec/lib.ui-link";
2446
- import { ChevronRight as ChevronRight14 } from "lucide-react";
2447
- import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
2448
- function LibrariesOverlayEnginePage() {
2449
- return /* @__PURE__ */ jsxs15("div", {
2450
- className: "space-y-8",
2451
- children: [
2452
- /* @__PURE__ */ jsxs15("div", {
2453
- className: "space-y-4",
2454
- children: [
2455
- /* @__PURE__ */ jsx15("h1", {
2456
- className: "font-bold text-4xl",
2457
- children: "Overlay Engine"
2458
- }),
2459
- /* @__PURE__ */ jsx15("p", {
2460
- className: "text-lg text-muted-foreground",
2461
- children: "`@contractspec/lib.overlay-engine` keeps OverlaySpecs typed, signed, and auditable across tenants, roles, users, and devices."
2462
- })
2463
- ]
2464
- }),
2465
- /* @__PURE__ */ jsxs15("div", {
2466
- className: "space-y-4",
2467
- children: [
2468
- /* @__PURE__ */ jsx15("h2", {
2469
- className: "font-bold text-2xl",
2470
- children: "Installation"
2471
- }),
2472
- /* @__PURE__ */ jsx15(InstallCommand14, {
2473
- package: "@contractspec/lib.overlay-engine"
2474
- })
2475
- ]
2476
- }),
2477
- /* @__PURE__ */ jsxs15("div", {
2478
- className: "space-y-4",
2479
- children: [
2480
- /* @__PURE__ */ jsx15("h2", {
2481
- className: "font-bold text-2xl",
2482
- children: "Define + Sign"
2483
- }),
2484
- /* @__PURE__ */ jsx15(CodeBlock15, {
2485
- language: "typescript",
2486
- code: `import { defineOverlay } from '@contractspec/lib.overlay-engine/spec';
328
+ });`})]}),q("div",{className:"flex items-center gap-4 pt-4",children:[N(Te,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),q(Te,{href:"/docs/libraries/slo",className:"btn-primary",children:["Next: SLO ",N(zt,{size:16})]})]})]})}import{CodeBlock as ne,InstallCommand as Dt}from"@contractspec/lib.design-system";import Ae from"@contractspec/lib.ui-link";import{ChevronRight as Wt}from"lucide-react";import{jsx as I,jsxs as Y}from"react/jsx-runtime";function Gt(){return Y("div",{className:"space-y-8",children:[Y("div",{className:"space-y-4",children:[I("h1",{className:"font-bold text-4xl",children:"Overlay Engine"}),I("p",{className:"text-lg text-muted-foreground",children:"`@contractspec/lib.overlay-engine` keeps OverlaySpecs typed, signed, and auditable across tenants, roles, users, and devices."})]}),Y("div",{className:"space-y-4",children:[I("h2",{className:"font-bold text-2xl",children:"Installation"}),I(Dt,{package:"@contractspec/lib.overlay-engine"})]}),Y("div",{className:"space-y-4",children:[I("h2",{className:"font-bold text-2xl",children:"Define + Sign"}),I(ne,{language:"typescript",code:`import { defineOverlay } from '@contractspec/lib.overlay-engine/spec';
2487
329
  import { signOverlay } from '@contractspec/lib.overlay-engine/signer';
2488
330
 
2489
331
  const overlay = defineOverlay({
@@ -2493,24 +335,7 @@ const overlay = defineOverlay({
2493
335
  modifications: [{ type: 'hideField', field: 'internalNotes' }],
2494
336
  });
2495
337
 
2496
- const signed = await signOverlay(overlay, privateKeyPem);`
2497
- })
2498
- ]
2499
- }),
2500
- /* @__PURE__ */ jsxs15("div", {
2501
- className: "space-y-4",
2502
- children: [
2503
- /* @__PURE__ */ jsx15("h2", {
2504
- className: "font-bold text-2xl",
2505
- children: "Runtime"
2506
- }),
2507
- /* @__PURE__ */ jsx15("p", {
2508
- className: "text-muted-foreground",
2509
- children: "`OverlayRegistry` stores signed overlays with specificity scoring. `OverlayEngine` merges modifications and emits audit events."
2510
- }),
2511
- /* @__PURE__ */ jsx15(CodeBlock15, {
2512
- language: "typescript",
2513
- code: `const registry = new OverlayRegistry();
338
+ const signed = await signOverlay(overlay, privateKeyPem);`})]}),Y("div",{className:"space-y-4",children:[I("h2",{className:"font-bold text-2xl",children:"Runtime"}),I("p",{className:"text-muted-foreground",children:"`OverlayRegistry` stores signed overlays with specificity scoring. `OverlayEngine` merges modifications and emits audit events."}),I(ne,{language:"typescript",code:`const registry = new OverlayRegistry();
2514
339
  registry.register(signed);
2515
340
 
2516
341
  const engine = new OverlayEngine({
@@ -2522,273 +347,13 @@ const result = engine.apply({
2522
347
  target: { fields },
2523
348
  capability: 'billing.createOrder',
2524
349
  tenantId: 'acme',
2525
- });`
2526
- })
2527
- ]
2528
- }),
2529
- /* @__PURE__ */ jsxs15("div", {
2530
- className: "space-y-4",
2531
- children: [
2532
- /* @__PURE__ */ jsx15("h2", {
2533
- className: "font-bold text-2xl",
2534
- children: "React Hooks"
2535
- }),
2536
- /* @__PURE__ */ jsx15("p", {
2537
- className: "text-muted-foreground",
2538
- children: "Render overlays in React/React Native via `useOverlay`."
2539
- }),
2540
- /* @__PURE__ */ jsx15(CodeBlock15, {
2541
- language: "typescript",
2542
- code: `import { useOverlay } from '@contractspec/lib.overlay-engine/react';
350
+ });`})]}),Y("div",{className:"space-y-4",children:[I("h2",{className:"font-bold text-2xl",children:"React Hooks"}),I("p",{className:"text-muted-foreground",children:"Render overlays in React/React Native via `useOverlay`."}),I(ne,{language:"typescript",code:`import { useOverlay } from '@contractspec/lib.overlay-engine/react';
2543
351
 
2544
352
  const { target } = useOverlay(engine, {
2545
353
  target: { fields },
2546
354
  capability: 'billing.createOrder',
2547
355
  tenantId: 'acme',
2548
- });`
2549
- })
2550
- ]
2551
- }),
2552
- /* @__PURE__ */ jsxs15("div", {
2553
- className: "flex items-center gap-4 pt-4",
2554
- children: [
2555
- /* @__PURE__ */ jsx15(Link14, {
2556
- href: "/docs/libraries",
2557
- className: "btn-ghost",
2558
- children: "Back to Libraries"
2559
- }),
2560
- /* @__PURE__ */ jsxs15(Link14, {
2561
- href: "/docs/libraries/workflow-composer",
2562
- className: "btn-primary",
2563
- children: [
2564
- "Next: Workflow Composer ",
2565
- /* @__PURE__ */ jsx15(ChevronRight14, {
2566
- size: 16
2567
- })
2568
- ]
2569
- })
2570
- ]
2571
- })
2572
- ]
2573
- });
2574
- }
2575
-
2576
- // src/components/docs/libraries/LibrariesOverviewPage.tsx
2577
- import Link15 from "@contractspec/lib.ui-link";
2578
- import { ChevronRight as ChevronRight15 } from "lucide-react";
2579
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
2580
- var libraryGroups = [
2581
- {
2582
- title: "Contract and schema foundation",
2583
- body: "Use these packages to define explicit contracts, schemas, and generated artifacts without inventing a new platform-specific language.",
2584
- items: [
2585
- {
2586
- title: "@contractspec/lib.contracts-spec",
2587
- description: "Define operations, events, policies, and generated surfaces in TypeScript.",
2588
- href: "/docs/libraries/contracts"
2589
- },
2590
- {
2591
- title: "@contractspec/lib.schema",
2592
- description: "Share type-safe schema definitions across validation, clients, and runtime adapters.",
2593
- href: "/docs/libraries/schema"
2594
- }
2595
- ]
2596
- },
2597
- {
2598
- title: "Runtime and surface libraries",
2599
- body: "These packages execute the contract model across UI, data, observability, workflows, and generated runtime behavior.",
2600
- items: [
2601
- {
2602
- title: "@contractspec/lib.runtime",
2603
- description: "Run typed capability surfaces, execute policies, and connect runtime adapters.",
2604
- href: "/docs/libraries/runtime"
2605
- },
2606
- {
2607
- title: "@contractspec/lib.ui-kit",
2608
- description: "Render shared surfaces across web and React Native without forking the contract layer.",
2609
- href: "/docs/libraries/ui-kit"
2610
- },
2611
- {
2612
- title: "@contractspec/lib.design-system",
2613
- description: "Build higher-level product surfaces and documented marketing/docs primitives on top of the UI kit.",
2614
- href: "/docs/libraries/design-system"
2615
- },
2616
- {
2617
- title: "@contractspec/lib.data-views",
2618
- description: "Generate and render list/detail style surfaces that stay aligned with data contracts.",
2619
- href: "/docs/libraries/data-views"
2620
- }
2621
- ]
2622
- },
2623
- {
2624
- title: "Operator and system packages",
2625
- body: "These packages matter once the system is live and you need governance, resilience, and observability.",
2626
- items: [
2627
- {
2628
- title: "@contractspec/lib.observability",
2629
- description: "Trace, log, and measure contract execution using the same system boundaries.",
2630
- href: "/docs/libraries/observability"
2631
- },
2632
- {
2633
- title: "@contractspec/lib.resilience",
2634
- description: "Add circuit breakers, retries, and failure controls without hiding the integration model.",
2635
- href: "/docs/libraries/resilience"
2636
- },
2637
- {
2638
- title: "@contractspec/lib.multi-tenancy",
2639
- description: "Keep tenant-specific config, policy, and surface resolution explicit.",
2640
- href: "/docs/libraries/multi-tenancy"
2641
- },
2642
- {
2643
- title: "@contractspec/lib.workflow-composer",
2644
- description: "Compose and extend workflows without smearing orchestration concerns across apps.",
2645
- href: "/docs/libraries/workflow-composer"
2646
- }
2647
- ]
2648
- }
2649
- ];
2650
- function LibrariesOverviewPage() {
2651
- return /* @__PURE__ */ jsxs16("div", {
2652
- className: "space-y-10",
2653
- children: [
2654
- /* @__PURE__ */ jsxs16("div", {
2655
- className: "space-y-3",
2656
- children: [
2657
- /* @__PURE__ */ jsx16("p", {
2658
- className: "editorial-kicker",
2659
- children: "Build"
2660
- }),
2661
- /* @__PURE__ */ jsx16("h1", {
2662
- className: "font-serif text-4xl tracking-[-0.04em] md:text-5xl",
2663
- children: "The OSS foundation is a library system, not a closed platform."
2664
- }),
2665
- /* @__PURE__ */ jsx16("p", {
2666
- className: "max-w-3xl text-lg text-muted-foreground leading-8",
2667
- children: "ContractSpec is assembled from libraries that remain useful on their own and stronger together. Start with the contract and schema foundation, then add runtime, UI, integration, and operator packages as your system grows."
2668
- })
2669
- ]
2670
- }),
2671
- /* @__PURE__ */ jsxs16("div", {
2672
- className: "editorial-proof-strip",
2673
- children: [
2674
- /* @__PURE__ */ jsxs16("div", {
2675
- className: "editorial-stat",
2676
- children: [
2677
- /* @__PURE__ */ jsx16("span", {
2678
- className: "editorial-label",
2679
- children: "Layering rule"
2680
- }),
2681
- /* @__PURE__ */ jsx16("span", {
2682
- className: "editorial-stat-value",
2683
- children: "libs → bundles → apps"
2684
- })
2685
- ]
2686
- }),
2687
- /* @__PURE__ */ jsx16("p", {
2688
- className: "max-w-2xl text-muted-foreground text-sm leading-7",
2689
- children: "Keep reusable behavior in libraries, compose it into bundle-level surfaces, and reserve app packages for concrete delivery shells."
2690
- })
2691
- ]
2692
- }),
2693
- /* @__PURE__ */ jsx16("div", {
2694
- className: "space-y-6",
2695
- children: libraryGroups.map((group) => /* @__PURE__ */ jsxs16("section", {
2696
- className: "editorial-panel space-y-5",
2697
- children: [
2698
- /* @__PURE__ */ jsxs16("div", {
2699
- className: "space-y-2",
2700
- children: [
2701
- /* @__PURE__ */ jsx16("h2", {
2702
- className: "font-serif text-3xl tracking-[-0.03em]",
2703
- children: group.title
2704
- }),
2705
- /* @__PURE__ */ jsx16("p", {
2706
- className: "text-muted-foreground text-sm leading-7",
2707
- children: group.body
2708
- })
2709
- ]
2710
- }),
2711
- /* @__PURE__ */ jsx16("div", {
2712
- className: "grid gap-4 md:grid-cols-2",
2713
- children: group.items.map((item) => /* @__PURE__ */ jsxs16(Link15, {
2714
- href: item.href,
2715
- className: "rounded-[24px] border border-border/75 bg-background/70 p-5 transition-colors hover:border-[color:rgb(162_79_42_/_0.45)]",
2716
- children: [
2717
- /* @__PURE__ */ jsx16("h3", {
2718
- className: "font-semibold text-lg",
2719
- children: item.title
2720
- }),
2721
- /* @__PURE__ */ jsx16("p", {
2722
- className: "mt-2 text-muted-foreground text-sm leading-7",
2723
- children: item.description
2724
- }),
2725
- /* @__PURE__ */ jsxs16("div", {
2726
- className: "mt-3 flex items-center gap-2 text-[color:var(--rust)] text-sm",
2727
- children: [
2728
- "Learn more ",
2729
- /* @__PURE__ */ jsx16(ChevronRight15, {
2730
- size: 14
2731
- })
2732
- ]
2733
- })
2734
- ]
2735
- }, item.title))
2736
- })
2737
- ]
2738
- }, group.title))
2739
- })
2740
- ]
2741
- });
2742
- }
2743
-
2744
- // src/components/docs/libraries/LibrariesPersonalizationPage.tsx
2745
- import { CodeBlock as CodeBlock16, InstallCommand as InstallCommand15 } from "@contractspec/lib.design-system";
2746
- import Link16 from "@contractspec/lib.ui-link";
2747
- import { ChevronRight as ChevronRight16 } from "lucide-react";
2748
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
2749
- function LibrariesPersonalizationPage() {
2750
- return /* @__PURE__ */ jsxs17("div", {
2751
- className: "space-y-8",
2752
- children: [
2753
- /* @__PURE__ */ jsxs17("div", {
2754
- className: "space-y-4",
2755
- children: [
2756
- /* @__PURE__ */ jsx17("h1", {
2757
- className: "font-bold text-4xl",
2758
- children: "@contractspec/lib.personalization"
2759
- }),
2760
- /* @__PURE__ */ jsx17("p", {
2761
- className: "text-lg text-muted-foreground",
2762
- children: "Track field/feature/workflow usage, analyze drop-offs, and convert insights into OverlaySpecs or workflow tweaks."
2763
- })
2764
- ]
2765
- }),
2766
- /* @__PURE__ */ jsxs17("div", {
2767
- className: "space-y-4",
2768
- children: [
2769
- /* @__PURE__ */ jsx17("h2", {
2770
- className: "font-bold text-2xl",
2771
- children: "Installation"
2772
- }),
2773
- /* @__PURE__ */ jsx17(InstallCommand15, {
2774
- package: "@contractspec/lib.personalization"
2775
- })
2776
- ]
2777
- }),
2778
- /* @__PURE__ */ jsxs17("div", {
2779
- className: "space-y-4",
2780
- children: [
2781
- /* @__PURE__ */ jsx17("h2", {
2782
- className: "font-bold text-2xl",
2783
- children: "Tracker"
2784
- }),
2785
- /* @__PURE__ */ jsx17("p", {
2786
- className: "text-muted-foreground",
2787
- children: "Buffer events per tenant/user and emit OpenTelemetry counters automatically."
2788
- }),
2789
- /* @__PURE__ */ jsx17(CodeBlock16, {
2790
- language: "typescript",
2791
- code: `import { createBehaviorTracker } from '@contractspec/lib.personalization';
356
+ });`})]}),Y("div",{className:"flex items-center gap-4 pt-4",children:[I(Ae,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),Y(Ae,{href:"/docs/libraries/workflow-composer",className:"btn-primary",children:["Next: Workflow Composer ",I(Wt,{size:16})]})]})]})}import Ft from"@contractspec/lib.ui-link";import{ChevronRight as Ut}from"lucide-react";import{jsx as B,jsxs as X}from"react/jsx-runtime";var qt=[{title:"Contract and schema foundation",body:"Use these packages to define explicit contracts, schemas, and generated artifacts without inventing a new platform-specific language.",items:[{title:"@contractspec/lib.contracts-spec",description:"Define operations, events, policies, and generated surfaces in TypeScript.",href:"/docs/libraries/contracts"},{title:"@contractspec/lib.schema",description:"Share type-safe schema definitions across validation, clients, and runtime adapters.",href:"/docs/libraries/schema"}]},{title:"Runtime and surface libraries",body:"These packages execute the contract model across UI, data, observability, workflows, and generated runtime behavior.",items:[{title:"@contractspec/lib.runtime",description:"Run typed capability surfaces, execute policies, and connect runtime adapters.",href:"/docs/libraries/runtime"},{title:"@contractspec/lib.ui-kit",description:"Render shared surfaces across web and React Native without forking the contract layer.",href:"/docs/libraries/ui-kit"},{title:"@contractspec/lib.design-system",description:"Build higher-level product surfaces and documented marketing/docs primitives on top of the UI kit.",href:"/docs/libraries/design-system"},{title:"@contractspec/lib.data-views",description:"Generate and render list/detail style surfaces that stay aligned with data contracts.",href:"/docs/libraries/data-views"}]},{title:"Operator and system packages",body:"These packages matter once the system is live and you need governance, resilience, and observability.",items:[{title:"@contractspec/lib.observability",description:"Trace, log, and measure contract execution using the same system boundaries.",href:"/docs/libraries/observability"},{title:"@contractspec/lib.resilience",description:"Add circuit breakers, retries, and failure controls without hiding the integration model.",href:"/docs/libraries/resilience"},{title:"@contractspec/lib.multi-tenancy",description:"Keep tenant-specific config, policy, and surface resolution explicit.",href:"/docs/libraries/multi-tenancy"},{title:"@contractspec/lib.workflow-composer",description:"Compose and extend workflows without smearing orchestration concerns across apps.",href:"/docs/libraries/workflow-composer"}]}];function _t(){return X("div",{className:"space-y-10",children:[X("div",{className:"space-y-3",children:[B("p",{className:"editorial-kicker",children:"Build"}),B("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"The OSS foundation is a library system, not a closed platform."}),B("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"ContractSpec is assembled from libraries that remain useful on their own and stronger together. Start with the contract and schema foundation, then add runtime, UI, integration, and operator packages as your system grows."})]}),X("div",{className:"editorial-proof-strip",children:[X("div",{className:"editorial-stat",children:[B("span",{className:"editorial-label",children:"Layering rule"}),B("span",{className:"editorial-stat-value",children:"libs → bundles → apps"})]}),B("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"Keep reusable behavior in libraries, compose it into bundle-level surfaces, and reserve app packages for concrete delivery shells."})]}),B("div",{className:"space-y-6",children:qt.map((E)=>X("section",{className:"editorial-panel space-y-5",children:[X("div",{className:"space-y-2",children:[B("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:E.title}),B("p",{className:"text-muted-foreground text-sm leading-7",children:E.body})]}),B("div",{className:"grid gap-4 md:grid-cols-2",children:E.items.map((te)=>X(Ft,{href:te.href,className:"rounded-[24px] border border-border/75 bg-background/70 p-5 transition-colors hover:border-[color:rgb(162_79_42_/_0.45)]",children:[B("h3",{className:"font-semibold text-lg",children:te.title}),B("p",{className:"mt-2 text-muted-foreground text-sm leading-7",children:te.description}),X("div",{className:"mt-3 flex items-center gap-2 text-[color:var(--rust)] text-sm",children:["Learn more ",B(Ut,{size:14})]})]},te.title))})]},E.title))})]})}import{CodeBlock as ce,InstallCommand as Ht}from"@contractspec/lib.design-system";import Be from"@contractspec/lib.ui-link";import{ChevronRight as Vt}from"lucide-react";import{jsx as w,jsxs as $}from"react/jsx-runtime";function Qt(){return $("div",{className:"space-y-8",children:[$("div",{className:"space-y-4",children:[w("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.personalization"}),w("p",{className:"text-lg text-muted-foreground",children:"Track field/feature/workflow usage, analyze drop-offs, and convert insights into OverlaySpecs or workflow tweaks."})]}),$("div",{className:"space-y-4",children:[w("h2",{className:"font-bold text-2xl",children:"Installation"}),w(Ht,{package:"@contractspec/lib.personalization"})]}),$("div",{className:"space-y-4",children:[w("h2",{className:"font-bold text-2xl",children:"Tracker"}),w("p",{className:"text-muted-foreground",children:"Buffer events per tenant/user and emit OpenTelemetry counters automatically."}),w(ce,{language:"typescript",code:`import { createBehaviorTracker } from '@contractspec/lib.personalization';
2792
357
 
2793
358
  const tracker = createBehaviorTracker({
2794
359
  store,
@@ -2796,128 +361,17 @@ const tracker = createBehaviorTracker({
2796
361
  });
2797
362
 
2798
363
  tracker.trackFieldAccess({ operation: 'billing.createOrder', field: 'items' });
2799
- tracker.trackWorkflowStep({ workflow: 'invoice', step: 'review', status: 'entered' });`
2800
- })
2801
- ]
2802
- }),
2803
- /* @__PURE__ */ jsxs17("div", {
2804
- className: "space-y-4",
2805
- children: [
2806
- /* @__PURE__ */ jsx17("h2", {
2807
- className: "font-bold text-2xl",
2808
- children: "Analyzer"
2809
- }),
2810
- /* @__PURE__ */ jsx17("p", {
2811
- className: "text-muted-foreground",
2812
- children: "Summarize events and highlight unused UI, frequent fields, and workflow bottlenecks."
2813
- }),
2814
- /* @__PURE__ */ jsx17(CodeBlock16, {
2815
- language: "typescript",
2816
- code: `import { BehaviorAnalyzer } from '@contractspec/lib.personalization/analyzer';
364
+ tracker.trackWorkflowStep({ workflow: 'invoice', step: 'review', status: 'entered' });`})]}),$("div",{className:"space-y-4",children:[w("h2",{className:"font-bold text-2xl",children:"Analyzer"}),w("p",{className:"text-muted-foreground",children:"Summarize events and highlight unused UI, frequent fields, and workflow bottlenecks."}),w(ce,{language:"typescript",code:`import { BehaviorAnalyzer } from '@contractspec/lib.personalization/analyzer';
2817
365
 
2818
366
  const analyzer = new BehaviorAnalyzer(store);
2819
367
  const insights = await analyzer.analyze({ tenantId: 'acme', userId: 'ops-42' });
2820
- // { unusedFields: ['internalNotes'], workflowBottlenecks: [...] }`
2821
- })
2822
- ]
2823
- }),
2824
- /* @__PURE__ */ jsxs17("div", {
2825
- className: "space-y-4",
2826
- children: [
2827
- /* @__PURE__ */ jsx17("h2", {
2828
- className: "font-bold text-2xl",
2829
- children: "Adapter"
2830
- }),
2831
- /* @__PURE__ */ jsx17("p", {
2832
- className: "text-muted-foreground",
2833
- children: "Convert insights into overlays or workflow extension hints."
2834
- }),
2835
- /* @__PURE__ */ jsx17(CodeBlock16, {
2836
- language: "typescript",
2837
- code: `import { insightsToOverlaySuggestion } from '@contractspec/lib.personalization/adapter';
368
+ // { unusedFields: ['internalNotes'], workflowBottlenecks: [...] }`})]}),$("div",{className:"space-y-4",children:[w("h2",{className:"font-bold text-2xl",children:"Adapter"}),w("p",{className:"text-muted-foreground",children:"Convert insights into overlays or workflow extension hints."}),w(ce,{language:"typescript",code:`import { insightsToOverlaySuggestion } from '@contractspec/lib.personalization/adapter';
2838
369
 
2839
370
  const overlay = insightsToOverlaySuggestion(insights, {
2840
371
  overlayId: 'acme-order-form',
2841
372
  tenantId: 'acme',
2842
373
  capability: 'billing.createOrder',
2843
- });`
2844
- })
2845
- ]
2846
- }),
2847
- /* @__PURE__ */ jsxs17("div", {
2848
- className: "flex items-center gap-4 pt-4",
2849
- children: [
2850
- /* @__PURE__ */ jsx17(Link16, {
2851
- href: "/docs/libraries",
2852
- className: "btn-ghost",
2853
- children: "Back to Libraries"
2854
- }),
2855
- /* @__PURE__ */ jsxs17(Link16, {
2856
- href: "/docs/libraries/overlay-engine",
2857
- className: "btn-primary",
2858
- children: [
2859
- "Next: Overlay Engine ",
2860
- /* @__PURE__ */ jsx17(ChevronRight16, {
2861
- size: 16
2862
- })
2863
- ]
2864
- })
2865
- ]
2866
- })
2867
- ]
2868
- });
2869
- }
2870
-
2871
- // src/components/docs/libraries/LibrariesProgressiveDeliveryPage.tsx
2872
- import { CodeBlock as CodeBlock17, InstallCommand as InstallCommand16 } from "@contractspec/lib.design-system";
2873
- import Link17 from "@contractspec/lib.ui-link";
2874
- import { ChevronRight as ChevronRight17 } from "lucide-react";
2875
- import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
2876
- function LibrariesProgressiveDeliveryPage() {
2877
- return /* @__PURE__ */ jsxs18("div", {
2878
- className: "space-y-8",
2879
- children: [
2880
- /* @__PURE__ */ jsxs18("div", {
2881
- className: "space-y-4",
2882
- children: [
2883
- /* @__PURE__ */ jsx18("h1", {
2884
- className: "font-bold text-4xl",
2885
- children: "Progressive Delivery Library"
2886
- }),
2887
- /* @__PURE__ */ jsxs18("p", {
2888
- className: "text-lg text-muted-foreground",
2889
- children: [
2890
- "The ",
2891
- /* @__PURE__ */ jsx18("code", {
2892
- children: "@contractspec/lib.progressive-delivery"
2893
- }),
2894
- " package helps you ship new specs with confidence: canary + blue-green strategies, metric guardrails, and rollback hooks in one place."
2895
- ]
2896
- })
2897
- ]
2898
- }),
2899
- /* @__PURE__ */ jsxs18("div", {
2900
- className: "space-y-4",
2901
- children: [
2902
- /* @__PURE__ */ jsx18("h2", {
2903
- className: "font-bold text-2xl",
2904
- children: "Installation"
2905
- }),
2906
- /* @__PURE__ */ jsx18(InstallCommand16, {
2907
- package: "@contractspec/lib.progressive-delivery"
2908
- })
2909
- ]
2910
- }),
2911
- /* @__PURE__ */ jsxs18("div", {
2912
- className: "space-y-4",
2913
- children: [
2914
- /* @__PURE__ */ jsx18("h2", {
2915
- className: "font-bold text-2xl",
2916
- children: "Define a Strategy"
2917
- }),
2918
- /* @__PURE__ */ jsx18(CodeBlock17, {
2919
- language: "typescript",
2920
- code: `import { DeploymentCoordinator, createDefaultCanaryController, TrafficShifter, RollbackManager } from '@contractspec/lib.progressive-delivery';
374
+ });`})]}),$("div",{className:"flex items-center gap-4 pt-4",children:[w(Be,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),$(Be,{href:"/docs/libraries/overlay-engine",className:"btn-primary",children:["Next: Overlay Engine ",w(Vt,{size:16})]})]})]})}import{CodeBlock as Pe,InstallCommand as Kt}from"@contractspec/lib.design-system";import Oe from"@contractspec/lib.ui-link";import{ChevronRight as Zt}from"lucide-react";import{jsx as C,jsxs as W}from"react/jsx-runtime";function Jt(){return W("div",{className:"space-y-8",children:[W("div",{className:"space-y-4",children:[C("h1",{className:"font-bold text-4xl",children:"Progressive Delivery Library"}),W("p",{className:"text-lg text-muted-foreground",children:["The ",C("code",{children:"@contractspec/lib.progressive-delivery"})," package helps you ship new specs with confidence: canary + blue-green strategies, metric guardrails, and rollback hooks in one place."]})]}),W("div",{className:"space-y-4",children:[C("h2",{className:"font-bold text-2xl",children:"Installation"}),C(Kt,{package:"@contractspec/lib.progressive-delivery"})]}),W("div",{className:"space-y-4",children:[C("h2",{className:"font-bold text-2xl",children:"Define a Strategy"}),C(Pe,{language:"typescript",code:`import { DeploymentCoordinator, createDefaultCanaryController, TrafficShifter, RollbackManager } from '@contractspec/lib.progressive-delivery';
2921
375
 
2922
376
  const strategy = {
2923
377
  target: { name: 'billing.createInvoice', version: 7 },
@@ -2927,20 +381,7 @@ const strategy = {
2927
381
  latencyP99: 500,
2928
382
  latencyP95: 250,
2929
383
  },
2930
- };`
2931
- })
2932
- ]
2933
- }),
2934
- /* @__PURE__ */ jsxs18("div", {
2935
- className: "space-y-4",
2936
- children: [
2937
- /* @__PURE__ */ jsx18("h2", {
2938
- className: "font-bold text-2xl",
2939
- children: "Run the Coordinator"
2940
- }),
2941
- /* @__PURE__ */ jsx18(CodeBlock17, {
2942
- language: "typescript",
2943
- code: `const eventBus = new DeploymentEventBus();
384
+ };`})]}),W("div",{className:"space-y-4",children:[C("h2",{className:"font-bold text-2xl",children:"Run the Coordinator"}),C(Pe,{language:"typescript",code:`const eventBus = new DeploymentEventBus();
2944
385
  const controller = createDefaultCanaryController(strategy, fetchMetrics, eventBus);
2945
386
  const coordinator = new DeploymentCoordinator({
2946
387
  strategy,
@@ -2951,126 +392,7 @@ const coordinator = new DeploymentCoordinator({
2951
392
  eventBus,
2952
393
  });
2953
394
 
2954
- const result = await coordinator.run();`
2955
- }),
2956
- /* @__PURE__ */ jsxs18("p", {
2957
- className: "text-muted-foreground text-sm",
2958
- children: [
2959
- "The coordinator emits ",
2960
- /* @__PURE__ */ jsx18("code", {
2961
- children: "stage_started"
2962
- }),
2963
- ",",
2964
- " ",
2965
- /* @__PURE__ */ jsx18("code", {
2966
- children: "stage_failed"
2967
- }),
2968
- ", and ",
2969
- /* @__PURE__ */ jsx18("code", {
2970
- children: "rolled_back"
2971
- }),
2972
- " events, making it easy to power dashboards or alerting workflows."
2973
- ]
2974
- })
2975
- ]
2976
- }),
2977
- /* @__PURE__ */ jsxs18("div", {
2978
- className: "space-y-4",
2979
- children: [
2980
- /* @__PURE__ */ jsx18("h2", {
2981
- className: "font-bold text-2xl",
2982
- children: "Blue-Green Swap"
2983
- }),
2984
- /* @__PURE__ */ jsxs18("p", {
2985
- className: "text-muted-foreground text-sm",
2986
- children: [
2987
- "Switch to ",
2988
- /* @__PURE__ */ jsx18("code", {
2989
- children: "mode: 'blue-green'"
2990
- }),
2991
- " to warm up the new stack in parallel and cut over once smoke tests pass. The same guardrails apply before the final swap."
2992
- ]
2993
- })
2994
- ]
2995
- }),
2996
- /* @__PURE__ */ jsxs18("div", {
2997
- className: "flex items-center gap-4 pt-4",
2998
- children: [
2999
- /* @__PURE__ */ jsx18(Link17, {
3000
- href: "/docs/libraries",
3001
- className: "btn-ghost",
3002
- children: "Back to Libraries"
3003
- }),
3004
- /* @__PURE__ */ jsxs18(Link17, {
3005
- href: "/docs/libraries/resilience",
3006
- className: "btn-primary",
3007
- children: [
3008
- "Next: Resilience ",
3009
- /* @__PURE__ */ jsx18(ChevronRight17, {
3010
- size: 16
3011
- })
3012
- ]
3013
- })
3014
- ]
3015
- })
3016
- ]
3017
- });
3018
- }
3019
-
3020
- // src/components/docs/libraries/LibrariesResiliencePage.tsx
3021
- import { CodeBlock as CodeBlock18, InstallCommand as InstallCommand17 } from "@contractspec/lib.design-system";
3022
- import Link18 from "@contractspec/lib.ui-link";
3023
- import { ChevronRight as ChevronRight18 } from "lucide-react";
3024
- import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
3025
- function LibrariesResiliencePage() {
3026
- return /* @__PURE__ */ jsxs19("div", {
3027
- className: "space-y-8",
3028
- children: [
3029
- /* @__PURE__ */ jsxs19("div", {
3030
- className: "space-y-4",
3031
- children: [
3032
- /* @__PURE__ */ jsx19("h1", {
3033
- className: "font-bold text-4xl",
3034
- children: "Resilience Library"
3035
- }),
3036
- /* @__PURE__ */ jsxs19("p", {
3037
- className: "text-lg text-muted-foreground",
3038
- children: [
3039
- "The ",
3040
- /* @__PURE__ */ jsx19("code", {
3041
- children: "@contractspec/lib.resilience"
3042
- }),
3043
- " library provides primitives to handle failures gracefully."
3044
- ]
3045
- })
3046
- ]
3047
- }),
3048
- /* @__PURE__ */ jsxs19("div", {
3049
- className: "space-y-4",
3050
- children: [
3051
- /* @__PURE__ */ jsx19("h2", {
3052
- className: "font-bold text-2xl",
3053
- children: "Installation"
3054
- }),
3055
- /* @__PURE__ */ jsx19(InstallCommand17, {
3056
- package: "@contractspec/lib.resilience"
3057
- })
3058
- ]
3059
- }),
3060
- /* @__PURE__ */ jsxs19("div", {
3061
- className: "space-y-4",
3062
- children: [
3063
- /* @__PURE__ */ jsx19("h2", {
3064
- className: "font-bold text-2xl",
3065
- children: "Circuit Breaker"
3066
- }),
3067
- /* @__PURE__ */ jsx19("p", {
3068
- className: "text-muted-foreground",
3069
- children: "Prevent cascading failures by stopping calls to a failing dependency."
3070
- }),
3071
- /* @__PURE__ */ jsx19(CodeBlock18, {
3072
- language: "typescript",
3073
- code: `import { CircuitBreaker } from '@contractspec/lib.resilience/circuit-breaker';
395
+ const result = await coordinator.run();`}),W("p",{className:"text-muted-foreground text-sm",children:["The coordinator emits ",C("code",{children:"stage_started"}),","," ",C("code",{children:"stage_failed"}),", and ",C("code",{children:"rolled_back"})," events, making it easy to power dashboards or alerting workflows."]})]}),W("div",{className:"space-y-4",children:[C("h2",{className:"font-bold text-2xl",children:"Blue-Green Swap"}),W("p",{className:"text-muted-foreground text-sm",children:["Switch to ",C("code",{children:"mode: 'blue-green'"})," to warm up the new stack in parallel and cut over once smoke tests pass. The same guardrails apply before the final swap."]})]}),W("div",{className:"flex items-center gap-4 pt-4",children:[C(Oe,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),W(Oe,{href:"/docs/libraries/resilience",className:"btn-primary",children:["Next: Resilience ",C(Zt,{size:16})]})]})]})}import{CodeBlock as le,InstallCommand as Yt}from"@contractspec/lib.design-system";import Ee from"@contractspec/lib.ui-link";import{ChevronRight as Xt}from"lucide-react";import{jsx as S,jsxs as K}from"react/jsx-runtime";function $t(){return K("div",{className:"space-y-8",children:[K("div",{className:"space-y-4",children:[S("h1",{className:"font-bold text-4xl",children:"Resilience Library"}),K("p",{className:"text-lg text-muted-foreground",children:["The ",S("code",{children:"@contractspec/lib.resilience"})," library provides primitives to handle failures gracefully."]})]}),K("div",{className:"space-y-4",children:[S("h2",{className:"font-bold text-2xl",children:"Installation"}),S(Yt,{package:"@contractspec/lib.resilience"})]}),K("div",{className:"space-y-4",children:[S("h2",{className:"font-bold text-2xl",children:"Circuit Breaker"}),S("p",{className:"text-muted-foreground",children:"Prevent cascading failures by stopping calls to a failing dependency."}),S(le,{language:"typescript",code:`import { CircuitBreaker } from '@contractspec/lib.resilience/circuit-breaker';
3074
396
 
3075
397
  const breaker = new CircuitBreaker({
3076
398
  failureThreshold: 5,
@@ -3079,192 +401,19 @@ const breaker = new CircuitBreaker({
3079
401
 
3080
402
  const result = await breaker.execute(async () => {
3081
403
  return await fetch('https://api.stripe.com/v1/charges');
3082
- });`
3083
- })
3084
- ]
3085
- }),
3086
- /* @__PURE__ */ jsxs19("div", {
3087
- className: "space-y-4",
3088
- children: [
3089
- /* @__PURE__ */ jsx19("h2", {
3090
- className: "font-bold text-2xl",
3091
- children: "Retry"
3092
- }),
3093
- /* @__PURE__ */ jsx19("p", {
3094
- className: "text-muted-foreground",
3095
- children: "Automatically retry transient failures with exponential backoff."
3096
- }),
3097
- /* @__PURE__ */ jsx19(CodeBlock18, {
3098
- language: "typescript",
3099
- code: `import { retry } from '@contractspec/lib.resilience/retry';
404
+ });`})]}),K("div",{className:"space-y-4",children:[S("h2",{className:"font-bold text-2xl",children:"Retry"}),S("p",{className:"text-muted-foreground",children:"Automatically retry transient failures with exponential backoff."}),S(le,{language:"typescript",code:`import { retry } from '@contractspec/lib.resilience/retry';
3100
405
 
3101
406
  const result = await retry(
3102
407
  async () => fetchUser(id),
3103
408
  3, // retries
3104
409
  1000, // initial delay
3105
410
  true // backoff
3106
- );`
3107
- })
3108
- ]
3109
- }),
3110
- /* @__PURE__ */ jsxs19("div", {
3111
- className: "space-y-4",
3112
- children: [
3113
- /* @__PURE__ */ jsx19("h2", {
3114
- className: "font-bold text-2xl",
3115
- children: "Timeout & Fallback"
3116
- }),
3117
- /* @__PURE__ */ jsx19("p", {
3118
- className: "text-muted-foreground",
3119
- children: "Set hard limits on execution time and provide default values on failure."
3120
- }),
3121
- /* @__PURE__ */ jsx19(CodeBlock18, {
3122
- language: "typescript",
3123
- code: `import { timeout, fallback } from '@contractspec/lib.resilience';
411
+ );`})]}),K("div",{className:"space-y-4",children:[S("h2",{className:"font-bold text-2xl",children:"Timeout & Fallback"}),S("p",{className:"text-muted-foreground",children:"Set hard limits on execution time and provide default values on failure."}),S(le,{language:"typescript",code:`import { timeout, fallback } from '@contractspec/lib.resilience';
3124
412
 
3125
413
  const result = await fallback(
3126
414
  () => timeout(slowOperation, 5000),
3127
415
  defaultValue
3128
- );`
3129
- })
3130
- ]
3131
- }),
3132
- /* @__PURE__ */ jsxs19("div", {
3133
- className: "flex items-center gap-4 pt-4",
3134
- children: [
3135
- /* @__PURE__ */ jsx19(Link18, {
3136
- href: "/docs/libraries",
3137
- className: "btn-ghost",
3138
- children: "Back to Libraries"
3139
- }),
3140
- /* @__PURE__ */ jsxs19(Link18, {
3141
- href: "/docs/libraries/testing",
3142
- className: "btn-primary",
3143
- children: [
3144
- "Next: Testing ",
3145
- /* @__PURE__ */ jsx19(ChevronRight18, {
3146
- size: 16
3147
- })
3148
- ]
3149
- })
3150
- ]
3151
- })
3152
- ]
3153
- });
3154
- }
3155
-
3156
- // src/components/docs/libraries/LibrariesRuntimePage.tsx
3157
- import { CodeBlock as CodeBlock19, InstallCommand as InstallCommand18 } from "@contractspec/lib.design-system";
3158
- import Link19 from "@contractspec/lib.ui-link";
3159
- import { ChevronRight as ChevronRight19 } from "lucide-react";
3160
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
3161
- function LibrariesRuntimePage() {
3162
- return /* @__PURE__ */ jsxs20("div", {
3163
- className: "space-y-8",
3164
- children: [
3165
- /* @__PURE__ */ jsxs20("div", {
3166
- className: "space-y-4",
3167
- children: [
3168
- /* @__PURE__ */ jsx20("h1", {
3169
- className: "font-bold text-4xl",
3170
- children: "Runtime Libraries"
3171
- }),
3172
- /* @__PURE__ */ jsx20("p", {
3173
- className: "text-muted-foreground",
3174
- children: "The presentation runtime libraries provide the engine for rendering ContractSpec-defined UIs. They handle state management, validation, step navigation, and component rendering for Workflows and DataViews."
3175
- })
3176
- ]
3177
- }),
3178
- /* @__PURE__ */ jsxs20("div", {
3179
- className: "space-y-4",
3180
- children: [
3181
- /* @__PURE__ */ jsx20("h2", {
3182
- className: "font-bold text-2xl",
3183
- children: "Installation"
3184
- }),
3185
- /* @__PURE__ */ jsx20(InstallCommand18, {
3186
- package: "@contractspec/lib.presentation-runtime-react"
3187
- })
3188
- ]
3189
- }),
3190
- /* @__PURE__ */ jsxs20("div", {
3191
- className: "space-y-4",
3192
- children: [
3193
- /* @__PURE__ */ jsx20("h2", {
3194
- className: "font-bold text-2xl",
3195
- children: "Libraries"
3196
- }),
3197
- /* @__PURE__ */ jsxs20("div", {
3198
- className: "space-y-6",
3199
- children: [
3200
- /* @__PURE__ */ jsxs20("div", {
3201
- className: "card-subtle p-6",
3202
- children: [
3203
- /* @__PURE__ */ jsx20("h3", {
3204
- className: "font-bold text-lg",
3205
- children: "@contractspec/lib.presentation-runtime-core"
3206
- }),
3207
- /* @__PURE__ */ jsxs20("p", {
3208
- className: "mt-2 text-muted-foreground text-sm",
3209
- children: [
3210
- /* @__PURE__ */ jsx20("strong", {
3211
- children: "Framework-Agnostic Core"
3212
- }),
3213
- ". Contains the state machines, validation logic, and navigation rules for workflows. Can be used to build renderers for any platform (Vue, Svelte, CLI)."
3214
- ]
3215
- })
3216
- ]
3217
- }),
3218
- /* @__PURE__ */ jsxs20("div", {
3219
- className: "card-subtle p-6",
3220
- children: [
3221
- /* @__PURE__ */ jsx20("h3", {
3222
- className: "font-bold text-lg",
3223
- children: "@contractspec/lib.presentation-runtime-react"
3224
- }),
3225
- /* @__PURE__ */ jsxs20("p", {
3226
- className: "mt-2 text-muted-foreground text-sm",
3227
- children: [
3228
- /* @__PURE__ */ jsx20("strong", {
3229
- children: "React Bindings"
3230
- }),
3231
- ". Hooks (`useWorkflow`) and components (`WorkflowStepper`, `WorkflowStepRenderer`) for React Web applications. Integrates with `ui-kit-web`."
3232
- ]
3233
- })
3234
- ]
3235
- }),
3236
- /* @__PURE__ */ jsxs20("div", {
3237
- className: "card-subtle p-6",
3238
- children: [
3239
- /* @__PURE__ */ jsx20("h3", {
3240
- className: "font-bold text-lg",
3241
- children: "@contractspec/lib.presentation-runtime-react-native"
3242
- }),
3243
- /* @__PURE__ */ jsxs20("p", {
3244
- className: "mt-2 text-muted-foreground text-sm",
3245
- children: [
3246
- /* @__PURE__ */ jsx20("strong", {
3247
- children: "React Native Bindings"
3248
- }),
3249
- ". Optimized for mobile experiences. Handles native navigation integration and uses universal components from `ui-kit`."
3250
- ]
3251
- })
3252
- ]
3253
- })
3254
- ]
3255
- })
3256
- ]
3257
- }),
3258
- /* @__PURE__ */ jsxs20("div", {
3259
- className: "space-y-4",
3260
- children: [
3261
- /* @__PURE__ */ jsx20("h2", {
3262
- className: "font-bold text-2xl",
3263
- children: "Example: React Workflow"
3264
- }),
3265
- /* @__PURE__ */ jsx20(CodeBlock19, {
3266
- language: "tsx",
3267
- code: `import { useWorkflow, WorkflowStepRenderer } from '@contractspec/lib.presentation-runtime-react';
416
+ );`})]}),K("div",{className:"flex items-center gap-4 pt-4",children:[S(Ee,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),K(Ee,{href:"/docs/libraries/testing",className:"btn-primary",children:["Next: Testing ",S(Xt,{size:16})]})]})]})}import{CodeBlock as xt,InstallCommand as jt}from"@contractspec/lib.design-system";import ze from"@contractspec/lib.ui-link";import{ChevronRight as ea}from"lucide-react";import{jsx as d,jsxs as p}from"react/jsx-runtime";function ta(){return p("div",{className:"space-y-8",children:[p("div",{className:"space-y-4",children:[d("h1",{className:"font-bold text-4xl",children:"Runtime Libraries"}),d("p",{className:"text-muted-foreground",children:"The presentation runtime libraries provide the engine for rendering ContractSpec-defined UIs. They handle state management, validation, step navigation, and component rendering for Workflows and DataViews."})]}),p("div",{className:"space-y-4",children:[d("h2",{className:"font-bold text-2xl",children:"Installation"}),d(jt,{package:"@contractspec/lib.presentation-runtime-react"})]}),p("div",{className:"space-y-4",children:[d("h2",{className:"font-bold text-2xl",children:"Libraries"}),p("div",{className:"space-y-6",children:[p("div",{className:"card-subtle p-6",children:[d("h3",{className:"font-bold text-lg",children:"@contractspec/lib.presentation-runtime-core"}),p("p",{className:"mt-2 text-muted-foreground text-sm",children:[d("strong",{children:"Framework-Agnostic Core"}),". Contains the state machines, validation logic, and navigation rules for workflows. Can be used to build renderers for any platform (Vue, Svelte, CLI)."]})]}),p("div",{className:"card-subtle p-6",children:[d("h3",{className:"font-bold text-lg",children:"@contractspec/lib.presentation-runtime-react"}),p("p",{className:"mt-2 text-muted-foreground text-sm",children:[d("strong",{children:"React Bindings"}),". Hooks (`useWorkflow`) and components (`WorkflowStepper`, `WorkflowStepRenderer`) for React Web applications. Integrates with `ui-kit-web`."]})]}),p("div",{className:"card-subtle p-6",children:[d("h3",{className:"font-bold text-lg",children:"@contractspec/lib.presentation-runtime-react-native"}),p("p",{className:"mt-2 text-muted-foreground text-sm",children:[d("strong",{children:"React Native Bindings"}),". Optimized for mobile experiences. Handles native navigation integration and uses universal components from `ui-kit`."]})]})]})]}),p("div",{className:"space-y-4",children:[d("h2",{className:"font-bold text-2xl",children:"Example: React Workflow"}),d(xt,{language:"tsx",code:`import { useWorkflow, WorkflowStepRenderer } from '@contractspec/lib.presentation-runtime-react';
3268
417
  import { OnboardingFlow } from './specs/onboarding';
3269
418
 
3270
419
  export function OnboardingPage() {
@@ -3304,186 +453,7 @@ export function OnboardingPage() {
3304
453
  </div>
3305
454
  </div>
3306
455
  );
3307
- }`
3308
- })
3309
- ]
3310
- }),
3311
- /* @__PURE__ */ jsxs20("div", {
3312
- className: "space-y-4",
3313
- children: [
3314
- /* @__PURE__ */ jsx20("h2", {
3315
- className: "font-bold text-2xl",
3316
- children: "Architecture"
3317
- }),
3318
- /* @__PURE__ */ jsx20("p", {
3319
- className: "text-muted-foreground",
3320
- children: 'The runtime follows a "render-loop" pattern:'
3321
- }),
3322
- /* @__PURE__ */ jsxs20("ol", {
3323
- className: "list-inside list-decimal space-y-2 text-muted-foreground",
3324
- children: [
3325
- /* @__PURE__ */ jsxs20("li", {
3326
- children: [
3327
- /* @__PURE__ */ jsx20("strong", {
3328
- children: "Spec"
3329
- }),
3330
- ": Defines the flow, fields, and validation rules."
3331
- ]
3332
- }),
3333
- /* @__PURE__ */ jsxs20("li", {
3334
- children: [
3335
- /* @__PURE__ */ jsx20("strong", {
3336
- children: "Core"
3337
- }),
3338
- ": Tracks current step, data state, and validation errors."
3339
- ]
3340
- }),
3341
- /* @__PURE__ */ jsxs20("li", {
3342
- children: [
3343
- /* @__PURE__ */ jsx20("strong", {
3344
- children: "Renderer"
3345
- }),
3346
- ": Maps spec fields to UI components (Input, Select, etc.)."
3347
- ]
3348
- }),
3349
- /* @__PURE__ */ jsxs20("li", {
3350
- children: [
3351
- /* @__PURE__ */ jsx20("strong", {
3352
- children: "User"
3353
- }),
3354
- ": Interacts with components, updating core state."
3355
- ]
3356
- }),
3357
- /* @__PURE__ */ jsxs20("li", {
3358
- children: [
3359
- /* @__PURE__ */ jsx20("strong", {
3360
- children: "Policy"
3361
- }),
3362
- ": (Optional) Re-evaluates visibility on every change."
3363
- ]
3364
- })
3365
- ]
3366
- })
3367
- ]
3368
- }),
3369
- /* @__PURE__ */ jsxs20("div", {
3370
- className: "flex items-center gap-4 pt-4",
3371
- children: [
3372
- /* @__PURE__ */ jsx20(Link19, {
3373
- href: "/docs/libraries/data-backend",
3374
- className: "btn-ghost",
3375
- children: "Previous: Data & Backend"
3376
- }),
3377
- /* @__PURE__ */ jsxs20(Link19, {
3378
- href: "/docs/libraries",
3379
- className: "btn-primary",
3380
- children: [
3381
- "Back to Libraries ",
3382
- /* @__PURE__ */ jsx20(ChevronRight19, {
3383
- size: 16
3384
- })
3385
- ]
3386
- })
3387
- ]
3388
- })
3389
- ]
3390
- });
3391
- }
3392
-
3393
- // src/components/docs/libraries/LibrariesSchemaPage.tsx
3394
- import { CodeBlock as CodeBlock20, InstallCommand as InstallCommand19 } from "@contractspec/lib.design-system";
3395
- import Link20 from "@contractspec/lib.ui-link";
3396
- import { ChevronRight as ChevronRight20 } from "lucide-react";
3397
- import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
3398
- function LibrariesSchemaPage() {
3399
- return /* @__PURE__ */ jsxs21("div", {
3400
- className: "space-y-8",
3401
- children: [
3402
- /* @__PURE__ */ jsxs21("div", {
3403
- className: "space-y-4",
3404
- children: [
3405
- /* @__PURE__ */ jsx21("h1", {
3406
- className: "font-bold text-4xl",
3407
- children: "@contractspec/lib.schema"
3408
- }),
3409
- /* @__PURE__ */ jsx21("p", {
3410
- className: "text-muted-foreground",
3411
- children: "A small schema dictionary to describe operation I/O once and export to Zod (runtime validation), Pothos (GraphQL type refs), and JSON Schema."
3412
- })
3413
- ]
3414
- }),
3415
- /* @__PURE__ */ jsxs21("div", {
3416
- className: "space-y-4",
3417
- children: [
3418
- /* @__PURE__ */ jsx21("h2", {
3419
- className: "font-bold text-2xl",
3420
- children: "Installation"
3421
- }),
3422
- /* @__PURE__ */ jsx21(InstallCommand19, {
3423
- package: "@contractspec/lib.schema"
3424
- })
3425
- ]
3426
- }),
3427
- /* @__PURE__ */ jsxs21("div", {
3428
- className: "space-y-4",
3429
- children: [
3430
- /* @__PURE__ */ jsx21("h2", {
3431
- className: "font-bold text-2xl",
3432
- children: "Core Exports"
3433
- }),
3434
- /* @__PURE__ */ jsxs21("ul", {
3435
- className: "space-y-2 text-muted-foreground",
3436
- children: [
3437
- /* @__PURE__ */ jsxs21("li", {
3438
- children: [
3439
- /* @__PURE__ */ jsx21("code", {
3440
- className: "rounded bg-background/50 px-2 py-1",
3441
- children: "SchemaModel"
3442
- }),
3443
- ": Compose fields into typed object models"
3444
- ]
3445
- }),
3446
- /* @__PURE__ */ jsxs21("li", {
3447
- children: [
3448
- /* @__PURE__ */ jsx21("code", {
3449
- className: "rounded bg-background/50 px-2 py-1",
3450
- children: "ScalarTypeEnum"
3451
- }),
3452
- ": Common scalar types (NonEmptyString, Email, DateTime, etc.)"
3453
- ]
3454
- }),
3455
- /* @__PURE__ */ jsxs21("li", {
3456
- children: [
3457
- /* @__PURE__ */ jsx21("code", {
3458
- className: "rounded bg-background/50 px-2 py-1",
3459
- children: "defineEnum"
3460
- }),
3461
- ": Create type-safe enums"
3462
- ]
3463
- }),
3464
- /* @__PURE__ */ jsxs21("li", {
3465
- children: [
3466
- /* @__PURE__ */ jsx21("code", {
3467
- className: "rounded bg-background/50 px-2 py-1",
3468
- children: "FieldType"
3469
- }),
3470
- ": Wrap scalars with Zod/GraphQL/JSON Schema"
3471
- ]
3472
- })
3473
- ]
3474
- })
3475
- ]
3476
- }),
3477
- /* @__PURE__ */ jsxs21("div", {
3478
- className: "space-y-4",
3479
- children: [
3480
- /* @__PURE__ */ jsx21("h2", {
3481
- className: "font-bold text-2xl",
3482
- children: "Example: Basic Schema"
3483
- }),
3484
- /* @__PURE__ */ jsx21(CodeBlock20, {
3485
- language: "typescript",
3486
- code: `import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
456
+ }`})]}),p("div",{className:"space-y-4",children:[d("h2",{className:"font-bold text-2xl",children:"Architecture"}),d("p",{className:"text-muted-foreground",children:'The runtime follows a "render-loop" pattern:'}),p("ol",{className:"list-inside list-decimal space-y-2 text-muted-foreground",children:[p("li",{children:[d("strong",{children:"Spec"}),": Defines the flow, fields, and validation rules."]}),p("li",{children:[d("strong",{children:"Core"}),": Tracks current step, data state, and validation errors."]}),p("li",{children:[d("strong",{children:"Renderer"}),": Maps spec fields to UI components (Input, Select, etc.)."]}),p("li",{children:[d("strong",{children:"User"}),": Interacts with components, updating core state."]}),p("li",{children:[d("strong",{children:"Policy"}),": (Optional) Re-evaluates visibility on every change."]})]})]}),p("div",{className:"flex items-center gap-4 pt-4",children:[d(ze,{href:"/docs/libraries/data-backend",className:"btn-ghost",children:"Previous: Data & Backend"}),p(ze,{href:"/docs/libraries",className:"btn-primary",children:["Back to Libraries ",d(ea,{size:16})]})]})]})}import{CodeBlock as Me,InstallCommand as aa}from"@contractspec/lib.design-system";import De from"@contractspec/lib.ui-link";import{ChevronRight as oa}from"lucide-react";import{jsx as e,jsxs as s}from"react/jsx-runtime";function ia(){return s("div",{className:"space-y-8",children:[s("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.schema"}),e("p",{className:"text-muted-foreground",children:"A small schema dictionary to describe operation I/O once and export to Zod (runtime validation), Pothos (GraphQL type refs), and JSON Schema."})]}),s("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Installation"}),e(aa,{package:"@contractspec/lib.schema"})]}),s("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Core Exports"}),s("ul",{className:"space-y-2 text-muted-foreground",children:[s("li",{children:[e("code",{className:"rounded bg-background/50 px-2 py-1",children:"SchemaModel"}),": Compose fields into typed object models"]}),s("li",{children:[e("code",{className:"rounded bg-background/50 px-2 py-1",children:"ScalarTypeEnum"}),": Common scalar types (NonEmptyString, Email, DateTime, etc.)"]}),s("li",{children:[e("code",{className:"rounded bg-background/50 px-2 py-1",children:"defineEnum"}),": Create type-safe enums"]}),s("li",{children:[e("code",{className:"rounded bg-background/50 px-2 py-1",children:"FieldType"}),": Wrap scalars with Zod/GraphQL/JSON Schema"]})]})]}),s("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Example: Basic Schema"}),e(Me,{language:"typescript",code:`import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
3487
457
 
3488
458
  export const CreateSpotInput = new SchemaModel({
3489
459
  name: 'CreateSpotInput',
@@ -3501,20 +471,7 @@ const zodSchema = CreateSpotInput.getZod();
3501
471
  const pothosName = CreateSpotInput.getPothosInput();
3502
472
 
3503
473
  // Get JSON Schema
3504
- const jsonSchema = CreateSpotInput.getJsonSchema();`
3505
- })
3506
- ]
3507
- }),
3508
- /* @__PURE__ */ jsxs21("div", {
3509
- className: "space-y-4",
3510
- children: [
3511
- /* @__PURE__ */ jsx21("h2", {
3512
- className: "font-bold text-2xl",
3513
- children: "Example: Enums"
3514
- }),
3515
- /* @__PURE__ */ jsx21(CodeBlock20, {
3516
- language: "typescript",
3517
- code: `import { defineEnum, SchemaModel } from '@contractspec/lib.schema';
474
+ const jsonSchema = CreateSpotInput.getJsonSchema();`})]}),s("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Example: Enums"}),e(Me,{language:"typescript",code:`import { defineEnum, SchemaModel } from '@contractspec/lib.schema';
3518
475
 
3519
476
  const Weekday = defineEnum('Weekday', [
3520
477
  'MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU',
@@ -3529,337 +486,19 @@ const RecurrenceRule = new SchemaModel({
3529
486
  },
3530
487
  byWeekday: { type: Weekday, isOptional: true, isArray: true },
3531
488
  },
3532
- });`
3533
- })
3534
- ]
3535
- }),
3536
- /* @__PURE__ */ jsxs21("div", {
3537
- className: "space-y-4",
3538
- children: [
3539
- /* @__PURE__ */ jsx21("h2", {
3540
- className: "font-bold text-2xl",
3541
- children: "Available Scalars"
3542
- }),
3543
- /* @__PURE__ */ jsxs21("div", {
3544
- className: "grid gap-4 md:grid-cols-2",
3545
- children: [
3546
- /* @__PURE__ */ jsxs21("div", {
3547
- className: "card-subtle p-4",
3548
- children: [
3549
- /* @__PURE__ */ jsx21("h3", {
3550
- className: "mb-2 font-semibold",
3551
- children: "Strings"
3552
- }),
3553
- /* @__PURE__ */ jsxs21("ul", {
3554
- className: "space-y-1 text-muted-foreground text-sm",
3555
- children: [
3556
- /* @__PURE__ */ jsx21("li", {
3557
- children: /* @__PURE__ */ jsx21("code", {
3558
- children: "NonEmptyString()"
3559
- })
3560
- }),
3561
- /* @__PURE__ */ jsx21("li", {
3562
- children: /* @__PURE__ */ jsx21("code", {
3563
- children: "Email()"
3564
- })
3565
- }),
3566
- /* @__PURE__ */ jsx21("li", {
3567
- children: /* @__PURE__ */ jsx21("code", {
3568
- children: "PhoneNumber()"
3569
- })
3570
- }),
3571
- /* @__PURE__ */ jsx21("li", {
3572
- children: /* @__PURE__ */ jsx21("code", {
3573
- children: "CountryCode()"
3574
- })
3575
- }),
3576
- /* @__PURE__ */ jsx21("li", {
3577
- children: /* @__PURE__ */ jsx21("code", {
3578
- children: "Locale()"
3579
- })
3580
- }),
3581
- /* @__PURE__ */ jsx21("li", {
3582
- children: /* @__PURE__ */ jsx21("code", {
3583
- children: "TimeZone()"
3584
- })
3585
- })
3586
- ]
3587
- })
3588
- ]
3589
- }),
3590
- /* @__PURE__ */ jsxs21("div", {
3591
- className: "card-subtle p-4",
3592
- children: [
3593
- /* @__PURE__ */ jsx21("h3", {
3594
- className: "mb-2 font-semibold",
3595
- children: "Numbers"
3596
- }),
3597
- /* @__PURE__ */ jsxs21("ul", {
3598
- className: "space-y-1 text-muted-foreground text-sm",
3599
- children: [
3600
- /* @__PURE__ */ jsx21("li", {
3601
- children: /* @__PURE__ */ jsx21("code", {
3602
- children: "PositiveNumber()"
3603
- })
3604
- }),
3605
- /* @__PURE__ */ jsx21("li", {
3606
- children: /* @__PURE__ */ jsx21("code", {
3607
- children: "Latitude()"
3608
- })
3609
- }),
3610
- /* @__PURE__ */ jsx21("li", {
3611
- children: /* @__PURE__ */ jsx21("code", {
3612
- children: "Longitude()"
3613
- })
3614
- })
3615
- ]
3616
- })
3617
- ]
3618
- }),
3619
- /* @__PURE__ */ jsxs21("div", {
3620
- className: "card-subtle p-4",
3621
- children: [
3622
- /* @__PURE__ */ jsx21("h3", {
3623
- className: "mb-2 font-semibold",
3624
- children: "Dates & Times"
3625
- }),
3626
- /* @__PURE__ */ jsxs21("ul", {
3627
- className: "space-y-1 text-muted-foreground text-sm",
3628
- children: [
3629
- /* @__PURE__ */ jsx21("li", {
3630
- children: /* @__PURE__ */ jsx21("code", {
3631
- children: "Date()"
3632
- })
3633
- }),
3634
- /* @__PURE__ */ jsx21("li", {
3635
- children: /* @__PURE__ */ jsx21("code", {
3636
- children: "DateTime()"
3637
- })
3638
- })
3639
- ]
3640
- })
3641
- ]
3642
- }),
3643
- /* @__PURE__ */ jsxs21("div", {
3644
- className: "card-subtle p-4",
3645
- children: [
3646
- /* @__PURE__ */ jsx21("h3", {
3647
- className: "mb-2 font-semibold",
3648
- children: "Generic"
3649
- }),
3650
- /* @__PURE__ */ jsxs21("ul", {
3651
- className: "space-y-1 text-muted-foreground text-sm",
3652
- children: [
3653
- /* @__PURE__ */ jsx21("li", {
3654
- children: /* @__PURE__ */ jsx21("code", {
3655
- children: "String()"
3656
- })
3657
- }),
3658
- /* @__PURE__ */ jsx21("li", {
3659
- children: /* @__PURE__ */ jsx21("code", {
3660
- children: "JSON()"
3661
- })
3662
- })
3663
- ]
3664
- })
3665
- ]
3666
- })
3667
- ]
3668
- })
3669
- ]
3670
- }),
3671
- /* @__PURE__ */ jsxs21("div", {
3672
- className: "flex items-center gap-4 pt-4",
3673
- children: [
3674
- /* @__PURE__ */ jsx21(Link20, {
3675
- href: "/docs/libraries/contracts",
3676
- className: "btn-ghost",
3677
- children: "Previous: Contracts"
3678
- }),
3679
- /* @__PURE__ */ jsxs21(Link20, {
3680
- href: "/docs/libraries/ui-kit",
3681
- className: "btn-primary",
3682
- children: [
3683
- "Next: UI Kit ",
3684
- /* @__PURE__ */ jsx21(ChevronRight20, {
3685
- size: 16
3686
- })
3687
- ]
3688
- })
3689
- ]
3690
- })
3691
- ]
3692
- });
3693
- }
3694
-
3695
- // src/components/docs/libraries/LibrariesSLOPage.tsx
3696
- import { CodeBlock as CodeBlock21, InstallCommand as InstallCommand20 } from "@contractspec/lib.design-system";
3697
- import Link21 from "@contractspec/lib.ui-link";
3698
- import { ChevronRight as ChevronRight21 } from "lucide-react";
3699
- import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
3700
- function LibrariesSLOPage() {
3701
- return /* @__PURE__ */ jsxs22("div", {
3702
- className: "space-y-8",
3703
- children: [
3704
- /* @__PURE__ */ jsxs22("div", {
3705
- className: "space-y-4",
3706
- children: [
3707
- /* @__PURE__ */ jsx22("h1", {
3708
- className: "font-bold text-4xl",
3709
- children: "SLO Library"
3710
- }),
3711
- /* @__PURE__ */ jsxs22("p", {
3712
- className: "text-lg text-muted-foreground",
3713
- children: [
3714
- /* @__PURE__ */ jsx22("code", {
3715
- children: "@contractspec/lib.slo"
3716
- }),
3717
- " keeps service level objectives front and center—declarative definitions, rolling snapshots, burn-rate math, and automated incidents."
3718
- ]
3719
- })
3720
- ]
3721
- }),
3722
- /* @__PURE__ */ jsxs22("div", {
3723
- className: "space-y-4",
3724
- children: [
3725
- /* @__PURE__ */ jsx22("h2", {
3726
- className: "font-bold text-2xl",
3727
- children: "Installation"
3728
- }),
3729
- /* @__PURE__ */ jsx22(InstallCommand20, {
3730
- package: "@contractspec/lib.slo"
3731
- })
3732
- ]
3733
- }),
3734
- /* @__PURE__ */ jsxs22("div", {
3735
- className: "space-y-4",
3736
- children: [
3737
- /* @__PURE__ */ jsx22("h2", {
3738
- className: "font-bold text-2xl",
3739
- children: "Define Targets"
3740
- }),
3741
- /* @__PURE__ */ jsx22(CodeBlock21, {
3742
- language: "typescript",
3743
- code: `const definition: SLODefinition = {
489
+ });`})]}),s("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Available Scalars"}),s("div",{className:"grid gap-4 md:grid-cols-2",children:[s("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Strings"}),s("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:e("code",{children:"NonEmptyString()"})}),e("li",{children:e("code",{children:"Email()"})}),e("li",{children:e("code",{children:"PhoneNumber()"})}),e("li",{children:e("code",{children:"CountryCode()"})}),e("li",{children:e("code",{children:"Locale()"})}),e("li",{children:e("code",{children:"TimeZone()"})})]})]}),s("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Numbers"}),s("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:e("code",{children:"PositiveNumber()"})}),e("li",{children:e("code",{children:"Latitude()"})}),e("li",{children:e("code",{children:"Longitude()"})})]})]}),s("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Dates & Times"}),s("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:e("code",{children:"Date()"})}),e("li",{children:e("code",{children:"DateTime()"})})]})]}),s("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Generic"}),s("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:e("code",{children:"String()"})}),e("li",{children:e("code",{children:"JSON()"})})]})]})]})]}),s("div",{className:"flex items-center gap-4 pt-4",children:[e(De,{href:"/docs/libraries/contracts",className:"btn-ghost",children:"Previous: Contracts"}),s(De,{href:"/docs/libraries/ui-kit",className:"btn-primary",children:["Next: UI Kit ",e(oa,{size:16})]})]})]})}import{CodeBlock as We,InstallCommand as ra}from"@contractspec/lib.design-system";import Ge from"@contractspec/lib.ui-link";import{ChevronRight as na}from"lucide-react";import{jsx as P,jsxs as _}from"react/jsx-runtime";function ca(){return _("div",{className:"space-y-8",children:[_("div",{className:"space-y-4",children:[P("h1",{className:"font-bold text-4xl",children:"SLO Library"}),_("p",{className:"text-lg text-muted-foreground",children:[P("code",{children:"@contractspec/lib.slo"})," keeps service level objectives front and center—declarative definitions, rolling snapshots, burn-rate math, and automated incidents."]})]}),_("div",{className:"space-y-4",children:[P("h2",{className:"font-bold text-2xl",children:"Installation"}),P(ra,{package:"@contractspec/lib.slo"})]}),_("div",{className:"space-y-4",children:[P("h2",{className:"font-bold text-2xl",children:"Define Targets"}),P(We,{language:"typescript",code:`const definition: SLODefinition = {
3744
490
  id: 'billing.createInvoice.availability',
3745
491
  targetAvailability: 0.999,
3746
492
  latencyP99TargetMs: 500,
3747
493
  rollingWindowMs: 7 * 24 * 60 * 60 * 1000,
3748
494
  alerts: { fastBurnThreshold: 14, slowBurnThreshold: 6 },
3749
- };`
3750
- })
3751
- ]
3752
- }),
3753
- /* @__PURE__ */ jsxs22("div", {
3754
- className: "space-y-4",
3755
- children: [
3756
- /* @__PURE__ */ jsx22("h2", {
3757
- className: "font-bold text-2xl",
3758
- children: "Monitor Burn Rate"
3759
- }),
3760
- /* @__PURE__ */ jsx22(CodeBlock21, {
3761
- language: "typescript",
3762
- code: `const monitor = new SLOMonitor({ definition, incidentManager });
495
+ };`})]}),_("div",{className:"space-y-4",children:[P("h2",{className:"font-bold text-2xl",children:"Monitor Burn Rate"}),P(We,{language:"typescript",code:`const monitor = new SLOMonitor({ definition, incidentManager });
3763
496
  const { snapshot, burnRate } = monitor.recordWindow({
3764
497
  good: 12500,
3765
498
  bad: 3,
3766
499
  latencyP99: 420,
3767
500
  latencyP95: 210,
3768
- });`
3769
- }),
3770
- /* @__PURE__ */ jsxs22("p", {
3771
- className: "text-muted-foreground text-sm",
3772
- children: [
3773
- "When burn rate exceeds the configured thresholds the monitor calls your",
3774
- /* @__PURE__ */ jsx22("code", {
3775
- children: "IncidentManager"
3776
- }),
3777
- ", providing the snapshot that triggered the alert."
3778
- ]
3779
- })
3780
- ]
3781
- }),
3782
- /* @__PURE__ */ jsxs22("div", {
3783
- className: "space-y-4",
3784
- children: [
3785
- /* @__PURE__ */ jsx22("h2", {
3786
- className: "font-bold text-2xl",
3787
- children: "History & Reporting"
3788
- }),
3789
- /* @__PURE__ */ jsx22("p", {
3790
- className: "text-muted-foreground text-sm",
3791
- children: "`SLOTracker.getHistory()` returns the latest snapshots so dashboards can show trends without hitting a warehouse. Prisma models persist everything for long-term audits."
3792
- })
3793
- ]
3794
- }),
3795
- /* @__PURE__ */ jsxs22("div", {
3796
- className: "flex items-center gap-4 pt-4",
3797
- children: [
3798
- /* @__PURE__ */ jsx22(Link21, {
3799
- href: "/docs/libraries",
3800
- className: "btn-ghost",
3801
- children: "Back to Libraries"
3802
- }),
3803
- /* @__PURE__ */ jsxs22(Link21, {
3804
- href: "/docs/libraries/cost-tracking",
3805
- className: "btn-primary",
3806
- children: [
3807
- "Next: Cost Tracking ",
3808
- /* @__PURE__ */ jsx22(ChevronRight21, {
3809
- size: 16
3810
- })
3811
- ]
3812
- })
3813
- ]
3814
- })
3815
- ]
3816
- });
3817
- }
3818
-
3819
- // src/components/docs/libraries/LibrariesSupportBotPage.tsx
3820
- import { CodeBlock as CodeBlock22, InstallCommand as InstallCommand21 } from "@contractspec/lib.design-system";
3821
- import Link22 from "@contractspec/lib.ui-link";
3822
- import { ChevronRight as ChevronRight22 } from "lucide-react";
3823
- import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
3824
- function LibrariesSupportBotPage() {
3825
- return /* @__PURE__ */ jsxs23("div", {
3826
- className: "space-y-8",
3827
- children: [
3828
- /* @__PURE__ */ jsxs23("div", {
3829
- className: "space-y-4",
3830
- children: [
3831
- /* @__PURE__ */ jsx23("h1", {
3832
- className: "font-bold text-4xl",
3833
- children: "@contractspec/lib.support-bot"
3834
- }),
3835
- /* @__PURE__ */ jsx23("p", {
3836
- className: "text-lg text-muted-foreground",
3837
- children: "Build AI-first support flows using drop-in classifiers, knowledge-grounded resolvers, and tone-aware responders—all wired into the agent runner."
3838
- })
3839
- ]
3840
- }),
3841
- /* @__PURE__ */ jsxs23("div", {
3842
- className: "space-y-4",
3843
- children: [
3844
- /* @__PURE__ */ jsx23("h2", {
3845
- className: "font-bold text-2xl",
3846
- children: "Installation"
3847
- }),
3848
- /* @__PURE__ */ jsx23(InstallCommand21, {
3849
- package: "@contractspec/lib.support-bot"
3850
- })
3851
- ]
3852
- }),
3853
- /* @__PURE__ */ jsxs23("div", {
3854
- className: "space-y-3",
3855
- children: [
3856
- /* @__PURE__ */ jsx23("h2", {
3857
- className: "font-bold text-2xl",
3858
- children: "Wire the primitives"
3859
- }),
3860
- /* @__PURE__ */ jsx23(CodeBlock22, {
3861
- language: "typescript",
3862
- code: `import { TicketClassifier, TicketResolver, AutoResponder } from '@contractspec/lib.support-bot';
501
+ });`}),_("p",{className:"text-muted-foreground text-sm",children:["When burn rate exceeds the configured thresholds the monitor calls your",P("code",{children:"IncidentManager"}),", providing the snapshot that triggered the alert."]})]}),_("div",{className:"space-y-4",children:[P("h2",{className:"font-bold text-2xl",children:"History & Reporting"}),P("p",{className:"text-muted-foreground text-sm",children:"`SLOTracker.getHistory()` returns the latest snapshots so dashboards can show trends without hitting a warehouse. Prisma models persist everything for long-term audits."})]}),_("div",{className:"flex items-center gap-4 pt-4",children:[P(Ge,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),_(Ge,{href:"/docs/libraries/cost-tracking",className:"btn-primary",children:["Next: Cost Tracking ",P(na,{size:16})]})]})]})}import{CodeBlock as Fe,InstallCommand as la}from"@contractspec/lib.design-system";import Ue from"@contractspec/lib.ui-link";import{ChevronRight as sa}from"lucide-react";import{jsx as L,jsxs as O}from"react/jsx-runtime";function da(){return O("div",{className:"space-y-8",children:[O("div",{className:"space-y-4",children:[L("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.support-bot"}),L("p",{className:"text-lg text-muted-foreground",children:"Build AI-first support flows using drop-in classifiers, knowledge-grounded resolvers, and tone-aware responders—all wired into the agent runner."})]}),O("div",{className:"space-y-4",children:[L("h2",{className:"font-bold text-2xl",children:"Installation"}),L(la,{package:"@contractspec/lib.support-bot"})]}),O("div",{className:"space-y-3",children:[L("h2",{className:"font-bold text-2xl",children:"Wire the primitives"}),L(Fe,{language:"typescript",code:`import { TicketClassifier, TicketResolver, AutoResponder } from '@contractspec/lib.support-bot';
3863
502
 
3864
503
  const classifier = new TicketClassifier();
3865
504
  const resolver = new TicketResolver({ knowledge });
@@ -3867,140 +506,10 @@ const responder = new AutoResponder();
3867
506
 
3868
507
  const classification = await classifier.classify(ticket);
3869
508
  const resolution = await resolver.resolve(ticket);
3870
- const draft = await responder.draft(ticket, resolution, classification);`
3871
- })
3872
- ]
3873
- }),
3874
- /* @__PURE__ */ jsxs23("div", {
3875
- className: "space-y-3",
3876
- children: [
3877
- /* @__PURE__ */ jsx23("h2", {
3878
- className: "font-bold text-2xl",
3879
- children: "Expose as agent tools"
3880
- }),
3881
- /* @__PURE__ */ jsx23(CodeBlock22, {
3882
- language: "typescript",
3883
- code: `import { createSupportTools } from '@contractspec/lib.support-bot/bot';
509
+ const draft = await responder.draft(ticket, resolution, classification);`})]}),O("div",{className:"space-y-3",children:[L("h2",{className:"font-bold text-2xl",children:"Expose as agent tools"}),L(Fe,{language:"typescript",code:`import { createSupportTools } from '@contractspec/lib.support-bot/bot';
3884
510
 
3885
511
  const tools = createSupportTools({ resolver, classifier, responder });
3886
- // Pass these tools into your host runtime or agent adapter.`
3887
- })
3888
- ]
3889
- }),
3890
- /* @__PURE__ */ jsxs23("div", {
3891
- className: "space-y-3",
3892
- children: [
3893
- /* @__PURE__ */ jsx23("h2", {
3894
- className: "font-bold text-2xl",
3895
- children: "Included modules"
3896
- }),
3897
- /* @__PURE__ */ jsxs23("ul", {
3898
- className: "list-inside list-disc space-y-2 text-muted-foreground",
3899
- children: [
3900
- /* @__PURE__ */ jsxs23("li", {
3901
- children: [
3902
- /* @__PURE__ */ jsx23("strong", {
3903
- children: "TicketClassifier"
3904
- }),
3905
- ": heuristics + optional LLM validation for category/priority."
3906
- ]
3907
- }),
3908
- /* @__PURE__ */ jsxs23("li", {
3909
- children: [
3910
- /* @__PURE__ */ jsx23("strong", {
3911
- children: "TicketResolver"
3912
- }),
3913
- ": RAG resolver that can plug into any knowledge retriever."
3914
- ]
3915
- }),
3916
- /* @__PURE__ */ jsxs23("li", {
3917
- children: [
3918
- /* @__PURE__ */ jsx23("strong", {
3919
- children: "AutoResponder"
3920
- }),
3921
- ": generates drafts, citations, and tone-aware copy."
3922
- ]
3923
- }),
3924
- /* @__PURE__ */ jsxs23("li", {
3925
- children: [
3926
- /* @__PURE__ */ jsx23("strong", {
3927
- children: "SupportFeedbackLoop"
3928
- }),
3929
- ": track auto-resolution rates and sentiment trends."
3930
- ]
3931
- })
3932
- ]
3933
- })
3934
- ]
3935
- }),
3936
- /* @__PURE__ */ jsxs23("div", {
3937
- className: "flex items-center gap-4 pt-4",
3938
- children: [
3939
- /* @__PURE__ */ jsx23(Link22, {
3940
- href: "/docs/libraries",
3941
- className: "btn-ghost",
3942
- children: "Back to Libraries"
3943
- }),
3944
- /* @__PURE__ */ jsxs23(Link22, {
3945
- href: "/docs/libraries/growth",
3946
- className: "btn-primary",
3947
- children: [
3948
- "Next: Growth ",
3949
- /* @__PURE__ */ jsx23(ChevronRight22, {
3950
- size: 16
3951
- })
3952
- ]
3953
- })
3954
- ]
3955
- })
3956
- ]
3957
- });
3958
- }
3959
-
3960
- // src/components/docs/libraries/LibrariesTestingPage.tsx
3961
- import { CodeBlock as CodeBlock23, InstallCommand as InstallCommand22 } from "@contractspec/lib.design-system";
3962
- import Link23 from "@contractspec/lib.ui-link";
3963
- import { ChevronRight as ChevronRight23 } from "lucide-react";
3964
- import { jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
3965
- function LibrariesTestingPage() {
3966
- return /* @__PURE__ */ jsxs24("div", {
3967
- className: "space-y-8",
3968
- children: [
3969
- /* @__PURE__ */ jsxs24("div", {
3970
- className: "space-y-4",
3971
- children: [
3972
- /* @__PURE__ */ jsx24("h1", {
3973
- className: "font-bold text-4xl",
3974
- children: "@contractspec/lib.testing"
3975
- }),
3976
- /* @__PURE__ */ jsx24("p", {
3977
- className: "text-lg text-muted-foreground",
3978
- children: "Golden tests ensure new rollouts behave exactly like the traffic that inspired them. Record requests in production, replay them locally, and ship with confidence."
3979
- })
3980
- ]
3981
- }),
3982
- /* @__PURE__ */ jsxs24("div", {
3983
- className: "space-y-4",
3984
- children: [
3985
- /* @__PURE__ */ jsx24("h2", {
3986
- className: "font-bold text-2xl",
3987
- children: "Installation"
3988
- }),
3989
- /* @__PURE__ */ jsx24(InstallCommand22, {
3990
- package: "@contractspec/lib.testing"
3991
- })
3992
- ]
3993
- }),
3994
- /* @__PURE__ */ jsxs24("div", {
3995
- className: "space-y-3",
3996
- children: [
3997
- /* @__PURE__ */ jsx24("h2", {
3998
- className: "font-bold text-2xl",
3999
- children: "Record traffic"
4000
- }),
4001
- /* @__PURE__ */ jsx24(CodeBlock23, {
4002
- language: "typescript",
4003
- code: `import {
512
+ // Pass these tools into your host runtime or agent adapter.`})]}),O("div",{className:"space-y-3",children:[L("h2",{className:"font-bold text-2xl",children:"Included modules"}),O("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[O("li",{children:[L("strong",{children:"TicketClassifier"}),": heuristics + optional LLM validation for category/priority."]}),O("li",{children:[L("strong",{children:"TicketResolver"}),": RAG resolver that can plug into any knowledge retriever."]}),O("li",{children:[L("strong",{children:"AutoResponder"}),": generates drafts, citations, and tone-aware copy."]}),O("li",{children:[L("strong",{children:"SupportFeedbackLoop"}),": track auto-resolution rates and sentiment trends."]})]})]}),O("div",{className:"flex items-center gap-4 pt-4",children:[L(Ue,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),O(Ue,{href:"/docs/libraries/growth",className:"btn-primary",children:["Next: Growth ",L(sa,{size:16})]})]})]})}import{CodeBlock as se,InstallCommand as pa}from"@contractspec/lib.design-system";import qe from"@contractspec/lib.ui-link";import{ChevronRight as ma}from"lucide-react";import{jsx as R,jsxs as Z}from"react/jsx-runtime";function ua(){return Z("div",{className:"space-y-8",children:[Z("div",{className:"space-y-4",children:[R("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.testing"}),R("p",{className:"text-lg text-muted-foreground",children:"Golden tests ensure new rollouts behave exactly like the traffic that inspired them. Record requests in production, replay them locally, and ship with confidence."})]}),Z("div",{className:"space-y-4",children:[R("h2",{className:"font-bold text-2xl",children:"Installation"}),R(pa,{package:"@contractspec/lib.testing"})]}),Z("div",{className:"space-y-3",children:[R("h2",{className:"font-bold text-2xl",children:"Record traffic"}),R(se,{language:"typescript",code:`import {
4004
513
  TrafficRecorder,
4005
514
  InMemoryTrafficStore,
4006
515
  } from '@contractspec/lib.testing/recorder';
@@ -4020,20 +529,7 @@ await recorder.record({
4020
529
  output,
4021
530
  success: true,
4022
531
  tenantId: ctx.organizationId ?? undefined,
4023
- });`
4024
- })
4025
- ]
4026
- }),
4027
- /* @__PURE__ */ jsxs24("div", {
4028
- className: "space-y-3",
4029
- children: [
4030
- /* @__PURE__ */ jsx24("h2", {
4031
- className: "font-bold text-2xl",
4032
- children: "Generate suites"
4033
- }),
4034
- /* @__PURE__ */ jsx24(CodeBlock23, {
4035
- language: "typescript",
4036
- code: `import { GoldenTestGenerator } from '@contractspec/lib.testing';
532
+ });`})]}),Z("div",{className:"space-y-3",children:[R("h2",{className:"font-bold text-2xl",children:"Generate suites"}),R(se,{language:"typescript",code:`import { GoldenTestGenerator } from '@contractspec/lib.testing';
4037
533
 
4038
534
  const generator = new GoldenTestGenerator();
4039
535
  const code = generator.generate(snapshots, {
@@ -4041,184 +537,7 @@ const code = generator.generate(snapshots, {
4041
537
  runnerImport: './tests/run-operation',
4042
538
  runnerFunction: 'runOrdersCommand',
4043
539
  framework: 'vitest',
4044
- });`
4045
- })
4046
- ]
4047
- }),
4048
- /* @__PURE__ */ jsxs24("div", {
4049
- className: "space-y-3",
4050
- children: [
4051
- /* @__PURE__ */ jsx24("h2", {
4052
- className: "font-bold text-2xl",
4053
- children: "CLI workflow"
4054
- }),
4055
- /* @__PURE__ */ jsx24(CodeBlock23, {
4056
- language: "bash",
4057
- code: `contractspec test generate \\
4058
- --operation orders.create \\
4059
- --output tests/orders.create.golden.test.ts \\
4060
- --runner-import ./tests/run-operation \\
4061
- --runner-fn runOrdersCommand \\
4062
- --from-production \\
4063
- --days 7 \\
4064
- --sample-rate 0.05`
4065
- })
4066
- ]
4067
- }),
4068
- /* @__PURE__ */ jsx24("div", {
4069
- className: "grid gap-4 md:grid-cols-2",
4070
- children: [
4071
- {
4072
- title: "Framework agnostic",
4073
- description: "Vitest by default, Jest via `generateJestSuite`, or call `runGoldenTests` manually inside CI."
4074
- },
4075
- {
4076
- title: "Sanitize & sample",
4077
- description: "Scrub payloads before persistence and control sample rates per operation to stay within compliance limits."
4078
- }
4079
- ].map((card) => /* @__PURE__ */ jsxs24("div", {
4080
- className: "card-subtle space-y-2 p-4",
4081
- children: [
4082
- /* @__PURE__ */ jsx24("h3", {
4083
- className: "font-semibold text-lg",
4084
- children: card.title
4085
- }),
4086
- /* @__PURE__ */ jsx24("p", {
4087
- className: "text-muted-foreground text-sm",
4088
- children: card.description
4089
- })
4090
- ]
4091
- }, card.title))
4092
- }),
4093
- /* @__PURE__ */ jsxs24("div", {
4094
- className: "flex items-center gap-4 pt-4",
4095
- children: [
4096
- /* @__PURE__ */ jsx24(Link23, {
4097
- href: "/docs/libraries",
4098
- className: "btn-ghost",
4099
- children: "Back to Libraries"
4100
- }),
4101
- /* @__PURE__ */ jsxs24(Link23, {
4102
- href: "/docs/libraries/resilience",
4103
- className: "btn-primary",
4104
- children: [
4105
- "Next: Resilience ",
4106
- /* @__PURE__ */ jsx24(ChevronRight23, {
4107
- size: 16
4108
- })
4109
- ]
4110
- })
4111
- ]
4112
- })
4113
- ]
4114
- });
4115
- }
4116
-
4117
- // src/components/docs/libraries/LibrariesUIKitPage.tsx
4118
- import { CodeBlock as CodeBlock24, InstallCommand as InstallCommand23 } from "@contractspec/lib.design-system";
4119
- import Link24 from "@contractspec/lib.ui-link";
4120
- import { ChevronRight as ChevronRight24 } from "lucide-react";
4121
- import { jsx as jsx25, jsxs as jsxs25 } from "react/jsx-runtime";
4122
- function LibrariesUIKitPage() {
4123
- return /* @__PURE__ */ jsxs25("div", {
4124
- className: "space-y-8",
4125
- children: [
4126
- /* @__PURE__ */ jsxs25("div", {
4127
- className: "space-y-4",
4128
- children: [
4129
- /* @__PURE__ */ jsx25("h1", {
4130
- className: "font-bold text-4xl",
4131
- children: "@contractspec/lib.ui-kit"
4132
- }),
4133
- /* @__PURE__ */ jsxs25("p", {
4134
- className: "text-muted-foreground",
4135
- children: [
4136
- "Universal UI components for React Native and Web, built on top of",
4137
- /* @__PURE__ */ jsx25("code", {
4138
- children: "nativewind"
4139
- }),
4140
- " and ",
4141
- /* @__PURE__ */ jsx25("code", {
4142
- children: "@rn-primitives"
4143
- }),
4144
- "."
4145
- ]
4146
- })
4147
- ]
4148
- }),
4149
- /* @__PURE__ */ jsxs25("div", {
4150
- className: "space-y-4",
4151
- children: [
4152
- /* @__PURE__ */ jsx25("h2", {
4153
- className: "font-bold text-2xl",
4154
- children: "Installation"
4155
- }),
4156
- /* @__PURE__ */ jsx25(InstallCommand23, {
4157
- package: "@contractspec/lib.ui-kit"
4158
- })
4159
- ]
4160
- }),
4161
- /* @__PURE__ */ jsxs25("div", {
4162
- className: "space-y-4",
4163
- children: [
4164
- /* @__PURE__ */ jsx25("h2", {
4165
- className: "font-bold text-2xl",
4166
- children: "Key Features"
4167
- }),
4168
- /* @__PURE__ */ jsxs25("ul", {
4169
- className: "list-inside list-disc space-y-2 text-muted-foreground",
4170
- children: [
4171
- /* @__PURE__ */ jsxs25("li", {
4172
- children: [
4173
- /* @__PURE__ */ jsx25("strong", {
4174
- children: "Universal"
4175
- }),
4176
- ": Components render natively on iOS/Android and as standard HTML on web"
4177
- ]
4178
- }),
4179
- /* @__PURE__ */ jsxs25("li", {
4180
- children: [
4181
- /* @__PURE__ */ jsx25("strong", {
4182
- children: "Styled with NativeWind"
4183
- }),
4184
- ": Uses Tailwind CSS classes for styling"
4185
- ]
4186
- }),
4187
- /* @__PURE__ */ jsxs25("li", {
4188
- children: [
4189
- /* @__PURE__ */ jsx25("strong", {
4190
- children: "Accessible"
4191
- }),
4192
- ": Leverages ",
4193
- /* @__PURE__ */ jsx25("code", {
4194
- children: "@rn-primitives"
4195
- }),
4196
- " ",
4197
- "(Radix UI for Native)"
4198
- ]
4199
- }),
4200
- /* @__PURE__ */ jsxs25("li", {
4201
- children: [
4202
- /* @__PURE__ */ jsx25("strong", {
4203
- children: "Atomic Design"
4204
- }),
4205
- ": Exports atoms, molecules, and organisms"
4206
- ]
4207
- })
4208
- ]
4209
- })
4210
- ]
4211
- }),
4212
- /* @__PURE__ */ jsxs25("div", {
4213
- className: "space-y-4",
4214
- children: [
4215
- /* @__PURE__ */ jsx25("h2", {
4216
- className: "font-bold text-2xl",
4217
- children: "Example Usage"
4218
- }),
4219
- /* @__PURE__ */ jsx25(CodeBlock24, {
4220
- language: "tsx",
4221
- code: `import { Button } from '@contractspec/lib.ui-kit/ui/button';
540
+ });`})]}),Z("div",{className:"space-y-3",children:[R("h2",{className:"font-bold text-2xl",children:"CLI workflow"}),R(se,{language:"bash",code:"contractspec test generate \\\n --operation orders.create \\\n --output tests/orders.create.golden.test.ts \\\n --runner-import ./tests/run-operation \\\n --runner-fn runOrdersCommand \\\n --from-production \\\n --days 7 \\\n --sample-rate 0.05"})]}),R("div",{className:"grid gap-4 md:grid-cols-2",children:[{title:"Framework agnostic",description:"Vitest by default, Jest via `generateJestSuite`, or call `runGoldenTests` manually inside CI."},{title:"Sanitize & sample",description:"Scrub payloads before persistence and control sample rates per operation to stay within compliance limits."}].map((E)=>Z("div",{className:"card-subtle space-y-2 p-4",children:[R("h3",{className:"font-semibold text-lg",children:E.title}),R("p",{className:"text-muted-foreground text-sm",children:E.description})]},E.title))}),Z("div",{className:"flex items-center gap-4 pt-4",children:[R(qe,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),Z(qe,{href:"/docs/libraries/resilience",className:"btn-primary",children:["Next: Resilience ",R(ma,{size:16})]})]})]})}import{CodeBlock as ga,InstallCommand as fa}from"@contractspec/lib.design-system";import _e from"@contractspec/lib.ui-link";import{ChevronRight as ha}from"lucide-react";import{jsx as a,jsxs as m}from"react/jsx-runtime";function ba(){return m("div",{className:"space-y-8",children:[m("div",{className:"space-y-4",children:[a("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.ui-kit"}),m("p",{className:"text-muted-foreground",children:["Universal UI components for React Native and Web, built on top of",a("code",{children:"nativewind"})," and ",a("code",{children:"@rn-primitives"}),"."]})]}),m("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Installation"}),a(fa,{package:"@contractspec/lib.ui-kit"})]}),m("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Key Features"}),m("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[m("li",{children:[a("strong",{children:"Universal"}),": Components render natively on iOS/Android and as standard HTML on web"]}),m("li",{children:[a("strong",{children:"Styled with NativeWind"}),": Uses Tailwind CSS classes for styling"]}),m("li",{children:[a("strong",{children:"Accessible"}),": Leverages ",a("code",{children:"@rn-primitives"})," ","(Radix UI for Native)"]}),m("li",{children:[a("strong",{children:"Atomic Design"}),": Exports atoms, molecules, and organisms"]})]})]}),m("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Example Usage"}),a(ga,{language:"tsx",code:`import { Button } from '@contractspec/lib.ui-kit/ui/button';
4222
541
  import { Text } from '@contractspec/lib.ui-kit/ui/text';
4223
542
  import { Card, CardHeader, CardTitle, CardContent } from '@contractspec/lib.ui-kit/ui/card';
4224
543
 
@@ -4236,173 +555,7 @@ export function MyComponent() {
4236
555
  </CardContent>
4237
556
  </Card>
4238
557
  );
4239
- }`
4240
- })
4241
- ]
4242
- }),
4243
- /* @__PURE__ */ jsxs25("div", {
4244
- className: "space-y-4",
4245
- children: [
4246
- /* @__PURE__ */ jsx25("h2", {
4247
- className: "font-bold text-2xl",
4248
- children: "Core Components"
4249
- }),
4250
- /* @__PURE__ */ jsxs25("div", {
4251
- className: "grid gap-4 md:grid-cols-3",
4252
- children: [
4253
- /* @__PURE__ */ jsxs25("div", {
4254
- className: "card-subtle p-4",
4255
- children: [
4256
- /* @__PURE__ */ jsx25("h3", {
4257
- className: "mb-2 font-semibold",
4258
- children: "Form Controls"
4259
- }),
4260
- /* @__PURE__ */ jsxs25("ul", {
4261
- className: "space-y-1 text-muted-foreground text-sm",
4262
- children: [
4263
- /* @__PURE__ */ jsx25("li", {
4264
- children: "Button"
4265
- }),
4266
- /* @__PURE__ */ jsx25("li", {
4267
- children: "Input"
4268
- }),
4269
- /* @__PURE__ */ jsx25("li", {
4270
- children: "Checkbox"
4271
- }),
4272
- /* @__PURE__ */ jsx25("li", {
4273
- children: "Switch"
4274
- }),
4275
- /* @__PURE__ */ jsx25("li", {
4276
- children: "Select"
4277
- })
4278
- ]
4279
- })
4280
- ]
4281
- }),
4282
- /* @__PURE__ */ jsxs25("div", {
4283
- className: "card-subtle p-4",
4284
- children: [
4285
- /* @__PURE__ */ jsx25("h3", {
4286
- className: "mb-2 font-semibold",
4287
- children: "Layout"
4288
- }),
4289
- /* @__PURE__ */ jsxs25("ul", {
4290
- className: "space-y-1 text-muted-foreground text-sm",
4291
- children: [
4292
- /* @__PURE__ */ jsx25("li", {
4293
- children: "Card"
4294
- }),
4295
- /* @__PURE__ */ jsx25("li", {
4296
- children: "Stack"
4297
- }),
4298
- /* @__PURE__ */ jsx25("li", {
4299
- children: "Separator"
4300
- }),
4301
- /* @__PURE__ */ jsx25("li", {
4302
- children: "Sheet"
4303
- })
4304
- ]
4305
- })
4306
- ]
4307
- }),
4308
- /* @__PURE__ */ jsxs25("div", {
4309
- className: "card-subtle p-4",
4310
- children: [
4311
- /* @__PURE__ */ jsx25("h3", {
4312
- className: "mb-2 font-semibold",
4313
- children: "Feedback"
4314
- }),
4315
- /* @__PURE__ */ jsxs25("ul", {
4316
- className: "space-y-1 text-muted-foreground text-sm",
4317
- children: [
4318
- /* @__PURE__ */ jsx25("li", {
4319
- children: "Alert"
4320
- }),
4321
- /* @__PURE__ */ jsx25("li", {
4322
- children: "Skeleton"
4323
- }),
4324
- /* @__PURE__ */ jsx25("li", {
4325
- children: "Progress"
4326
- }),
4327
- /* @__PURE__ */ jsx25("li", {
4328
- children: "Tooltip"
4329
- })
4330
- ]
4331
- })
4332
- ]
4333
- })
4334
- ]
4335
- })
4336
- ]
4337
- }),
4338
- /* @__PURE__ */ jsxs25("div", {
4339
- className: "flex items-center gap-4 pt-4",
4340
- children: [
4341
- /* @__PURE__ */ jsx25(Link24, {
4342
- href: "/docs/libraries/schema",
4343
- className: "btn-ghost",
4344
- children: "Previous: Schema"
4345
- }),
4346
- /* @__PURE__ */ jsxs25(Link24, {
4347
- href: "/docs/libraries/design-system",
4348
- className: "btn-primary",
4349
- children: [
4350
- "Next: Design System ",
4351
- /* @__PURE__ */ jsx25(ChevronRight24, {
4352
- size: 16
4353
- })
4354
- ]
4355
- })
4356
- ]
4357
- })
4358
- ]
4359
- });
4360
- }
4361
-
4362
- // src/components/docs/libraries/LibrariesWorkflowComposerPage.tsx
4363
- import { CodeBlock as CodeBlock25, InstallCommand as InstallCommand24 } from "@contractspec/lib.design-system";
4364
- import Link25 from "@contractspec/lib.ui-link";
4365
- import { ChevronRight as ChevronRight25 } from "lucide-react";
4366
- import { jsx as jsx26, jsxs as jsxs26 } from "react/jsx-runtime";
4367
- function LibrariesWorkflowComposerPage() {
4368
- return /* @__PURE__ */ jsxs26("div", {
4369
- className: "space-y-8",
4370
- children: [
4371
- /* @__PURE__ */ jsxs26("div", {
4372
- className: "space-y-4",
4373
- children: [
4374
- /* @__PURE__ */ jsx26("h1", {
4375
- className: "font-bold text-4xl",
4376
- children: "Workflow Composer"
4377
- }),
4378
- /* @__PURE__ */ jsx26("p", {
4379
- className: "text-lg text-muted-foreground",
4380
- children: "`@contractspec/lib.workflow-composer` injects tenant-/role-/device-specific steps into base WorkflowSpecs and keeps transitions valid."
4381
- })
4382
- ]
4383
- }),
4384
- /* @__PURE__ */ jsxs26("div", {
4385
- className: "space-y-4",
4386
- children: [
4387
- /* @__PURE__ */ jsx26("h2", {
4388
- className: "font-bold text-2xl",
4389
- children: "Installation"
4390
- }),
4391
- /* @__PURE__ */ jsx26(InstallCommand24, {
4392
- package: "@contractspec/lib.workflow-composer"
4393
- })
4394
- ]
4395
- }),
4396
- /* @__PURE__ */ jsxs26("div", {
4397
- className: "space-y-4",
4398
- children: [
4399
- /* @__PURE__ */ jsx26("h2", {
4400
- className: "font-bold text-2xl",
4401
- children: "Register extensions"
4402
- }),
4403
- /* @__PURE__ */ jsx26(CodeBlock25, {
4404
- language: "typescript",
4405
- code: `const composer = new WorkflowComposer();
558
+ }`})]}),m("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Core Components"}),m("div",{className:"grid gap-4 md:grid-cols-3",children:[m("div",{className:"card-subtle p-4",children:[a("h3",{className:"mb-2 font-semibold",children:"Form Controls"}),m("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[a("li",{children:"Button"}),a("li",{children:"Input"}),a("li",{children:"Checkbox"}),a("li",{children:"Switch"}),a("li",{children:"Select"})]})]}),m("div",{className:"card-subtle p-4",children:[a("h3",{className:"mb-2 font-semibold",children:"Layout"}),m("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[a("li",{children:"Card"}),a("li",{children:"Stack"}),a("li",{children:"Separator"}),a("li",{children:"Sheet"})]})]}),m("div",{className:"card-subtle p-4",children:[a("h3",{className:"mb-2 font-semibold",children:"Feedback"}),m("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[a("li",{children:"Alert"}),a("li",{children:"Skeleton"}),a("li",{children:"Progress"}),a("li",{children:"Tooltip"})]})]})]})]}),m("div",{className:"flex items-center gap-4 pt-4",children:[a(_e,{href:"/docs/libraries/schema",className:"btn-ghost",children:"Previous: Schema"}),m(_e,{href:"/docs/libraries/design-system",className:"btn-primary",children:["Next: Design System ",a(ha,{size:16})]})]})]})}import{CodeBlock as He,InstallCommand as va}from"@contractspec/lib.design-system";import Ve from"@contractspec/lib.ui-link";import{ChevronRight as ya}from"lucide-react";import{jsx as H,jsxs as j}from"react/jsx-runtime";function Na(){return j("div",{className:"space-y-8",children:[j("div",{className:"space-y-4",children:[H("h1",{className:"font-bold text-4xl",children:"Workflow Composer"}),H("p",{className:"text-lg text-muted-foreground",children:"`@contractspec/lib.workflow-composer` injects tenant-/role-/device-specific steps into base WorkflowSpecs and keeps transitions valid."})]}),j("div",{className:"space-y-4",children:[H("h2",{className:"font-bold text-2xl",children:"Installation"}),H(va,{package:"@contractspec/lib.workflow-composer"})]}),j("div",{className:"space-y-4",children:[H("h2",{className:"font-bold text-2xl",children:"Register extensions"}),H(He,{language:"typescript",code:`const composer = new WorkflowComposer();
4406
559
 
4407
560
  composer.register({
4408
561
  workflow: 'billing.invoiceApproval',
@@ -4419,110 +572,12 @@ composer.register({
4419
572
  },
4420
573
  ],
4421
574
  hiddenSteps: ['internal-audit'],
4422
- });`
4423
- })
4424
- ]
4425
- }),
4426
- /* @__PURE__ */ jsxs26("div", {
4427
- className: "space-y-4",
4428
- children: [
4429
- /* @__PURE__ */ jsx26("h2", {
4430
- className: "font-bold text-2xl",
4431
- children: "Compose at runtime"
4432
- }),
4433
- /* @__PURE__ */ jsx26(CodeBlock25, {
4434
- language: "typescript",
4435
- code: `const tenantWorkflow = composer.compose({
575
+ });`})]}),j("div",{className:"space-y-4",children:[H("h2",{className:"font-bold text-2xl",children:"Compose at runtime"}),H(He,{language:"typescript",code:`const tenantWorkflow = composer.compose({
4436
576
  base: BaseInvoiceWorkflow,
4437
577
  tenantId: 'acme',
4438
578
  });
4439
579
 
4440
- workflowRunner.execute(tenantWorkflow, ctx);`
4441
- })
4442
- ]
4443
- }),
4444
- /* @__PURE__ */ jsxs26("div", {
4445
- className: "flex items-center gap-4 pt-4",
4446
- children: [
4447
- /* @__PURE__ */ jsx26(Link25, {
4448
- href: "/docs/libraries",
4449
- className: "btn-ghost",
4450
- children: "Back to Libraries"
4451
- }),
4452
- /* @__PURE__ */ jsxs26(Link25, {
4453
- href: "/docs/libraries/workflows",
4454
- className: "btn-primary",
4455
- children: [
4456
- "Next: Workflow Runtime ",
4457
- /* @__PURE__ */ jsx26(ChevronRight25, {
4458
- size: 16
4459
- })
4460
- ]
4461
- })
4462
- ]
4463
- })
4464
- ]
4465
- });
4466
- }
4467
-
4468
- // src/components/docs/libraries/LibrariesWorkflowsPage.tsx
4469
- import { CodeBlock as CodeBlock26, InstallCommand as InstallCommand25 } from "@contractspec/lib.design-system";
4470
- import Link26 from "@contractspec/lib.ui-link";
4471
- import { ChevronRight as ChevronRight26 } from "lucide-react";
4472
- import { jsx as jsx27, jsxs as jsxs27 } from "react/jsx-runtime";
4473
- function LibrariesWorkflowsPage() {
4474
- return /* @__PURE__ */ jsxs27("div", {
4475
- className: "space-y-8",
4476
- children: [
4477
- /* @__PURE__ */ jsxs27("div", {
4478
- className: "space-y-4",
4479
- children: [
4480
- /* @__PURE__ */ jsx27("h1", {
4481
- className: "font-bold text-4xl",
4482
- children: "Workflow Runtime Library"
4483
- }),
4484
- /* @__PURE__ */ jsxs27("p", {
4485
- className: "text-lg text-muted-foreground",
4486
- children: [
4487
- "The ",
4488
- /* @__PURE__ */ jsx27("code", {
4489
- children: "@contractspec/lib.contracts-spec/workflow"
4490
- }),
4491
- " library provides the core ",
4492
- /* @__PURE__ */ jsx27("code", {
4493
- children: "WorkflowRunner"
4494
- }),
4495
- " for executing stateful, durable workflows."
4496
- ]
4497
- })
4498
- ]
4499
- }),
4500
- /* @__PURE__ */ jsxs27("div", {
4501
- className: "space-y-4",
4502
- children: [
4503
- /* @__PURE__ */ jsx27("h2", {
4504
- className: "font-bold text-2xl",
4505
- children: "Installation"
4506
- }),
4507
- /* @__PURE__ */ jsx27(InstallCommand25, {
4508
- package: "@contractspec/lib.contracts-spec"
4509
- })
4510
- ]
4511
- }),
4512
- /* @__PURE__ */ jsxs27("div", {
4513
- className: "space-y-4",
4514
- children: [
4515
- /* @__PURE__ */ jsx27("h2", {
4516
- className: "font-bold text-2xl",
4517
- children: "WorkflowRunner"
4518
- }),
4519
- /* @__PURE__ */ jsx27("p", {
4520
- className: "text-muted-foreground",
4521
- children: "The runner manages execution state, step transitions, retries, and compensation."
4522
- }),
4523
- /* @__PURE__ */ jsx27(CodeBlock26, {
4524
- language: "typescript",
4525
- code: `import { WorkflowRunner } from '@contractspec/lib.contracts-spec/workflow/runner';
580
+ workflowRunner.execute(tenantWorkflow, ctx);`})]}),j("div",{className:"flex items-center gap-4 pt-4",children:[H(Ve,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),j(Ve,{href:"/docs/libraries/workflows",className:"btn-primary",children:["Next: Workflow Runtime ",H(ya,{size:16})]})]})]})}import{CodeBlock as ka,InstallCommand as wa}from"@contractspec/lib.design-system";import Qe from"@contractspec/lib.ui-link";import{ChevronRight as Ca}from"lucide-react";import{jsx as r,jsxs as T}from"react/jsx-runtime";function Sa(){return T("div",{className:"space-y-8",children:[T("div",{className:"space-y-4",children:[r("h1",{className:"font-bold text-4xl",children:"Workflow Runtime Library"}),T("p",{className:"text-lg text-muted-foreground",children:["The ",r("code",{children:"@contractspec/lib.contracts-spec/workflow"})," library provides the core ",r("code",{children:"WorkflowRunner"})," for executing stateful, durable workflows."]})]}),T("div",{className:"space-y-4",children:[r("h2",{className:"font-bold text-2xl",children:"Installation"}),r(wa,{package:"@contractspec/lib.contracts-spec"})]}),T("div",{className:"space-y-4",children:[r("h2",{className:"font-bold text-2xl",children:"WorkflowRunner"}),r("p",{className:"text-muted-foreground",children:"The runner manages execution state, step transitions, retries, and compensation."}),r(ka,{language:"typescript",code:`import { WorkflowRunner } from '@contractspec/lib.contracts-spec/workflow/runner';
4526
581
  import { InMemoryStateStore } from '@contractspec/lib.contracts-spec/workflow/adapters/memory-store';
4527
582
  import { WorkflowRegistry } from '@contractspec/lib.contracts-spec/workflow/spec';
4528
583
 
@@ -4542,152 +597,4 @@ const runner = new WorkflowRunner({
4542
597
  const workflowId = await runner.start('my.workflow', 1, { userId: '123' });
4543
598
 
4544
599
  // Execute next step (usually called by a worker or queue consumer)
4545
- await runner.executeStep(workflowId);`
4546
- })
4547
- ]
4548
- }),
4549
- /* @__PURE__ */ jsxs27("div", {
4550
- className: "space-y-4",
4551
- children: [
4552
- /* @__PURE__ */ jsx27("h2", {
4553
- className: "font-bold text-2xl",
4554
- children: "State Persistence"
4555
- }),
4556
- /* @__PURE__ */ jsxs27("p", {
4557
- className: "text-muted-foreground",
4558
- children: [
4559
- "The runner relies on a ",
4560
- /* @__PURE__ */ jsx27("code", {
4561
- children: "StateStore"
4562
- }),
4563
- " to persist workflow execution history. ContractSpec ships with:"
4564
- ]
4565
- }),
4566
- /* @__PURE__ */ jsxs27("ul", {
4567
- className: "list-disc space-y-2 pl-6 text-muted-foreground",
4568
- children: [
4569
- /* @__PURE__ */ jsxs27("li", {
4570
- children: [
4571
- /* @__PURE__ */ jsx27("code", {
4572
- children: "InMemoryStateStore"
4573
- }),
4574
- " - for testing and development."
4575
- ]
4576
- }),
4577
- /* @__PURE__ */ jsxs27("li", {
4578
- children: [
4579
- /* @__PURE__ */ jsx27("code", {
4580
- children: "PrismaStateStore"
4581
- }),
4582
- " - for production using Prisma ORM."
4583
- ]
4584
- })
4585
- ]
4586
- })
4587
- ]
4588
- }),
4589
- /* @__PURE__ */ jsxs27("div", {
4590
- className: "space-y-4",
4591
- children: [
4592
- /* @__PURE__ */ jsx27("h2", {
4593
- className: "font-bold text-2xl",
4594
- children: "Events"
4595
- }),
4596
- /* @__PURE__ */ jsx27("p", {
4597
- className: "text-muted-foreground",
4598
- children: "The runner emits events that you can subscribe to for monitoring:"
4599
- }),
4600
- /* @__PURE__ */ jsxs27("ul", {
4601
- className: "list-disc space-y-2 pl-6 text-muted-foreground",
4602
- children: [
4603
- /* @__PURE__ */ jsx27("li", {
4604
- children: /* @__PURE__ */ jsx27("code", {
4605
- children: "workflow.started"
4606
- })
4607
- }),
4608
- /* @__PURE__ */ jsx27("li", {
4609
- children: /* @__PURE__ */ jsx27("code", {
4610
- children: "workflow.step_completed"
4611
- })
4612
- }),
4613
- /* @__PURE__ */ jsx27("li", {
4614
- children: /* @__PURE__ */ jsx27("code", {
4615
- children: "workflow.step_failed"
4616
- })
4617
- }),
4618
- /* @__PURE__ */ jsx27("li", {
4619
- children: /* @__PURE__ */ jsx27("code", {
4620
- children: "workflow.step_retrying"
4621
- })
4622
- }),
4623
- /* @__PURE__ */ jsx27("li", {
4624
- children: /* @__PURE__ */ jsx27("code", {
4625
- children: "workflow.completed"
4626
- })
4627
- }),
4628
- /* @__PURE__ */ jsx27("li", {
4629
- children: /* @__PURE__ */ jsx27("code", {
4630
- children: "workflow.cancelled"
4631
- })
4632
- }),
4633
- /* @__PURE__ */ jsx27("li", {
4634
- children: /* @__PURE__ */ jsx27("code", {
4635
- children: "workflow.compensation_step_completed"
4636
- })
4637
- })
4638
- ]
4639
- })
4640
- ]
4641
- }),
4642
- /* @__PURE__ */ jsxs27("div", {
4643
- className: "flex items-center gap-4 pt-4",
4644
- children: [
4645
- /* @__PURE__ */ jsx27(Link26, {
4646
- href: "/docs/libraries",
4647
- className: "btn-ghost",
4648
- children: "Back to Libraries"
4649
- }),
4650
- /* @__PURE__ */ jsxs27(Link26, {
4651
- href: "/docs/libraries/data-views",
4652
- className: "btn-primary",
4653
- children: [
4654
- "Next: Data Views ",
4655
- /* @__PURE__ */ jsx27(ChevronRight26, {
4656
- size: 16
4657
- })
4658
- ]
4659
- })
4660
- ]
4661
- })
4662
- ]
4663
- });
4664
- }
4665
- export {
4666
- LibrariesWorkflowsPage,
4667
- LibrariesWorkflowComposerPage,
4668
- LibrariesUIKitPage,
4669
- LibrariesTestingPage,
4670
- LibrariesSupportBotPage,
4671
- LibrariesSchemaPage,
4672
- LibrariesSLOPage,
4673
- LibrariesRuntimePage,
4674
- LibrariesResiliencePage,
4675
- LibrariesProgressiveDeliveryPage,
4676
- LibrariesPersonalizationPage,
4677
- LibrariesOverviewPage,
4678
- LibrariesOverlayEnginePage,
4679
- LibrariesObservabilityPage,
4680
- LibrariesMultiTenancyPage,
4681
- LibrariesGrowthPage,
4682
- LibrariesGraphQLPage,
4683
- LibrariesEvolutionPage,
4684
- LibrariesDesignSystemPage,
4685
- LibrariesDataViewsPage,
4686
- LibrariesDataBackendPage,
4687
- LibrariesCostTrackingPage,
4688
- LibrariesContractsPage,
4689
- LibrariesContentGenPage,
4690
- LibrariesAnalyticsPage,
4691
- LibrariesAiAgentPage,
4692
- LibrariesAccessibilityPage
4693
- };
600
+ await runner.executeStep(workflowId);`})]}),T("div",{className:"space-y-4",children:[r("h2",{className:"font-bold text-2xl",children:"State Persistence"}),T("p",{className:"text-muted-foreground",children:["The runner relies on a ",r("code",{children:"StateStore"})," to persist workflow execution history. ContractSpec ships with:"]}),T("ul",{className:"list-disc space-y-2 pl-6 text-muted-foreground",children:[T("li",{children:[r("code",{children:"InMemoryStateStore"})," - for testing and development."]}),T("li",{children:[r("code",{children:"PrismaStateStore"})," - for production using Prisma ORM."]})]})]}),T("div",{className:"space-y-4",children:[r("h2",{className:"font-bold text-2xl",children:"Events"}),r("p",{className:"text-muted-foreground",children:"The runner emits events that you can subscribe to for monitoring:"}),T("ul",{className:"list-disc space-y-2 pl-6 text-muted-foreground",children:[r("li",{children:r("code",{children:"workflow.started"})}),r("li",{children:r("code",{children:"workflow.step_completed"})}),r("li",{children:r("code",{children:"workflow.step_failed"})}),r("li",{children:r("code",{children:"workflow.step_retrying"})}),r("li",{children:r("code",{children:"workflow.completed"})}),r("li",{children:r("code",{children:"workflow.cancelled"})}),r("li",{children:r("code",{children:"workflow.compensation_step_completed"})})]})]}),T("div",{className:"flex items-center gap-4 pt-4",children:[r(Qe,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),T(Qe,{href:"/docs/libraries/data-views",className:"btn-primary",children:["Next: Data Views ",r(Ca,{size:16})]})]})]})}export{Sa as LibrariesWorkflowsPage,Na as LibrariesWorkflowComposerPage,ba as LibrariesUIKitPage,ua as LibrariesTestingPage,da as LibrariesSupportBotPage,ia as LibrariesSchemaPage,ca as LibrariesSLOPage,ta as LibrariesRuntimePage,$t as LibrariesResiliencePage,Jt as LibrariesProgressiveDeliveryPage,Qt as LibrariesPersonalizationPage,_t as LibrariesOverviewPage,Gt as LibrariesOverlayEnginePage,Mt as LibrariesObservabilityPage,Ot as LibrariesMultiTenancyPage,At as LibrariesGrowthPage,Rt as LibrariesGraphQLPage,wt as LibrariesEvolutionPage,yt as LibrariesDesignSystemPage,ht as LibrariesDataViewsPage,ut as LibrariesDataBackendPage,dt as LibrariesCostTrackingPage,ct as LibrariesContractsPage,ot as LibrariesContentGenPage,je as LibrariesAnalyticsPage,$e as LibrariesAiAgentPage,Je as LibrariesAccessibilityPage};