@contractspec/bundle.library 3.7.5 → 3.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (890) hide show
  1. package/.turbo/turbo-build.log +144 -142
  2. package/AGENTS.md +42 -24
  3. package/CHANGELOG.md +27 -0
  4. package/README.md +59 -37
  5. package/dist/application/index.d.ts +1 -1
  6. package/dist/application/index.js +842 -840
  7. package/dist/application/mcp/cliMcp.js +30 -30
  8. package/dist/application/mcp/common.d.ts +2 -2
  9. package/dist/application/mcp/common.js +2 -2
  10. package/dist/application/mcp/contractsMcp.d.ts +1 -1
  11. package/dist/application/mcp/contractsMcp.js +163 -163
  12. package/dist/application/mcp/docsMcp.js +31 -31
  13. package/dist/application/mcp/index.d.ts +2 -2
  14. package/dist/application/mcp/index.js +842 -840
  15. package/dist/application/mcp/internalMcp.js +30 -30
  16. package/dist/application/mcp/providerRankingMcp.js +35 -33
  17. package/dist/components/docs/DocsIndexPage.js +859 -212
  18. package/dist/components/docs/advanced/AdvancedMCPPage.js +15 -15
  19. package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
  20. package/dist/components/docs/advanced/AdvancedRenderersPage.js +7 -7
  21. package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
  22. package/dist/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
  23. package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
  24. package/dist/components/docs/advanced/index.d.ts +2 -2
  25. package/dist/components/docs/advanced/index.js +57 -57
  26. package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
  27. package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
  28. package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
  29. package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
  30. package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
  31. package/dist/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
  32. package/dist/components/docs/architecture/index.d.ts +3 -3
  33. package/dist/components/docs/architecture/index.js +145 -466
  34. package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
  35. package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
  36. package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
  37. package/dist/components/docs/comparison/ComparisonOverviewPage.js +4 -4
  38. package/dist/components/docs/comparison/ComparisonWindmillPage.js +6 -6
  39. package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
  40. package/dist/components/docs/comparison/index.d.ts +2 -2
  41. package/dist/components/docs/comparison/index.js +35 -35
  42. package/dist/components/docs/docsManifest.d.ts +42 -0
  43. package/dist/components/docs/docsManifest.js +612 -0
  44. package/dist/components/docs/ecosystem/IntegrationsPage.js +5 -5
  45. package/dist/components/docs/ecosystem/PluginsPage.js +7 -7
  46. package/dist/components/docs/ecosystem/RegistryPage.js +4 -4
  47. package/dist/components/docs/ecosystem/TemplatesPage.js +11 -11
  48. package/dist/components/docs/ecosystem/index.d.ts +2 -2
  49. package/dist/components/docs/ecosystem/index.js +27 -27
  50. package/dist/components/docs/examples/DocsExamplesPage.js +4 -4
  51. package/dist/components/docs/examples/index.js +4 -4
  52. package/dist/components/docs/getting-started/CLIPage.js +9 -9
  53. package/dist/components/docs/getting-started/CompatibilityPage.js +12 -12
  54. package/dist/components/docs/getting-started/DataViewTutorialPage.js +7 -7
  55. package/dist/components/docs/getting-started/DeveloperToolsPage.js +10 -10
  56. package/dist/components/docs/getting-started/HelloWorldPage.js +8 -8
  57. package/dist/components/docs/getting-started/InstallationPage.js +10 -10
  58. package/dist/components/docs/getting-started/StartHerePage.js +8 -8
  59. package/dist/components/docs/getting-started/TroubleshootingPage.js +12 -12
  60. package/dist/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
  61. package/dist/components/docs/getting-started/index.d.ts +5 -5
  62. package/dist/components/docs/getting-started/index.js +89 -89
  63. package/dist/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
  64. package/dist/components/docs/guides/GuideContractTypesPage.js +33 -33
  65. package/dist/components/docs/guides/GuideDocsPipelinePage.js +13 -13
  66. package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
  67. package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
  68. package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
  69. package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
  70. package/dist/components/docs/guides/GuidesIndexPage.js +69 -46
  71. package/dist/components/docs/guides/index.d.ts +4 -4
  72. package/dist/components/docs/guides/index.js +174 -151
  73. package/dist/components/docs/index.d.ts +13 -12
  74. package/dist/components/docs/index.js +14060 -15332
  75. package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
  76. package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
  77. package/dist/components/docs/integrations/IntegrationsGithubPage.js +11 -11
  78. package/dist/components/docs/integrations/IntegrationsGmailPage.js +7 -7
  79. package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
  80. package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
  81. package/dist/components/docs/integrations/IntegrationsMistralPage.js +12 -12
  82. package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
  83. package/dist/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
  84. package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
  85. package/dist/components/docs/integrations/IntegrationsPowensPage.js +24 -24
  86. package/dist/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
  87. package/dist/components/docs/integrations/IntegrationsResendPage.js +7 -7
  88. package/dist/components/docs/integrations/IntegrationsS3Page.js +9 -9
  89. package/dist/components/docs/integrations/IntegrationsSlackPage.js +11 -11
  90. package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
  91. package/dist/components/docs/integrations/IntegrationsStripePage.js +25 -25
  92. package/dist/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
  93. package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
  94. package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
  95. package/dist/components/docs/integrations/index.d.ts +1 -1
  96. package/dist/components/docs/integrations/index.js +614 -1231
  97. package/dist/components/docs/intent/ContractFirstApiPage.js +8 -8
  98. package/dist/components/docs/intent/DeterministicCodegenPage.js +9 -9
  99. package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
  100. package/dist/components/docs/intent/OpenapiAlternativePage.js +13 -13
  101. package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
  102. package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
  103. package/dist/components/docs/intent/index.d.ts +3 -3
  104. package/dist/components/docs/intent/index.js +766 -766
  105. package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
  106. package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
  107. package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
  108. package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
  109. package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
  110. package/dist/components/docs/knowledge/index.d.ts +1 -1
  111. package/dist/components/docs/knowledge/index.js +437 -785
  112. package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
  113. package/dist/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
  114. package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
  115. package/dist/components/docs/libraries/LibrariesContentGenPage.js +6 -6
  116. package/dist/components/docs/libraries/LibrariesContractsPage.js +16 -16
  117. package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
  118. package/dist/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
  119. package/dist/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
  120. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
  121. package/dist/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
  122. package/dist/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
  123. package/dist/components/docs/libraries/LibrariesGrowthPage.js +5 -5
  124. package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
  125. package/dist/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
  126. package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
  127. package/dist/components/docs/libraries/LibrariesOverviewPage.js +117 -430
  128. package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
  129. package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
  130. package/dist/components/docs/libraries/LibrariesResiliencePage.js +6 -6
  131. package/dist/components/docs/libraries/LibrariesRuntimePage.js +13 -13
  132. package/dist/components/docs/libraries/LibrariesSLOPage.js +6 -6
  133. package/dist/components/docs/libraries/LibrariesSchemaPage.js +16 -16
  134. package/dist/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
  135. package/dist/components/docs/libraries/LibrariesTestingPage.js +7 -7
  136. package/dist/components/docs/libraries/LibrariesUIKitPage.js +10 -10
  137. package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
  138. package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
  139. package/dist/components/docs/libraries/index.d.ts +4 -4
  140. package/dist/components/docs/libraries/index.js +1308 -1621
  141. package/dist/components/docs/manifesto/ManifestoPage.js +33 -138
  142. package/dist/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
  143. package/dist/components/docs/ops/DistributedTracingOpsPage.js +5 -5
  144. package/dist/components/docs/ops/index.js +14 -14
  145. package/dist/components/docs/reference/DocsMarkdownContent.js +1 -1
  146. package/dist/components/docs/reference/DocsReferenceContent.js +2 -2
  147. package/dist/components/docs/reference/DocsReferenceIndexClient.js +8 -8
  148. package/dist/components/docs/reference/DocsReferenceIndexPage.js +8 -8
  149. package/dist/components/docs/reference/DocsReferencePage.js +2 -2
  150. package/dist/components/docs/reference/index.js +10 -10
  151. package/dist/components/docs/safety/SafetyAuditingPage.js +16 -16
  152. package/dist/components/docs/safety/SafetyMigrationsPage.js +15 -15
  153. package/dist/components/docs/safety/SafetyOverviewPage.js +69 -206
  154. package/dist/components/docs/safety/SafetyPDPPage.js +12 -12
  155. package/dist/components/docs/safety/SafetySecurityTrustPage.js +11 -11
  156. package/dist/components/docs/safety/SafetySigningPage.js +7 -7
  157. package/dist/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
  158. package/dist/components/docs/safety/index.d.ts +3 -3
  159. package/dist/components/docs/safety/index.js +616 -753
  160. package/dist/components/docs/shared/StudioPrompt.js +5 -5
  161. package/dist/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
  162. package/dist/components/docs/specs/SpecsDataViewsPage.js +14 -14
  163. package/dist/components/docs/specs/SpecsOverlaysPage.js +14 -14
  164. package/dist/components/docs/specs/SpecsOverviewPage.js +135 -297
  165. package/dist/components/docs/specs/SpecsPolicyPage.js +29 -29
  166. package/dist/components/docs/specs/SpecsWorkflowsPage.js +18 -18
  167. package/dist/components/docs/specs/index.d.ts +3 -3
  168. package/dist/components/docs/specs/index.js +814 -976
  169. package/dist/components/docs/studio/StudioBYOKPage.js +1 -1
  170. package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -1
  171. package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -1
  172. package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -1
  173. package/dist/components/docs/studio/StudioOverviewPage.js +109 -56
  174. package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -1
  175. package/dist/components/docs/studio/index.d.ts +4 -4
  176. package/dist/components/docs/studio/index.js +170 -117
  177. package/dist/components/integrations/index.js +25 -25
  178. package/dist/components/integrations/molecules/IntegrationCard.js +5 -5
  179. package/dist/components/integrations/organisms/IntegrationMarketplace.js +12 -12
  180. package/dist/components/integrations/organisms/IntegrationSettings.js +7 -7
  181. package/dist/components/integrations/organisms/KnowledgeSourceList.js +6 -6
  182. package/dist/components/legal/PrivacyTemplate.js +67 -67
  183. package/dist/components/legal/TermsTemplate.js +54 -54
  184. package/dist/components/legal/index.js +121 -121
  185. package/dist/components/shared/FeatureGateNotice.js +4 -4
  186. package/dist/components/shared/index.js +4 -4
  187. package/dist/components/shell/WorkspaceHeader.js +4 -4
  188. package/dist/components/shell/WorkspaceProjectShellLayout.d.ts +3 -3
  189. package/dist/components/shell/WorkspaceProjectShellLayout.js +10 -10
  190. package/dist/components/shell/WorkspaceShellRenderer.d.ts +4 -4
  191. package/dist/components/shell/WorkspaceShellRenderer.js +8 -8
  192. package/dist/components/shell/WorkspaceSidebar.js +2 -2
  193. package/dist/components/shell/index.d.ts +1 -1
  194. package/dist/components/shell/index.js +12 -12
  195. package/dist/components/templates/engine/index.d.ts +1 -1
  196. package/dist/components/templates/index.d.ts +1 -1
  197. package/dist/components/templates/index.js +835 -835
  198. package/dist/components/templates/messaging/ConversationList.js +11 -11
  199. package/dist/components/templates/messaging/MessageComposer.js +11 -11
  200. package/dist/components/templates/messaging/MessageThread.js +6 -6
  201. package/dist/components/templates/messaging/MessagingWorkspace.js +23 -23
  202. package/dist/components/templates/messaging/index.d.ts +1 -1
  203. package/dist/components/templates/messaging/index.js +23 -23
  204. package/dist/components/templates/recipes/LanguageSwitcher.js +1 -1
  205. package/dist/components/templates/recipes/RecipeCard.js +5 -5
  206. package/dist/components/templates/recipes/RecipeDetail.js +8 -8
  207. package/dist/components/templates/recipes/RecipeList.js +17 -17
  208. package/dist/components/templates/recipes/index.d.ts +2 -2
  209. package/dist/components/templates/recipes/index.js +17 -17
  210. package/dist/components/templates/todos/FilterBar.d.ts +1 -1
  211. package/dist/components/templates/todos/FilterBar.js +9 -9
  212. package/dist/components/templates/todos/TaskForm.js +14 -14
  213. package/dist/components/templates/todos/TaskItem.js +4 -4
  214. package/dist/components/templates/todos/TaskList.js +30 -30
  215. package/dist/components/templates/todos/index.d.ts +2 -2
  216. package/dist/components/templates/todos/index.js +30 -30
  217. package/dist/config/index.d.ts +2 -2
  218. package/dist/features/contracts-registry.d.ts +3 -3
  219. package/dist/features/contracts-registry.js +15 -15
  220. package/dist/features/docs/docs.contracts.d.ts +1 -1
  221. package/dist/features/docs/docs.contracts.js +2 -2
  222. package/dist/features/docs/index.d.ts +1 -1
  223. package/dist/features/docs/index.js +2 -2
  224. package/dist/features/index.d.ts +4 -4
  225. package/dist/features/index.js +18 -18
  226. package/dist/features/registry.js +1 -1
  227. package/dist/index.d.ts +2 -2
  228. package/dist/index.js +14982 -16254
  229. package/dist/libs/email/client.js +1 -1
  230. package/dist/libs/email/contact.js +1 -1
  231. package/dist/libs/email/newsletter.js +1 -1
  232. package/dist/libs/email/waitlist-application.js +1 -1
  233. package/dist/libs/email/waitlist.js +1 -1
  234. package/dist/libs/email.d.ts +1 -1
  235. package/dist/libs/email.js +1 -1
  236. package/dist/node/application/index.js +842 -840
  237. package/dist/node/application/mcp/cliMcp.js +30 -30
  238. package/dist/node/application/mcp/common.js +2 -2
  239. package/dist/node/application/mcp/contractsMcp.js +163 -163
  240. package/dist/node/application/mcp/docsMcp.js +31 -31
  241. package/dist/node/application/mcp/index.js +842 -840
  242. package/dist/node/application/mcp/internalMcp.js +30 -30
  243. package/dist/node/application/mcp/providerRankingMcp.js +35 -33
  244. package/dist/node/components/docs/DocsIndexPage.js +859 -212
  245. package/dist/node/components/docs/advanced/AdvancedMCPPage.js +15 -15
  246. package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +4 -4
  247. package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +7 -7
  248. package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +9 -9
  249. package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +16 -16
  250. package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +6 -6
  251. package/dist/node/components/docs/advanced/index.js +57 -57
  252. package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +10 -10
  253. package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +8 -8
  254. package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +14 -14
  255. package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +16 -16
  256. package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +7 -7
  257. package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +90 -411
  258. package/dist/node/components/docs/architecture/index.js +145 -466
  259. package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +6 -6
  260. package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +7 -7
  261. package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +6 -6
  262. package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +4 -4
  263. package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +6 -6
  264. package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +6 -6
  265. package/dist/node/components/docs/comparison/index.js +35 -35
  266. package/dist/node/components/docs/docsManifest.js +611 -0
  267. package/dist/node/components/docs/ecosystem/IntegrationsPage.js +5 -5
  268. package/dist/node/components/docs/ecosystem/PluginsPage.js +7 -7
  269. package/dist/node/components/docs/ecosystem/RegistryPage.js +4 -4
  270. package/dist/node/components/docs/ecosystem/TemplatesPage.js +11 -11
  271. package/dist/node/components/docs/ecosystem/index.js +27 -27
  272. package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -4
  273. package/dist/node/components/docs/examples/index.js +4 -4
  274. package/dist/node/components/docs/getting-started/CLIPage.js +9 -9
  275. package/dist/node/components/docs/getting-started/CompatibilityPage.js +12 -12
  276. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +7 -7
  277. package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +10 -10
  278. package/dist/node/components/docs/getting-started/HelloWorldPage.js +8 -8
  279. package/dist/node/components/docs/getting-started/InstallationPage.js +10 -10
  280. package/dist/node/components/docs/getting-started/StartHerePage.js +8 -8
  281. package/dist/node/components/docs/getting-started/TroubleshootingPage.js +12 -12
  282. package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +13 -13
  283. package/dist/node/components/docs/getting-started/index.js +89 -89
  284. package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +13 -13
  285. package/dist/node/components/docs/guides/GuideContractTypesPage.js +33 -33
  286. package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +13 -13
  287. package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +13 -13
  288. package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +35 -35
  289. package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +15 -15
  290. package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +13 -13
  291. package/dist/node/components/docs/guides/GuidesIndexPage.js +69 -46
  292. package/dist/node/components/docs/guides/index.js +174 -151
  293. package/dist/node/components/docs/index.js +14060 -15332
  294. package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +4 -4
  295. package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +7 -7
  296. package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +11 -11
  297. package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +7 -7
  298. package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +5 -5
  299. package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +12 -12
  300. package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +12 -12
  301. package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +11 -11
  302. package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +119 -736
  303. package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +12 -12
  304. package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +24 -24
  305. package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +9 -9
  306. package/dist/node/components/docs/integrations/IntegrationsResendPage.js +7 -7
  307. package/dist/node/components/docs/integrations/IntegrationsS3Page.js +9 -9
  308. package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +11 -11
  309. package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +19 -19
  310. package/dist/node/components/docs/integrations/IntegrationsStripePage.js +25 -25
  311. package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +9 -9
  312. package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +12 -12
  313. package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +13 -13
  314. package/dist/node/components/docs/integrations/index.js +614 -1231
  315. package/dist/node/components/docs/intent/ContractFirstApiPage.js +8 -8
  316. package/dist/node/components/docs/intent/DeterministicCodegenPage.js +9 -9
  317. package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +13 -13
  318. package/dist/node/components/docs/intent/OpenapiAlternativePage.js +13 -13
  319. package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +9 -9
  320. package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +8 -8
  321. package/dist/node/components/docs/intent/index.js +766 -766
  322. package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +38 -38
  323. package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +9 -9
  324. package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +91 -439
  325. package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +28 -28
  326. package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +21 -21
  327. package/dist/node/components/docs/knowledge/index.js +437 -785
  328. package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +16 -16
  329. package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +8 -8
  330. package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +6 -6
  331. package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +6 -6
  332. package/dist/node/components/docs/libraries/LibrariesContractsPage.js +16 -16
  333. package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +6 -6
  334. package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +14 -14
  335. package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +7 -7
  336. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +13 -13
  337. package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +7 -7
  338. package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +13 -13
  339. package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +5 -5
  340. package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +5 -5
  341. package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +7 -7
  342. package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +6 -6
  343. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +117 -430
  344. package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +6 -6
  345. package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +6 -6
  346. package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +6 -6
  347. package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +13 -13
  348. package/dist/node/components/docs/libraries/LibrariesSLOPage.js +6 -6
  349. package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +16 -16
  350. package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +7 -7
  351. package/dist/node/components/docs/libraries/LibrariesTestingPage.js +7 -7
  352. package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +10 -10
  353. package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +5 -5
  354. package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +8 -8
  355. package/dist/node/components/docs/libraries/index.js +1308 -1621
  356. package/dist/node/components/docs/manifesto/ManifestoPage.js +33 -138
  357. package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +9 -9
  358. package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +5 -5
  359. package/dist/node/components/docs/ops/index.js +14 -14
  360. package/dist/node/components/docs/reference/DocsMarkdownContent.js +1 -1
  361. package/dist/node/components/docs/reference/DocsReferenceContent.js +2 -2
  362. package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +8 -8
  363. package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +8 -8
  364. package/dist/node/components/docs/reference/DocsReferencePage.js +2 -2
  365. package/dist/node/components/docs/reference/index.js +10 -10
  366. package/dist/node/components/docs/safety/SafetyAuditingPage.js +16 -16
  367. package/dist/node/components/docs/safety/SafetyMigrationsPage.js +15 -15
  368. package/dist/node/components/docs/safety/SafetyOverviewPage.js +69 -206
  369. package/dist/node/components/docs/safety/SafetyPDPPage.js +12 -12
  370. package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +11 -11
  371. package/dist/node/components/docs/safety/SafetySigningPage.js +7 -7
  372. package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +6 -6
  373. package/dist/node/components/docs/safety/index.js +616 -753
  374. package/dist/node/components/docs/shared/StudioPrompt.js +5 -5
  375. package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +12 -12
  376. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +14 -14
  377. package/dist/node/components/docs/specs/SpecsOverlaysPage.js +14 -14
  378. package/dist/node/components/docs/specs/SpecsOverviewPage.js +135 -297
  379. package/dist/node/components/docs/specs/SpecsPolicyPage.js +29 -29
  380. package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +18 -18
  381. package/dist/node/components/docs/specs/index.js +814 -976
  382. package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -1
  383. package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -1
  384. package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -1
  385. package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -1
  386. package/dist/node/components/docs/studio/StudioOverviewPage.js +109 -56
  387. package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -1
  388. package/dist/node/components/docs/studio/index.js +170 -117
  389. package/dist/node/components/integrations/index.js +25 -25
  390. package/dist/node/components/integrations/molecules/IntegrationCard.js +5 -5
  391. package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +12 -12
  392. package/dist/node/components/integrations/organisms/IntegrationSettings.js +7 -7
  393. package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +6 -6
  394. package/dist/node/components/legal/PrivacyTemplate.js +67 -67
  395. package/dist/node/components/legal/TermsTemplate.js +54 -54
  396. package/dist/node/components/legal/index.js +121 -121
  397. package/dist/node/components/shared/FeatureGateNotice.js +4 -4
  398. package/dist/node/components/shared/index.js +4 -4
  399. package/dist/node/components/shell/WorkspaceHeader.js +4 -4
  400. package/dist/node/components/shell/WorkspaceProjectShellLayout.js +10 -10
  401. package/dist/node/components/shell/WorkspaceShellRenderer.js +8 -8
  402. package/dist/node/components/shell/WorkspaceSidebar.js +2 -2
  403. package/dist/node/components/shell/index.js +12 -12
  404. package/dist/node/components/templates/index.js +835 -835
  405. package/dist/node/components/templates/messaging/ConversationList.js +11 -11
  406. package/dist/node/components/templates/messaging/MessageComposer.js +11 -11
  407. package/dist/node/components/templates/messaging/MessageThread.js +6 -6
  408. package/dist/node/components/templates/messaging/MessagingWorkspace.js +23 -23
  409. package/dist/node/components/templates/messaging/index.js +23 -23
  410. package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -1
  411. package/dist/node/components/templates/recipes/RecipeCard.js +5 -5
  412. package/dist/node/components/templates/recipes/RecipeDetail.js +8 -8
  413. package/dist/node/components/templates/recipes/RecipeList.js +17 -17
  414. package/dist/node/components/templates/recipes/index.js +17 -17
  415. package/dist/node/components/templates/todos/FilterBar.js +9 -9
  416. package/dist/node/components/templates/todos/TaskForm.js +14 -14
  417. package/dist/node/components/templates/todos/TaskItem.js +4 -4
  418. package/dist/node/components/templates/todos/TaskList.js +30 -30
  419. package/dist/node/components/templates/todos/index.js +30 -30
  420. package/dist/node/features/contracts-registry.js +15 -15
  421. package/dist/node/features/docs/docs.contracts.js +2 -2
  422. package/dist/node/features/docs/index.js +2 -2
  423. package/dist/node/features/index.js +18 -18
  424. package/dist/node/features/registry.js +1 -1
  425. package/dist/node/index.js +14982 -16254
  426. package/dist/node/libs/email/client.js +1 -1
  427. package/dist/node/libs/email/contact.js +1 -1
  428. package/dist/node/libs/email/newsletter.js +1 -1
  429. package/dist/node/libs/email/waitlist-application.js +1 -1
  430. package/dist/node/libs/email/waitlist.js +1 -1
  431. package/dist/node/libs/email.js +1 -1
  432. package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
  433. package/dist/node/presentation/features/atoms/FeatureIcon/index.js +7 -7
  434. package/dist/node/presentation/features/atoms/index.js +7 -7
  435. package/dist/node/presentation/features/hooks/index.js +56 -56
  436. package/dist/node/presentation/features/hooks/useContractsRegistry.js +18 -18
  437. package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -1
  438. package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -1
  439. package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -1
  440. package/dist/node/presentation/features/index.js +1364 -1364
  441. package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
  442. package/dist/node/presentation/features/molecules/FeatureCard/index.js +15 -15
  443. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
  444. package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
  445. package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
  446. package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -1
  447. package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
  448. package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
  449. package/dist/node/presentation/features/molecules/index.js +77 -77
  450. package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +18 -18
  451. package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
  452. package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
  453. package/dist/node/presentation/features/organisms/FeatureEventsList.js +18 -18
  454. package/dist/node/presentation/features/organisms/FeatureFormsList.js +18 -18
  455. package/dist/node/presentation/features/organisms/FeatureOperationsList.js +15 -15
  456. package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +18 -18
  457. package/dist/node/presentation/features/organisms/index.js +401 -401
  458. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
  459. package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
  460. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
  461. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
  462. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
  463. package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
  464. package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
  465. package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
  466. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
  467. package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
  468. package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
  469. package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
  470. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
  471. package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
  472. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
  473. package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
  474. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
  475. package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
  476. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
  477. package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
  478. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
  479. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
  480. package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +7 -7
  481. package/dist/presentation/features/atoms/FeatureIcon/index.d.ts +1 -1
  482. package/dist/presentation/features/atoms/FeatureIcon/index.js +7 -7
  483. package/dist/presentation/features/atoms/index.js +7 -7
  484. package/dist/presentation/features/hooks/index.d.ts +3 -3
  485. package/dist/presentation/features/hooks/index.js +56 -56
  486. package/dist/presentation/features/hooks/useContractsRegistry.js +18 -18
  487. package/dist/presentation/features/hooks/useFeatureFilters.js +1 -1
  488. package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -1
  489. package/dist/presentation/features/hooks/useRelatedDocs.js +1 -1
  490. package/dist/presentation/features/index.d.ts +14 -14
  491. package/dist/presentation/features/index.js +1364 -1364
  492. package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +15 -15
  493. package/dist/presentation/features/molecules/FeatureCard/index.js +15 -15
  494. package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +7 -7
  495. package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +7 -7
  496. package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -1
  497. package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -1
  498. package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +5 -5
  499. package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +5 -5
  500. package/dist/presentation/features/molecules/index.d.ts +1 -1
  501. package/dist/presentation/features/molecules/index.js +77 -77
  502. package/dist/presentation/features/organisms/FeatureDataViewsList.js +18 -18
  503. package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +121 -121
  504. package/dist/presentation/features/organisms/FeatureDiscovery/index.d.ts +1 -1
  505. package/dist/presentation/features/organisms/FeatureDiscovery/index.js +121 -121
  506. package/dist/presentation/features/organisms/FeatureEventsList.js +18 -18
  507. package/dist/presentation/features/organisms/FeatureFormsList.js +18 -18
  508. package/dist/presentation/features/organisms/FeatureOperationsList.js +15 -15
  509. package/dist/presentation/features/organisms/FeaturePresentationsList.js +18 -18
  510. package/dist/presentation/features/organisms/index.d.ts +4 -4
  511. package/dist/presentation/features/organisms/index.js +401 -401
  512. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +13 -13
  513. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +13 -13
  514. package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/types.d.ts +1 -1
  515. package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +20 -20
  516. package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +20 -20
  517. package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +12 -12
  518. package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +12 -12
  519. package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +18 -18
  520. package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +18 -18
  521. package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +13 -13
  522. package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +13 -13
  523. package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +20 -20
  524. package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +20 -20
  525. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +8 -8
  526. package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +8 -8
  527. package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +15 -15
  528. package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +15 -15
  529. package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +2 -2
  530. package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +2 -2
  531. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +12 -12
  532. package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +12 -12
  533. package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +18 -18
  534. package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +18 -18
  535. package/package.json +46 -32
  536. package/src/__tests__/env-setup.ts +1 -1
  537. package/src/__tests__/mocks/prisma.ts +78 -78
  538. package/src/__tests__/setup.ts +2 -2
  539. package/src/application/context-storage/index.ts +42 -42
  540. package/src/application/index.ts +1 -1
  541. package/src/application/mcp/cliMcp.ts +221 -221
  542. package/src/application/mcp/common.ts +210 -210
  543. package/src/application/mcp/contractsMcp.ts +15 -15
  544. package/src/application/mcp/contractsMcpResources.ts +119 -119
  545. package/src/application/mcp/contractsMcpTools.ts +218 -218
  546. package/src/application/mcp/contractsMcpTypes.ts +35 -35
  547. package/src/application/mcp/docsMcp.ts +173 -173
  548. package/src/application/mcp/index.ts +2 -2
  549. package/src/application/mcp/internalMcp.ts +204 -204
  550. package/src/application/mcp/providerRankingMcp.ts +346 -344
  551. package/src/bundles/LibraryBundle.ts +136 -136
  552. package/src/components/docs/DocsIndexPage.tsx +189 -241
  553. package/src/components/docs/advanced/AdvancedMCPPage.tsx +168 -168
  554. package/src/components/docs/advanced/AdvancedOverlayEditorPage.tsx +52 -52
  555. package/src/components/docs/advanced/AdvancedRenderersPage.tsx +53 -53
  556. package/src/components/docs/advanced/AdvancedSpecExperimentsPage.tsx +48 -48
  557. package/src/components/docs/advanced/AdvancedTelemetryPage.tsx +205 -205
  558. package/src/components/docs/advanced/AdvancedWorkflowMonitoringPage.tsx +42 -42
  559. package/src/components/docs/advanced/index.ts +2 -2
  560. package/src/components/docs/architecture/ArchitectureAppConfigPage.tsx +127 -127
  561. package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +79 -79
  562. package/src/components/docs/architecture/ArchitectureIntegrationBindingPage.tsx +147 -147
  563. package/src/components/docs/architecture/ArchitectureKnowledgeBindingPage.tsx +193 -193
  564. package/src/components/docs/architecture/ArchitectureMultiTenancyPage.tsx +73 -73
  565. package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +98 -273
  566. package/src/components/docs/architecture/index.ts +3 -3
  567. package/src/components/docs/comparison/ComparisonAutomationPlatformsPage.tsx +137 -137
  568. package/src/components/docs/comparison/ComparisonEnterprisePlatformsPage.tsx +138 -138
  569. package/src/components/docs/comparison/ComparisonInternalToolBuildersPage.tsx +147 -147
  570. package/src/components/docs/comparison/ComparisonOverviewPage.tsx +106 -106
  571. package/src/components/docs/comparison/ComparisonWindmillPage.tsx +143 -143
  572. package/src/components/docs/comparison/ComparisonWorkflowEnginesPage.tsx +168 -168
  573. package/src/components/docs/comparison/index.ts +2 -2
  574. package/src/components/docs/docsManifest.ts +720 -0
  575. package/src/components/docs/ecosystem/IntegrationsPage.tsx +45 -45
  576. package/src/components/docs/ecosystem/PluginsPage.tsx +77 -77
  577. package/src/components/docs/ecosystem/RegistryPage.tsx +48 -48
  578. package/src/components/docs/ecosystem/TemplatesPage.tsx +52 -52
  579. package/src/components/docs/ecosystem/ecosystem.docblocks.ts +42 -42
  580. package/src/components/docs/ecosystem/index.ts +2 -2
  581. package/src/components/docs/examples/DocsExamplesPage.tsx +67 -66
  582. package/src/components/docs/generated/docs-index._common.json +1757 -1757
  583. package/src/components/docs/generated/docs-index.agent-console.json +376 -376
  584. package/src/components/docs/generated/docs-index.ai-chat-assistant.json +8 -8
  585. package/src/components/docs/generated/docs-index.ai-chat.json +104 -104
  586. package/src/components/docs/generated/docs-index.ai-support-bot.json +8 -8
  587. package/src/components/docs/generated/docs-index.analytics-dashboard.json +168 -168
  588. package/src/components/docs/generated/docs-index.app-config.json +136 -136
  589. package/src/components/docs/generated/docs-index.audit-trail.json +48 -48
  590. package/src/components/docs/generated/docs-index.calendar-google.json +8 -8
  591. package/src/components/docs/generated/docs-index.content-generation.json +8 -8
  592. package/src/components/docs/generated/docs-index.crm-pipeline.json +160 -160
  593. package/src/components/docs/generated/docs-index.email-gmail.json +8 -8
  594. package/src/components/docs/generated/docs-index.feature-flags.json +216 -216
  595. package/src/components/docs/generated/docs-index.files.json +176 -176
  596. package/src/components/docs/generated/docs-index.generated.ts +19 -19
  597. package/src/components/docs/generated/docs-index.health.json +96 -96
  598. package/src/components/docs/generated/docs-index.identity-rbac.json +312 -312
  599. package/src/components/docs/generated/docs-index.in-app-docs.json +8 -8
  600. package/src/components/docs/generated/docs-index.integration-hub.json +264 -264
  601. package/src/components/docs/generated/docs-index.integration-posthog.json +8 -8
  602. package/src/components/docs/generated/docs-index.integration-stripe.json +8 -8
  603. package/src/components/docs/generated/docs-index.integration-supabase.json +8 -8
  604. package/src/components/docs/generated/docs-index.jobs.json +136 -136
  605. package/src/components/docs/generated/docs-index.kb-update-pipeline.json +128 -128
  606. package/src/components/docs/generated/docs-index.knowledge-canon.json +8 -8
  607. package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +8 -8
  608. package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +48 -48
  609. package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +8 -8
  610. package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +48 -48
  611. package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +8 -8
  612. package/src/components/docs/generated/docs-index.learning-journey-registry.json +32 -32
  613. package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +48 -48
  614. package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +8 -8
  615. package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +8 -8
  616. package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +8 -8
  617. package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +8 -8
  618. package/src/components/docs/generated/docs-index.learning-journey.json +216 -216
  619. package/src/components/docs/generated/docs-index.learning-patterns.json +8 -8
  620. package/src/components/docs/generated/docs-index.lifecycle-cli.json +8 -8
  621. package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +8 -8
  622. package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +48 -48
  623. package/src/components/docs/generated/docs-index.manifest.json +376 -376
  624. package/src/components/docs/generated/docs-index.marketplace.json +336 -336
  625. package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +8 -8
  626. package/src/components/docs/generated/docs-index.meeting-recorder.json +48 -48
  627. package/src/components/docs/generated/docs-index.metrics.json +200 -200
  628. package/src/components/docs/generated/docs-index.minimal.json +16 -16
  629. package/src/components/docs/generated/docs-index.notifications.json +64 -64
  630. package/src/components/docs/generated/docs-index.openbanking-powens.json +8 -8
  631. package/src/components/docs/generated/docs-index.openbanking.json +64 -64
  632. package/src/components/docs/generated/docs-index.opencode-cli.json +16 -16
  633. package/src/components/docs/generated/docs-index.personalization.json +8 -8
  634. package/src/components/docs/generated/docs-index.platform-acp.json +72 -72
  635. package/src/components/docs/generated/docs-index.platform-agent.json +96 -96
  636. package/src/components/docs/generated/docs-index.platform-context.json +56 -56
  637. package/src/components/docs/generated/docs-index.platform-database.json +48 -48
  638. package/src/components/docs/generated/docs-index.platform-docs.json +88 -88
  639. package/src/components/docs/generated/docs-index.platform-integrations.json +320 -320
  640. package/src/components/docs/generated/docs-index.platform-knowledge.json +56 -56
  641. package/src/components/docs/generated/docs-index.platform-provider-ranking.json +96 -96
  642. package/src/components/docs/generated/docs-index.pocket-family-office.json +120 -120
  643. package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +8 -8
  644. package/src/components/docs/generated/docs-index.product-intent.json +8 -8
  645. package/src/components/docs/generated/docs-index.project-management-sync.json +8 -8
  646. package/src/components/docs/generated/docs-index.saas-boilerplate.json +208 -208
  647. package/src/components/docs/generated/docs-index.service-business-os.json +192 -192
  648. package/src/components/docs/generated/docs-index.team-hub.json +184 -184
  649. package/src/components/docs/generated/docs-index.unknown.json +512 -512
  650. package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +80 -80
  651. package/src/components/docs/generated/docs-index.video-api-showcase.json +32 -32
  652. package/src/components/docs/generated/docs-index.video-docs-terminal.json +8 -8
  653. package/src/components/docs/generated/docs-index.video-marketing-clip.json +8 -8
  654. package/src/components/docs/generated/docs-index.voice-providers.json +8 -8
  655. package/src/components/docs/generated/docs-index.wealth-snapshot.json +152 -152
  656. package/src/components/docs/generated/docs-index.workflow-system.json +432 -432
  657. package/src/components/docs/generated/docs-index.workspace-cli.json +8 -8
  658. package/src/components/docs/generated/index.ts +6 -6
  659. package/src/components/docs/generated/loader.ts +49 -49
  660. package/src/components/docs/getting-started/CLIPage.tsx +157 -157
  661. package/src/components/docs/getting-started/CompatibilityPage.tsx +69 -69
  662. package/src/components/docs/getting-started/DataViewTutorialPage.tsx +63 -63
  663. package/src/components/docs/getting-started/DeveloperToolsPage.tsx +141 -140
  664. package/src/components/docs/getting-started/HelloWorldPage.tsx +88 -88
  665. package/src/components/docs/getting-started/InstallationPage.tsx +78 -78
  666. package/src/components/docs/getting-started/StartHerePage.tsx +64 -64
  667. package/src/components/docs/getting-started/TroubleshootingPage.tsx +68 -68
  668. package/src/components/docs/getting-started/VSCodeExtensionPage.tsx +233 -233
  669. package/src/components/docs/getting-started/getting-started.docblocks.ts +30 -30
  670. package/src/components/docs/getting-started/index.ts +6 -5
  671. package/src/components/docs/guides/GuideCIDiffGatingPage.tsx +88 -88
  672. package/src/components/docs/guides/GuideContractTypesPage.tsx +266 -266
  673. package/src/components/docs/guides/GuideDocsPipelinePage.tsx +78 -78
  674. package/src/components/docs/guides/GuideGenerateDocsClientsSchemasPage.tsx +89 -89
  675. package/src/components/docs/guides/GuideImportExistingCodebasesPage.tsx +360 -360
  676. package/src/components/docs/guides/GuideNextjsOneEndpointPage.tsx +117 -117
  677. package/src/components/docs/guides/GuideSpecValidationTypingPage.tsx +82 -82
  678. package/src/components/docs/guides/GuidesIndexPage.tsx +109 -99
  679. package/src/components/docs/guides/guides.docblocks.ts +60 -60
  680. package/src/components/docs/guides/index.ts +4 -4
  681. package/src/components/docs/index.ts +26 -40
  682. package/src/components/docs/integrations/IntegrationsCircuitBreakersPage.tsx +22 -22
  683. package/src/components/docs/integrations/IntegrationsElevenLabsPage.tsx +41 -41
  684. package/src/components/docs/integrations/IntegrationsGithubPage.tsx +66 -66
  685. package/src/components/docs/integrations/IntegrationsGmailPage.tsx +44 -44
  686. package/src/components/docs/integrations/IntegrationsGoogleCalendarPage.tsx +31 -31
  687. package/src/components/docs/integrations/IntegrationsHealthRoutingPage.tsx +80 -80
  688. package/src/components/docs/integrations/IntegrationsMistralPage.tsx +65 -65
  689. package/src/components/docs/integrations/IntegrationsOpenAIPage.tsx +54 -54
  690. package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +124 -529
  691. package/src/components/docs/integrations/IntegrationsPostmarkPage.tsx +97 -97
  692. package/src/components/docs/integrations/IntegrationsPowensPage.tsx +165 -165
  693. package/src/components/docs/integrations/IntegrationsQdrantPage.tsx +44 -44
  694. package/src/components/docs/integrations/IntegrationsResendPage.tsx +40 -40
  695. package/src/components/docs/integrations/IntegrationsS3Page.tsx +48 -48
  696. package/src/components/docs/integrations/IntegrationsSlackPage.tsx +70 -70
  697. package/src/components/docs/integrations/IntegrationsSpecModelPage.tsx +139 -139
  698. package/src/components/docs/integrations/IntegrationsStripePage.tsx +153 -153
  699. package/src/components/docs/integrations/IntegrationsTwilioPage.tsx +50 -50
  700. package/src/components/docs/integrations/IntegrationsWhatsappMetaPage.tsx +69 -69
  701. package/src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx +73 -73
  702. package/src/components/docs/integrations/index.ts +1 -1
  703. package/src/components/docs/intent/ContractFirstApiPage.tsx +61 -61
  704. package/src/components/docs/intent/DeterministicCodegenPage.tsx +81 -80
  705. package/src/components/docs/intent/GenerateClientFromSchemaPage.tsx +108 -108
  706. package/src/components/docs/intent/OpenapiAlternativePage.tsx +98 -98
  707. package/src/components/docs/intent/SchemaValidationTypescriptPage.tsx +79 -79
  708. package/src/components/docs/intent/SpecDrivenDevelopmentPage.tsx +67 -67
  709. package/src/components/docs/intent/index.ts +3 -3
  710. package/src/components/docs/intent/intent-pages.docblocks.ts +186 -186
  711. package/src/components/docs/knowledge/KnowledgeCategoriesPage.tsx +304 -304
  712. package/src/components/docs/knowledge/KnowledgeExamplesPage.tsx +84 -84
  713. package/src/components/docs/knowledge/KnowledgeOverviewPage.tsx +76 -285
  714. package/src/components/docs/knowledge/KnowledgeSourcesPage.tsx +171 -171
  715. package/src/components/docs/knowledge/KnowledgeSpacesPage.tsx +132 -132
  716. package/src/components/docs/knowledge/index.ts +1 -1
  717. package/src/components/docs/libraries/LibrariesAccessibilityPage.tsx +95 -95
  718. package/src/components/docs/libraries/LibrariesAiAgentPage.tsx +58 -58
  719. package/src/components/docs/libraries/LibrariesAnalyticsPage.tsx +39 -39
  720. package/src/components/docs/libraries/LibrariesContentGenPage.tsx +41 -41
  721. package/src/components/docs/libraries/LibrariesContractsPage.tsx +132 -132
  722. package/src/components/docs/libraries/LibrariesCostTrackingPage.tsx +47 -47
  723. package/src/components/docs/libraries/LibrariesDataBackendPage.tsx +73 -73
  724. package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +76 -76
  725. package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +115 -115
  726. package/src/components/docs/libraries/LibrariesEvolutionPage.tsx +64 -64
  727. package/src/components/docs/libraries/LibrariesGraphQLPage.tsx +92 -92
  728. package/src/components/docs/libraries/LibrariesGrowthPage.tsx +37 -37
  729. package/src/components/docs/libraries/LibrariesMultiTenancyPage.tsx +47 -47
  730. package/src/components/docs/libraries/LibrariesObservabilityPage.tsx +58 -58
  731. package/src/components/docs/libraries/LibrariesOverlayEnginePage.tsx +51 -51
  732. package/src/components/docs/libraries/LibrariesOverviewPage.tsx +137 -301
  733. package/src/components/docs/libraries/LibrariesPersonalizationPage.tsx +57 -57
  734. package/src/components/docs/libraries/LibrariesProgressiveDeliveryPage.tsx +51 -51
  735. package/src/components/docs/libraries/LibrariesResiliencePage.tsx +54 -54
  736. package/src/components/docs/libraries/LibrariesRuntimePage.tsx +96 -96
  737. package/src/components/docs/libraries/LibrariesSLOPage.tsx +52 -52
  738. package/src/components/docs/libraries/LibrariesSchemaPage.tsx +131 -131
  739. package/src/components/docs/libraries/LibrariesSupportBotPage.tsx +59 -59
  740. package/src/components/docs/libraries/LibrariesTestingPage.tsx +64 -64
  741. package/src/components/docs/libraries/LibrariesUIKitPage.tsx +85 -85
  742. package/src/components/docs/libraries/LibrariesWorkflowComposerPage.tsx +38 -38
  743. package/src/components/docs/libraries/LibrariesWorkflowsPage.tsx +79 -79
  744. package/src/components/docs/libraries/index.ts +4 -4
  745. package/src/components/docs/manifesto/ManifestoPage.tsx +61 -132
  746. package/src/components/docs/ops/AutoEvolutionOpsPage.tsx +81 -81
  747. package/src/components/docs/ops/DistributedTracingOpsPage.tsx +28 -28
  748. package/src/components/docs/ops/ops-lifecycle.docblocks.ts +32 -32
  749. package/src/components/docs/ops/ops-runbooks-a.docblocks.ts +60 -60
  750. package/src/components/docs/ops/ops-runbooks-b.docblocks.ts +60 -60
  751. package/src/components/docs/ops/ops-slo-tenant.docblocks.ts +61 -61
  752. package/src/components/docs/ops/ops-top.docs.ts +10 -10
  753. package/src/components/docs/ops/ops.docs.ts +6 -6
  754. package/src/components/docs/product/product.docblocks.ts +60 -60
  755. package/src/components/docs/reference/DocsMarkdownContent.tsx +74 -74
  756. package/src/components/docs/reference/DocsReferenceContent.tsx +51 -51
  757. package/src/components/docs/reference/DocsReferenceIndexClient.tsx +106 -105
  758. package/src/components/docs/reference/DocsReferenceIndexPage.tsx +2 -2
  759. package/src/components/docs/reference/DocsReferencePage.tsx +3 -3
  760. package/src/components/docs/reference/docsMarkdownParser.ts +90 -90
  761. package/src/components/docs/safety/SafetyAuditingPage.tsx +189 -189
  762. package/src/components/docs/safety/SafetyMigrationsPage.tsx +189 -189
  763. package/src/components/docs/safety/SafetyOverviewPage.tsx +70 -157
  764. package/src/components/docs/safety/SafetyPDPPage.tsx +163 -163
  765. package/src/components/docs/safety/SafetySecurityTrustPage.tsx +89 -89
  766. package/src/components/docs/safety/SafetySigningPage.tsx +38 -38
  767. package/src/components/docs/safety/SafetyTenantIsolationPage.tsx +39 -39
  768. package/src/components/docs/safety/index.ts +3 -3
  769. package/src/components/docs/shared/StudioPrompt.tsx +17 -17
  770. package/src/components/docs/specs/SpecsCapabilitiesPage.tsx +79 -79
  771. package/src/components/docs/specs/SpecsDataViewsPage.tsx +142 -142
  772. package/src/components/docs/specs/SpecsOverlaysPage.tsx +202 -202
  773. package/src/components/docs/specs/SpecsOverviewPage.tsx +118 -193
  774. package/src/components/docs/specs/SpecsPolicyPage.tsx +233 -233
  775. package/src/components/docs/specs/SpecsWorkflowsPage.tsx +156 -156
  776. package/src/components/docs/specs/index.ts +3 -3
  777. package/src/components/docs/studio/StudioBYOKPage.tsx +11 -11
  778. package/src/components/docs/studio/StudioDeploymentsPage.tsx +11 -11
  779. package/src/components/docs/studio/StudioGettingStartedPage.tsx +11 -11
  780. package/src/components/docs/studio/StudioIntegrationsPage.tsx +11 -11
  781. package/src/components/docs/studio/StudioOverviewPage.tsx +94 -73
  782. package/src/components/docs/studio/StudioVisualBuilderPage.tsx +11 -11
  783. package/src/components/docs/studio/index.ts +4 -4
  784. package/src/components/docs/tech/contracts/tech-docs.docblocks.ts +10 -10
  785. package/src/components/integrations/molecules/IntegrationCard.tsx +71 -72
  786. package/src/components/integrations/organisms/IntegrationMarketplace.tsx +116 -116
  787. package/src/components/integrations/organisms/IntegrationSettings.tsx +201 -201
  788. package/src/components/integrations/organisms/KnowledgeSourceList.tsx +93 -94
  789. package/src/components/legal/PrivacyTemplate.tsx +611 -611
  790. package/src/components/legal/TermsTemplate.tsx +675 -675
  791. package/src/components/shared/FeatureGateNotice.tsx +26 -27
  792. package/src/components/shell/WorkspaceHeader.tsx +80 -80
  793. package/src/components/shell/WorkspaceProjectShellLayout.tsx +59 -58
  794. package/src/components/shell/WorkspaceShellRenderer.tsx +69 -68
  795. package/src/components/shell/WorkspaceSidebar.tsx +58 -58
  796. package/src/components/shell/index.ts +1 -1
  797. package/src/components/templates/engine/index.ts +29 -28
  798. package/src/components/templates/index.ts +1 -1
  799. package/src/components/templates/messaging/ConversationList.tsx +68 -69
  800. package/src/components/templates/messaging/MessageComposer.tsx +59 -59
  801. package/src/components/templates/messaging/MessageThread.tsx +73 -74
  802. package/src/components/templates/messaging/MessagingWorkspace.tsx +18 -19
  803. package/src/components/templates/messaging/index.ts +1 -1
  804. package/src/components/templates/messaging/types.ts +17 -17
  805. package/src/components/templates/recipes/LanguageSwitcher.tsx +20 -20
  806. package/src/components/templates/recipes/RecipeCard.tsx +56 -56
  807. package/src/components/templates/recipes/RecipeDetail.tsx +43 -43
  808. package/src/components/templates/recipes/RecipeList.tsx +62 -63
  809. package/src/components/templates/recipes/index.ts +2 -2
  810. package/src/components/templates/recipes/types.ts +24 -24
  811. package/src/components/templates/todos/FilterBar.tsx +84 -84
  812. package/src/components/templates/todos/TaskForm.tsx +118 -119
  813. package/src/components/templates/todos/TaskItem.tsx +78 -78
  814. package/src/components/templates/todos/TaskList.tsx +106 -107
  815. package/src/components/templates/todos/index.ts +2 -2
  816. package/src/components/templates/todos/types.ts +11 -11
  817. package/src/config/contractspec-blueprint.ts +55 -55
  818. package/src/config/contractspec-branding.ts +37 -37
  819. package/src/config/contractspec-routes.ts +22 -22
  820. package/src/config/index.ts +14 -15
  821. package/src/features/contracts-registry.ts +118 -118
  822. package/src/features/docs/docs.contracts.ts +6 -6
  823. package/src/features/docs/index.ts +6 -6
  824. package/src/features/docs.feature.ts +27 -27
  825. package/src/features/index.ts +59 -63
  826. package/src/features/mcp.feature.ts +24 -24
  827. package/src/features/presentations.feature.ts +27 -27
  828. package/src/features/registry.ts +14 -14
  829. package/src/index.ts +2 -2
  830. package/src/infrastructure/elysia/logger.ts +21 -21
  831. package/src/libs/email/client.test.ts +81 -81
  832. package/src/libs/email/client.ts +111 -111
  833. package/src/libs/email/contact.ts +35 -35
  834. package/src/libs/email/newsletter.ts +46 -46
  835. package/src/libs/email/types.ts +29 -29
  836. package/src/libs/email/utils.ts +5 -5
  837. package/src/libs/email/waitlist-application.ts +69 -69
  838. package/src/libs/email/waitlist.ts +46 -46
  839. package/src/libs/email.ts +7 -7
  840. package/src/libs/posthog/client.ts +44 -44
  841. package/src/libs/posthog/native.ts +23 -22
  842. package/src/libs/posthog/server.ts +7 -7
  843. package/src/libs/pricing-examples.ts +12 -12
  844. package/src/presentation/features/atoms/FeatureIcon/FeatureIcon.tsx +90 -90
  845. package/src/presentation/features/atoms/FeatureIcon/index.ts +3 -3
  846. package/src/presentation/features/hooks/index.ts +9 -9
  847. package/src/presentation/features/hooks/useContractsRegistry.ts +23 -23
  848. package/src/presentation/features/hooks/useFeatureFilters.ts +117 -117
  849. package/src/presentation/features/hooks/useFeatureRegistry.ts +40 -40
  850. package/src/presentation/features/hooks/useRelatedDocs.ts +28 -28
  851. package/src/presentation/features/index.ts +50 -52
  852. package/src/presentation/features/molecules/FeatureCard/FeatureCard.tsx +80 -80
  853. package/src/presentation/features/molecules/FeatureCard/types.ts +6 -6
  854. package/src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx +54 -54
  855. package/src/presentation/features/molecules/FeatureCategoryHeader/index.ts +2 -2
  856. package/src/presentation/features/molecules/FeatureFilters/FeatureFilters.tsx +67 -67
  857. package/src/presentation/features/molecules/FeatureFilters/types.ts +20 -20
  858. package/src/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.tsx +120 -121
  859. package/src/presentation/features/molecules/FeatureHoverPreview/index.ts +2 -2
  860. package/src/presentation/features/molecules/index.ts +8 -8
  861. package/src/presentation/features/organisms/FeatureDataViewsList.tsx +21 -21
  862. package/src/presentation/features/organisms/FeatureDetail/FeatureDetail.tsx +86 -86
  863. package/src/presentation/features/organisms/FeatureDetail/types.ts +4 -4
  864. package/src/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.tsx +210 -210
  865. package/src/presentation/features/organisms/FeatureDiscovery/index.ts +3 -3
  866. package/src/presentation/features/organisms/FeatureDiscovery/types.ts +10 -10
  867. package/src/presentation/features/organisms/FeatureEventsList.tsx +19 -19
  868. package/src/presentation/features/organisms/FeatureFormsList.tsx +19 -19
  869. package/src/presentation/features/organisms/FeatureOperationsList.tsx +21 -21
  870. package/src/presentation/features/organisms/FeaturePresentationsList.tsx +21 -21
  871. package/src/presentation/features/organisms/index.ts +6 -6
  872. package/src/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.tsx +219 -219
  873. package/src/presentation/features/templates/FeatureDataViewDetailTemplate/types.ts +7 -7
  874. package/src/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.tsx +26 -26
  875. package/src/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.tsx +195 -195
  876. package/src/presentation/features/templates/FeatureEventDetailTemplate/types.ts +7 -7
  877. package/src/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.tsx +26 -26
  878. package/src/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.tsx +216 -216
  879. package/src/presentation/features/templates/FeatureFormDetailTemplate/types.ts +7 -7
  880. package/src/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.tsx +26 -26
  881. package/src/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.tsx +228 -228
  882. package/src/presentation/features/templates/FeatureOperationDetailTemplate/types.ts +7 -7
  883. package/src/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.tsx +26 -26
  884. package/src/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.tsx +24 -24
  885. package/src/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.tsx +201 -201
  886. package/src/presentation/features/templates/FeaturePresentationDetailTemplate/types.ts +8 -8
  887. package/src/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.tsx +26 -26
  888. package/src/presentation/features/templates/types.ts +2 -2
  889. package/tsconfig.json +12 -12
  890. package/tsdown.config.js +5 -5
@@ -1,396 +1,50 @@
1
- // src/components/docs/specs/SpecsOverviewPage.tsx
1
+ // src/components/docs/specs/SpecsCapabilitiesPage.tsx
2
2
  import Link from "@contractspec/lib.ui-link";
3
3
  import { ChevronRight } from "lucide-react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- function SpecsOverviewPage() {
5
+ function SpecsCapabilitiesPage() {
6
6
  return /* @__PURE__ */ jsxs("div", {
7
7
  className: "space-y-8",
8
8
  children: [
9
9
  /* @__PURE__ */ jsxs("div", {
10
- className: "space-y-4",
11
- children: [
12
- /* @__PURE__ */ jsx("h1", {
13
- className: "text-4xl font-bold",
14
- children: "Specifications Overview"
15
- }),
16
- /* @__PURE__ */ jsxs("p", {
17
- className: "text-muted-foreground",
18
- children: [
19
- "ContractSpec is built on a ",
20
- /* @__PURE__ */ jsx("strong", {
21
- children: "spec-first"
22
- }),
23
- " philosophy. You define declarative TypeScript specifications that describe what your application can do. Runtime adapters automatically serve these specs as type-safe API endpoints (REST, GraphQL, MCP), enforce policies, and validate inputs/outputs—no code generation required."
24
- ]
25
- })
26
- ]
27
- }),
28
- /* @__PURE__ */ jsxs("div", {
29
- className: "space-y-4",
30
- children: [
31
- /* @__PURE__ */ jsx("h2", {
32
- className: "text-2xl font-bold",
33
- children: "Why spec-first matters"
34
- }),
35
- /* @__PURE__ */ jsx("p", {
36
- className: "text-muted-foreground",
37
- children: "Traditional development requires writing and maintaining separate code for APIs, databases, UI components, validation logic, and access control. This approach leads to:"
38
- }),
39
- /* @__PURE__ */ jsxs("ul", {
40
- className: "text-muted-foreground list-inside list-disc space-y-2",
41
- children: [
42
- /* @__PURE__ */ jsx("li", {
43
- children: "Duplication across front-end and back-end"
44
- }),
45
- /* @__PURE__ */ jsx("li", {
46
- children: "Type mismatches and runtime errors"
47
- }),
48
- /* @__PURE__ */ jsx("li", {
49
- children: "Security vulnerabilities from inconsistent policy enforcement"
50
- }),
51
- /* @__PURE__ */ jsx("li", {
52
- children: "High maintenance burden when requirements change"
53
- })
54
- ]
55
- }),
56
- /* @__PURE__ */ jsxs("p", {
57
- className: "text-muted-foreground",
58
- children: [
59
- "With ContractSpec, you define your application's operations (Commands/Queries), workflows, and policies in pure TypeScript. Runtime adapters ensure consistency, type safety, and policy enforcement across your entire stack—the spec ",
60
- /* @__PURE__ */ jsx("em", {
61
- children: "is"
62
- }),
63
- " the implementation."
64
- ]
65
- })
66
- ]
67
- }),
68
- /* @__PURE__ */ jsxs("div", {
69
- className: "space-y-4",
70
- children: [
71
- /* @__PURE__ */ jsx("h2", {
72
- className: "text-2xl font-bold",
73
- children: "Specification types"
74
- }),
75
- /* @__PURE__ */ jsx("div", {
76
- className: "border-border/50 overflow-x-auto rounded-lg border",
77
- children: /* @__PURE__ */ jsxs("table", {
78
- className: "w-full text-left text-sm",
79
- children: [
80
- /* @__PURE__ */ jsx("thead", {
81
- className: "bg-card/50",
82
- children: /* @__PURE__ */ jsxs("tr", {
83
- className: "border-border/50 border-b",
84
- children: [
85
- /* @__PURE__ */ jsx("th", {
86
- className: "px-4 py-3 font-semibold",
87
- children: "Spec Type"
88
- }),
89
- /* @__PURE__ */ jsx("th", {
90
- className: "px-4 py-3 font-semibold",
91
- children: "Purpose"
92
- }),
93
- /* @__PURE__ */ jsx("th", {
94
- className: "px-4 py-3 font-semibold",
95
- children: "Generates"
96
- })
97
- ]
98
- })
99
- }),
100
- /* @__PURE__ */ jsxs("tbody", {
101
- className: "divide-border/50 divide-y",
102
- children: [
103
- /* @__PURE__ */ jsxs("tr", {
104
- children: [
105
- /* @__PURE__ */ jsx("td", {
106
- className: "px-4 py-3 align-top",
107
- children: /* @__PURE__ */ jsx(Link, {
108
- href: "/docs/specs/capabilities",
109
- className: "text-violet-400 hover:text-violet-300",
110
- children: /* @__PURE__ */ jsx("strong", {
111
- children: "CapabilitySpec"
112
- })
113
- })
114
- }),
115
- /* @__PURE__ */ jsx("td", {
116
- className: "px-4 py-3 align-top",
117
- children: "Defines what your application can do: operations (Commands/Queries), their inputs, outputs, policies, and side effects."
118
- }),
119
- /* @__PURE__ */ jsx("td", {
120
- className: "px-4 py-3 align-top",
121
- children: "Runtime-served REST/GraphQL/MCP endpoints, Zod validation, policy enforcement"
122
- })
123
- ]
124
- }),
125
- /* @__PURE__ */ jsxs("tr", {
126
- children: [
127
- /* @__PURE__ */ jsx("td", {
128
- className: "px-4 py-3 align-top",
129
- children: /* @__PURE__ */ jsx("strong", {
130
- children: "DataViewSpec"
131
- })
132
- }),
133
- /* @__PURE__ */ jsx("td", {
134
- className: "px-4 py-3 align-top",
135
- children: "Describes how data should be queried, filtered, sorted, and presented to users."
136
- }),
137
- /* @__PURE__ */ jsx("td", {
138
- className: "px-4 py-3 align-top",
139
- children: "Database queries, list/detail views, search interfaces"
140
- })
141
- ]
142
- }),
143
- /* @__PURE__ */ jsxs("tr", {
144
- children: [
145
- /* @__PURE__ */ jsx("td", {
146
- className: "px-4 py-3 align-top",
147
- children: /* @__PURE__ */ jsx(Link, {
148
- href: "/docs/specs/workflows",
149
- className: "text-violet-400 hover:text-violet-300",
150
- children: /* @__PURE__ */ jsx("strong", {
151
- children: "WorkflowSpec"
152
- })
153
- })
154
- }),
155
- /* @__PURE__ */ jsx("td", {
156
- className: "px-4 py-3 align-top",
157
- children: "Orchestrates multi-step processes with retries, compensation, and monitoring."
158
- }),
159
- /* @__PURE__ */ jsx("td", {
160
- className: "px-4 py-3 align-top",
161
- children: "Workflow engine, state machines, retry logic, observability hooks"
162
- })
163
- ]
164
- }),
165
- /* @__PURE__ */ jsxs("tr", {
166
- children: [
167
- /* @__PURE__ */ jsx("td", {
168
- className: "px-4 py-3 align-top",
169
- children: /* @__PURE__ */ jsx("strong", {
170
- children: "PolicySpec"
171
- })
172
- }),
173
- /* @__PURE__ */ jsx("td", {
174
- className: "px-4 py-3 align-top",
175
- children: "Defines who can do what, when, and under what conditions. Supports ABAC and PII rules."
176
- }),
177
- /* @__PURE__ */ jsx("td", {
178
- className: "px-4 py-3 align-top",
179
- children: "Policy decision points, access control middleware, audit logs"
180
- })
181
- ]
182
- }),
183
- /* @__PURE__ */ jsxs("tr", {
184
- children: [
185
- /* @__PURE__ */ jsx("td", {
186
- className: "px-4 py-3 align-top",
187
- children: /* @__PURE__ */ jsx("strong", {
188
- children: "OverlaySpec"
189
- })
190
- }),
191
- /* @__PURE__ */ jsx("td", {
192
- className: "px-4 py-3 align-top",
193
- children: "Allows safe, signed customization of UI layouts and field visibility by tenants or users."
194
- }),
195
- /* @__PURE__ */ jsx("td", {
196
- className: "px-4 py-3 align-top",
197
- children: "Personalized UI components, layout variations, conditional rendering"
198
- })
199
- ]
200
- }),
201
- /* @__PURE__ */ jsxs("tr", {
202
- children: [
203
- /* @__PURE__ */ jsx("td", {
204
- className: "px-4 py-3 align-top",
205
- children: /* @__PURE__ */ jsx("strong", {
206
- children: "TelemetrySpec"
207
- })
208
- }),
209
- /* @__PURE__ */ jsx("td", {
210
- className: "px-4 py-3 align-top",
211
- children: "Specifies what metrics, logs, and traces to collect for observability."
212
- }),
213
- /* @__PURE__ */ jsx("td", {
214
- className: "px-4 py-3 align-top",
215
- children: "Instrumentation code, dashboards, alerting rules"
216
- })
217
- ]
218
- }),
219
- /* @__PURE__ */ jsxs("tr", {
220
- children: [
221
- /* @__PURE__ */ jsx("td", {
222
- className: "px-4 py-3 align-top",
223
- children: /* @__PURE__ */ jsx(Link, {
224
- href: "/docs/safety/migrations",
225
- className: "text-violet-400 hover:text-violet-300",
226
- children: /* @__PURE__ */ jsx("strong", {
227
- children: "MigrationSpec"
228
- })
229
- })
230
- }),
231
- /* @__PURE__ */ jsx("td", {
232
- className: "px-4 py-3 align-top",
233
- children: "Manages incremental, reversible schema and data migrations."
234
- }),
235
- /* @__PURE__ */ jsx("td", {
236
- className: "px-4 py-3 align-top",
237
- children: "Migration scripts, rollback procedures, version tracking"
238
- })
239
- ]
240
- })
241
- ]
242
- })
243
- ]
244
- })
245
- })
246
- ]
247
- }),
248
- /* @__PURE__ */ jsxs("div", {
249
- className: "space-y-4",
250
- children: [
251
- /* @__PURE__ */ jsx("h2", {
252
- className: "text-2xl font-bold",
253
- children: "How specs work together"
254
- }),
255
- /* @__PURE__ */ jsxs("p", {
256
- className: "text-muted-foreground",
257
- children: [
258
- "Specs compose naturally. A ",
259
- /* @__PURE__ */ jsx("strong", {
260
- children: "WorkflowSpec"
261
- }),
262
- " can invoke multiple ",
263
- /* @__PURE__ */ jsx("strong", {
264
- children: "CapabilitySpecs"
265
- }),
266
- ". A",
267
- " ",
268
- /* @__PURE__ */ jsx("strong", {
269
- children: "DataViewSpec"
270
- }),
271
- " respects ",
272
- /* @__PURE__ */ jsx("strong", {
273
- children: "PolicySpecs"
274
- }),
275
- " to filter sensitive fields. An ",
276
- /* @__PURE__ */ jsx("strong", {
277
- children: "OverlaySpec"
278
- }),
279
- " can hide or rearrange UI elements generated from a ",
280
- /* @__PURE__ */ jsx("strong", {
281
- children: "CapabilitySpec"
282
- }),
283
- ", but only within the bounds allowed by the underlying policy."
284
- ]
285
- }),
286
- /* @__PURE__ */ jsx("p", {
287
- className: "text-muted-foreground",
288
- children: "This composability means you can build complex applications from simple, reusable building blocks—all while maintaining type safety and policy enforcement."
289
- })
290
- ]
291
- }),
292
- /* @__PURE__ */ jsxs("div", {
293
- className: "space-y-4",
294
- children: [
295
- /* @__PURE__ */ jsx("h2", {
296
- className: "text-2xl font-bold",
297
- children: "Next steps"
298
- }),
299
- /* @__PURE__ */ jsx("p", {
300
- className: "text-muted-foreground",
301
- children: "Explore each specification type in detail using the links in the table above, or continue with the core concepts:"
302
- }),
303
- /* @__PURE__ */ jsxs("div", {
304
- className: "flex flex-wrap gap-4 pt-4",
305
- children: [
306
- /* @__PURE__ */ jsxs(Link, {
307
- href: "/docs/specs/capabilities",
308
- className: "btn-primary",
309
- children: [
310
- "Capabilities ",
311
- /* @__PURE__ */ jsx(ChevronRight, {
312
- size: 16,
313
- className: "inline"
314
- })
315
- ]
316
- }),
317
- /* @__PURE__ */ jsxs(Link, {
318
- href: "/docs/specs/workflows",
319
- className: "btn-ghost",
320
- children: [
321
- "Workflows ",
322
- /* @__PURE__ */ jsx(ChevronRight, {
323
- size: 16,
324
- className: "inline"
325
- })
326
- ]
327
- }),
328
- /* @__PURE__ */ jsxs(Link, {
329
- href: "/docs/safety",
330
- className: "btn-ghost",
331
- children: [
332
- "Safety Features ",
333
- /* @__PURE__ */ jsx(ChevronRight, {
334
- size: 16,
335
- className: "inline"
336
- })
337
- ]
338
- })
339
- ]
340
- })
341
- ]
342
- })
343
- ]
344
- });
345
- }
346
-
347
- // src/components/docs/specs/SpecsCapabilitiesPage.tsx
348
- import Link2 from "@contractspec/lib.ui-link";
349
- import { ChevronRight as ChevronRight2 } from "lucide-react";
350
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
351
- function SpecsCapabilitiesPage() {
352
- return /* @__PURE__ */ jsxs2("div", {
353
- className: "space-y-8",
354
- children: [
355
- /* @__PURE__ */ jsxs2("div", {
356
10
  className: "space-y-2",
357
11
  children: [
358
- /* @__PURE__ */ jsx2("h1", {
359
- className: "text-4xl font-bold",
12
+ /* @__PURE__ */ jsx("h1", {
13
+ className: "font-bold text-4xl",
360
14
  children: "Capabilities"
361
15
  }),
362
- /* @__PURE__ */ jsx2("p", {
363
- className: "text-muted-foreground text-lg",
16
+ /* @__PURE__ */ jsx("p", {
17
+ className: "text-lg text-muted-foreground",
364
18
  children: "Capabilities are the core building block of ContractSpec. They define what your app can do."
365
19
  })
366
20
  ]
367
21
  }),
368
- /* @__PURE__ */ jsxs2("div", {
22
+ /* @__PURE__ */ jsxs("div", {
369
23
  className: "space-y-6",
370
24
  children: [
371
- /* @__PURE__ */ jsxs2("div", {
25
+ /* @__PURE__ */ jsxs("div", {
372
26
  className: "space-y-3",
373
27
  children: [
374
- /* @__PURE__ */ jsx2("h2", {
375
- className: "text-2xl font-bold",
28
+ /* @__PURE__ */ jsx("h2", {
29
+ className: "font-bold text-2xl",
376
30
  children: "Overview"
377
31
  }),
378
- /* @__PURE__ */ jsx2("p", {
32
+ /* @__PURE__ */ jsx("p", {
379
33
  className: "text-muted-foreground",
380
34
  children: "A ContractSpec (or Capability) is a typed, declarative description of an operation. It defines the operation's name, version, inputs, outputs, policies, and side effects. Runtime adapters automatically serve these as REST/GraphQL/MCP endpoints with full validation and policy enforcement."
381
35
  })
382
36
  ]
383
37
  }),
384
- /* @__PURE__ */ jsxs2("div", {
38
+ /* @__PURE__ */ jsxs("div", {
385
39
  className: "space-y-3",
386
40
  children: [
387
- /* @__PURE__ */ jsx2("h2", {
388
- className: "text-2xl font-bold",
41
+ /* @__PURE__ */ jsx("h2", {
42
+ className: "font-bold text-2xl",
389
43
  children: "Defining a Command (Write)"
390
44
  }),
391
- /* @__PURE__ */ jsx2("div", {
392
- className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
393
- children: /* @__PURE__ */ jsx2("pre", {
45
+ /* @__PURE__ */ jsx("div", {
46
+ className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
47
+ children: /* @__PURE__ */ jsx("pre", {
394
48
  children: `import { defineCommand } from '@contractspec/lib.contracts-spec';
395
49
  import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
396
50
 
@@ -434,80 +88,80 @@ export const TransferFunds = defineCommand({
434
88
  })
435
89
  ]
436
90
  }),
437
- /* @__PURE__ */ jsxs2("div", {
91
+ /* @__PURE__ */ jsxs("div", {
438
92
  className: "space-y-3",
439
93
  children: [
440
- /* @__PURE__ */ jsx2("h2", {
441
- className: "text-2xl font-bold",
94
+ /* @__PURE__ */ jsx("h2", {
95
+ className: "font-bold text-2xl",
442
96
  children: "Schema Types"
443
97
  }),
444
- /* @__PURE__ */ jsxs2("p", {
98
+ /* @__PURE__ */ jsxs("p", {
445
99
  className: "text-muted-foreground",
446
100
  children: [
447
101
  "ContractSpec uses ",
448
- /* @__PURE__ */ jsx2("code", {
102
+ /* @__PURE__ */ jsx("code", {
449
103
  children: "@contractspec/lib.schema"
450
104
  }),
451
105
  " for I/O definitions. This provides Zod validation, GraphQL types, and JSON Schema from a single source."
452
106
  ]
453
107
  }),
454
- /* @__PURE__ */ jsxs2("ul", {
455
- className: "text-muted-foreground space-y-2",
108
+ /* @__PURE__ */ jsxs("ul", {
109
+ className: "space-y-2 text-muted-foreground",
456
110
  children: [
457
- /* @__PURE__ */ jsxs2("li", {
111
+ /* @__PURE__ */ jsxs("li", {
458
112
  children: [
459
113
  "•",
460
114
  " ",
461
- /* @__PURE__ */ jsx2("code", {
462
- className: "bg-background/50 rounded px-2 py-1",
115
+ /* @__PURE__ */ jsx("code", {
116
+ className: "rounded bg-background/50 px-2 py-1",
463
117
  children: "ScalarTypeEnum.NonEmptyString()"
464
118
  }),
465
119
  " ",
466
120
  "- Non-empty text"
467
121
  ]
468
122
  }),
469
- /* @__PURE__ */ jsxs2("li", {
123
+ /* @__PURE__ */ jsxs("li", {
470
124
  children: [
471
125
  "•",
472
126
  " ",
473
- /* @__PURE__ */ jsx2("code", {
474
- className: "bg-background/50 rounded px-2 py-1",
127
+ /* @__PURE__ */ jsx("code", {
128
+ className: "rounded bg-background/50 px-2 py-1",
475
129
  children: "ScalarTypeEnum.PositiveNumber()"
476
130
  }),
477
131
  " ",
478
132
  "- Positive numbers"
479
133
  ]
480
134
  }),
481
- /* @__PURE__ */ jsxs2("li", {
135
+ /* @__PURE__ */ jsxs("li", {
482
136
  children: [
483
137
  "•",
484
138
  " ",
485
- /* @__PURE__ */ jsx2("code", {
486
- className: "bg-background/50 rounded px-2 py-1",
139
+ /* @__PURE__ */ jsx("code", {
140
+ className: "rounded bg-background/50 px-2 py-1",
487
141
  children: "ScalarTypeEnum.DateTime()"
488
142
  }),
489
143
  " ",
490
144
  "- ISO 8601 timestamps"
491
145
  ]
492
146
  }),
493
- /* @__PURE__ */ jsxs2("li", {
147
+ /* @__PURE__ */ jsxs("li", {
494
148
  children: [
495
149
  "•",
496
150
  " ",
497
- /* @__PURE__ */ jsx2("code", {
498
- className: "bg-background/50 rounded px-2 py-1",
151
+ /* @__PURE__ */ jsx("code", {
152
+ className: "rounded bg-background/50 px-2 py-1",
499
153
  children: "ScalarTypeEnum.Email()"
500
154
  }),
501
155
  " ",
502
156
  "- Valid email addresses"
503
157
  ]
504
158
  }),
505
- /* @__PURE__ */ jsxs2("li", {
159
+ /* @__PURE__ */ jsxs("li", {
506
160
  children: [
507
161
  "•",
508
162
  " ",
509
- /* @__PURE__ */ jsx2("code", {
510
- className: "bg-background/50 rounded px-2 py-1",
163
+ /* @__PURE__ */ jsx("code", {
164
+ className: "rounded bg-background/50 px-2 py-1",
511
165
  children: "defineEnum(...)"
512
166
  }),
513
167
  " ",
@@ -518,14 +172,14 @@ export const TransferFunds = defineCommand({
518
172
  })
519
173
  ]
520
174
  }),
521
- /* @__PURE__ */ jsx2("div", {
175
+ /* @__PURE__ */ jsx("div", {
522
176
  className: "flex items-center gap-4 pt-4",
523
- children: /* @__PURE__ */ jsxs2(Link2, {
177
+ children: /* @__PURE__ */ jsxs(Link, {
524
178
  href: "/docs/specs/dataviews",
525
179
  className: "btn-primary",
526
180
  children: [
527
181
  "Next: DataViews ",
528
- /* @__PURE__ */ jsx2(ChevronRight2, {
182
+ /* @__PURE__ */ jsx(ChevronRight, {
529
183
  size: 16
530
184
  })
531
185
  ]
@@ -538,25 +192,25 @@ export const TransferFunds = defineCommand({
538
192
  }
539
193
 
540
194
  // src/components/docs/specs/SpecsDataViewsPage.tsx
541
- import Link3 from "@contractspec/lib.ui-link";
542
- import { ChevronRight as ChevronRight3 } from "lucide-react";
543
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
195
+ import Link2 from "@contractspec/lib.ui-link";
196
+ import { ChevronRight as ChevronRight2 } from "lucide-react";
197
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
544
198
  function SpecsDataViewsPage() {
545
- return /* @__PURE__ */ jsxs3("div", {
199
+ return /* @__PURE__ */ jsxs2("div", {
546
200
  className: "space-y-8",
547
201
  children: [
548
- /* @__PURE__ */ jsxs3("div", {
202
+ /* @__PURE__ */ jsxs2("div", {
549
203
  className: "space-y-4",
550
204
  children: [
551
- /* @__PURE__ */ jsx3("h1", {
552
- className: "text-4xl font-bold",
205
+ /* @__PURE__ */ jsx2("h1", {
206
+ className: "font-bold text-4xl",
553
207
  children: "DataViews"
554
208
  }),
555
- /* @__PURE__ */ jsxs3("p", {
209
+ /* @__PURE__ */ jsxs2("p", {
556
210
  className: "text-muted-foreground",
557
211
  children: [
558
212
  "A ",
559
- /* @__PURE__ */ jsx3("strong", {
213
+ /* @__PURE__ */ jsx2("strong", {
560
214
  children: "DataViewSpec"
561
215
  }),
562
216
  " describes how data should be queried, filtered, sorted, and presented to users. Runtime adapters execute optimized database queries and serve list views, detail views, and search interfaces while respecting policy constraints."
@@ -564,71 +218,71 @@ function SpecsDataViewsPage() {
564
218
  })
565
219
  ]
566
220
  }),
567
- /* @__PURE__ */ jsxs3("div", {
221
+ /* @__PURE__ */ jsxs2("div", {
568
222
  className: "space-y-4",
569
223
  children: [
570
- /* @__PURE__ */ jsx3("h2", {
571
- className: "text-2xl font-bold",
224
+ /* @__PURE__ */ jsx2("h2", {
225
+ className: "font-bold text-2xl",
572
226
  children: "Core concepts"
573
227
  }),
574
- /* @__PURE__ */ jsxs3("div", {
228
+ /* @__PURE__ */ jsxs2("div", {
575
229
  className: "space-y-3",
576
230
  children: [
577
- /* @__PURE__ */ jsxs3("div", {
231
+ /* @__PURE__ */ jsxs2("div", {
578
232
  children: [
579
- /* @__PURE__ */ jsx3("h3", {
580
- className: "text-lg font-semibold",
233
+ /* @__PURE__ */ jsx2("h3", {
234
+ className: "font-semibold text-lg",
581
235
  children: "Data sources"
582
236
  }),
583
- /* @__PURE__ */ jsx3("p", {
237
+ /* @__PURE__ */ jsx2("p", {
584
238
  className: "text-muted-foreground",
585
239
  children: "A DataView connects to one or more data sources—databases, APIs, or other capabilities. You specify the source and the fields you want to expose."
586
240
  })
587
241
  ]
588
242
  }),
589
- /* @__PURE__ */ jsxs3("div", {
243
+ /* @__PURE__ */ jsxs2("div", {
590
244
  children: [
591
- /* @__PURE__ */ jsx3("h3", {
592
- className: "text-lg font-semibold",
245
+ /* @__PURE__ */ jsx2("h3", {
246
+ className: "font-semibold text-lg",
593
247
  children: "Filtering"
594
248
  }),
595
- /* @__PURE__ */ jsx3("p", {
249
+ /* @__PURE__ */ jsx2("p", {
596
250
  className: "text-muted-foreground",
597
251
  children: `Define filters that users can apply to narrow down results. Filters can be simple (e.g., "status equals 'active'") or complex (e.g., "created within the last 30 days AND assigned to current user").`
598
252
  })
599
253
  ]
600
254
  }),
601
- /* @__PURE__ */ jsxs3("div", {
255
+ /* @__PURE__ */ jsxs2("div", {
602
256
  children: [
603
- /* @__PURE__ */ jsx3("h3", {
604
- className: "text-lg font-semibold",
257
+ /* @__PURE__ */ jsx2("h3", {
258
+ className: "font-semibold text-lg",
605
259
  children: "Sorting"
606
260
  }),
607
- /* @__PURE__ */ jsx3("p", {
261
+ /* @__PURE__ */ jsx2("p", {
608
262
  className: "text-muted-foreground",
609
263
  children: "Specify which fields can be sorted and the default sort order. ContractSpec generates efficient database queries with proper indexes."
610
264
  })
611
265
  ]
612
266
  }),
613
- /* @__PURE__ */ jsxs3("div", {
267
+ /* @__PURE__ */ jsxs2("div", {
614
268
  children: [
615
- /* @__PURE__ */ jsx3("h3", {
616
- className: "text-lg font-semibold",
269
+ /* @__PURE__ */ jsx2("h3", {
270
+ className: "font-semibold text-lg",
617
271
  children: "Pagination"
618
272
  }),
619
- /* @__PURE__ */ jsx3("p", {
273
+ /* @__PURE__ */ jsx2("p", {
620
274
  className: "text-muted-foreground",
621
275
  children: "DataViews automatically support pagination to handle large datasets. You can configure page size limits and cursor-based or offset-based pagination."
622
276
  })
623
277
  ]
624
278
  }),
625
- /* @__PURE__ */ jsxs3("div", {
279
+ /* @__PURE__ */ jsxs2("div", {
626
280
  children: [
627
- /* @__PURE__ */ jsx3("h3", {
628
- className: "text-lg font-semibold",
281
+ /* @__PURE__ */ jsx2("h3", {
282
+ className: "font-semibold text-lg",
629
283
  children: "Aggregations"
630
284
  }),
631
- /* @__PURE__ */ jsx3("p", {
285
+ /* @__PURE__ */ jsx2("p", {
632
286
  className: "text-muted-foreground",
633
287
  children: "Compute aggregates like counts, sums, averages, and group-by operations. These are useful for dashboards and summary views."
634
288
  })
@@ -638,20 +292,20 @@ function SpecsDataViewsPage() {
638
292
  })
639
293
  ]
640
294
  }),
641
- /* @__PURE__ */ jsxs3("div", {
295
+ /* @__PURE__ */ jsxs2("div", {
642
296
  className: "space-y-4",
643
297
  children: [
644
- /* @__PURE__ */ jsx3("h2", {
645
- className: "text-2xl font-bold",
298
+ /* @__PURE__ */ jsx2("h2", {
299
+ className: "font-bold text-2xl",
646
300
  children: "Example DataViewSpec"
647
301
  }),
648
- /* @__PURE__ */ jsx3("p", {
302
+ /* @__PURE__ */ jsx2("p", {
649
303
  className: "text-muted-foreground",
650
304
  children: "Here's a DataView for listing orders in TypeScript:"
651
305
  }),
652
- /* @__PURE__ */ jsx3("div", {
653
- className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
654
- children: /* @__PURE__ */ jsx3("pre", {
306
+ /* @__PURE__ */ jsx2("div", {
307
+ className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
308
+ children: /* @__PURE__ */ jsx2("pre", {
655
309
  children: `import { defineDataView } from '@contractspec/lib.contracts-spec';
656
310
  import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
657
311
 
@@ -697,19 +351,19 @@ export const OrderList = defineDataView({
697
351
  })
698
352
  ]
699
353
  }),
700
- /* @__PURE__ */ jsxs3("div", {
354
+ /* @__PURE__ */ jsxs2("div", {
701
355
  className: "space-y-4",
702
356
  children: [
703
- /* @__PURE__ */ jsx3("h2", {
704
- className: "text-2xl font-bold",
357
+ /* @__PURE__ */ jsx2("h2", {
358
+ className: "font-bold text-2xl",
705
359
  children: "Policy integration"
706
360
  }),
707
- /* @__PURE__ */ jsxs3("p", {
361
+ /* @__PURE__ */ jsxs2("p", {
708
362
  className: "text-muted-foreground",
709
363
  children: [
710
364
  "DataViews automatically enforce",
711
365
  " ",
712
- /* @__PURE__ */ jsx3(Link3, {
366
+ /* @__PURE__ */ jsx2(Link2, {
713
367
  href: "/docs/specs/policy",
714
368
  className: "text-violet-400 hover:text-violet-300",
715
369
  children: "PolicySpecs"
@@ -717,61 +371,61 @@ export const OrderList = defineDataView({
717
371
  ". If a user doesn't have permission to see certain fields, those fields are automatically filtered out or redacted. If a user can only see their own data, the query is automatically scoped."
718
372
  ]
719
373
  }),
720
- /* @__PURE__ */ jsx3("p", {
374
+ /* @__PURE__ */ jsx2("p", {
721
375
  className: "text-muted-foreground",
722
376
  children: "This means you define the data view once, and it works correctly for all users based on their permissions—no need to write separate queries for different roles."
723
377
  })
724
378
  ]
725
379
  }),
726
- /* @__PURE__ */ jsxs3("div", {
380
+ /* @__PURE__ */ jsxs2("div", {
727
381
  className: "space-y-4",
728
382
  children: [
729
- /* @__PURE__ */ jsx3("h2", {
730
- className: "text-2xl font-bold",
383
+ /* @__PURE__ */ jsx2("h2", {
384
+ className: "font-bold text-2xl",
731
385
  children: "Served outputs"
732
386
  }),
733
- /* @__PURE__ */ jsx3("p", {
387
+ /* @__PURE__ */ jsx2("p", {
734
388
  className: "text-muted-foreground",
735
389
  children: "From a DataViewSpec, ContractSpec serves:"
736
390
  }),
737
- /* @__PURE__ */ jsxs3("ul", {
738
- className: "text-muted-foreground list-inside list-disc space-y-2",
391
+ /* @__PURE__ */ jsxs2("ul", {
392
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
739
393
  children: [
740
- /* @__PURE__ */ jsxs3("li", {
394
+ /* @__PURE__ */ jsxs2("li", {
741
395
  children: [
742
- /* @__PURE__ */ jsx3("strong", {
396
+ /* @__PURE__ */ jsx2("strong", {
743
397
  children: "Database queries"
744
398
  }),
745
399
  " – Optimized SQL or NoSQL queries executed at runtime"
746
400
  ]
747
401
  }),
748
- /* @__PURE__ */ jsxs3("li", {
402
+ /* @__PURE__ */ jsxs2("li", {
749
403
  children: [
750
- /* @__PURE__ */ jsx3("strong", {
404
+ /* @__PURE__ */ jsx2("strong", {
751
405
  children: "API endpoints"
752
406
  }),
753
407
  " – RESTful or GraphQL endpoints for fetching data"
754
408
  ]
755
409
  }),
756
- /* @__PURE__ */ jsxs3("li", {
410
+ /* @__PURE__ */ jsxs2("li", {
757
411
  children: [
758
- /* @__PURE__ */ jsx3("strong", {
412
+ /* @__PURE__ */ jsx2("strong", {
759
413
  children: "UI components"
760
414
  }),
761
415
  " – List views, tables, cards, and detail views"
762
416
  ]
763
417
  }),
764
- /* @__PURE__ */ jsxs3("li", {
418
+ /* @__PURE__ */ jsxs2("li", {
765
419
  children: [
766
- /* @__PURE__ */ jsx3("strong", {
420
+ /* @__PURE__ */ jsx2("strong", {
767
421
  children: "Search interfaces"
768
422
  }),
769
423
  " – Full-text search with autocomplete"
770
424
  ]
771
425
  }),
772
- /* @__PURE__ */ jsxs3("li", {
426
+ /* @__PURE__ */ jsxs2("li", {
773
427
  children: [
774
- /* @__PURE__ */ jsx3("strong", {
428
+ /* @__PURE__ */ jsx2("strong", {
775
429
  children: "Export functions"
776
430
  }),
777
431
  " – CSV, JSON, or Excel exports"
@@ -781,49 +435,49 @@ export const OrderList = defineDataView({
781
435
  })
782
436
  ]
783
437
  }),
784
- /* @__PURE__ */ jsxs3("div", {
438
+ /* @__PURE__ */ jsxs2("div", {
785
439
  className: "space-y-4",
786
440
  children: [
787
- /* @__PURE__ */ jsx3("h2", {
788
- className: "text-2xl font-bold",
441
+ /* @__PURE__ */ jsx2("h2", {
442
+ className: "font-bold text-2xl",
789
443
  children: "Best practices"
790
444
  }),
791
- /* @__PURE__ */ jsxs3("ul", {
792
- className: "text-muted-foreground list-inside list-disc space-y-2",
445
+ /* @__PURE__ */ jsxs2("ul", {
446
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
793
447
  children: [
794
- /* @__PURE__ */ jsx3("li", {
448
+ /* @__PURE__ */ jsx2("li", {
795
449
  children: "Only expose fields that users actually need—this improves performance and security."
796
450
  }),
797
- /* @__PURE__ */ jsx3("li", {
451
+ /* @__PURE__ */ jsx2("li", {
798
452
  children: "Use appropriate indexes for sortable and filterable fields."
799
453
  }),
800
- /* @__PURE__ */ jsx3("li", {
454
+ /* @__PURE__ */ jsx2("li", {
801
455
  children: "Set reasonable pagination limits to prevent performance issues."
802
456
  }),
803
- /* @__PURE__ */ jsx3("li", {
457
+ /* @__PURE__ */ jsx2("li", {
804
458
  children: "Use aggregations sparingly—they can be expensive on large datasets."
805
459
  }),
806
- /* @__PURE__ */ jsx3("li", {
460
+ /* @__PURE__ */ jsx2("li", {
807
461
  children: "Test DataViews with realistic data volumes to ensure they perform well."
808
462
  })
809
463
  ]
810
464
  })
811
465
  ]
812
466
  }),
813
- /* @__PURE__ */ jsxs3("div", {
467
+ /* @__PURE__ */ jsxs2("div", {
814
468
  className: "flex items-center gap-4 pt-4",
815
469
  children: [
816
- /* @__PURE__ */ jsx3(Link3, {
470
+ /* @__PURE__ */ jsx2(Link2, {
817
471
  href: "/docs/specs/capabilities",
818
472
  className: "btn-ghost",
819
473
  children: "Previous: Capabilities"
820
474
  }),
821
- /* @__PURE__ */ jsxs3(Link3, {
475
+ /* @__PURE__ */ jsxs2(Link2, {
822
476
  href: "/docs/specs/workflows",
823
477
  className: "btn-primary",
824
478
  children: [
825
479
  "Next: Workflows ",
826
- /* @__PURE__ */ jsx3(ChevronRight3, {
480
+ /* @__PURE__ */ jsx2(ChevronRight2, {
827
481
  size: 16
828
482
  })
829
483
  ]
@@ -834,360 +488,589 @@ export const OrderList = defineDataView({
834
488
  });
835
489
  }
836
490
 
837
- // src/components/docs/specs/SpecsWorkflowsPage.tsx
838
- import Link4 from "@contractspec/lib.ui-link";
839
- import { ChevronRight as ChevronRight4 } from "lucide-react";
840
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
841
- function SpecsWorkflowsPage() {
842
- return /* @__PURE__ */ jsxs4("div", {
491
+ // src/components/docs/specs/SpecsOverlaysPage.tsx
492
+ import Link3 from "@contractspec/lib.ui-link";
493
+ import { ChevronRight as ChevronRight3 } from "lucide-react";
494
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
495
+ function SpecsOverlaysPage() {
496
+ return /* @__PURE__ */ jsxs3("div", {
843
497
  className: "space-y-8",
844
498
  children: [
845
- /* @__PURE__ */ jsxs4("div", {
499
+ /* @__PURE__ */ jsxs3("div", {
846
500
  className: "space-y-4",
847
501
  children: [
848
- /* @__PURE__ */ jsx4("h1", {
849
- className: "text-4xl font-bold",
850
- children: "Workflows"
502
+ /* @__PURE__ */ jsx3("h1", {
503
+ className: "font-bold text-4xl",
504
+ children: "Overlays"
851
505
  }),
852
- /* @__PURE__ */ jsxs4("p", {
506
+ /* @__PURE__ */ jsxs3("p", {
853
507
  className: "text-muted-foreground",
854
508
  children: [
855
- "A ",
856
- /* @__PURE__ */ jsx4("strong", {
857
- children: "WorkflowSpec"
509
+ "An ",
510
+ /* @__PURE__ */ jsx3("strong", {
511
+ children: "OverlaySpec"
858
512
  }),
859
- " orchestrates multi-step processes. It defines the sequence of operations, handles failures with retries and compensation, and provides observability into long-running tasks."
513
+ " allows tenants or users to customize UI layouts and field visibility without modifying the underlying application code. Overlays are cryptographically signed to ensure they respect policy boundaries and cannot introduce security vulnerabilities."
860
514
  ]
861
515
  })
862
516
  ]
863
517
  }),
864
- /* @__PURE__ */ jsxs4("div", {
518
+ /* @__PURE__ */ jsxs3("div", {
865
519
  className: "space-y-4",
866
520
  children: [
867
- /* @__PURE__ */ jsx4("h2", {
868
- className: "text-2xl font-bold",
869
- children: "Core concepts"
521
+ /* @__PURE__ */ jsx3("h2", {
522
+ className: "font-bold text-2xl",
523
+ children: "Why overlays matter"
870
524
  }),
871
- /* @__PURE__ */ jsxs4("div", {
872
- className: "space-y-3",
525
+ /* @__PURE__ */ jsx3("p", {
526
+ className: "text-muted-foreground",
527
+ children: "Different users have different needs. A power user might want to see all available fields and actions, while a casual user prefers a simplified interface. A tenant in a multi-tenant application might want to brand the UI or hide features they don't use."
528
+ }),
529
+ /* @__PURE__ */ jsx3("p", {
530
+ className: "text-muted-foreground",
531
+ children: "Traditional approaches require either building multiple UIs or adding complex configuration logic throughout the codebase. OverlaySpecs provide a safer, more maintainable solution: users can customize their experience, but only within the bounds allowed by the underlying specs and policies."
532
+ })
533
+ ]
534
+ }),
535
+ /* @__PURE__ */ jsxs3("div", {
536
+ className: "space-y-4",
537
+ children: [
538
+ /* @__PURE__ */ jsx3("h2", {
539
+ className: "font-bold text-2xl",
540
+ children: "What overlays can do"
541
+ }),
542
+ /* @__PURE__ */ jsxs3("ul", {
543
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
873
544
  children: [
874
- /* @__PURE__ */ jsxs4("div", {
545
+ /* @__PURE__ */ jsxs3("li", {
875
546
  children: [
876
- /* @__PURE__ */ jsx4("h3", {
877
- className: "text-lg font-semibold",
878
- children: "Identifiers"
547
+ /* @__PURE__ */ jsx3("strong", {
548
+ children: "Hide or show fields"
879
549
  }),
880
- /* @__PURE__ */ jsxs4("p", {
881
- className: "text-muted-foreground",
882
- children: [
883
- "Each workflow has a unique",
884
- " ",
885
- /* @__PURE__ */ jsx4("code", {
886
- className: "bg-background/50 rounded px-2 py-1",
887
- children: "workflowId"
888
- }),
889
- " ",
890
- "and a",
891
- " ",
892
- /* @__PURE__ */ jsx4("code", {
893
- className: "bg-background/50 rounded px-2 py-1",
894
- children: "version"
895
- }),
896
- ". This allows you to run multiple versions of the same workflow simultaneously during migrations or A/B tests."
897
- ]
898
- })
550
+ " Remove fields from forms or detail views (but only if the user has permission to see them in the first place)"
899
551
  ]
900
552
  }),
901
- /* @__PURE__ */ jsxs4("div", {
553
+ /* @__PURE__ */ jsxs3("li", {
902
554
  children: [
903
- /* @__PURE__ */ jsx4("h3", {
904
- className: "text-lg font-semibold",
905
- children: "Steps"
555
+ /* @__PURE__ */ jsx3("strong", {
556
+ children: "Reorder fields"
906
557
  }),
907
- /* @__PURE__ */ jsxs4("p", {
908
- className: "text-muted-foreground",
909
- children: [
910
- "A workflow is composed of ",
911
- /* @__PURE__ */ jsx4("strong", {
912
- children: "steps"
913
- }),
914
- ". Each step invokes a",
915
- " ",
916
- /* @__PURE__ */ jsx4(Link4, {
917
- href: "/docs/specs/capabilities",
918
- className: "text-violet-400 hover:text-violet-300",
919
- children: "CapabilitySpec"
920
- }),
921
- ", passes inputs, and receives outputs. Steps can run sequentially or in parallel."
922
- ]
923
- })
558
+ " Change the order in which fields appear"
924
559
  ]
925
560
  }),
926
- /* @__PURE__ */ jsxs4("div", {
561
+ /* @__PURE__ */ jsxs3("li", {
927
562
  children: [
928
- /* @__PURE__ */ jsx4("h3", {
929
- className: "text-lg font-semibold",
930
- children: "Transitions"
563
+ /* @__PURE__ */ jsx3("strong", {
564
+ children: "Rename labels"
931
565
  }),
932
- /* @__PURE__ */ jsxs4("p", {
933
- className: "text-muted-foreground",
934
- children: [
935
- /* @__PURE__ */ jsx4("strong", {
936
- children: "Transitions"
937
- }),
938
- ' define the flow between steps. They can be conditional (e.g., "if payment succeeds, go to step 3; otherwise, go to step 5") or unconditional.'
939
- ]
940
- })
566
+ " Use different terminology that's more familiar to the user"
941
567
  ]
942
568
  }),
943
- /* @__PURE__ */ jsxs4("div", {
569
+ /* @__PURE__ */ jsxs3("li", {
944
570
  children: [
945
- /* @__PURE__ */ jsx4("h3", {
946
- className: "text-lg font-semibold",
947
- children: "Retries"
571
+ /* @__PURE__ */ jsx3("strong", {
572
+ children: "Change layouts"
948
573
  }),
949
- /* @__PURE__ */ jsx4("p", {
950
- className: "text-muted-foreground",
951
- children: "If a step fails, the workflow can retry it with exponential backoff. You specify the maximum number of retries and the backoff strategy in the spec."
952
- })
574
+ " Switch between list, grid, or card views"
953
575
  ]
954
576
  }),
955
- /* @__PURE__ */ jsxs4("div", {
577
+ /* @__PURE__ */ jsxs3("li", {
956
578
  children: [
957
- /* @__PURE__ */ jsx4("h3", {
958
- className: "text-lg font-semibold",
959
- children: "Compensation"
579
+ /* @__PURE__ */ jsx3("strong", {
580
+ children: "Add help text"
960
581
  }),
961
- /* @__PURE__ */ jsxs4("p", {
962
- className: "text-muted-foreground",
963
- children: [
964
- "When a workflow fails partway through,",
965
- " ",
966
- /* @__PURE__ */ jsx4("strong", {
967
- children: "compensation"
968
- }),
969
- " steps undo the effects of completed steps (e.g., refunding a payment, releasing a reservation). This ensures consistency even in failure scenarios."
970
- ]
971
- })
582
+ " Provide context-specific guidance"
972
583
  ]
973
584
  }),
974
- /* @__PURE__ */ jsxs4("div", {
585
+ /* @__PURE__ */ jsxs3("li", {
975
586
  children: [
976
- /* @__PURE__ */ jsx4("h3", {
977
- className: "text-lg font-semibold",
978
- children: "SLAs"
587
+ /* @__PURE__ */ jsx3("strong", {
588
+ children: "Set default values"
979
589
  }),
980
- /* @__PURE__ */ jsx4("p", {
981
- className: "text-muted-foreground",
982
- children: "You can define Service Level Agreements (SLAs) for each step or the entire workflow. If a step exceeds its SLA, the system can trigger alerts or escalations."
983
- })
590
+ " Pre-fill forms with tenant-specific defaults"
591
+ ]
592
+ }),
593
+ /* @__PURE__ */ jsxs3("li", {
594
+ children: [
595
+ /* @__PURE__ */ jsx3("strong", {
596
+ children: "Apply branding"
597
+ }),
598
+ " – Customize colors, logos, and styling (within approved themes)"
984
599
  ]
985
600
  })
986
601
  ]
987
602
  })
988
603
  ]
989
604
  }),
990
- /* @__PURE__ */ jsxs4("div", {
605
+ /* @__PURE__ */ jsxs3("div", {
991
606
  className: "space-y-4",
992
607
  children: [
993
- /* @__PURE__ */ jsx4("h2", {
994
- className: "text-2xl font-bold",
995
- children: "Example WorkflowSpec (TypeScript)"
608
+ /* @__PURE__ */ jsx3("h2", {
609
+ className: "font-bold text-2xl",
610
+ children: "Example OverlaySpec"
996
611
  }),
997
- /* @__PURE__ */ jsx4("p", {
612
+ /* @__PURE__ */ jsx3("p", {
998
613
  className: "text-muted-foreground",
999
- children: "Here's a simplified example of a payment workflow in TypeScript:"
614
+ children: "Here's an overlay that customizes an order form:"
1000
615
  }),
1001
- /* @__PURE__ */ jsx4("div", {
1002
- className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
1003
- children: /* @__PURE__ */ jsx4("pre", {
1004
- children: `import { defineWorkflow } from '@contractspec/lib.contracts-spec/workflow';
1005
- import { ValidatePaymentMethod, ChargePayment, SendEmail } from './specs';
1006
-
1007
- export const PaymentFlow = defineWorkflow({
1008
- meta: {
1009
- key: 'payment.flow',
1010
- version: '1.0.0',
1011
- description: 'End-to-end payment processing',
1012
- owners: ['team-payments'],
1013
- tags: ['payments'],
1014
- stability: 'stable',
1015
- },
1016
- steps: [
1017
- {
1018
- id: 'validate-payment',
1019
- operation: ValidatePaymentMethod,
1020
- inputs: (ctx, input) => ({
1021
- userId: ctx.userId,
1022
- paymentMethodId: input.paymentMethodId,
1023
- }),
1024
- retry: {
1025
- maxAttempts: 3,
1026
- backoff: 'exponential',
1027
- },
1028
- onSuccess: 'charge-payment',
1029
- onFailure: 'notify-user',
1030
- },
1031
- {
1032
- id: 'charge-payment',
1033
- operation: ChargePayment,
1034
- inputs: (ctx, input, steps) => ({
1035
- amount: input.amount,
1036
- paymentMethodId: input.paymentMethodId,
616
+ /* @__PURE__ */ jsx3("div", {
617
+ className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
618
+ children: /* @__PURE__ */ jsx3("pre", {
619
+ children: `overlayId: acme-order-form
620
+ version: '1.0.0'.0.0
621
+ appliesTo:
622
+ capability: createOrder
623
+ tenantId: acme-corp
624
+
625
+ modifications:
626
+ - type: hideField
627
+ field: internalNotes
628
+ reason: "ACME doesn't use internal notes"
629
+
630
+ - type: renameLabel
631
+ field: customerReference
632
+ newLabel: "PO Number"
633
+
634
+ - type: reorderFields
635
+ fields:
636
+ - customerReference
637
+ - items
638
+ - shippingAddress
639
+ - billingAddress
640
+ - paymentMethod
641
+
642
+ - type: setDefault
643
+ field: paymentMethod
644
+ value: "net30"
645
+
646
+ - type: addHelpText
647
+ field: customerReference
648
+ text: "Enter your purchase order number from your procurement system"
649
+
650
+ - type: makeRequired
651
+ field: customerReference
652
+
653
+ signature:
654
+ algorithm: EdDSA
655
+ publicKey: "acme-corp-overlay-key"
656
+ signature: "base64-encoded-signature"`
657
+ })
658
+ })
659
+ ]
1037
660
  }),
1038
- compensation: 'refund-payment',
1039
- onSuccess: 'send-receipt',
1040
- onFailure: 'notify-admin',
1041
- },
1042
- {
1043
- id: 'send-receipt',
1044
- operation: SendEmail,
1045
- inputs: (ctx, input, steps) => ({
1046
- to: ctx.userEmail,
1047
- template: 'payment-receipt',
1048
- data: steps['charge-payment'].output,
661
+ /* @__PURE__ */ jsxs3("div", {
662
+ className: "space-y-4",
663
+ children: [
664
+ /* @__PURE__ */ jsx3("h2", {
665
+ className: "font-bold text-2xl",
666
+ children: "Safety guarantees"
667
+ }),
668
+ /* @__PURE__ */ jsx3("p", {
669
+ className: "text-muted-foreground",
670
+ children: "Overlays are powerful, but they must not compromise security or data integrity. ContractSpec enforces several guarantees:"
671
+ }),
672
+ /* @__PURE__ */ jsxs3("ul", {
673
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
674
+ children: [
675
+ /* @__PURE__ */ jsxs3("li", {
676
+ children: [
677
+ /* @__PURE__ */ jsx3("strong", {
678
+ children: "Overlays cannot grant new permissions"
679
+ }),
680
+ " – They can only hide or rearrange what the user is already allowed to see"
681
+ ]
682
+ }),
683
+ /* @__PURE__ */ jsxs3("li", {
684
+ children: [
685
+ /* @__PURE__ */ jsx3("strong", {
686
+ children: "Overlays cannot bypass validation"
687
+ }),
688
+ " – Field types, constraints, and business rules from the underlying spec still apply"
689
+ ]
690
+ }),
691
+ /* @__PURE__ */ jsxs3("li", {
692
+ children: [
693
+ /* @__PURE__ */ jsx3("strong", {
694
+ children: "Overlays must be signed"
695
+ }),
696
+ " – Only authorized parties (typically tenant admins) can create overlays"
697
+ ]
698
+ }),
699
+ /* @__PURE__ */ jsxs3("li", {
700
+ children: [
701
+ /* @__PURE__ */ jsx3("strong", {
702
+ children: "Overlays are versioned"
703
+ }),
704
+ " – Changes to overlays are tracked and can be rolled back"
705
+ ]
706
+ }),
707
+ /* @__PURE__ */ jsxs3("li", {
708
+ children: [
709
+ /* @__PURE__ */ jsx3("strong", {
710
+ children: "Overlays are audited"
711
+ }),
712
+ " – Every overlay application is logged"
713
+ ]
714
+ })
715
+ ]
716
+ })
717
+ ]
1049
718
  }),
1050
- },
1051
- ],
1052
- sla: {
1053
- maxDuration: 30000, // milliseconds
1054
- alertOnBreach: true,
1055
- },
1056
- });`
1057
- })
719
+ /* @__PURE__ */ jsxs3("div", {
720
+ className: "space-y-4",
721
+ children: [
722
+ /* @__PURE__ */ jsx3("h2", {
723
+ className: "font-bold text-2xl",
724
+ children: "Creating overlays"
725
+ }),
726
+ /* @__PURE__ */ jsx3("p", {
727
+ className: "text-muted-foreground",
728
+ children: "Overlays can be created through:"
729
+ }),
730
+ /* @__PURE__ */ jsxs3("ul", {
731
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
732
+ children: [
733
+ /* @__PURE__ */ jsxs3("li", {
734
+ children: [
735
+ /* @__PURE__ */ jsx3("strong", {
736
+ children: "Visual editor"
737
+ }),
738
+ " – A drag-and-drop interface for non-technical users"
739
+ ]
740
+ }),
741
+ /* @__PURE__ */ jsxs3("li", {
742
+ children: [
743
+ /* @__PURE__ */ jsx3("strong", {
744
+ children: "TypeScript/JSON"
745
+ }),
746
+ " – For developers who prefer code"
747
+ ]
748
+ }),
749
+ /* @__PURE__ */ jsxs3("li", {
750
+ children: [
751
+ /* @__PURE__ */ jsx3("strong", {
752
+ children: "API"
753
+ }),
754
+ " – Programmatically create overlays for automation"
755
+ ]
756
+ })
757
+ ]
758
+ }),
759
+ /* @__PURE__ */ jsx3("p", {
760
+ className: "text-muted-foreground",
761
+ children: "Once created, overlays must be signed using a private key. The corresponding public key is registered with ContractSpec, which verifies the signature before applying the overlay."
762
+ }),
763
+ /* @__PURE__ */ jsxs3("p", {
764
+ className: "text-muted-foreground",
765
+ children: [
766
+ "See",
767
+ " ",
768
+ /* @__PURE__ */ jsx3(Link3, {
769
+ href: "/docs/libraries/overlay-engine",
770
+ className: "text-violet-400 underline",
771
+ children: "Overlay Engine docs"
772
+ }),
773
+ " ",
774
+ "and the",
775
+ " ",
776
+ /* @__PURE__ */ jsx3(Link3, {
777
+ href: "/docs/advanced/overlay-editor",
778
+ className: "text-violet-400 underline",
779
+ children: "Overlay Editor guide"
780
+ }),
781
+ " ",
782
+ "for end-to-end workflows."
783
+ ]
1058
784
  })
1059
785
  ]
1060
786
  }),
1061
- /* @__PURE__ */ jsxs4("div", {
787
+ /* @__PURE__ */ jsxs3("div", {
1062
788
  className: "space-y-4",
1063
789
  children: [
1064
- /* @__PURE__ */ jsx4("h2", {
1065
- className: "text-2xl font-bold",
1066
- children: "Triggers"
790
+ /* @__PURE__ */ jsx3("h2", {
791
+ className: "font-bold text-2xl",
792
+ children: "Overlay scope"
1067
793
  }),
1068
- /* @__PURE__ */ jsx4("p", {
794
+ /* @__PURE__ */ jsx3("p", {
1069
795
  className: "text-muted-foreground",
1070
- children: "Workflows can be triggered in several ways:"
796
+ children: "Overlays can be scoped to:"
1071
797
  }),
1072
- /* @__PURE__ */ jsxs4("ul", {
1073
- className: "text-muted-foreground list-inside list-disc space-y-2",
798
+ /* @__PURE__ */ jsxs3("ul", {
799
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1074
800
  children: [
1075
- /* @__PURE__ */ jsxs4("li", {
801
+ /* @__PURE__ */ jsxs3("li", {
1076
802
  children: [
1077
- /* @__PURE__ */ jsx4("strong", {
1078
- children: "Manual invocation"
803
+ /* @__PURE__ */ jsx3("strong", {
804
+ children: "Tenant"
1079
805
  }),
1080
- " – A user or system calls the workflow via an API endpoint."
806
+ " – All users in a tenant see the same overlay"
1081
807
  ]
1082
808
  }),
1083
- /* @__PURE__ */ jsxs4("li", {
809
+ /* @__PURE__ */ jsxs3("li", {
1084
810
  children: [
1085
- /* @__PURE__ */ jsx4("strong", {
1086
- children: "Event-driven"
811
+ /* @__PURE__ */ jsx3("strong", {
812
+ children: "User"
1087
813
  }),
1088
- " – The workflow starts automatically when a specific event occurs (e.g., a new order is created)."
814
+ " – Individual users can have personal overlays"
1089
815
  ]
1090
816
  }),
1091
- /* @__PURE__ */ jsxs4("li", {
817
+ /* @__PURE__ */ jsxs3("li", {
1092
818
  children: [
1093
- /* @__PURE__ */ jsx4("strong", {
1094
- children: "Scheduled"
819
+ /* @__PURE__ */ jsx3("strong", {
820
+ children: "Role"
1095
821
  }),
1096
- " – The workflow runs on a cron schedule (e.g., nightly batch processing)."
822
+ " – All users with a specific role see the overlay"
1097
823
  ]
1098
824
  }),
1099
- /* @__PURE__ */ jsxs4("li", {
825
+ /* @__PURE__ */ jsxs3("li", {
1100
826
  children: [
1101
- /* @__PURE__ */ jsx4("strong", {
1102
- children: "Chained"
827
+ /* @__PURE__ */ jsx3("strong", {
828
+ children: "Device"
1103
829
  }),
1104
- " – One workflow can invoke another as a step."
830
+ " – Different overlays for mobile vs desktop"
1105
831
  ]
1106
832
  })
1107
833
  ]
834
+ }),
835
+ /* @__PURE__ */ jsx3("p", {
836
+ className: "text-muted-foreground",
837
+ children: "If multiple overlays apply to the same user, they are merged in order of specificity (user overlays override role overlays, which override tenant overlays)."
1108
838
  })
1109
839
  ]
1110
840
  }),
1111
- /* @__PURE__ */ jsxs4("div", {
841
+ /* @__PURE__ */ jsxs3("div", {
1112
842
  className: "space-y-4",
1113
843
  children: [
1114
- /* @__PURE__ */ jsx4("h2", {
1115
- className: "text-2xl font-bold",
1116
- children: "Monitoring and versioning"
1117
- }),
1118
- /* @__PURE__ */ jsx4("p", {
1119
- className: "text-muted-foreground",
1120
- children: "ContractSpec automatically instruments workflows with telemetry. You can view:"
844
+ /* @__PURE__ */ jsx3("h2", {
845
+ className: "font-bold text-2xl",
846
+ children: "Best practices"
1121
847
  }),
1122
- /* @__PURE__ */ jsxs4("ul", {
1123
- className: "text-muted-foreground list-inside list-disc space-y-2",
848
+ /* @__PURE__ */ jsxs3("ul", {
849
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1124
850
  children: [
1125
- /* @__PURE__ */ jsx4("li", {
1126
- children: "Real-time execution status for each step"
851
+ /* @__PURE__ */ jsx3("li", {
852
+ children: "Start with the default UI and only create overlays when users request specific changes."
1127
853
  }),
1128
- /* @__PURE__ */ jsx4("li", {
1129
- children: "Historical run data and success/failure rates"
854
+ /* @__PURE__ */ jsx3("li", {
855
+ children: "Document why each overlay modification was made—this helps when reviewing or updating overlays."
1130
856
  }),
1131
- /* @__PURE__ */ jsx4("li", {
1132
- children: "Latency distributions and SLA compliance"
857
+ /* @__PURE__ */ jsx3("li", {
858
+ children: "Test overlays thoroughly to ensure they don't break workflows or confuse users."
1133
859
  }),
1134
- /* @__PURE__ */ jsx4("li", {
1135
- children: "Compensation events and retry attempts"
860
+ /* @__PURE__ */ jsx3("li", {
861
+ children: "Use tenant-level overlays for organizational customizations and user-level overlays for personal preferences."
862
+ }),
863
+ /* @__PURE__ */ jsx3("li", {
864
+ children: "Regularly review overlays to remove ones that are no longer needed."
865
+ }),
866
+ /* @__PURE__ */ jsx3("li", {
867
+ children: "Protect overlay signing keys carefully—they control what customizations are allowed."
868
+ })
869
+ ]
870
+ })
871
+ ]
872
+ }),
873
+ /* @__PURE__ */ jsxs3("div", {
874
+ className: "flex items-center gap-4 pt-4",
875
+ children: [
876
+ /* @__PURE__ */ jsx3(Link3, {
877
+ href: "/docs/specs/policy",
878
+ className: "btn-ghost",
879
+ children: "Previous: Policy"
880
+ }),
881
+ /* @__PURE__ */ jsxs3(Link3, {
882
+ href: "/docs/safety",
883
+ className: "btn-primary",
884
+ children: [
885
+ "Next: Safety ",
886
+ /* @__PURE__ */ jsx3(ChevronRight3, {
887
+ size: 16
1136
888
  })
1137
889
  ]
890
+ })
891
+ ]
892
+ })
893
+ ]
894
+ });
895
+ }
896
+
897
+ // src/components/docs/specs/SpecsOverviewPage.tsx
898
+ import Link4 from "@contractspec/lib.ui-link";
899
+ import { ChevronRight as ChevronRight4 } from "lucide-react";
900
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
901
+ var specTypes = [
902
+ {
903
+ title: "Capabilities",
904
+ body: "Model operations, events, and presentations as explicit system behavior.",
905
+ href: "/docs/specs/capabilities"
906
+ },
907
+ {
908
+ title: "Data views",
909
+ body: "Describe query, filtering, and presentation behavior from the same source model.",
910
+ href: "/docs/specs/dataviews"
911
+ },
912
+ {
913
+ title: "Workflows",
914
+ body: "Coordinate multi-step execution, retries, monitoring, and hand-offs.",
915
+ href: "/docs/specs/workflows"
916
+ },
917
+ {
918
+ title: "Policy",
919
+ body: "Carry governance and access rules through every generated and runtime-served surface.",
920
+ href: "/docs/specs/policy"
921
+ },
922
+ {
923
+ title: "Overlays",
924
+ body: "Customize generated surfaces safely instead of forking them permanently.",
925
+ href: "/docs/specs/overlays"
926
+ },
927
+ {
928
+ title: "Safety and migration",
929
+ body: "Keep change safe with signing, audits, rollbacks, and explicit migration behavior.",
930
+ href: "/docs/safety"
931
+ }
932
+ ];
933
+ function SpecsOverviewPage() {
934
+ return /* @__PURE__ */ jsxs4("div", {
935
+ className: "space-y-10",
936
+ children: [
937
+ /* @__PURE__ */ jsxs4("div", {
938
+ className: "space-y-3",
939
+ children: [
940
+ /* @__PURE__ */ jsx4("p", {
941
+ className: "editorial-kicker",
942
+ children: "Core model"
943
+ }),
944
+ /* @__PURE__ */ jsx4("h1", {
945
+ className: "font-serif text-4xl tracking-[-0.04em] md:text-5xl",
946
+ children: "Contracts are the durable system boundary."
1138
947
  }),
1139
948
  /* @__PURE__ */ jsx4("p", {
1140
- className: "text-muted-foreground",
1141
- children: "When you update a workflow, you increment its version. Running workflows continue on their original version, while new invocations use the latest version. This allows safe, zero-downtime deployments."
949
+ className: "max-w-3xl text-lg text-muted-foreground leading-8",
950
+ children: "ContractSpec uses explicit TypeScript specs to describe behavior before it spreads across APIs, UI, data models, events, and operator flows. The goal is not to hide implementation. The goal is to make the system boundary explicit enough that generation, validation, runtime enforcement, and regeneration can stay coherent."
1142
951
  })
1143
952
  ]
1144
953
  }),
1145
954
  /* @__PURE__ */ jsxs4("div", {
1146
- className: "space-y-4",
955
+ className: "editorial-proof-strip",
1147
956
  children: [
1148
- /* @__PURE__ */ jsx4("h2", {
1149
- className: "text-2xl font-bold",
1150
- children: "Best practices"
1151
- }),
1152
- /* @__PURE__ */ jsxs4("ul", {
1153
- className: "text-muted-foreground list-inside list-disc space-y-2",
957
+ /* @__PURE__ */ jsxs4("div", {
958
+ className: "editorial-stat",
1154
959
  children: [
1155
- /* @__PURE__ */ jsx4("li", {
1156
- children: "Keep steps idempotent – they should be safe to retry without side effects."
1157
- }),
1158
- /* @__PURE__ */ jsx4("li", {
1159
- children: "Define compensation for any step that modifies external state."
1160
- }),
1161
- /* @__PURE__ */ jsx4("li", {
1162
- children: "Use meaningful step IDs that describe the operation."
1163
- }),
1164
- /* @__PURE__ */ jsx4("li", {
1165
- children: "Set realistic SLAs and monitor them in production."
960
+ /* @__PURE__ */ jsx4("span", {
961
+ className: "editorial-label",
962
+ children: "System promise"
1166
963
  }),
1167
- /* @__PURE__ */ jsx4("li", {
1168
- children: "Test failure scenarios locally before deploying."
964
+ /* @__PURE__ */ jsx4("span", {
965
+ className: "editorial-stat-value",
966
+ children: "one contract → many surfaces"
1169
967
  })
1170
968
  ]
969
+ }),
970
+ /* @__PURE__ */ jsx4("p", {
971
+ className: "max-w-2xl text-muted-foreground text-sm leading-7",
972
+ children: "Use the contract layer to keep surface behavior aligned, then let runtimes and generators do the repetitive work without inventing a closed platform."
1171
973
  })
1172
974
  ]
1173
975
  }),
1174
- /* @__PURE__ */ jsxs4("div", {
1175
- className: "flex items-center gap-4 pt-4",
976
+ /* @__PURE__ */ jsx4("section", {
977
+ className: "editorial-panel space-y-5",
978
+ children: /* @__PURE__ */ jsxs4("div", {
979
+ className: "space-y-2",
980
+ children: [
981
+ /* @__PURE__ */ jsx4("h2", {
982
+ className: "font-serif text-3xl tracking-[-0.03em]",
983
+ children: "What the contract layer owns"
984
+ }),
985
+ /* @__PURE__ */ jsxs4("ul", {
986
+ className: "editorial-list",
987
+ children: [
988
+ /* @__PURE__ */ jsxs4("li", {
989
+ children: [
990
+ /* @__PURE__ */ jsx4("span", {
991
+ className: "editorial-list-marker"
992
+ }),
993
+ /* @__PURE__ */ jsx4("span", {
994
+ children: "Behavior: operations, events, presentations, workflows."
995
+ })
996
+ ]
997
+ }),
998
+ /* @__PURE__ */ jsxs4("li", {
999
+ children: [
1000
+ /* @__PURE__ */ jsx4("span", {
1001
+ className: "editorial-list-marker"
1002
+ }),
1003
+ /* @__PURE__ */ jsx4("span", {
1004
+ children: "Validation: input, output, and schema boundaries."
1005
+ })
1006
+ ]
1007
+ }),
1008
+ /* @__PURE__ */ jsxs4("li", {
1009
+ children: [
1010
+ /* @__PURE__ */ jsx4("span", {
1011
+ className: "editorial-list-marker"
1012
+ }),
1013
+ /* @__PURE__ */ jsx4("span", {
1014
+ children: "Governance: policy, auditability, and migration rules."
1015
+ })
1016
+ ]
1017
+ }),
1018
+ /* @__PURE__ */ jsxs4("li", {
1019
+ children: [
1020
+ /* @__PURE__ */ jsx4("span", {
1021
+ className: "editorial-list-marker"
1022
+ }),
1023
+ /* @__PURE__ */ jsx4("span", {
1024
+ children: "Surface alignment: generated or served behavior across API, UI, data, and agent-facing interfaces."
1025
+ })
1026
+ ]
1027
+ })
1028
+ ]
1029
+ })
1030
+ ]
1031
+ })
1032
+ }),
1033
+ /* @__PURE__ */ jsxs4("section", {
1034
+ className: "space-y-5",
1176
1035
  children: [
1177
- /* @__PURE__ */ jsx4(Link4, {
1178
- href: "/docs/specs/capabilities",
1179
- className: "btn-ghost",
1180
- children: "Previous: Capabilities"
1181
- }),
1182
- /* @__PURE__ */ jsxs4(Link4, {
1183
- href: "/docs/safety",
1184
- className: "btn-primary",
1036
+ /* @__PURE__ */ jsxs4("div", {
1037
+ className: "space-y-2",
1185
1038
  children: [
1186
- "Next: Safety Features ",
1187
- /* @__PURE__ */ jsx4(ChevronRight4, {
1188
- size: 16
1039
+ /* @__PURE__ */ jsx4("h2", {
1040
+ className: "font-serif text-3xl tracking-[-0.03em]",
1041
+ children: "Specification types"
1042
+ }),
1043
+ /* @__PURE__ */ jsx4("p", {
1044
+ className: "text-muted-foreground text-sm leading-7",
1045
+ children: "You can adopt the model one part at a time. Not every system needs every spec type on day one."
1189
1046
  })
1190
1047
  ]
1048
+ }),
1049
+ /* @__PURE__ */ jsx4("div", {
1050
+ className: "grid gap-4 md:grid-cols-2",
1051
+ children: specTypes.map((item) => /* @__PURE__ */ jsxs4(Link4, {
1052
+ href: item.href,
1053
+ className: "editorial-panel",
1054
+ children: [
1055
+ /* @__PURE__ */ jsx4("h3", {
1056
+ className: "font-semibold text-xl",
1057
+ children: item.title
1058
+ }),
1059
+ /* @__PURE__ */ jsx4("p", {
1060
+ className: "mt-2 text-muted-foreground text-sm leading-7",
1061
+ children: item.body
1062
+ }),
1063
+ /* @__PURE__ */ jsxs4("div", {
1064
+ className: "mt-4 flex items-center gap-2 text-[color:var(--rust)] text-sm",
1065
+ children: [
1066
+ "Open section ",
1067
+ /* @__PURE__ */ jsx4(ChevronRight4, {
1068
+ size: 14
1069
+ })
1070
+ ]
1071
+ })
1072
+ ]
1073
+ }, item.title))
1191
1074
  })
1192
1075
  ]
1193
1076
  })
@@ -1207,7 +1090,7 @@ function SpecsPolicyPage() {
1207
1090
  className: "space-y-4",
1208
1091
  children: [
1209
1092
  /* @__PURE__ */ jsx5("h1", {
1210
- className: "text-4xl font-bold",
1093
+ className: "font-bold text-4xl",
1211
1094
  children: "Policy"
1212
1095
  }),
1213
1096
  /* @__PURE__ */ jsxs5("p", {
@@ -1226,7 +1109,7 @@ function SpecsPolicyPage() {
1226
1109
  className: "space-y-4",
1227
1110
  children: [
1228
1111
  /* @__PURE__ */ jsx5("h2", {
1229
- className: "text-2xl font-bold",
1112
+ className: "font-bold text-2xl",
1230
1113
  children: "Why policies matter"
1231
1114
  }),
1232
1115
  /* @__PURE__ */ jsx5("p", {
@@ -1253,7 +1136,7 @@ function SpecsPolicyPage() {
1253
1136
  className: "space-y-4",
1254
1137
  children: [
1255
1138
  /* @__PURE__ */ jsx5("h2", {
1256
- className: "text-2xl font-bold",
1139
+ className: "font-bold text-2xl",
1257
1140
  children: "Policy structure"
1258
1141
  }),
1259
1142
  /* @__PURE__ */ jsx5("p", {
@@ -1261,7 +1144,7 @@ function SpecsPolicyPage() {
1261
1144
  children: "A PolicySpec contains one or more rules. Each rule has:"
1262
1145
  }),
1263
1146
  /* @__PURE__ */ jsxs5("ul", {
1264
- className: "text-muted-foreground list-inside list-disc space-y-2",
1147
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1265
1148
  children: [
1266
1149
  /* @__PURE__ */ jsxs5("li", {
1267
1150
  children: [
@@ -1303,7 +1186,7 @@ function SpecsPolicyPage() {
1303
1186
  className: "space-y-4",
1304
1187
  children: [
1305
1188
  /* @__PURE__ */ jsx5("h2", {
1306
- className: "text-2xl font-bold",
1189
+ className: "font-bold text-2xl",
1307
1190
  children: "Example PolicySpec"
1308
1191
  }),
1309
1192
  /* @__PURE__ */ jsx5("p", {
@@ -1311,7 +1194,7 @@ function SpecsPolicyPage() {
1311
1194
  children: "Here's a policy that controls access to customer data in TypeScript:"
1312
1195
  }),
1313
1196
  /* @__PURE__ */ jsx5("div", {
1314
- className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
1197
+ className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
1315
1198
  children: /* @__PURE__ */ jsx5("pre", {
1316
1199
  children: `import { definePolicy } from '@contractspec/lib.contracts-spec';
1317
1200
 
@@ -1364,7 +1247,7 @@ export const CustomerDataAccess = definePolicy({
1364
1247
  className: "space-y-4",
1365
1248
  children: [
1366
1249
  /* @__PURE__ */ jsx5("h2", {
1367
- className: "text-2xl font-bold",
1250
+ className: "font-bold text-2xl",
1368
1251
  children: "Attributes"
1369
1252
  }),
1370
1253
  /* @__PURE__ */ jsx5("p", {
@@ -1377,32 +1260,32 @@ export const CustomerDataAccess = definePolicy({
1377
1260
  /* @__PURE__ */ jsxs5("div", {
1378
1261
  children: [
1379
1262
  /* @__PURE__ */ jsx5("h3", {
1380
- className: "text-lg font-semibold",
1263
+ className: "font-semibold text-lg",
1381
1264
  children: "User attributes"
1382
1265
  }),
1383
1266
  /* @__PURE__ */ jsxs5("p", {
1384
1267
  className: "text-muted-foreground",
1385
1268
  children: [
1386
1269
  /* @__PURE__ */ jsx5("code", {
1387
- className: "bg-background/50 rounded px-2 py-1",
1270
+ className: "rounded bg-background/50 px-2 py-1",
1388
1271
  children: "user.id"
1389
1272
  }),
1390
1273
  ",",
1391
1274
  " ",
1392
1275
  /* @__PURE__ */ jsx5("code", {
1393
- className: "bg-background/50 rounded px-2 py-1",
1276
+ className: "rounded bg-background/50 px-2 py-1",
1394
1277
  children: "user.role"
1395
1278
  }),
1396
1279
  ",",
1397
1280
  " ",
1398
1281
  /* @__PURE__ */ jsx5("code", {
1399
- className: "bg-background/50 rounded px-2 py-1",
1282
+ className: "rounded bg-background/50 px-2 py-1",
1400
1283
  children: "user.groups"
1401
1284
  }),
1402
1285
  ",",
1403
1286
  " ",
1404
1287
  /* @__PURE__ */ jsx5("code", {
1405
- className: "bg-background/50 rounded px-2 py-1",
1288
+ className: "rounded bg-background/50 px-2 py-1",
1406
1289
  children: "user.department"
1407
1290
  }),
1408
1291
  ", custom attributes"
@@ -1413,26 +1296,26 @@ export const CustomerDataAccess = definePolicy({
1413
1296
  /* @__PURE__ */ jsxs5("div", {
1414
1297
  children: [
1415
1298
  /* @__PURE__ */ jsx5("h3", {
1416
- className: "text-lg font-semibold",
1299
+ className: "font-semibold text-lg",
1417
1300
  children: "Resource attributes"
1418
1301
  }),
1419
1302
  /* @__PURE__ */ jsxs5("p", {
1420
1303
  className: "text-muted-foreground",
1421
1304
  children: [
1422
1305
  /* @__PURE__ */ jsx5("code", {
1423
- className: "bg-background/50 rounded px-2 py-1",
1306
+ className: "rounded bg-background/50 px-2 py-1",
1424
1307
  children: "resource.type"
1425
1308
  }),
1426
1309
  ",",
1427
1310
  " ",
1428
1311
  /* @__PURE__ */ jsx5("code", {
1429
- className: "bg-background/50 rounded px-2 py-1",
1312
+ className: "rounded bg-background/50 px-2 py-1",
1430
1313
  children: "resource.owner"
1431
1314
  }),
1432
1315
  ",",
1433
1316
  " ",
1434
1317
  /* @__PURE__ */ jsx5("code", {
1435
- className: "bg-background/50 rounded px-2 py-1",
1318
+ className: "rounded bg-background/50 px-2 py-1",
1436
1319
  children: "resource.sensitivity"
1437
1320
  }),
1438
1321
  ", custom attributes"
@@ -1443,14 +1326,14 @@ export const CustomerDataAccess = definePolicy({
1443
1326
  /* @__PURE__ */ jsxs5("div", {
1444
1327
  children: [
1445
1328
  /* @__PURE__ */ jsx5("h3", {
1446
- className: "text-lg font-semibold",
1329
+ className: "font-semibold text-lg",
1447
1330
  children: "Action attributes"
1448
1331
  }),
1449
1332
  /* @__PURE__ */ jsxs5("p", {
1450
1333
  className: "text-muted-foreground",
1451
1334
  children: [
1452
1335
  /* @__PURE__ */ jsx5("code", {
1453
- className: "bg-background/50 rounded px-2 py-1",
1336
+ className: "rounded bg-background/50 px-2 py-1",
1454
1337
  children: "action"
1455
1338
  }),
1456
1339
  " ",
@@ -1462,32 +1345,32 @@ export const CustomerDataAccess = definePolicy({
1462
1345
  /* @__PURE__ */ jsxs5("div", {
1463
1346
  children: [
1464
1347
  /* @__PURE__ */ jsx5("h3", {
1465
- className: "text-lg font-semibold",
1348
+ className: "font-semibold text-lg",
1466
1349
  children: "Context attributes"
1467
1350
  }),
1468
1351
  /* @__PURE__ */ jsxs5("p", {
1469
1352
  className: "text-muted-foreground",
1470
1353
  children: [
1471
1354
  /* @__PURE__ */ jsx5("code", {
1472
- className: "bg-background/50 rounded px-2 py-1",
1355
+ className: "rounded bg-background/50 px-2 py-1",
1473
1356
  children: "time.hour"
1474
1357
  }),
1475
1358
  ",",
1476
1359
  " ",
1477
1360
  /* @__PURE__ */ jsx5("code", {
1478
- className: "bg-background/50 rounded px-2 py-1",
1361
+ className: "rounded bg-background/50 px-2 py-1",
1479
1362
  children: "time.dayOfWeek"
1480
1363
  }),
1481
1364
  ",",
1482
1365
  " ",
1483
1366
  /* @__PURE__ */ jsx5("code", {
1484
- className: "bg-background/50 rounded px-2 py-1",
1367
+ className: "rounded bg-background/50 px-2 py-1",
1485
1368
  children: "request.ipAddress"
1486
1369
  }),
1487
1370
  ",",
1488
1371
  " ",
1489
1372
  /* @__PURE__ */ jsx5("code", {
1490
- className: "bg-background/50 rounded px-2 py-1",
1373
+ className: "rounded bg-background/50 px-2 py-1",
1491
1374
  children: "request.userAgent"
1492
1375
  })
1493
1376
  ]
@@ -1502,7 +1385,7 @@ export const CustomerDataAccess = definePolicy({
1502
1385
  className: "space-y-4",
1503
1386
  children: [
1504
1387
  /* @__PURE__ */ jsx5("h2", {
1505
- className: "text-2xl font-bold",
1388
+ className: "font-bold text-2xl",
1506
1389
  children: "Data classification"
1507
1390
  }),
1508
1391
  /* @__PURE__ */ jsxs5("p", {
@@ -1527,7 +1410,7 @@ export const CustomerDataAccess = definePolicy({
1527
1410
  ]
1528
1411
  }),
1529
1412
  /* @__PURE__ */ jsx5("div", {
1530
- className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
1413
+ className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
1531
1414
  children: /* @__PURE__ */ jsx5("pre", {
1532
1415
  children: `fields:
1533
1416
  - name: email
@@ -1555,7 +1438,7 @@ export const CustomerDataAccess = definePolicy({
1555
1438
  className: "space-y-4",
1556
1439
  children: [
1557
1440
  /* @__PURE__ */ jsx5("h2", {
1558
- className: "text-2xl font-bold",
1441
+ className: "font-bold text-2xl",
1559
1442
  children: "Testing policies"
1560
1443
  }),
1561
1444
  /* @__PURE__ */ jsx5("p", {
@@ -1563,7 +1446,7 @@ export const CustomerDataAccess = definePolicy({
1563
1446
  children: "ContractSpec provides tools for testing policies before deployment:"
1564
1447
  }),
1565
1448
  /* @__PURE__ */ jsxs5("ul", {
1566
- className: "text-muted-foreground list-inside list-disc space-y-2",
1449
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1567
1450
  children: [
1568
1451
  /* @__PURE__ */ jsxs5("li", {
1569
1452
  children: [
@@ -1605,11 +1488,11 @@ export const CustomerDataAccess = definePolicy({
1605
1488
  className: "space-y-4",
1606
1489
  children: [
1607
1490
  /* @__PURE__ */ jsx5("h2", {
1608
- className: "text-2xl font-bold",
1491
+ className: "font-bold text-2xl",
1609
1492
  children: "Best practices"
1610
1493
  }),
1611
1494
  /* @__PURE__ */ jsxs5("ul", {
1612
- className: "text-muted-foreground list-inside list-disc space-y-2",
1495
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1613
1496
  children: [
1614
1497
  /* @__PURE__ */ jsx5("li", {
1615
1498
  children: "Start with a deny-by-default policy—explicitly permit what should be allowed."
@@ -1666,11 +1549,11 @@ export const CustomerDataAccess = definePolicy({
1666
1549
  });
1667
1550
  }
1668
1551
 
1669
- // src/components/docs/specs/SpecsOverlaysPage.tsx
1552
+ // src/components/docs/specs/SpecsWorkflowsPage.tsx
1670
1553
  import Link6 from "@contractspec/lib.ui-link";
1671
1554
  import { ChevronRight as ChevronRight6 } from "lucide-react";
1672
1555
  import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1673
- function SpecsOverlaysPage() {
1556
+ function SpecsWorkflowsPage() {
1674
1557
  return /* @__PURE__ */ jsxs6("div", {
1675
1558
  className: "space-y-8",
1676
1559
  children: [
@@ -1678,17 +1561,17 @@ function SpecsOverlaysPage() {
1678
1561
  className: "space-y-4",
1679
1562
  children: [
1680
1563
  /* @__PURE__ */ jsx6("h1", {
1681
- className: "text-4xl font-bold",
1682
- children: "Overlays"
1564
+ className: "font-bold text-4xl",
1565
+ children: "Workflows"
1683
1566
  }),
1684
1567
  /* @__PURE__ */ jsxs6("p", {
1685
1568
  className: "text-muted-foreground",
1686
1569
  children: [
1687
- "An ",
1570
+ "A ",
1688
1571
  /* @__PURE__ */ jsx6("strong", {
1689
- children: "OverlaySpec"
1572
+ children: "WorkflowSpec"
1690
1573
  }),
1691
- " allows tenants or users to customize UI layouts and field visibility without modifying the underlying application code. Overlays are cryptographically signed to ensure they respect policy boundaries and cannot introduce security vulnerabilities."
1574
+ " orchestrates multi-step processes. It defines the sequence of operations, handles failures with retries and compensation, and provides observability into long-running tasks."
1692
1575
  ]
1693
1576
  })
1694
1577
  ]
@@ -1697,83 +1580,122 @@ function SpecsOverlaysPage() {
1697
1580
  className: "space-y-4",
1698
1581
  children: [
1699
1582
  /* @__PURE__ */ jsx6("h2", {
1700
- className: "text-2xl font-bold",
1701
- children: "Why overlays matter"
1702
- }),
1703
- /* @__PURE__ */ jsx6("p", {
1704
- className: "text-muted-foreground",
1705
- children: "Different users have different needs. A power user might want to see all available fields and actions, while a casual user prefers a simplified interface. A tenant in a multi-tenant application might want to brand the UI or hide features they don't use."
1706
- }),
1707
- /* @__PURE__ */ jsx6("p", {
1708
- className: "text-muted-foreground",
1709
- children: "Traditional approaches require either building multiple UIs or adding complex configuration logic throughout the codebase. OverlaySpecs provide a safer, more maintainable solution: users can customize their experience, but only within the bounds allowed by the underlying specs and policies."
1710
- })
1711
- ]
1712
- }),
1713
- /* @__PURE__ */ jsxs6("div", {
1714
- className: "space-y-4",
1715
- children: [
1716
- /* @__PURE__ */ jsx6("h2", {
1717
- className: "text-2xl font-bold",
1718
- children: "What overlays can do"
1583
+ className: "font-bold text-2xl",
1584
+ children: "Core concepts"
1719
1585
  }),
1720
- /* @__PURE__ */ jsxs6("ul", {
1721
- className: "text-muted-foreground list-inside list-disc space-y-2",
1586
+ /* @__PURE__ */ jsxs6("div", {
1587
+ className: "space-y-3",
1722
1588
  children: [
1723
- /* @__PURE__ */ jsxs6("li", {
1724
- children: [
1725
- /* @__PURE__ */ jsx6("strong", {
1726
- children: "Hide or show fields"
1727
- }),
1728
- " – Remove fields from forms or detail views (but only if the user has permission to see them in the first place)"
1729
- ]
1730
- }),
1731
- /* @__PURE__ */ jsxs6("li", {
1589
+ /* @__PURE__ */ jsxs6("div", {
1732
1590
  children: [
1733
- /* @__PURE__ */ jsx6("strong", {
1734
- children: "Reorder fields"
1591
+ /* @__PURE__ */ jsx6("h3", {
1592
+ className: "font-semibold text-lg",
1593
+ children: "Identifiers"
1735
1594
  }),
1736
- " Change the order in which fields appear"
1595
+ /* @__PURE__ */ jsxs6("p", {
1596
+ className: "text-muted-foreground",
1597
+ children: [
1598
+ "Each workflow has a unique",
1599
+ " ",
1600
+ /* @__PURE__ */ jsx6("code", {
1601
+ className: "rounded bg-background/50 px-2 py-1",
1602
+ children: "workflowId"
1603
+ }),
1604
+ " ",
1605
+ "and a",
1606
+ " ",
1607
+ /* @__PURE__ */ jsx6("code", {
1608
+ className: "rounded bg-background/50 px-2 py-1",
1609
+ children: "version"
1610
+ }),
1611
+ ". This allows you to run multiple versions of the same workflow simultaneously during migrations or A/B tests."
1612
+ ]
1613
+ })
1737
1614
  ]
1738
1615
  }),
1739
- /* @__PURE__ */ jsxs6("li", {
1616
+ /* @__PURE__ */ jsxs6("div", {
1740
1617
  children: [
1741
- /* @__PURE__ */ jsx6("strong", {
1742
- children: "Rename labels"
1618
+ /* @__PURE__ */ jsx6("h3", {
1619
+ className: "font-semibold text-lg",
1620
+ children: "Steps"
1743
1621
  }),
1744
- " Use different terminology that's more familiar to the user"
1622
+ /* @__PURE__ */ jsxs6("p", {
1623
+ className: "text-muted-foreground",
1624
+ children: [
1625
+ "A workflow is composed of ",
1626
+ /* @__PURE__ */ jsx6("strong", {
1627
+ children: "steps"
1628
+ }),
1629
+ ". Each step invokes a",
1630
+ " ",
1631
+ /* @__PURE__ */ jsx6(Link6, {
1632
+ href: "/docs/specs/capabilities",
1633
+ className: "text-violet-400 hover:text-violet-300",
1634
+ children: "CapabilitySpec"
1635
+ }),
1636
+ ", passes inputs, and receives outputs. Steps can run sequentially or in parallel."
1637
+ ]
1638
+ })
1745
1639
  ]
1746
1640
  }),
1747
- /* @__PURE__ */ jsxs6("li", {
1641
+ /* @__PURE__ */ jsxs6("div", {
1748
1642
  children: [
1749
- /* @__PURE__ */ jsx6("strong", {
1750
- children: "Change layouts"
1643
+ /* @__PURE__ */ jsx6("h3", {
1644
+ className: "font-semibold text-lg",
1645
+ children: "Transitions"
1751
1646
  }),
1752
- " Switch between list, grid, or card views"
1647
+ /* @__PURE__ */ jsxs6("p", {
1648
+ className: "text-muted-foreground",
1649
+ children: [
1650
+ /* @__PURE__ */ jsx6("strong", {
1651
+ children: "Transitions"
1652
+ }),
1653
+ ' define the flow between steps. They can be conditional (e.g., "if payment succeeds, go to step 3; otherwise, go to step 5") or unconditional.'
1654
+ ]
1655
+ })
1753
1656
  ]
1754
1657
  }),
1755
- /* @__PURE__ */ jsxs6("li", {
1658
+ /* @__PURE__ */ jsxs6("div", {
1756
1659
  children: [
1757
- /* @__PURE__ */ jsx6("strong", {
1758
- children: "Add help text"
1660
+ /* @__PURE__ */ jsx6("h3", {
1661
+ className: "font-semibold text-lg",
1662
+ children: "Retries"
1759
1663
  }),
1760
- " Provide context-specific guidance"
1664
+ /* @__PURE__ */ jsx6("p", {
1665
+ className: "text-muted-foreground",
1666
+ children: "If a step fails, the workflow can retry it with exponential backoff. You specify the maximum number of retries and the backoff strategy in the spec."
1667
+ })
1761
1668
  ]
1762
1669
  }),
1763
- /* @__PURE__ */ jsxs6("li", {
1670
+ /* @__PURE__ */ jsxs6("div", {
1764
1671
  children: [
1765
- /* @__PURE__ */ jsx6("strong", {
1766
- children: "Set default values"
1672
+ /* @__PURE__ */ jsx6("h3", {
1673
+ className: "font-semibold text-lg",
1674
+ children: "Compensation"
1767
1675
  }),
1768
- " Pre-fill forms with tenant-specific defaults"
1676
+ /* @__PURE__ */ jsxs6("p", {
1677
+ className: "text-muted-foreground",
1678
+ children: [
1679
+ "When a workflow fails partway through,",
1680
+ " ",
1681
+ /* @__PURE__ */ jsx6("strong", {
1682
+ children: "compensation"
1683
+ }),
1684
+ " steps undo the effects of completed steps (e.g., refunding a payment, releasing a reservation). This ensures consistency even in failure scenarios."
1685
+ ]
1686
+ })
1769
1687
  ]
1770
1688
  }),
1771
- /* @__PURE__ */ jsxs6("li", {
1689
+ /* @__PURE__ */ jsxs6("div", {
1772
1690
  children: [
1773
- /* @__PURE__ */ jsx6("strong", {
1774
- children: "Apply branding"
1691
+ /* @__PURE__ */ jsx6("h3", {
1692
+ className: "font-semibold text-lg",
1693
+ children: "SLAs"
1775
1694
  }),
1776
- " Customize colors, logos, and styling (within approved themes)"
1695
+ /* @__PURE__ */ jsx6("p", {
1696
+ className: "text-muted-foreground",
1697
+ children: "You can define Service Level Agreements (SLAs) for each step or the entire workflow. If a step exceeds its SLA, the system can trigger alerts or escalations."
1698
+ })
1777
1699
  ]
1778
1700
  })
1779
1701
  ]
@@ -1784,54 +1706,69 @@ function SpecsOverlaysPage() {
1784
1706
  className: "space-y-4",
1785
1707
  children: [
1786
1708
  /* @__PURE__ */ jsx6("h2", {
1787
- className: "text-2xl font-bold",
1788
- children: "Example OverlaySpec"
1709
+ className: "font-bold text-2xl",
1710
+ children: "Example WorkflowSpec (TypeScript)"
1789
1711
  }),
1790
1712
  /* @__PURE__ */ jsx6("p", {
1791
1713
  className: "text-muted-foreground",
1792
- children: "Here's an overlay that customizes an order form:"
1714
+ children: "Here's a simplified example of a payment workflow in TypeScript:"
1793
1715
  }),
1794
1716
  /* @__PURE__ */ jsx6("div", {
1795
- className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
1717
+ className: "overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",
1796
1718
  children: /* @__PURE__ */ jsx6("pre", {
1797
- children: `overlayId: acme-order-form
1798
- version: '1.0.0'.0.0
1799
- appliesTo:
1800
- capability: createOrder
1801
- tenantId: acme-corp
1802
-
1803
- modifications:
1804
- - type: hideField
1805
- field: internalNotes
1806
- reason: "ACME doesn't use internal notes"
1807
-
1808
- - type: renameLabel
1809
- field: customerReference
1810
- newLabel: "PO Number"
1811
-
1812
- - type: reorderFields
1813
- fields:
1814
- - customerReference
1815
- - items
1816
- - shippingAddress
1817
- - billingAddress
1818
- - paymentMethod
1819
-
1820
- - type: setDefault
1821
- field: paymentMethod
1822
- value: "net30"
1823
-
1824
- - type: addHelpText
1825
- field: customerReference
1826
- text: "Enter your purchase order number from your procurement system"
1827
-
1828
- - type: makeRequired
1829
- field: customerReference
1830
-
1831
- signature:
1832
- algorithm: EdDSA
1833
- publicKey: "acme-corp-overlay-key"
1834
- signature: "base64-encoded-signature"`
1719
+ children: `import { defineWorkflow } from '@contractspec/lib.contracts-spec/workflow';
1720
+ import { ValidatePaymentMethod, ChargePayment, SendEmail } from './specs';
1721
+
1722
+ export const PaymentFlow = defineWorkflow({
1723
+ meta: {
1724
+ key: 'payment.flow',
1725
+ version: '1.0.0',
1726
+ description: 'End-to-end payment processing',
1727
+ owners: ['team-payments'],
1728
+ tags: ['payments'],
1729
+ stability: 'stable',
1730
+ },
1731
+ steps: [
1732
+ {
1733
+ id: 'validate-payment',
1734
+ operation: ValidatePaymentMethod,
1735
+ inputs: (ctx, input) => ({
1736
+ userId: ctx.userId,
1737
+ paymentMethodId: input.paymentMethodId,
1738
+ }),
1739
+ retry: {
1740
+ maxAttempts: 3,
1741
+ backoff: 'exponential',
1742
+ },
1743
+ onSuccess: 'charge-payment',
1744
+ onFailure: 'notify-user',
1745
+ },
1746
+ {
1747
+ id: 'charge-payment',
1748
+ operation: ChargePayment,
1749
+ inputs: (ctx, input, steps) => ({
1750
+ amount: input.amount,
1751
+ paymentMethodId: input.paymentMethodId,
1752
+ }),
1753
+ compensation: 'refund-payment',
1754
+ onSuccess: 'send-receipt',
1755
+ onFailure: 'notify-admin',
1756
+ },
1757
+ {
1758
+ id: 'send-receipt',
1759
+ operation: SendEmail,
1760
+ inputs: (ctx, input, steps) => ({
1761
+ to: ctx.userEmail,
1762
+ template: 'payment-receipt',
1763
+ data: steps['charge-payment'].output,
1764
+ }),
1765
+ },
1766
+ ],
1767
+ sla: {
1768
+ maxDuration: 30000, // milliseconds
1769
+ alertOnBreach: true,
1770
+ },
1771
+ });`
1835
1772
  })
1836
1773
  })
1837
1774
  ]
@@ -1840,125 +1777,49 @@ signature:
1840
1777
  className: "space-y-4",
1841
1778
  children: [
1842
1779
  /* @__PURE__ */ jsx6("h2", {
1843
- className: "text-2xl font-bold",
1844
- children: "Safety guarantees"
1780
+ className: "font-bold text-2xl",
1781
+ children: "Triggers"
1845
1782
  }),
1846
1783
  /* @__PURE__ */ jsx6("p", {
1847
1784
  className: "text-muted-foreground",
1848
- children: "Overlays are powerful, but they must not compromise security or data integrity. ContractSpec enforces several guarantees:"
1785
+ children: "Workflows can be triggered in several ways:"
1849
1786
  }),
1850
1787
  /* @__PURE__ */ jsxs6("ul", {
1851
- className: "text-muted-foreground list-inside list-disc space-y-2",
1788
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1852
1789
  children: [
1853
1790
  /* @__PURE__ */ jsxs6("li", {
1854
1791
  children: [
1855
1792
  /* @__PURE__ */ jsx6("strong", {
1856
- children: "Overlays cannot grant new permissions"
1857
- }),
1858
- " – They can only hide or rearrange what the user is already allowed to see"
1859
- ]
1860
- }),
1861
- /* @__PURE__ */ jsxs6("li", {
1862
- children: [
1863
- /* @__PURE__ */ jsx6("strong", {
1864
- children: "Overlays cannot bypass validation"
1865
- }),
1866
- " – Field types, constraints, and business rules from the underlying spec still apply"
1867
- ]
1868
- }),
1869
- /* @__PURE__ */ jsxs6("li", {
1870
- children: [
1871
- /* @__PURE__ */ jsx6("strong", {
1872
- children: "Overlays must be signed"
1873
- }),
1874
- " – Only authorized parties (typically tenant admins) can create overlays"
1875
- ]
1876
- }),
1877
- /* @__PURE__ */ jsxs6("li", {
1878
- children: [
1879
- /* @__PURE__ */ jsx6("strong", {
1880
- children: "Overlays are versioned"
1793
+ children: "Manual invocation"
1881
1794
  }),
1882
- " – Changes to overlays are tracked and can be rolled back"
1795
+ " – A user or system calls the workflow via an API endpoint."
1883
1796
  ]
1884
1797
  }),
1885
1798
  /* @__PURE__ */ jsxs6("li", {
1886
1799
  children: [
1887
1800
  /* @__PURE__ */ jsx6("strong", {
1888
- children: "Overlays are audited"
1889
- }),
1890
- " – Every overlay application is logged"
1891
- ]
1892
- })
1893
- ]
1894
- })
1895
- ]
1896
- }),
1897
- /* @__PURE__ */ jsxs6("div", {
1898
- className: "space-y-4",
1899
- children: [
1900
- /* @__PURE__ */ jsx6("h2", {
1901
- className: "text-2xl font-bold",
1902
- children: "Creating overlays"
1903
- }),
1904
- /* @__PURE__ */ jsx6("p", {
1905
- className: "text-muted-foreground",
1906
- children: "Overlays can be created through:"
1907
- }),
1908
- /* @__PURE__ */ jsxs6("ul", {
1909
- className: "text-muted-foreground list-inside list-disc space-y-2",
1910
- children: [
1911
- /* @__PURE__ */ jsxs6("li", {
1912
- children: [
1913
- /* @__PURE__ */ jsx6("strong", {
1914
- children: "Visual editor"
1801
+ children: "Event-driven"
1915
1802
  }),
1916
- " – A drag-and-drop interface for non-technical users"
1803
+ " – The workflow starts automatically when a specific event occurs (e.g., a new order is created)."
1917
1804
  ]
1918
1805
  }),
1919
1806
  /* @__PURE__ */ jsxs6("li", {
1920
1807
  children: [
1921
1808
  /* @__PURE__ */ jsx6("strong", {
1922
- children: "TypeScript/JSON"
1809
+ children: "Scheduled"
1923
1810
  }),
1924
- " – For developers who prefer code"
1811
+ " – The workflow runs on a cron schedule (e.g., nightly batch processing)."
1925
1812
  ]
1926
1813
  }),
1927
1814
  /* @__PURE__ */ jsxs6("li", {
1928
1815
  children: [
1929
1816
  /* @__PURE__ */ jsx6("strong", {
1930
- children: "API"
1817
+ children: "Chained"
1931
1818
  }),
1932
- " – Programmatically create overlays for automation"
1819
+ " – One workflow can invoke another as a step."
1933
1820
  ]
1934
1821
  })
1935
1822
  ]
1936
- }),
1937
- /* @__PURE__ */ jsx6("p", {
1938
- className: "text-muted-foreground",
1939
- children: "Once created, overlays must be signed using a private key. The corresponding public key is registered with ContractSpec, which verifies the signature before applying the overlay."
1940
- }),
1941
- /* @__PURE__ */ jsxs6("p", {
1942
- className: "text-muted-foreground",
1943
- children: [
1944
- "See",
1945
- " ",
1946
- /* @__PURE__ */ jsx6(Link6, {
1947
- href: "/docs/libraries/overlay-engine",
1948
- className: "text-violet-400 underline",
1949
- children: "Overlay Engine docs"
1950
- }),
1951
- " ",
1952
- "and the",
1953
- " ",
1954
- /* @__PURE__ */ jsx6(Link6, {
1955
- href: "/docs/advanced/overlay-editor",
1956
- className: "text-violet-400 underline",
1957
- children: "Overlay Editor guide"
1958
- }),
1959
- " ",
1960
- "for end-to-end workflows."
1961
- ]
1962
1823
  })
1963
1824
  ]
1964
1825
  }),
@@ -1966,53 +1827,33 @@ signature:
1966
1827
  className: "space-y-4",
1967
1828
  children: [
1968
1829
  /* @__PURE__ */ jsx6("h2", {
1969
- className: "text-2xl font-bold",
1970
- children: "Overlay scope"
1830
+ className: "font-bold text-2xl",
1831
+ children: "Monitoring and versioning"
1971
1832
  }),
1972
1833
  /* @__PURE__ */ jsx6("p", {
1973
1834
  className: "text-muted-foreground",
1974
- children: "Overlays can be scoped to:"
1835
+ children: "ContractSpec automatically instruments workflows with telemetry. You can view:"
1975
1836
  }),
1976
1837
  /* @__PURE__ */ jsxs6("ul", {
1977
- className: "text-muted-foreground list-inside list-disc space-y-2",
1838
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
1978
1839
  children: [
1979
- /* @__PURE__ */ jsxs6("li", {
1980
- children: [
1981
- /* @__PURE__ */ jsx6("strong", {
1982
- children: "Tenant"
1983
- }),
1984
- " – All users in a tenant see the same overlay"
1985
- ]
1840
+ /* @__PURE__ */ jsx6("li", {
1841
+ children: "Real-time execution status for each step"
1986
1842
  }),
1987
- /* @__PURE__ */ jsxs6("li", {
1988
- children: [
1989
- /* @__PURE__ */ jsx6("strong", {
1990
- children: "User"
1991
- }),
1992
- " – Individual users can have personal overlays"
1993
- ]
1843
+ /* @__PURE__ */ jsx6("li", {
1844
+ children: "Historical run data and success/failure rates"
1994
1845
  }),
1995
- /* @__PURE__ */ jsxs6("li", {
1996
- children: [
1997
- /* @__PURE__ */ jsx6("strong", {
1998
- children: "Role"
1999
- }),
2000
- " – All users with a specific role see the overlay"
2001
- ]
1846
+ /* @__PURE__ */ jsx6("li", {
1847
+ children: "Latency distributions and SLA compliance"
2002
1848
  }),
2003
- /* @__PURE__ */ jsxs6("li", {
2004
- children: [
2005
- /* @__PURE__ */ jsx6("strong", {
2006
- children: "Device"
2007
- }),
2008
- " – Different overlays for mobile vs desktop"
2009
- ]
1849
+ /* @__PURE__ */ jsx6("li", {
1850
+ children: "Compensation events and retry attempts"
2010
1851
  })
2011
1852
  ]
2012
1853
  }),
2013
1854
  /* @__PURE__ */ jsx6("p", {
2014
1855
  className: "text-muted-foreground",
2015
- children: "If multiple overlays apply to the same user, they are merged in order of specificity (user overlays override role overlays, which override tenant overlays)."
1856
+ children: "When you update a workflow, you increment its version. Running workflows continue on their original version, while new invocations use the latest version. This allows safe, zero-downtime deployments."
2016
1857
  })
2017
1858
  ]
2018
1859
  }),
@@ -2020,29 +1861,26 @@ signature:
2020
1861
  className: "space-y-4",
2021
1862
  children: [
2022
1863
  /* @__PURE__ */ jsx6("h2", {
2023
- className: "text-2xl font-bold",
1864
+ className: "font-bold text-2xl",
2024
1865
  children: "Best practices"
2025
1866
  }),
2026
1867
  /* @__PURE__ */ jsxs6("ul", {
2027
- className: "text-muted-foreground list-inside list-disc space-y-2",
1868
+ className: "list-inside list-disc space-y-2 text-muted-foreground",
2028
1869
  children: [
2029
1870
  /* @__PURE__ */ jsx6("li", {
2030
- children: "Start with the default UI and only create overlays when users request specific changes."
2031
- }),
2032
- /* @__PURE__ */ jsx6("li", {
2033
- children: "Document why each overlay modification was made—this helps when reviewing or updating overlays."
1871
+ children: "Keep steps idempotent they should be safe to retry without side effects."
2034
1872
  }),
2035
1873
  /* @__PURE__ */ jsx6("li", {
2036
- children: "Test overlays thoroughly to ensure they don't break workflows or confuse users."
1874
+ children: "Define compensation for any step that modifies external state."
2037
1875
  }),
2038
1876
  /* @__PURE__ */ jsx6("li", {
2039
- children: "Use tenant-level overlays for organizational customizations and user-level overlays for personal preferences."
1877
+ children: "Use meaningful step IDs that describe the operation."
2040
1878
  }),
2041
1879
  /* @__PURE__ */ jsx6("li", {
2042
- children: "Regularly review overlays to remove ones that are no longer needed."
1880
+ children: "Set realistic SLAs and monitor them in production."
2043
1881
  }),
2044
1882
  /* @__PURE__ */ jsx6("li", {
2045
- children: "Protect overlay signing keys carefully—they control what customizations are allowed."
1883
+ children: "Test failure scenarios locally before deploying."
2046
1884
  })
2047
1885
  ]
2048
1886
  })
@@ -2052,15 +1890,15 @@ signature:
2052
1890
  className: "flex items-center gap-4 pt-4",
2053
1891
  children: [
2054
1892
  /* @__PURE__ */ jsx6(Link6, {
2055
- href: "/docs/specs/policy",
1893
+ href: "/docs/specs/capabilities",
2056
1894
  className: "btn-ghost",
2057
- children: "Previous: Policy"
1895
+ children: "Previous: Capabilities"
2058
1896
  }),
2059
1897
  /* @__PURE__ */ jsxs6(Link6, {
2060
1898
  href: "/docs/safety",
2061
1899
  className: "btn-primary",
2062
1900
  children: [
2063
- "Next: Safety ",
1901
+ "Next: Safety Features ",
2064
1902
  /* @__PURE__ */ jsx6(ChevronRight6, {
2065
1903
  size: 16
2066
1904
  })