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