@contractspec/lib.contracts-spec 2.0.0

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 (1058) hide show
  1. package/README.md +3 -0
  2. package/dist/app-config/app-config.capability.d.ts +1 -0
  3. package/dist/app-config/app-config.capability.js +730 -0
  4. package/dist/app-config/app-config.contracts.d.ts +239 -0
  5. package/dist/app-config/app-config.contracts.js +713 -0
  6. package/dist/app-config/app-config.contracts.test.d.ts +1 -0
  7. package/dist/app-config/app-config.feature.d.ts +5 -0
  8. package/dist/app-config/app-config.feature.js +255 -0
  9. package/dist/app-config/branding.d.ts +52 -0
  10. package/dist/app-config/branding.js +1 -0
  11. package/dist/app-config/branding.test.d.ts +1 -0
  12. package/dist/app-config/docs/app-config.docblock.d.ts +2 -0
  13. package/dist/app-config/docs/app-config.docblock.js +383 -0
  14. package/dist/app-config/events.d.ts +115 -0
  15. package/dist/app-config/events.js +386 -0
  16. package/dist/app-config/events.test.d.ts +1 -0
  17. package/dist/app-config/index.d.ts +9 -0
  18. package/dist/app-config/index.js +2899 -0
  19. package/dist/app-config/lifecycle-contracts.d.ts +265 -0
  20. package/dist/app-config/lifecycle-contracts.js +870 -0
  21. package/dist/app-config/lifecycle-contracts.test.d.ts +1 -0
  22. package/dist/app-config/lifecycle.d.ts +23 -0
  23. package/dist/app-config/lifecycle.js +1 -0
  24. package/dist/app-config/lifecycle.test.d.ts +1 -0
  25. package/dist/app-config/runtime.d.ts +111 -0
  26. package/dist/app-config/runtime.js +734 -0
  27. package/dist/app-config/runtime.test.d.ts +1 -0
  28. package/dist/app-config/spec.d.ts +169 -0
  29. package/dist/app-config/spec.js +229 -0
  30. package/dist/app-config/spec.test.d.ts +1 -0
  31. package/dist/app-config/validation.d.ts +43 -0
  32. package/dist/app-config/validation.js +650 -0
  33. package/dist/app-config/validation.test.d.ts +1 -0
  34. package/dist/capabilities/capabilities.d.ts +96 -0
  35. package/dist/capabilities/capabilities.js +217 -0
  36. package/dist/capabilities/capabilities.test.d.ts +1 -0
  37. package/dist/capabilities/context.d.ts +110 -0
  38. package/dist/capabilities/context.js +101 -0
  39. package/dist/capabilities/context.test.d.ts +1 -0
  40. package/dist/capabilities/docs/capabilities.docblock.d.ts +2 -0
  41. package/dist/capabilities/docs/capabilities.docblock.js +353 -0
  42. package/dist/capabilities/guards.d.ts +121 -0
  43. package/dist/capabilities/guards.js +177 -0
  44. package/dist/capabilities/index.d.ts +6 -0
  45. package/dist/capabilities/index.js +739 -0
  46. package/dist/capabilities/meeting-recorder.d.ts +5 -0
  47. package/dist/capabilities/meeting-recorder.js +154 -0
  48. package/dist/capabilities/openbanking.d.ts +5 -0
  49. package/dist/capabilities/openbanking.js +166 -0
  50. package/dist/capabilities/validation.d.ts +79 -0
  51. package/dist/capabilities/validation.js +185 -0
  52. package/dist/capabilities/validation.test.d.ts +1 -0
  53. package/dist/contract-registry/index.d.ts +3 -0
  54. package/dist/contract-registry/index.js +129 -0
  55. package/dist/contract-registry/schemas.d.ts +120 -0
  56. package/dist/contract-registry/schemas.js +129 -0
  57. package/dist/contract-registry/schemas.test.d.ts +1 -0
  58. package/dist/contract-registry/types.d.ts +42 -0
  59. package/dist/contract-registry/types.js +1 -0
  60. package/dist/data-views/data-views.d.ts +4 -0
  61. package/dist/data-views/data-views.js +232 -0
  62. package/dist/data-views/data-views.test.d.ts +1 -0
  63. package/dist/data-views/docs/data-views.docblock.d.ts +2 -0
  64. package/dist/data-views/docs/data-views.docblock.js +164 -0
  65. package/dist/data-views/index.d.ts +4 -0
  66. package/dist/data-views/index.js +232 -0
  67. package/dist/data-views/query-generator.d.ts +35 -0
  68. package/dist/data-views/query-generator.js +89 -0
  69. package/dist/data-views/registry.d.ts +12 -0
  70. package/dist/data-views/registry.js +226 -0
  71. package/dist/data-views/registry.test.d.ts +1 -0
  72. package/dist/data-views/report/contractVerificationTable.d.ts +4 -0
  73. package/dist/data-views/report/contractVerificationTable.js +240 -0
  74. package/dist/data-views/report/contractVerificationTable.test.d.ts +1 -0
  75. package/dist/data-views/runtime.d.ts +25 -0
  76. package/dist/data-views/runtime.js +108 -0
  77. package/dist/data-views/runtime.test.d.ts +1 -0
  78. package/dist/data-views/spec.d.ts +22 -0
  79. package/dist/data-views/spec.js +38 -0
  80. package/dist/data-views/spec.test.d.ts +1 -0
  81. package/dist/data-views/types.d.ts +152 -0
  82. package/dist/data-views/types.js +1 -0
  83. package/dist/data-views/types.test.d.ts +1 -0
  84. package/dist/docs/accessibility_wcag_compliance_specs.docblock.d.ts +2 -0
  85. package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +513 -0
  86. package/dist/docs/capabilities/documentationSystem.capability.d.ts +1 -0
  87. package/dist/docs/capabilities/documentationSystem.capability.js +784 -0
  88. package/dist/docs/capabilities/index.d.ts +1 -0
  89. package/dist/docs/capabilities/index.js +784 -0
  90. package/dist/docs/commands/docsGenerate.command.d.ts +88 -0
  91. package/dist/docs/commands/docsGenerate.command.js +802 -0
  92. package/dist/docs/commands/docsPublish.command.d.ts +57 -0
  93. package/dist/docs/commands/docsPublish.command.js +781 -0
  94. package/dist/docs/commands/index.d.ts +2 -0
  95. package/dist/docs/commands/index.js +906 -0
  96. package/dist/docs/constants.d.ts +4 -0
  97. package/dist/docs/constants.js +78 -0
  98. package/dist/docs/contracts.d.ts +430 -0
  99. package/dist/docs/contracts.js +1611 -0
  100. package/dist/docs/ensure-docblocks.d.ts +1 -0
  101. package/dist/docs/ensure-docblocks.js +264 -0
  102. package/dist/docs/events/docsGenerated.event.d.ts +56 -0
  103. package/dist/docs/events/docsGenerated.event.js +533 -0
  104. package/dist/docs/events/docsPublished.event.d.ts +64 -0
  105. package/dist/docs/events/docsPublished.event.js +534 -0
  106. package/dist/docs/events/index.d.ts +2 -0
  107. package/dist/docs/events/index.js +567 -0
  108. package/dist/docs/forms/docsSearch.form.d.ts +16 -0
  109. package/dist/docs/forms/docsSearch.form.js +676 -0
  110. package/dist/docs/forms/index.d.ts +1 -0
  111. package/dist/docs/forms/index.js +676 -0
  112. package/dist/docs/index.d.ts +40 -0
  113. package/dist/docs/index.js +4719 -0
  114. package/dist/docs/meta.docs.d.ts +2 -0
  115. package/dist/docs/meta.docs.js +176 -0
  116. package/dist/docs/presentations/docsLayout.presentation.d.ts +2 -0
  117. package/dist/docs/presentations/docsLayout.presentation.js +527 -0
  118. package/dist/docs/presentations/docsReferencePage.presentation.d.ts +2 -0
  119. package/dist/docs/presentations/docsReferencePage.presentation.js +527 -0
  120. package/dist/docs/presentations/index.d.ts +2 -0
  121. package/dist/docs/presentations/index.js +555 -0
  122. package/dist/docs/presentations.d.ts +27 -0
  123. package/dist/docs/presentations.js +97 -0
  124. package/dist/docs/presentations.test.d.ts +1 -0
  125. package/dist/docs/queries/contractReference.query.d.ts +211 -0
  126. package/dist/docs/queries/contractReference.query.js +752 -0
  127. package/dist/docs/queries/docsIndex.query.d.ts +266 -0
  128. package/dist/docs/queries/docsIndex.query.js +752 -0
  129. package/dist/docs/queries/index.d.ts +2 -0
  130. package/dist/docs/queries/index.js +827 -0
  131. package/dist/docs/registry.d.ts +19 -0
  132. package/dist/docs/registry.js +153 -0
  133. package/dist/docs/registry.test.d.ts +1 -0
  134. package/dist/docs/tech/auth/better-auth-nextjs.docblock.d.ts +2 -0
  135. package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +221 -0
  136. package/dist/docs/tech/cli.docblock.d.ts +2 -0
  137. package/dist/docs/tech/cli.docblock.js +291 -0
  138. package/dist/docs/tech/contracts/README.docblock.d.ts +2 -0
  139. package/dist/docs/tech/contracts/README.docblock.js +164 -0
  140. package/dist/docs/tech/contracts/migrations.docblock.d.ts +2 -0
  141. package/dist/docs/tech/contracts/migrations.docblock.js +164 -0
  142. package/dist/docs/tech/contracts/openapi-export.docblock.d.ts +2 -0
  143. package/dist/docs/tech/contracts/openapi-export.docblock.js +201 -0
  144. package/dist/docs/tech/contracts/openapi-import.docblock.d.ts +2 -0
  145. package/dist/docs/tech/contracts/openapi-import.docblock.js +207 -0
  146. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.d.ts +2 -0
  147. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +225 -0
  148. package/dist/docs/tech/contracts/overlays.docblock.d.ts +2 -0
  149. package/dist/docs/tech/contracts/overlays.docblock.js +231 -0
  150. package/dist/docs/tech/contracts/tests.docblock.d.ts +2 -0
  151. package/dist/docs/tech/contracts/tests.docblock.js +164 -0
  152. package/dist/docs/tech/contracts/themes.docblock.d.ts +2 -0
  153. package/dist/docs/tech/contracts/themes.docblock.js +257 -0
  154. package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.d.ts +2 -0
  155. package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +269 -0
  156. package/dist/docs/tech/docs-system.docblock.d.ts +1 -0
  157. package/dist/docs/tech/docs-system.docblock.js +264 -0
  158. package/dist/docs/tech/lifecycle-stage-system.docblock.d.ts +2 -0
  159. package/dist/docs/tech/lifecycle-stage-system.docblock.js +376 -0
  160. package/dist/docs/tech/llm/llm-integration.docblock.d.ts +7 -0
  161. package/dist/docs/tech/llm/llm-integration.docblock.js +482 -0
  162. package/dist/docs/tech/mcp-endpoints.docblock.d.ts +2 -0
  163. package/dist/docs/tech/mcp-endpoints.docblock.js +185 -0
  164. package/dist/docs/tech/presentation-runtime.docblock.d.ts +2 -0
  165. package/dist/docs/tech/presentation-runtime.docblock.js +221 -0
  166. package/dist/docs/tech/report-verification-table.docblock.d.ts +1 -0
  167. package/dist/docs/tech/report-verification-table.docblock.js +191 -0
  168. package/dist/docs/tech/report-verification-table.test.d.ts +1 -0
  169. package/dist/docs/tech/schema/README.docblock.d.ts +2 -0
  170. package/dist/docs/tech/schema/README.docblock.js +164 -0
  171. package/dist/docs/tech/studio/learning-events.docblock.d.ts +2 -0
  172. package/dist/docs/tech/studio/learning-events.docblock.js +190 -0
  173. package/dist/docs/tech/studio/learning-journeys.docblock.d.ts +2 -0
  174. package/dist/docs/tech/studio/learning-journeys.docblock.js +227 -0
  175. package/dist/docs/tech/studio/platform-admin-panel.docblock.d.ts +2 -0
  176. package/dist/docs/tech/studio/platform-admin-panel.docblock.js +226 -0
  177. package/dist/docs/tech/studio/project-access-teams.docblock.d.ts +2 -0
  178. package/dist/docs/tech/studio/project-access-teams.docblock.js +200 -0
  179. package/dist/docs/tech/studio/project-routing.docblock.d.ts +2 -0
  180. package/dist/docs/tech/studio/project-routing.docblock.js +209 -0
  181. package/dist/docs/tech/studio/sandbox-unlogged.docblock.d.ts +2 -0
  182. package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +183 -0
  183. package/dist/docs/tech/studio/team-invitations.docblock.d.ts +2 -0
  184. package/dist/docs/tech/studio/team-invitations.docblock.js +228 -0
  185. package/dist/docs/tech/studio/workspace-ops.docblock.d.ts +2 -0
  186. package/dist/docs/tech/studio/workspace-ops.docblock.js +189 -0
  187. package/dist/docs/tech/studio/workspaces.docblock.d.ts +2 -0
  188. package/dist/docs/tech/studio/workspaces.docblock.js +204 -0
  189. package/dist/docs/tech/telemetry-ingest.docblock.d.ts +2 -0
  190. package/dist/docs/tech/telemetry-ingest.docblock.js +305 -0
  191. package/dist/docs/tech/vscode-extension.docblock.d.ts +2 -0
  192. package/dist/docs/tech/vscode-extension.docblock.js +241 -0
  193. package/dist/docs/tech-contracts.docs.d.ts +2 -0
  194. package/dist/docs/tech-contracts.docs.js +239 -0
  195. package/dist/docs/types.d.ts +37 -0
  196. package/dist/docs/types.js +1 -0
  197. package/dist/docs/views/contractReference.dataView.d.ts +2 -0
  198. package/dist/docs/views/contractReference.dataView.js +838 -0
  199. package/dist/docs/views/docsIndex.dataView.d.ts +2 -0
  200. package/dist/docs/views/docsIndex.dataView.js +832 -0
  201. package/dist/docs/views/exampleCatalog.dataView.d.ts +2 -0
  202. package/dist/docs/views/exampleCatalog.dataView.js +816 -0
  203. package/dist/docs/views/index.d.ts +3 -0
  204. package/dist/docs/views/index.js +1031 -0
  205. package/dist/events.d.ts +142 -0
  206. package/dist/events.js +228 -0
  207. package/dist/events.test.d.ts +1 -0
  208. package/dist/examples/define.d.ts +5 -0
  209. package/dist/examples/define.js +36 -0
  210. package/dist/examples/docs/examples.docblock.d.ts +2 -0
  211. package/dist/examples/docs/examples.docblock.js +307 -0
  212. package/dist/examples/index.d.ts +7 -0
  213. package/dist/examples/index.js +604 -0
  214. package/dist/examples/registry.d.ts +38 -0
  215. package/dist/examples/registry.js +286 -0
  216. package/dist/examples/registry.test.d.ts +1 -0
  217. package/dist/examples/schema.d.ts +278 -0
  218. package/dist/examples/schema.js +166 -0
  219. package/dist/examples/schema.test.d.ts +1 -0
  220. package/dist/examples/types.d.ts +162 -0
  221. package/dist/examples/types.js +77 -0
  222. package/dist/examples/types.test.d.ts +1 -0
  223. package/dist/examples/validation.d.ts +61 -0
  224. package/dist/examples/validation.js +287 -0
  225. package/dist/examples/validation.test.d.ts +1 -0
  226. package/dist/experiments/docs/experiments.docblock.d.ts +2 -0
  227. package/dist/experiments/docs/experiments.docblock.js +291 -0
  228. package/dist/experiments/evaluator.d.ts +33 -0
  229. package/dist/experiments/evaluator.js +155 -0
  230. package/dist/experiments/evaluator.test.d.ts +1 -0
  231. package/dist/experiments/spec-resolver.d.ts +12 -0
  232. package/dist/experiments/spec-resolver.js +1 -0
  233. package/dist/experiments/spec.d.ts +79 -0
  234. package/dist/experiments/spec.js +227 -0
  235. package/dist/experiments/spec.test.d.ts +1 -0
  236. package/dist/features/index.d.ts +5 -0
  237. package/dist/features/index.js +275 -0
  238. package/dist/features/install.d.ts +14 -0
  239. package/dist/features/install.js +95 -0
  240. package/dist/features/install.test.d.ts +1 -0
  241. package/dist/features/registry.d.ts +21 -0
  242. package/dist/features/registry.js +192 -0
  243. package/dist/features/registry.test.d.ts +1 -0
  244. package/dist/features/types.d.ts +82 -0
  245. package/dist/features/types.js +36 -0
  246. package/dist/features/types.test.d.ts +1 -0
  247. package/dist/features/validation.d.ts +4 -0
  248. package/dist/features/validation.js +48 -0
  249. package/dist/features/validation.test.d.ts +1 -0
  250. package/dist/features.capabilities.test.d.ts +1 -0
  251. package/dist/forms/docs/forms.docblock.d.ts +2 -0
  252. package/dist/forms/docs/forms.docblock.js +164 -0
  253. package/dist/forms/forms.d.ts +264 -0
  254. package/dist/forms/forms.js +332 -0
  255. package/dist/forms/index.d.ts +1 -0
  256. package/dist/forms/index.js +332 -0
  257. package/dist/index.d.ts +36 -0
  258. package/dist/index.js +2195 -0
  259. package/dist/install.d.ts +75 -0
  260. package/dist/install.js +60 -0
  261. package/dist/integrations/binding.d.ts +14 -0
  262. package/dist/integrations/binding.js +1 -0
  263. package/dist/integrations/connection.d.ts +47 -0
  264. package/dist/integrations/connection.js +1 -0
  265. package/dist/integrations/docs/integrations.docblock.d.ts +2 -0
  266. package/dist/integrations/docs/integrations.docblock.js +140 -0
  267. package/dist/integrations/health.d.ts +17 -0
  268. package/dist/integrations/health.js +103 -0
  269. package/dist/integrations/health.test.d.ts +1 -0
  270. package/dist/integrations/index.d.ts +11 -0
  271. package/dist/integrations/index.js +3293 -0
  272. package/dist/integrations/integrations.capability.d.ts +1 -0
  273. package/dist/integrations/integrations.capability.js +48 -0
  274. package/dist/integrations/integrations.feature.d.ts +5 -0
  275. package/dist/integrations/integrations.feature.js +63 -0
  276. package/dist/integrations/meeting-recorder/contracts/index.d.ts +7 -0
  277. package/dist/integrations/meeting-recorder/contracts/index.js +504 -0
  278. package/dist/integrations/meeting-recorder/contracts/meetings.d.ts +451 -0
  279. package/dist/integrations/meeting-recorder/contracts/meetings.js +249 -0
  280. package/dist/integrations/meeting-recorder/contracts/transcripts.d.ts +166 -0
  281. package/dist/integrations/meeting-recorder/contracts/transcripts.js +317 -0
  282. package/dist/integrations/meeting-recorder/contracts/webhooks.d.ts +85 -0
  283. package/dist/integrations/meeting-recorder/contracts/webhooks.js +202 -0
  284. package/dist/integrations/meeting-recorder/meeting-recorder.capability.d.ts +1 -0
  285. package/dist/integrations/meeting-recorder/meeting-recorder.capability.js +48 -0
  286. package/dist/integrations/meeting-recorder/meeting-recorder.feature.d.ts +5 -0
  287. package/dist/integrations/meeting-recorder/meeting-recorder.feature.js +63 -0
  288. package/dist/integrations/meeting-recorder/models.d.ts +402 -0
  289. package/dist/integrations/meeting-recorder/models.js +152 -0
  290. package/dist/integrations/meeting-recorder/telemetry.d.ts +13 -0
  291. package/dist/integrations/meeting-recorder/telemetry.js +84 -0
  292. package/dist/integrations/openbanking/contracts/accounts.d.ts +282 -0
  293. package/dist/integrations/openbanking/contracts/accounts.js +358 -0
  294. package/dist/integrations/openbanking/contracts/balances.d.ts +158 -0
  295. package/dist/integrations/openbanking/contracts/balances.js +322 -0
  296. package/dist/integrations/openbanking/contracts/index.d.ts +7 -0
  297. package/dist/integrations/openbanking/contracts/index.js +674 -0
  298. package/dist/integrations/openbanking/contracts/transactions.d.ts +206 -0
  299. package/dist/integrations/openbanking/contracts/transactions.js +328 -0
  300. package/dist/integrations/openbanking/guards.d.ts +8 -0
  301. package/dist/integrations/openbanking/guards.js +72 -0
  302. package/dist/integrations/openbanking/guards.test.d.ts +1 -0
  303. package/dist/integrations/openbanking/models.d.ts +223 -0
  304. package/dist/integrations/openbanking/models.js +140 -0
  305. package/dist/integrations/openbanking/openbanking.capability.d.ts +1 -0
  306. package/dist/integrations/openbanking/openbanking.capability.js +48 -0
  307. package/dist/integrations/openbanking/openbanking.feature.d.ts +5 -0
  308. package/dist/integrations/openbanking/openbanking.feature.js +65 -0
  309. package/dist/integrations/openbanking/telemetry.d.ts +12 -0
  310. package/dist/integrations/openbanking/telemetry.js +81 -0
  311. package/dist/integrations/operations.d.ts +430 -0
  312. package/dist/integrations/operations.js +327 -0
  313. package/dist/integrations/operations.test.d.ts +1 -0
  314. package/dist/integrations/providers/analytics-reader.d.ts +103 -0
  315. package/dist/integrations/providers/analytics-reader.js +1 -0
  316. package/dist/integrations/providers/analytics-writer.d.ts +6 -0
  317. package/dist/integrations/providers/analytics-writer.js +1 -0
  318. package/dist/integrations/providers/analytics.d.ts +47 -0
  319. package/dist/integrations/providers/analytics.js +1 -0
  320. package/dist/integrations/providers/calendar.d.ts +75 -0
  321. package/dist/integrations/providers/calendar.js +1 -0
  322. package/dist/integrations/providers/database.d.ts +12 -0
  323. package/dist/integrations/providers/database.js +1 -0
  324. package/dist/integrations/providers/elevenlabs.d.ts +3 -0
  325. package/dist/integrations/providers/elevenlabs.js +116 -0
  326. package/dist/integrations/providers/email.d.ts +83 -0
  327. package/dist/integrations/providers/email.js +1 -0
  328. package/dist/integrations/providers/embedding.d.ts +21 -0
  329. package/dist/integrations/providers/embedding.js +1 -0
  330. package/dist/integrations/providers/fal.d.ts +3 -0
  331. package/dist/integrations/providers/fal.js +142 -0
  332. package/dist/integrations/providers/fathom.d.ts +3 -0
  333. package/dist/integrations/providers/fathom.js +156 -0
  334. package/dist/integrations/providers/fireflies.d.ts +3 -0
  335. package/dist/integrations/providers/fireflies.js +136 -0
  336. package/dist/integrations/providers/gcs-storage.d.ts +3 -0
  337. package/dist/integrations/providers/gcs-storage.js +127 -0
  338. package/dist/integrations/providers/gmail.d.ts +3 -0
  339. package/dist/integrations/providers/gmail.js +139 -0
  340. package/dist/integrations/providers/google-calendar.d.ts +3 -0
  341. package/dist/integrations/providers/google-calendar.js +122 -0
  342. package/dist/integrations/providers/gradium.d.ts +3 -0
  343. package/dist/integrations/providers/gradium.js +140 -0
  344. package/dist/integrations/providers/granola.d.ts +3 -0
  345. package/dist/integrations/providers/granola.js +137 -0
  346. package/dist/integrations/providers/index.d.ts +38 -0
  347. package/dist/integrations/providers/index.js +2124 -0
  348. package/dist/integrations/providers/jira.d.ts +3 -0
  349. package/dist/integrations/providers/jira.js +138 -0
  350. package/dist/integrations/providers/linear.d.ts +3 -0
  351. package/dist/integrations/providers/linear.js +137 -0
  352. package/dist/integrations/providers/llm.d.ts +79 -0
  353. package/dist/integrations/providers/llm.js +1 -0
  354. package/dist/integrations/providers/meeting-recorder.d.ts +129 -0
  355. package/dist/integrations/providers/meeting-recorder.js +1 -0
  356. package/dist/integrations/providers/mistral.d.ts +3 -0
  357. package/dist/integrations/providers/mistral.js +124 -0
  358. package/dist/integrations/providers/notion.d.ts +3 -0
  359. package/dist/integrations/providers/notion.js +143 -0
  360. package/dist/integrations/providers/openbanking.d.ts +125 -0
  361. package/dist/integrations/providers/openbanking.js +1 -0
  362. package/dist/integrations/providers/payments.d.ts +106 -0
  363. package/dist/integrations/providers/payments.js +1 -0
  364. package/dist/integrations/providers/posthog-llm-telemetry.d.ts +51 -0
  365. package/dist/integrations/providers/posthog-llm-telemetry.js +206 -0
  366. package/dist/integrations/providers/posthog.d.ts +3 -0
  367. package/dist/integrations/providers/posthog.js +136 -0
  368. package/dist/integrations/providers/postmark.d.ts +3 -0
  369. package/dist/integrations/providers/postmark.js +128 -0
  370. package/dist/integrations/providers/powens.d.ts +3 -0
  371. package/dist/integrations/providers/powens.js +154 -0
  372. package/dist/integrations/providers/project-management.d.ts +32 -0
  373. package/dist/integrations/providers/project-management.js +1 -0
  374. package/dist/integrations/providers/providers.test.d.ts +1 -0
  375. package/dist/integrations/providers/qdrant.d.ts +3 -0
  376. package/dist/integrations/providers/qdrant.js +131 -0
  377. package/dist/integrations/providers/registry.d.ts +6 -0
  378. package/dist/integrations/providers/registry.js +1908 -0
  379. package/dist/integrations/providers/sms.d.ts +31 -0
  380. package/dist/integrations/providers/sms.js +1 -0
  381. package/dist/integrations/providers/storage.d.ts +57 -0
  382. package/dist/integrations/providers/storage.js +1 -0
  383. package/dist/integrations/providers/stripe.d.ts +3 -0
  384. package/dist/integrations/providers/stripe.js +135 -0
  385. package/dist/integrations/providers/supabase-postgres.d.ts +3 -0
  386. package/dist/integrations/providers/supabase-postgres.js +117 -0
  387. package/dist/integrations/providers/supabase-vector.d.ts +3 -0
  388. package/dist/integrations/providers/supabase-vector.js +137 -0
  389. package/dist/integrations/providers/tldv.d.ts +3 -0
  390. package/dist/integrations/providers/tldv.js +136 -0
  391. package/dist/integrations/providers/twilio-sms.d.ts +3 -0
  392. package/dist/integrations/providers/twilio-sms.js +121 -0
  393. package/dist/integrations/providers/vector-store.d.ts +39 -0
  394. package/dist/integrations/providers/vector-store.js +1 -0
  395. package/dist/integrations/providers/voice.d.ts +31 -0
  396. package/dist/integrations/providers/voice.js +1 -0
  397. package/dist/integrations/runtime.d.ts +95 -0
  398. package/dist/integrations/runtime.js +239 -0
  399. package/dist/integrations/runtime.test.d.ts +1 -0
  400. package/dist/integrations/secrets/aws-secret-manager.d.ts +28 -0
  401. package/dist/integrations/secrets/aws-secret-manager.js +376 -0
  402. package/dist/integrations/secrets/env-secret-provider.d.ts +28 -0
  403. package/dist/integrations/secrets/env-secret-provider.js +189 -0
  404. package/dist/integrations/secrets/gcp-secret-manager.d.ts +29 -0
  405. package/dist/integrations/secrets/gcp-secret-manager.js +377 -0
  406. package/dist/integrations/secrets/index.d.ts +6 -0
  407. package/dist/integrations/secrets/index.js +1159 -0
  408. package/dist/integrations/secrets/manager.d.ts +44 -0
  409. package/dist/integrations/secrets/manager.js +213 -0
  410. package/dist/integrations/secrets/provider.d.ts +49 -0
  411. package/dist/integrations/secrets/provider.js +104 -0
  412. package/dist/integrations/secrets/provider.test.d.ts +1 -0
  413. package/dist/integrations/secrets/scaleway-secret-manager.d.ts +35 -0
  414. package/dist/integrations/secrets/scaleway-secret-manager.js +405 -0
  415. package/dist/integrations/secrets-types.d.ts +14 -0
  416. package/dist/integrations/secrets-types.js +1 -0
  417. package/dist/integrations/spec.d.ts +72 -0
  418. package/dist/integrations/spec.js +52 -0
  419. package/dist/integrations/spec.test.d.ts +1 -0
  420. package/dist/jobs/define-job.d.ts +15 -0
  421. package/dist/jobs/define-job.js +41 -0
  422. package/dist/jobs/gcp-cloud-tasks.d.ts +38 -0
  423. package/dist/jobs/gcp-cloud-tasks.js +103 -0
  424. package/dist/jobs/gcp-pubsub.d.ts +22 -0
  425. package/dist/jobs/gcp-pubsub.js +91 -0
  426. package/dist/jobs/handlers/gmail-sync-handler.d.ts +5 -0
  427. package/dist/jobs/handlers/gmail-sync-handler.js +40 -0
  428. package/dist/jobs/handlers/handlers.test.d.ts +1 -0
  429. package/dist/jobs/handlers/index.d.ts +5 -0
  430. package/dist/jobs/handlers/index.js +83 -0
  431. package/dist/jobs/handlers/ping-handler.d.ts +6 -0
  432. package/dist/jobs/handlers/ping-handler.js +47 -0
  433. package/dist/jobs/handlers/storage-document-handler.d.ts +8 -0
  434. package/dist/jobs/handlers/storage-document-handler.js +47 -0
  435. package/dist/jobs/index.d.ts +2 -0
  436. package/dist/jobs/index.js +64 -0
  437. package/dist/jobs/memory-queue.d.ts +14 -0
  438. package/dist/jobs/memory-queue.js +129 -0
  439. package/dist/jobs/queue.d.ts +126 -0
  440. package/dist/jobs/queue.js +55 -0
  441. package/dist/jobs/queue.test.d.ts +1 -0
  442. package/dist/jobs/scaleway-sqs-queue.d.ts +27 -0
  443. package/dist/jobs/scaleway-sqs-queue.js +222 -0
  444. package/dist/jsonschema.d.ts +39 -0
  445. package/dist/jsonschema.js +73 -0
  446. package/dist/jsonschema.test.d.ts +1 -0
  447. package/dist/knowledge/binding.d.ts +22 -0
  448. package/dist/knowledge/binding.js +1 -0
  449. package/dist/knowledge/docs/knowledge.docblock.d.ts +2 -0
  450. package/dist/knowledge/docs/knowledge.docblock.js +301 -0
  451. package/dist/knowledge/index.d.ts +4 -0
  452. package/dist/knowledge/index.js +467 -0
  453. package/dist/knowledge/ingestion/document-processor.d.ts +22 -0
  454. package/dist/knowledge/ingestion/document-processor.js +95 -0
  455. package/dist/knowledge/ingestion/embedding-service.d.ts +8 -0
  456. package/dist/knowledge/ingestion/embedding-service.js +57 -0
  457. package/dist/knowledge/ingestion/gmail-adapter.d.ts +14 -0
  458. package/dist/knowledge/ingestion/gmail-adapter.js +103 -0
  459. package/dist/knowledge/ingestion/index.d.ts +5 -0
  460. package/dist/knowledge/ingestion/index.js +252 -0
  461. package/dist/knowledge/ingestion/ingestion.test.d.ts +1 -0
  462. package/dist/knowledge/ingestion/storage-adapter.d.ts +11 -0
  463. package/dist/knowledge/ingestion/storage-adapter.js +62 -0
  464. package/dist/knowledge/ingestion/vector-indexer.d.ts +14 -0
  465. package/dist/knowledge/ingestion/vector-indexer.js +63 -0
  466. package/dist/knowledge/knowledge.capability.d.ts +1 -0
  467. package/dist/knowledge/knowledge.capability.js +726 -0
  468. package/dist/knowledge/knowledge.feature.d.ts +5 -0
  469. package/dist/knowledge/knowledge.feature.js +300 -0
  470. package/dist/knowledge/operations.d.ts +311 -0
  471. package/dist/knowledge/operations.js +619 -0
  472. package/dist/knowledge/operations.test.d.ts +1 -0
  473. package/dist/knowledge/query/index.d.ts +1 -0
  474. package/dist/knowledge/query/index.js +110 -0
  475. package/dist/knowledge/query/service.d.ts +25 -0
  476. package/dist/knowledge/query/service.js +110 -0
  477. package/dist/knowledge/query/service.test.d.ts +1 -0
  478. package/dist/knowledge/runtime.d.ts +28 -0
  479. package/dist/knowledge/runtime.js +91 -0
  480. package/dist/knowledge/runtime.test.d.ts +1 -0
  481. package/dist/knowledge/source.d.ts +29 -0
  482. package/dist/knowledge/source.js +1 -0
  483. package/dist/knowledge/spaces/email-threads.d.ts +3 -0
  484. package/dist/knowledge/spaces/email-threads.js +102 -0
  485. package/dist/knowledge/spaces/financial-docs.d.ts +3 -0
  486. package/dist/knowledge/spaces/financial-docs.js +102 -0
  487. package/dist/knowledge/spaces/financial-overview.d.ts +3 -0
  488. package/dist/knowledge/spaces/financial-overview.js +102 -0
  489. package/dist/knowledge/spaces/index.d.ts +6 -0
  490. package/dist/knowledge/spaces/index.js +273 -0
  491. package/dist/knowledge/spaces/product-canon.d.ts +3 -0
  492. package/dist/knowledge/spaces/product-canon.js +102 -0
  493. package/dist/knowledge/spaces/spaces.test.d.ts +1 -0
  494. package/dist/knowledge/spaces/support-faq.d.ts +3 -0
  495. package/dist/knowledge/spaces/support-faq.js +103 -0
  496. package/dist/knowledge/spaces/uploaded-docs.d.ts +3 -0
  497. package/dist/knowledge/spaces/uploaded-docs.js +102 -0
  498. package/dist/knowledge/spec.d.ts +42 -0
  499. package/dist/knowledge/spec.js +228 -0
  500. package/dist/knowledge/spec.test.d.ts +1 -0
  501. package/dist/llm/exporters.d.ts +68 -0
  502. package/dist/llm/exporters.js +1011 -0
  503. package/dist/llm/index.d.ts +12 -0
  504. package/dist/llm/index.js +1465 -0
  505. package/dist/llm/prompts.d.ts +53 -0
  506. package/dist/llm/prompts.js +1456 -0
  507. package/dist/llm/types.d.ts +212 -0
  508. package/dist/llm/types.js +1 -0
  509. package/dist/markdown.d.ts +16 -0
  510. package/dist/markdown.js +529 -0
  511. package/dist/migrations.d.ts +48 -0
  512. package/dist/migrations.js +67 -0
  513. package/dist/migrations.test.d.ts +1 -0
  514. package/dist/model-registry.d.ts +9 -0
  515. package/dist/model-registry.js +64 -0
  516. package/dist/model-registry.test.d.ts +1 -0
  517. package/dist/node/app-config/app-config.capability.js +730 -0
  518. package/dist/node/app-config/app-config.contracts.js +713 -0
  519. package/dist/node/app-config/app-config.feature.js +255 -0
  520. package/dist/node/app-config/branding.js +0 -0
  521. package/dist/node/app-config/docs/app-config.docblock.js +383 -0
  522. package/dist/node/app-config/events.js +386 -0
  523. package/dist/node/app-config/index.js +2899 -0
  524. package/dist/node/app-config/lifecycle-contracts.js +870 -0
  525. package/dist/node/app-config/lifecycle.js +0 -0
  526. package/dist/node/app-config/runtime.js +734 -0
  527. package/dist/node/app-config/spec.js +229 -0
  528. package/dist/node/app-config/validation.js +650 -0
  529. package/dist/node/capabilities/capabilities.js +217 -0
  530. package/dist/node/capabilities/context.js +101 -0
  531. package/dist/node/capabilities/docs/capabilities.docblock.js +353 -0
  532. package/dist/node/capabilities/guards.js +177 -0
  533. package/dist/node/capabilities/index.js +739 -0
  534. package/dist/node/capabilities/meeting-recorder.js +154 -0
  535. package/dist/node/capabilities/openbanking.js +166 -0
  536. package/dist/node/capabilities/validation.js +185 -0
  537. package/dist/node/contract-registry/index.js +129 -0
  538. package/dist/node/contract-registry/schemas.js +129 -0
  539. package/dist/node/contract-registry/types.js +0 -0
  540. package/dist/node/data-views/data-views.js +232 -0
  541. package/dist/node/data-views/docs/data-views.docblock.js +164 -0
  542. package/dist/node/data-views/index.js +232 -0
  543. package/dist/node/data-views/query-generator.js +89 -0
  544. package/dist/node/data-views/registry.js +226 -0
  545. package/dist/node/data-views/report/contractVerificationTable.js +240 -0
  546. package/dist/node/data-views/runtime.js +108 -0
  547. package/dist/node/data-views/spec.js +38 -0
  548. package/dist/node/data-views/types.js +0 -0
  549. package/dist/node/docs/accessibility_wcag_compliance_specs.docblock.js +513 -0
  550. package/dist/node/docs/capabilities/documentationSystem.capability.js +784 -0
  551. package/dist/node/docs/capabilities/index.js +784 -0
  552. package/dist/node/docs/commands/docsGenerate.command.js +802 -0
  553. package/dist/node/docs/commands/docsPublish.command.js +781 -0
  554. package/dist/node/docs/commands/index.js +906 -0
  555. package/dist/node/docs/constants.js +78 -0
  556. package/dist/node/docs/contracts.js +1611 -0
  557. package/dist/node/docs/ensure-docblocks.js +264 -0
  558. package/dist/node/docs/events/docsGenerated.event.js +533 -0
  559. package/dist/node/docs/events/docsPublished.event.js +534 -0
  560. package/dist/node/docs/events/index.js +567 -0
  561. package/dist/node/docs/forms/docsSearch.form.js +676 -0
  562. package/dist/node/docs/forms/index.js +676 -0
  563. package/dist/node/docs/index.js +4719 -0
  564. package/dist/node/docs/meta.docs.js +176 -0
  565. package/dist/node/docs/presentations/docsLayout.presentation.js +527 -0
  566. package/dist/node/docs/presentations/docsReferencePage.presentation.js +527 -0
  567. package/dist/node/docs/presentations/index.js +555 -0
  568. package/dist/node/docs/presentations.js +97 -0
  569. package/dist/node/docs/queries/contractReference.query.js +752 -0
  570. package/dist/node/docs/queries/docsIndex.query.js +752 -0
  571. package/dist/node/docs/queries/index.js +827 -0
  572. package/dist/node/docs/registry.js +153 -0
  573. package/dist/node/docs/tech/auth/better-auth-nextjs.docblock.js +221 -0
  574. package/dist/node/docs/tech/cli.docblock.js +291 -0
  575. package/dist/node/docs/tech/contracts/README.docblock.js +164 -0
  576. package/dist/node/docs/tech/contracts/migrations.docblock.js +164 -0
  577. package/dist/node/docs/tech/contracts/openapi-export.docblock.js +201 -0
  578. package/dist/node/docs/tech/contracts/openapi-import.docblock.js +207 -0
  579. package/dist/node/docs/tech/contracts/ops-to-presentation-linking.docblock.js +225 -0
  580. package/dist/node/docs/tech/contracts/overlays.docblock.js +231 -0
  581. package/dist/node/docs/tech/contracts/tests.docblock.js +164 -0
  582. package/dist/node/docs/tech/contracts/themes.docblock.js +257 -0
  583. package/dist/node/docs/tech/contracts/vertical-pocket-family-office.docblock.js +269 -0
  584. package/dist/node/docs/tech/docs-system.docblock.js +264 -0
  585. package/dist/node/docs/tech/lifecycle-stage-system.docblock.js +376 -0
  586. package/dist/node/docs/tech/llm/llm-integration.docblock.js +482 -0
  587. package/dist/node/docs/tech/mcp-endpoints.docblock.js +185 -0
  588. package/dist/node/docs/tech/presentation-runtime.docblock.js +221 -0
  589. package/dist/node/docs/tech/report-verification-table.docblock.js +191 -0
  590. package/dist/node/docs/tech/schema/README.docblock.js +164 -0
  591. package/dist/node/docs/tech/studio/learning-events.docblock.js +190 -0
  592. package/dist/node/docs/tech/studio/learning-journeys.docblock.js +227 -0
  593. package/dist/node/docs/tech/studio/platform-admin-panel.docblock.js +226 -0
  594. package/dist/node/docs/tech/studio/project-access-teams.docblock.js +200 -0
  595. package/dist/node/docs/tech/studio/project-routing.docblock.js +209 -0
  596. package/dist/node/docs/tech/studio/sandbox-unlogged.docblock.js +183 -0
  597. package/dist/node/docs/tech/studio/team-invitations.docblock.js +228 -0
  598. package/dist/node/docs/tech/studio/workspace-ops.docblock.js +189 -0
  599. package/dist/node/docs/tech/studio/workspaces.docblock.js +204 -0
  600. package/dist/node/docs/tech/telemetry-ingest.docblock.js +305 -0
  601. package/dist/node/docs/tech/vscode-extension.docblock.js +241 -0
  602. package/dist/node/docs/tech-contracts.docs.js +239 -0
  603. package/dist/node/docs/types.js +0 -0
  604. package/dist/node/docs/views/contractReference.dataView.js +838 -0
  605. package/dist/node/docs/views/docsIndex.dataView.js +832 -0
  606. package/dist/node/docs/views/exampleCatalog.dataView.js +816 -0
  607. package/dist/node/docs/views/index.js +1031 -0
  608. package/dist/node/events.js +228 -0
  609. package/dist/node/examples/define.js +36 -0
  610. package/dist/node/examples/docs/examples.docblock.js +307 -0
  611. package/dist/node/examples/index.js +604 -0
  612. package/dist/node/examples/registry.js +286 -0
  613. package/dist/node/examples/schema.js +166 -0
  614. package/dist/node/examples/types.js +77 -0
  615. package/dist/node/examples/validation.js +287 -0
  616. package/dist/node/experiments/docs/experiments.docblock.js +291 -0
  617. package/dist/node/experiments/evaluator.js +155 -0
  618. package/dist/node/experiments/spec-resolver.js +0 -0
  619. package/dist/node/experiments/spec.js +227 -0
  620. package/dist/node/features/index.js +275 -0
  621. package/dist/node/features/install.js +95 -0
  622. package/dist/node/features/registry.js +192 -0
  623. package/dist/node/features/types.js +36 -0
  624. package/dist/node/features/validation.js +48 -0
  625. package/dist/node/forms/docs/forms.docblock.js +164 -0
  626. package/dist/node/forms/forms.js +332 -0
  627. package/dist/node/forms/index.js +332 -0
  628. package/dist/node/index.js +2195 -0
  629. package/dist/node/install.js +60 -0
  630. package/dist/node/integrations/binding.js +0 -0
  631. package/dist/node/integrations/connection.js +0 -0
  632. package/dist/node/integrations/docs/integrations.docblock.js +140 -0
  633. package/dist/node/integrations/health.js +103 -0
  634. package/dist/node/integrations/index.js +3293 -0
  635. package/dist/node/integrations/integrations.capability.js +48 -0
  636. package/dist/node/integrations/integrations.feature.js +63 -0
  637. package/dist/node/integrations/meeting-recorder/contracts/index.js +504 -0
  638. package/dist/node/integrations/meeting-recorder/contracts/meetings.js +249 -0
  639. package/dist/node/integrations/meeting-recorder/contracts/transcripts.js +317 -0
  640. package/dist/node/integrations/meeting-recorder/contracts/webhooks.js +202 -0
  641. package/dist/node/integrations/meeting-recorder/meeting-recorder.capability.js +48 -0
  642. package/dist/node/integrations/meeting-recorder/meeting-recorder.feature.js +63 -0
  643. package/dist/node/integrations/meeting-recorder/models.js +152 -0
  644. package/dist/node/integrations/meeting-recorder/telemetry.js +84 -0
  645. package/dist/node/integrations/openbanking/contracts/accounts.js +358 -0
  646. package/dist/node/integrations/openbanking/contracts/balances.js +322 -0
  647. package/dist/node/integrations/openbanking/contracts/index.js +674 -0
  648. package/dist/node/integrations/openbanking/contracts/transactions.js +328 -0
  649. package/dist/node/integrations/openbanking/guards.js +72 -0
  650. package/dist/node/integrations/openbanking/models.js +140 -0
  651. package/dist/node/integrations/openbanking/openbanking.capability.js +48 -0
  652. package/dist/node/integrations/openbanking/openbanking.feature.js +65 -0
  653. package/dist/node/integrations/openbanking/telemetry.js +81 -0
  654. package/dist/node/integrations/operations.js +327 -0
  655. package/dist/node/integrations/providers/analytics-reader.js +0 -0
  656. package/dist/node/integrations/providers/analytics-writer.js +0 -0
  657. package/dist/node/integrations/providers/analytics.js +0 -0
  658. package/dist/node/integrations/providers/calendar.js +0 -0
  659. package/dist/node/integrations/providers/database.js +0 -0
  660. package/dist/node/integrations/providers/elevenlabs.js +116 -0
  661. package/dist/node/integrations/providers/email.js +0 -0
  662. package/dist/node/integrations/providers/embedding.js +0 -0
  663. package/dist/node/integrations/providers/fal.js +142 -0
  664. package/dist/node/integrations/providers/fathom.js +156 -0
  665. package/dist/node/integrations/providers/fireflies.js +136 -0
  666. package/dist/node/integrations/providers/gcs-storage.js +127 -0
  667. package/dist/node/integrations/providers/gmail.js +139 -0
  668. package/dist/node/integrations/providers/google-calendar.js +122 -0
  669. package/dist/node/integrations/providers/gradium.js +140 -0
  670. package/dist/node/integrations/providers/granola.js +137 -0
  671. package/dist/node/integrations/providers/index.js +2124 -0
  672. package/dist/node/integrations/providers/jira.js +138 -0
  673. package/dist/node/integrations/providers/linear.js +137 -0
  674. package/dist/node/integrations/providers/llm.js +0 -0
  675. package/dist/node/integrations/providers/meeting-recorder.js +0 -0
  676. package/dist/node/integrations/providers/mistral.js +124 -0
  677. package/dist/node/integrations/providers/notion.js +143 -0
  678. package/dist/node/integrations/providers/openbanking.js +0 -0
  679. package/dist/node/integrations/providers/payments.js +0 -0
  680. package/dist/node/integrations/providers/posthog-llm-telemetry.js +206 -0
  681. package/dist/node/integrations/providers/posthog.js +136 -0
  682. package/dist/node/integrations/providers/postmark.js +128 -0
  683. package/dist/node/integrations/providers/powens.js +154 -0
  684. package/dist/node/integrations/providers/project-management.js +0 -0
  685. package/dist/node/integrations/providers/qdrant.js +131 -0
  686. package/dist/node/integrations/providers/registry.js +1908 -0
  687. package/dist/node/integrations/providers/sms.js +0 -0
  688. package/dist/node/integrations/providers/storage.js +0 -0
  689. package/dist/node/integrations/providers/stripe.js +135 -0
  690. package/dist/node/integrations/providers/supabase-postgres.js +117 -0
  691. package/dist/node/integrations/providers/supabase-vector.js +137 -0
  692. package/dist/node/integrations/providers/tldv.js +136 -0
  693. package/dist/node/integrations/providers/twilio-sms.js +121 -0
  694. package/dist/node/integrations/providers/vector-store.js +0 -0
  695. package/dist/node/integrations/providers/voice.js +0 -0
  696. package/dist/node/integrations/runtime.js +239 -0
  697. package/dist/node/integrations/secrets/aws-secret-manager.js +376 -0
  698. package/dist/node/integrations/secrets/env-secret-provider.js +189 -0
  699. package/dist/node/integrations/secrets/gcp-secret-manager.js +377 -0
  700. package/dist/node/integrations/secrets/index.js +1159 -0
  701. package/dist/node/integrations/secrets/manager.js +213 -0
  702. package/dist/node/integrations/secrets/provider.js +104 -0
  703. package/dist/node/integrations/secrets/scaleway-secret-manager.js +405 -0
  704. package/dist/node/integrations/secrets-types.js +0 -0
  705. package/dist/node/integrations/spec.js +52 -0
  706. package/dist/node/jobs/define-job.js +41 -0
  707. package/dist/node/jobs/gcp-cloud-tasks.js +103 -0
  708. package/dist/node/jobs/gcp-pubsub.js +91 -0
  709. package/dist/node/jobs/handlers/gmail-sync-handler.js +40 -0
  710. package/dist/node/jobs/handlers/index.js +83 -0
  711. package/dist/node/jobs/handlers/ping-handler.js +47 -0
  712. package/dist/node/jobs/handlers/storage-document-handler.js +47 -0
  713. package/dist/node/jobs/index.js +64 -0
  714. package/dist/node/jobs/memory-queue.js +129 -0
  715. package/dist/node/jobs/queue.js +55 -0
  716. package/dist/node/jobs/scaleway-sqs-queue.js +222 -0
  717. package/dist/node/jsonschema.js +73 -0
  718. package/dist/node/knowledge/binding.js +0 -0
  719. package/dist/node/knowledge/docs/knowledge.docblock.js +301 -0
  720. package/dist/node/knowledge/index.js +467 -0
  721. package/dist/node/knowledge/ingestion/document-processor.js +95 -0
  722. package/dist/node/knowledge/ingestion/embedding-service.js +57 -0
  723. package/dist/node/knowledge/ingestion/gmail-adapter.js +103 -0
  724. package/dist/node/knowledge/ingestion/index.js +252 -0
  725. package/dist/node/knowledge/ingestion/storage-adapter.js +62 -0
  726. package/dist/node/knowledge/ingestion/vector-indexer.js +63 -0
  727. package/dist/node/knowledge/knowledge.capability.js +726 -0
  728. package/dist/node/knowledge/knowledge.feature.js +300 -0
  729. package/dist/node/knowledge/operations.js +619 -0
  730. package/dist/node/knowledge/query/index.js +110 -0
  731. package/dist/node/knowledge/query/service.js +110 -0
  732. package/dist/node/knowledge/runtime.js +91 -0
  733. package/dist/node/knowledge/source.js +0 -0
  734. package/dist/node/knowledge/spaces/email-threads.js +102 -0
  735. package/dist/node/knowledge/spaces/financial-docs.js +102 -0
  736. package/dist/node/knowledge/spaces/financial-overview.js +102 -0
  737. package/dist/node/knowledge/spaces/index.js +273 -0
  738. package/dist/node/knowledge/spaces/product-canon.js +102 -0
  739. package/dist/node/knowledge/spaces/support-faq.js +103 -0
  740. package/dist/node/knowledge/spaces/uploaded-docs.js +102 -0
  741. package/dist/node/knowledge/spec.js +228 -0
  742. package/dist/node/llm/exporters.js +1011 -0
  743. package/dist/node/llm/index.js +1465 -0
  744. package/dist/node/llm/prompts.js +1456 -0
  745. package/dist/node/llm/types.js +0 -0
  746. package/dist/node/markdown.js +529 -0
  747. package/dist/node/migrations.js +67 -0
  748. package/dist/node/model-registry.js +64 -0
  749. package/dist/node/onboarding-base.js +597 -0
  750. package/dist/node/openapi.js +151 -0
  751. package/dist/node/operations/index.js +408 -0
  752. package/dist/node/operations/operation.js +51 -0
  753. package/dist/node/operations/registry.js +405 -0
  754. package/dist/node/operations/report/getContractVerificationStatus.js +170 -0
  755. package/dist/node/operations/report/index.js +305 -0
  756. package/dist/node/ownership.js +73 -0
  757. package/dist/node/policy/context.js +206 -0
  758. package/dist/node/policy/docs/policy.docblock.js +313 -0
  759. package/dist/node/policy/engine.js +325 -0
  760. package/dist/node/policy/guards.js +387 -0
  761. package/dist/node/policy/index.js +1313 -0
  762. package/dist/node/policy/opa-adapter.js +110 -0
  763. package/dist/node/policy/registry.js +221 -0
  764. package/dist/node/policy/spec.js +0 -0
  765. package/dist/node/policy/validation.js +391 -0
  766. package/dist/node/presentations/docs/presentations-conventions.docblock.js +171 -0
  767. package/dist/node/presentations/index.js +227 -0
  768. package/dist/node/presentations/presentations.js +38 -0
  769. package/dist/node/presentations/registry.js +221 -0
  770. package/dist/node/presentations/transform-engine.js +600 -0
  771. package/dist/node/product-intent/contract-patch-intent.js +68 -0
  772. package/dist/node/product-intent/contract-spec-patch.js +75 -0
  773. package/dist/node/product-intent/evidence.js +45 -0
  774. package/dist/node/product-intent/findings.js +81 -0
  775. package/dist/node/product-intent/impact-report.js +62 -0
  776. package/dist/node/product-intent/index.js +742 -0
  777. package/dist/node/product-intent/insights.js +63 -0
  778. package/dist/node/product-intent/opportunity-brief.js +106 -0
  779. package/dist/node/product-intent/problems.js +55 -0
  780. package/dist/node/product-intent/registry.js +242 -0
  781. package/dist/node/product-intent/runtime.js +320 -0
  782. package/dist/node/product-intent/spec.js +425 -0
  783. package/dist/node/product-intent/task-pack.js +69 -0
  784. package/dist/node/product-intent/tickets.js +57 -0
  785. package/dist/node/product-intent/types.js +378 -0
  786. package/dist/node/product-intent/ui-wireframe.js +73 -0
  787. package/dist/node/prompt.js +38 -0
  788. package/dist/node/promptRegistry.js +63 -0
  789. package/dist/node/regenerator/adapters.js +0 -0
  790. package/dist/node/regenerator/docs/regenerator.docblock.js +164 -0
  791. package/dist/node/regenerator/executor.js +157 -0
  792. package/dist/node/regenerator/index.js +341 -0
  793. package/dist/node/regenerator/service.js +183 -0
  794. package/dist/node/regenerator/sinks.js +64 -0
  795. package/dist/node/regenerator/types.js +0 -0
  796. package/dist/node/regenerator/utils.js +87 -0
  797. package/dist/node/registry-utils.js +163 -0
  798. package/dist/node/registry.js +215 -0
  799. package/dist/node/resources.js +83 -0
  800. package/dist/node/schema-to-markdown.js +278 -0
  801. package/dist/node/serialization/index.js +179 -0
  802. package/dist/node/serialization/serializers.js +180 -0
  803. package/dist/node/serialization/types.js +0 -0
  804. package/dist/node/telemetry/anomaly.js +91 -0
  805. package/dist/node/telemetry/docs/telemetry.docblock.js +164 -0
  806. package/dist/node/telemetry/index.js +417 -0
  807. package/dist/node/telemetry/spec.js +261 -0
  808. package/dist/node/telemetry/tracker.js +129 -0
  809. package/dist/node/tests/index.js +231 -0
  810. package/dist/node/tests/runner.js +189 -0
  811. package/dist/node/tests/spec.js +74 -0
  812. package/dist/node/themes.js +225 -0
  813. package/dist/node/translations/catalog.js +0 -0
  814. package/dist/node/translations/index.js +533 -0
  815. package/dist/node/translations/registry.js +170 -0
  816. package/dist/node/translations/spec.js +36 -0
  817. package/dist/node/translations/tenant.js +0 -0
  818. package/dist/node/translations/validation.js +392 -0
  819. package/dist/node/types.js +0 -0
  820. package/dist/node/versioning/index.js +274 -0
  821. package/dist/node/versioning/refs.js +99 -0
  822. package/dist/node/versioning/types.js +55 -0
  823. package/dist/node/versioning/utils.js +184 -0
  824. package/dist/node/workflow/adapters/db-adapter.js +127 -0
  825. package/dist/node/workflow/adapters/file-adapter.js +38 -0
  826. package/dist/node/workflow/adapters/index.js +194 -0
  827. package/dist/node/workflow/adapters/memory-store.js +93 -0
  828. package/dist/node/workflow/context.js +247 -0
  829. package/dist/node/workflow/expression.js +157 -0
  830. package/dist/node/workflow/index.js +1546 -0
  831. package/dist/node/workflow/overview.docblock.js +164 -0
  832. package/dist/node/workflow/runner.js +532 -0
  833. package/dist/node/workflow/sla-monitor.js +84 -0
  834. package/dist/node/workflow/spec.js +221 -0
  835. package/dist/node/workflow/state.js +0 -0
  836. package/dist/node/workflow/validation.js +425 -0
  837. package/dist/node/workspace-config/contractsrc-schema.js +344 -0
  838. package/dist/node/workspace-config/contractsrc-types.js +0 -0
  839. package/dist/node/workspace-config/index.js +325 -0
  840. package/dist/node/workspace-config/workspace-config.docblock.js +188 -0
  841. package/dist/onboarding-base.d.ts +131 -0
  842. package/dist/onboarding-base.js +597 -0
  843. package/dist/openapi.d.ts +33 -0
  844. package/dist/openapi.js +151 -0
  845. package/dist/operations/index.d.ts +2 -0
  846. package/dist/operations/index.js +408 -0
  847. package/dist/operations/operation.d.ts +191 -0
  848. package/dist/operations/operation.js +51 -0
  849. package/dist/operations/registry.d.ts +58 -0
  850. package/dist/operations/registry.js +405 -0
  851. package/dist/operations/report/getContractVerificationStatus.d.ts +68 -0
  852. package/dist/operations/report/getContractVerificationStatus.js +170 -0
  853. package/dist/operations/report/getContractVerificationStatus.test.d.ts +1 -0
  854. package/dist/operations/report/index.d.ts +10 -0
  855. package/dist/operations/report/index.js +305 -0
  856. package/dist/operations/report/index.test.d.ts +1 -0
  857. package/dist/ownership.d.ts +211 -0
  858. package/dist/ownership.js +73 -0
  859. package/dist/ownership.test.d.ts +1 -0
  860. package/dist/policy/context.d.ts +234 -0
  861. package/dist/policy/context.js +206 -0
  862. package/dist/policy/context.test.d.ts +1 -0
  863. package/dist/policy/docs/policy.docblock.d.ts +2 -0
  864. package/dist/policy/docs/policy.docblock.js +313 -0
  865. package/dist/policy/engine.d.ts +36 -0
  866. package/dist/policy/engine.js +325 -0
  867. package/dist/policy/engine.test.d.ts +1 -0
  868. package/dist/policy/guards.d.ts +156 -0
  869. package/dist/policy/guards.js +387 -0
  870. package/dist/policy/guards.test.d.ts +1 -0
  871. package/dist/policy/index.d.ts +12 -0
  872. package/dist/policy/index.js +1313 -0
  873. package/dist/policy/opa-adapter.d.ts +41 -0
  874. package/dist/policy/opa-adapter.js +110 -0
  875. package/dist/policy/opa-adapter.test.d.ts +1 -0
  876. package/dist/policy/registry.d.ts +5 -0
  877. package/dist/policy/registry.js +221 -0
  878. package/dist/policy/spec.d.ts +102 -0
  879. package/dist/policy/spec.js +1 -0
  880. package/dist/policy/validation.d.ts +84 -0
  881. package/dist/policy/validation.js +391 -0
  882. package/dist/policy/validation.test.d.ts +1 -0
  883. package/dist/presentations/docs/presentations-conventions.docblock.d.ts +2 -0
  884. package/dist/presentations/docs/presentations-conventions.docblock.js +171 -0
  885. package/dist/presentations/index.d.ts +2 -0
  886. package/dist/presentations/index.js +227 -0
  887. package/dist/presentations/presentations.d.ts +52 -0
  888. package/dist/presentations/presentations.js +38 -0
  889. package/dist/presentations/registry.d.ts +6 -0
  890. package/dist/presentations/registry.js +221 -0
  891. package/dist/presentations/transform-engine.d.ts +62 -0
  892. package/dist/presentations/transform-engine.js +600 -0
  893. package/dist/presentations/transform-engine.test.d.ts +1 -0
  894. package/dist/product-intent/contract-patch-intent.d.ts +100 -0
  895. package/dist/product-intent/contract-patch-intent.js +68 -0
  896. package/dist/product-intent/contract-spec-patch.d.ts +86 -0
  897. package/dist/product-intent/contract-spec-patch.js +75 -0
  898. package/dist/product-intent/evidence.d.ts +14 -0
  899. package/dist/product-intent/evidence.js +45 -0
  900. package/dist/product-intent/findings.d.ts +57 -0
  901. package/dist/product-intent/findings.js +81 -0
  902. package/dist/product-intent/impact-report.d.ts +57 -0
  903. package/dist/product-intent/impact-report.js +62 -0
  904. package/dist/product-intent/index.d.ts +13 -0
  905. package/dist/product-intent/index.js +742 -0
  906. package/dist/product-intent/insights.d.ts +62 -0
  907. package/dist/product-intent/insights.js +63 -0
  908. package/dist/product-intent/opportunity-brief.d.ts +192 -0
  909. package/dist/product-intent/opportunity-brief.js +106 -0
  910. package/dist/product-intent/problems.d.ts +59 -0
  911. package/dist/product-intent/problems.js +55 -0
  912. package/dist/product-intent/registry.d.ts +28 -0
  913. package/dist/product-intent/registry.js +242 -0
  914. package/dist/product-intent/registry.test.d.ts +1 -0
  915. package/dist/product-intent/runtime.d.ts +92 -0
  916. package/dist/product-intent/runtime.js +320 -0
  917. package/dist/product-intent/runtime.test.d.ts +1 -0
  918. package/dist/product-intent/spec.d.ts +664 -0
  919. package/dist/product-intent/spec.js +425 -0
  920. package/dist/product-intent/task-pack.d.ts +98 -0
  921. package/dist/product-intent/task-pack.js +69 -0
  922. package/dist/product-intent/tickets.d.ts +67 -0
  923. package/dist/product-intent/tickets.js +57 -0
  924. package/dist/product-intent/types.d.ts +11 -0
  925. package/dist/product-intent/types.js +378 -0
  926. package/dist/product-intent/ui-wireframe.d.ts +100 -0
  927. package/dist/product-intent/ui-wireframe.js +73 -0
  928. package/dist/prompt.d.ts +49 -0
  929. package/dist/prompt.js +38 -0
  930. package/dist/prompt.test.d.ts +1 -0
  931. package/dist/promptRegistry.d.ts +11 -0
  932. package/dist/promptRegistry.js +63 -0
  933. package/dist/promptRegistry.test.d.ts +1 -0
  934. package/dist/regenerator/adapters.d.ts +15 -0
  935. package/dist/regenerator/adapters.js +1 -0
  936. package/dist/regenerator/docs/regenerator.docblock.d.ts +2 -0
  937. package/dist/regenerator/docs/regenerator.docblock.js +164 -0
  938. package/dist/regenerator/executor.d.ts +66 -0
  939. package/dist/regenerator/executor.js +157 -0
  940. package/dist/regenerator/executor.test.d.ts +1 -0
  941. package/dist/regenerator/index.d.ts +6 -0
  942. package/dist/regenerator/index.js +341 -0
  943. package/dist/regenerator/service.d.ts +29 -0
  944. package/dist/regenerator/service.js +183 -0
  945. package/dist/regenerator/service.test.d.ts +1 -0
  946. package/dist/regenerator/sinks.d.ts +23 -0
  947. package/dist/regenerator/sinks.js +64 -0
  948. package/dist/regenerator/sinks.test.d.ts +1 -0
  949. package/dist/regenerator/types.d.ts +103 -0
  950. package/dist/regenerator/types.js +1 -0
  951. package/dist/regenerator/utils.d.ts +6 -0
  952. package/dist/regenerator/utils.js +87 -0
  953. package/dist/registry-utils.d.ts +105 -0
  954. package/dist/registry-utils.js +163 -0
  955. package/dist/registry-utils.test.d.ts +1 -0
  956. package/dist/registry.d.ts +27 -0
  957. package/dist/registry.js +215 -0
  958. package/dist/resources.d.ts +60 -0
  959. package/dist/resources.js +83 -0
  960. package/dist/schema-to-markdown.d.ts +56 -0
  961. package/dist/schema-to-markdown.js +278 -0
  962. package/dist/serialization/index.d.ts +10 -0
  963. package/dist/serialization/index.js +179 -0
  964. package/dist/serialization/serializers.d.ts +35 -0
  965. package/dist/serialization/serializers.js +180 -0
  966. package/dist/serialization/types.d.ts +100 -0
  967. package/dist/serialization/types.js +1 -0
  968. package/dist/telemetry/anomaly.d.ts +23 -0
  969. package/dist/telemetry/anomaly.js +91 -0
  970. package/dist/telemetry/anomaly.test.d.ts +1 -0
  971. package/dist/telemetry/docs/telemetry.docblock.d.ts +2 -0
  972. package/dist/telemetry/docs/telemetry.docblock.js +164 -0
  973. package/dist/telemetry/index.d.ts +3 -0
  974. package/dist/telemetry/index.js +417 -0
  975. package/dist/telemetry/spec.d.ts +87 -0
  976. package/dist/telemetry/spec.js +261 -0
  977. package/dist/telemetry/spec.test.d.ts +1 -0
  978. package/dist/telemetry/tracker.d.ts +48 -0
  979. package/dist/telemetry/tracker.js +129 -0
  980. package/dist/telemetry/tracker.test.d.ts +1 -0
  981. package/dist/tests/index.d.ts +2 -0
  982. package/dist/tests/index.js +231 -0
  983. package/dist/tests/runner.d.ts +38 -0
  984. package/dist/tests/runner.js +189 -0
  985. package/dist/tests/runner.test.d.ts +1 -0
  986. package/dist/tests/spec.d.ts +82 -0
  987. package/dist/tests/spec.js +74 -0
  988. package/dist/tests/spec.test.d.ts +1 -0
  989. package/dist/themes.d.ts +50 -0
  990. package/dist/themes.js +225 -0
  991. package/dist/themes.test.d.ts +1 -0
  992. package/dist/translations/catalog.d.ts +25 -0
  993. package/dist/translations/catalog.js +1 -0
  994. package/dist/translations/index.d.ts +44 -0
  995. package/dist/translations/index.js +533 -0
  996. package/dist/translations/registry.d.ts +172 -0
  997. package/dist/translations/registry.js +170 -0
  998. package/dist/translations/registry.test.d.ts +1 -0
  999. package/dist/translations/spec.d.ts +153 -0
  1000. package/dist/translations/spec.js +36 -0
  1001. package/dist/translations/spec.test.d.ts +1 -0
  1002. package/dist/translations/tenant.d.ts +11 -0
  1003. package/dist/translations/tenant.js +1 -0
  1004. package/dist/translations/validation.d.ts +106 -0
  1005. package/dist/translations/validation.js +392 -0
  1006. package/dist/translations/validation.test.d.ts +1 -0
  1007. package/dist/types.d.ts +212 -0
  1008. package/dist/types.js +1 -0
  1009. package/dist/versioning/index.d.ts +9 -0
  1010. package/dist/versioning/index.js +274 -0
  1011. package/dist/versioning/refs.d.ts +176 -0
  1012. package/dist/versioning/refs.js +99 -0
  1013. package/dist/versioning/refs.test.d.ts +4 -0
  1014. package/dist/versioning/types.d.ts +130 -0
  1015. package/dist/versioning/types.js +55 -0
  1016. package/dist/versioning/utils.d.ts +93 -0
  1017. package/dist/versioning/utils.js +184 -0
  1018. package/dist/versioning/utils.test.d.ts +4 -0
  1019. package/dist/workflow/adapters/db-adapter.d.ts +43 -0
  1020. package/dist/workflow/adapters/db-adapter.js +127 -0
  1021. package/dist/workflow/adapters/file-adapter.d.ts +10 -0
  1022. package/dist/workflow/adapters/file-adapter.js +38 -0
  1023. package/dist/workflow/adapters/index.d.ts +3 -0
  1024. package/dist/workflow/adapters/index.js +194 -0
  1025. package/dist/workflow/adapters/memory-store.d.ts +13 -0
  1026. package/dist/workflow/adapters/memory-store.js +93 -0
  1027. package/dist/workflow/context.d.ts +217 -0
  1028. package/dist/workflow/context.js +247 -0
  1029. package/dist/workflow/context.test.d.ts +1 -0
  1030. package/dist/workflow/expression.d.ts +6 -0
  1031. package/dist/workflow/expression.js +157 -0
  1032. package/dist/workflow/expression.test.d.ts +1 -0
  1033. package/dist/workflow/index.d.ts +13 -0
  1034. package/dist/workflow/index.js +1546 -0
  1035. package/dist/workflow/overview.docblock.d.ts +2 -0
  1036. package/dist/workflow/overview.docblock.js +164 -0
  1037. package/dist/workflow/runner.d.ts +71 -0
  1038. package/dist/workflow/runner.js +532 -0
  1039. package/dist/workflow/runner.test.d.ts +1 -0
  1040. package/dist/workflow/sla-monitor.d.ts +16 -0
  1041. package/dist/workflow/sla-monitor.js +84 -0
  1042. package/dist/workflow/spec.d.ts +81 -0
  1043. package/dist/workflow/spec.js +221 -0
  1044. package/dist/workflow/state.d.ts +31 -0
  1045. package/dist/workflow/state.js +1 -0
  1046. package/dist/workflow/validation.d.ts +87 -0
  1047. package/dist/workflow/validation.js +425 -0
  1048. package/dist/workflow/validation.test.d.ts +1 -0
  1049. package/dist/workspace-config/contractsrc-schema.d.ts +144 -0
  1050. package/dist/workspace-config/contractsrc-schema.js +344 -0
  1051. package/dist/workspace-config/contractsrc-schema.test.d.ts +1 -0
  1052. package/dist/workspace-config/contractsrc-types.d.ts +342 -0
  1053. package/dist/workspace-config/contractsrc-types.js +1 -0
  1054. package/dist/workspace-config/index.d.ts +5 -0
  1055. package/dist/workspace-config/index.js +325 -0
  1056. package/dist/workspace-config/workspace-config.docblock.d.ts +2 -0
  1057. package/dist/workspace-config/workspace-config.docblock.js +188 -0
  1058. package/package.json +4426 -0
@@ -0,0 +1,3293 @@
1
+ // @bun
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ return entry;
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
30
+ var __require = import.meta.require;
31
+ // src/integrations/spec.ts
32
+ import { SpecContractRegistry } from "@contractspec/lib.contracts-spec/registry";
33
+ var integrationKey = (meta) => `${meta.key}.v${meta.version}`;
34
+
35
+ class IntegrationSpecRegistry extends SpecContractRegistry {
36
+ constructor(items) {
37
+ super("integration", items);
38
+ }
39
+ getByCategory(category) {
40
+ return this.list().filter((spec) => spec.meta.category === category);
41
+ }
42
+ }
43
+ function makeIntegrationSpecKey(meta) {
44
+ return integrationKey(meta);
45
+ }
46
+ var defineIntegration = (spec) => spec;
47
+ // src/integrations/providers/stripe.ts
48
+ import { StabilityEnum } from "@contractspec/lib.contracts-spec/ownership";
49
+ var stripeIntegrationSpec = defineIntegration({
50
+ meta: {
51
+ key: "payments.stripe",
52
+ version: "1.0.0",
53
+ category: "payments",
54
+ title: "Stripe Payments",
55
+ description: "Stripe integration for payment processing, charges, and payouts.",
56
+ domain: "payments",
57
+ owners: ["platform.payments"],
58
+ tags: ["payments", "psp"],
59
+ stability: StabilityEnum.Stable
60
+ },
61
+ supportedModes: ["managed", "byok"],
62
+ capabilities: {
63
+ provides: [{ key: "payments.psp", version: "1.0.0" }],
64
+ requires: [
65
+ {
66
+ key: "platform.webhooks",
67
+ optional: true,
68
+ reason: "Recommended for reliable event ingestion"
69
+ }
70
+ ]
71
+ },
72
+ configSchema: {
73
+ schema: {
74
+ type: "object",
75
+ properties: {
76
+ accountId: {
77
+ type: "string",
78
+ description: "Connected account ID when using Stripe Connect (BYOK)."
79
+ },
80
+ region: {
81
+ type: "string",
82
+ description: "Optional Stripe region or data residency hint."
83
+ }
84
+ }
85
+ },
86
+ example: {
87
+ accountId: "acct_123",
88
+ region: "us-east-1"
89
+ }
90
+ },
91
+ secretSchema: {
92
+ schema: {
93
+ type: "object",
94
+ required: ["apiKey", "webhookSecret"],
95
+ properties: {
96
+ apiKey: {
97
+ type: "string",
98
+ description: "Stripe secret API key (sk_live_... or sk_test_...)."
99
+ },
100
+ webhookSecret: {
101
+ type: "string",
102
+ description: "Signing secret for webhook verification."
103
+ }
104
+ }
105
+ },
106
+ example: {
107
+ apiKey: "sk_live_***",
108
+ webhookSecret: "whsec_***"
109
+ }
110
+ },
111
+ healthCheck: {
112
+ method: "ping",
113
+ timeoutMs: 5000
114
+ },
115
+ docsUrl: "https://stripe.com/docs/api",
116
+ constraints: {
117
+ rateLimit: {
118
+ rpm: 1000,
119
+ rph: 20000
120
+ }
121
+ },
122
+ byokSetup: {
123
+ setupInstructions: "Create a restricted Stripe API key with write access to Charges and provide a webhook signing secret.",
124
+ requiredScopes: ["charges:write", "customers:read"]
125
+ }
126
+ });
127
+ function registerStripeIntegration(registry) {
128
+ return registry.register(stripeIntegrationSpec);
129
+ }
130
+
131
+ // src/integrations/providers/postmark.ts
132
+ import { StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts-spec/ownership";
133
+ var postmarkIntegrationSpec = defineIntegration({
134
+ meta: {
135
+ key: "email.postmark",
136
+ version: "1.0.0",
137
+ category: "email",
138
+ title: "Postmark Transactional Email",
139
+ description: "Postmark integration for transactional email delivery.",
140
+ domain: "communications",
141
+ owners: ["platform.messaging"],
142
+ tags: ["email", "transactional"],
143
+ stability: StabilityEnum2.Stable
144
+ },
145
+ supportedModes: ["managed", "byok"],
146
+ capabilities: {
147
+ provides: [{ key: "email.transactional", version: "1.0.0" }],
148
+ requires: [
149
+ {
150
+ key: "platform.webhooks",
151
+ optional: true,
152
+ reason: "Optional for inbound bounce handling"
153
+ }
154
+ ]
155
+ },
156
+ configSchema: {
157
+ schema: {
158
+ type: "object",
159
+ properties: {
160
+ messageStream: {
161
+ type: "string",
162
+ description: "Optional message stream identifier (e.g., transactional)."
163
+ },
164
+ fromEmail: {
165
+ type: "string",
166
+ description: "Default From address used for outbound messages."
167
+ }
168
+ }
169
+ },
170
+ example: {
171
+ messageStream: "outbound",
172
+ fromEmail: "notifications@example.com"
173
+ }
174
+ },
175
+ secretSchema: {
176
+ schema: {
177
+ type: "object",
178
+ required: ["serverToken"],
179
+ properties: {
180
+ serverToken: {
181
+ type: "string",
182
+ description: "Server token for the Postmark account."
183
+ }
184
+ }
185
+ },
186
+ example: {
187
+ serverToken: "server-***"
188
+ }
189
+ },
190
+ healthCheck: {
191
+ method: "ping",
192
+ timeoutMs: 3000
193
+ },
194
+ docsUrl: "https://postmarkapp.com/developer",
195
+ constraints: {
196
+ rateLimit: {
197
+ rpm: 500
198
+ }
199
+ },
200
+ byokSetup: {
201
+ setupInstructions: "Create a Postmark server token with outbound send permissions and configure allowed from addresses."
202
+ }
203
+ });
204
+ function registerPostmarkIntegration(registry) {
205
+ return registry.register(postmarkIntegrationSpec);
206
+ }
207
+
208
+ // src/integrations/providers/qdrant.ts
209
+ import { StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts-spec/ownership";
210
+ var qdrantIntegrationSpec = defineIntegration({
211
+ meta: {
212
+ key: "vectordb.qdrant",
213
+ version: "1.0.0",
214
+ category: "vector-db",
215
+ title: "Qdrant Vector Database",
216
+ description: "Qdrant integration for vector search and embeddings storage.",
217
+ domain: "ai",
218
+ owners: ["platform.ai"],
219
+ tags: ["vector-db", "search"],
220
+ stability: StabilityEnum3.Experimental
221
+ },
222
+ supportedModes: ["managed", "byok"],
223
+ capabilities: {
224
+ provides: [
225
+ { key: "vector-db.search", version: "1.0.0" },
226
+ { key: "vector-db.storage", version: "1.0.0" }
227
+ ],
228
+ requires: [
229
+ {
230
+ key: "ai.embeddings",
231
+ optional: true,
232
+ reason: "Required if vectors are generated via hosted embedding services"
233
+ }
234
+ ]
235
+ },
236
+ configSchema: {
237
+ schema: {
238
+ type: "object",
239
+ properties: {
240
+ apiUrl: {
241
+ type: "string",
242
+ description: "Base URL for the Qdrant instance (e.g., https://qdrant.example.com)."
243
+ },
244
+ collectionPrefix: {
245
+ type: "string",
246
+ description: "Prefix applied to all collection names for this tenant."
247
+ }
248
+ }
249
+ },
250
+ example: {
251
+ apiUrl: "https://qdrant.example.com",
252
+ collectionPrefix: "tenant_"
253
+ }
254
+ },
255
+ secretSchema: {
256
+ schema: {
257
+ type: "object",
258
+ properties: {
259
+ apiKey: {
260
+ type: "string",
261
+ description: "API key or token when authentication is enabled."
262
+ }
263
+ }
264
+ },
265
+ example: {
266
+ apiKey: "qdrant-api-key"
267
+ }
268
+ },
269
+ healthCheck: {
270
+ method: "ping",
271
+ timeoutMs: 4000
272
+ },
273
+ docsUrl: "https://qdrant.tech/documentation/quick-start/",
274
+ constraints: {
275
+ quotas: {
276
+ collections: 100,
277
+ pointsPerCollection: 1e6
278
+ }
279
+ },
280
+ byokSetup: {
281
+ setupInstructions: "Provide the HTTPS endpoint of your Qdrant cluster and generate an API key with read/write access to the collections that will be managed."
282
+ }
283
+ });
284
+ function registerQdrantIntegration(registry) {
285
+ return registry.register(qdrantIntegrationSpec);
286
+ }
287
+
288
+ // src/integrations/providers/supabase-vector.ts
289
+ import { StabilityEnum as StabilityEnum4 } from "@contractspec/lib.contracts-spec/ownership";
290
+ var supabaseVectorIntegrationSpec = defineIntegration({
291
+ meta: {
292
+ key: "vectordb.supabase",
293
+ version: "1.0.0",
294
+ category: "vector-db",
295
+ title: "Supabase Vector Database (pgvector)",
296
+ description: "Supabase integration for embedding storage and vector similarity search using pgvector.",
297
+ domain: "ai",
298
+ owners: ["platform.ai"],
299
+ tags: ["vector-db", "supabase", "pgvector"],
300
+ stability: StabilityEnum4.Beta
301
+ },
302
+ supportedModes: ["managed", "byok"],
303
+ capabilities: {
304
+ provides: [
305
+ { key: "vector-db.search", version: "1.0.0" },
306
+ { key: "vector-db.storage", version: "1.0.0" }
307
+ ],
308
+ requires: [
309
+ {
310
+ key: "ai.embeddings",
311
+ optional: true,
312
+ reason: "Required when vectors are generated by a hosted embedding provider."
313
+ }
314
+ ]
315
+ },
316
+ configSchema: {
317
+ schema: {
318
+ type: "object",
319
+ properties: {
320
+ schema: {
321
+ type: "string",
322
+ description: "Schema name containing the pgvector table (default: public)."
323
+ },
324
+ table: {
325
+ type: "string",
326
+ description: "Table used to store vectors and metadata (default: contractspec_vectors)."
327
+ },
328
+ createTableIfMissing: {
329
+ type: "boolean",
330
+ description: "Automatically create pgvector extension and table when first writing vectors."
331
+ },
332
+ distanceMetric: {
333
+ type: "string",
334
+ enum: ["cosine", "l2", "inner_product"],
335
+ description: "Distance metric used for nearest-neighbor search."
336
+ }
337
+ }
338
+ },
339
+ example: {
340
+ schema: "public",
341
+ table: "contractspec_vectors",
342
+ createTableIfMissing: true,
343
+ distanceMetric: "cosine"
344
+ }
345
+ },
346
+ secretSchema: {
347
+ schema: {
348
+ type: "object",
349
+ required: ["databaseUrl"],
350
+ properties: {
351
+ databaseUrl: {
352
+ type: "string",
353
+ description: "Supabase Postgres connection string with privileges to read/write vector rows."
354
+ }
355
+ }
356
+ },
357
+ example: {
358
+ databaseUrl: "postgresql://postgres.[project-ref]:password@aws-0-region.pooler.supabase.com:6543/postgres"
359
+ }
360
+ },
361
+ healthCheck: {
362
+ method: "ping",
363
+ timeoutMs: 5000
364
+ },
365
+ docsUrl: "https://supabase.com/docs/guides/ai/vector-columns",
366
+ byokSetup: {
367
+ setupInstructions: "Create or reuse a Supabase project, enable pgvector, and provide a Postgres connection string with read/write access to the target vector table."
368
+ }
369
+ });
370
+ function registerSupabaseVectorIntegration(registry) {
371
+ return registry.register(supabaseVectorIntegrationSpec);
372
+ }
373
+
374
+ // src/integrations/providers/supabase-postgres.ts
375
+ import { StabilityEnum as StabilityEnum5 } from "@contractspec/lib.contracts-spec/ownership";
376
+ var supabasePostgresIntegrationSpec = defineIntegration({
377
+ meta: {
378
+ key: "database.supabase",
379
+ version: "1.0.0",
380
+ category: "database",
381
+ title: "Supabase Postgres",
382
+ description: "Supabase Postgres integration for SQL query execution and transactional workloads.",
383
+ domain: "infrastructure",
384
+ owners: ["platform.infrastructure"],
385
+ tags: ["database", "postgres", "supabase"],
386
+ stability: StabilityEnum5.Beta
387
+ },
388
+ supportedModes: ["managed", "byok"],
389
+ capabilities: {
390
+ provides: [{ key: "database.sql", version: "1.0.0" }]
391
+ },
392
+ configSchema: {
393
+ schema: {
394
+ type: "object",
395
+ properties: {
396
+ maxConnections: {
397
+ type: "number",
398
+ description: "Optional connection pool size when opening a Postgres client to Supabase."
399
+ },
400
+ sslMode: {
401
+ type: "string",
402
+ enum: ["require", "allow", "prefer"],
403
+ description: "TLS mode used by the Postgres client."
404
+ }
405
+ }
406
+ },
407
+ example: {
408
+ maxConnections: 10,
409
+ sslMode: "require"
410
+ }
411
+ },
412
+ secretSchema: {
413
+ schema: {
414
+ type: "object",
415
+ required: ["databaseUrl"],
416
+ properties: {
417
+ databaseUrl: {
418
+ type: "string",
419
+ description: "Supabase Postgres connection string (transaction or session pooler endpoint)."
420
+ }
421
+ }
422
+ },
423
+ example: {
424
+ databaseUrl: "postgresql://postgres.[project-ref]:password@aws-0-region.pooler.supabase.com:6543/postgres"
425
+ }
426
+ },
427
+ healthCheck: {
428
+ method: "ping",
429
+ timeoutMs: 5000
430
+ },
431
+ docsUrl: "https://supabase.com/docs/guides/database/connecting-to-postgres",
432
+ byokSetup: {
433
+ setupInstructions: "Create or reuse a Supabase project and provide a Postgres connection string with permissions aligned to your workload."
434
+ }
435
+ });
436
+ function registerSupabasePostgresIntegration(registry) {
437
+ return registry.register(supabasePostgresIntegrationSpec);
438
+ }
439
+
440
+ // src/integrations/providers/mistral.ts
441
+ import { StabilityEnum as StabilityEnum6 } from "@contractspec/lib.contracts-spec/ownership";
442
+ var mistralIntegrationSpec = defineIntegration({
443
+ meta: {
444
+ key: "ai-llm.mistral",
445
+ version: "1.0.0",
446
+ category: "ai-llm",
447
+ title: "Mistral Large Language Model",
448
+ description: "Mistral integration providing chat completions and embedding generation.",
449
+ domain: "ai",
450
+ owners: ["platform.ai"],
451
+ tags: ["ai", "llm", "embeddings"],
452
+ stability: StabilityEnum6.Experimental
453
+ },
454
+ supportedModes: ["managed", "byok"],
455
+ capabilities: {
456
+ provides: [
457
+ { key: "ai.chat", version: "1.0.0" },
458
+ { key: "ai.embeddings", version: "1.0.0" }
459
+ ]
460
+ },
461
+ configSchema: {
462
+ schema: {
463
+ type: "object",
464
+ properties: {
465
+ model: {
466
+ type: "string",
467
+ description: "Default chat completion model (e.g., mistral-large-latest)."
468
+ },
469
+ embeddingModel: {
470
+ type: "string",
471
+ description: "Embedding model identifier."
472
+ }
473
+ }
474
+ },
475
+ example: {
476
+ model: "mistral-large-latest",
477
+ embeddingModel: "mistral-embed"
478
+ }
479
+ },
480
+ secretSchema: {
481
+ schema: {
482
+ type: "object",
483
+ required: ["apiKey"],
484
+ properties: {
485
+ apiKey: {
486
+ type: "string",
487
+ description: "Mistral API key with access to chat and embeddings endpoints."
488
+ }
489
+ }
490
+ },
491
+ example: {
492
+ apiKey: "mistral-***"
493
+ }
494
+ },
495
+ healthCheck: {
496
+ method: "custom",
497
+ timeoutMs: 5000
498
+ },
499
+ docsUrl: "https://docs.mistral.ai/platform/endpoints",
500
+ constraints: {
501
+ rateLimit: {
502
+ rpm: 600
503
+ }
504
+ },
505
+ byokSetup: {
506
+ setupInstructions: "Generate an API key within the Mistral console and ensure the selected models are enabled for the account."
507
+ }
508
+ });
509
+ function registerMistralIntegration(registry) {
510
+ return registry.register(mistralIntegrationSpec);
511
+ }
512
+
513
+ // src/integrations/providers/elevenlabs.ts
514
+ import { StabilityEnum as StabilityEnum7 } from "@contractspec/lib.contracts-spec/ownership";
515
+ var elevenLabsIntegrationSpec = defineIntegration({
516
+ meta: {
517
+ key: "ai-voice.elevenlabs",
518
+ version: "1.0.0",
519
+ category: "ai-voice",
520
+ title: "ElevenLabs Text-to-Speech",
521
+ description: "ElevenLabs integration for neural voice synthesis and voice catalog access.",
522
+ domain: "ai",
523
+ owners: ["platform.ai"],
524
+ tags: ["voice", "tts"],
525
+ stability: StabilityEnum7.Beta
526
+ },
527
+ supportedModes: ["managed", "byok"],
528
+ capabilities: {
529
+ provides: [{ key: "ai.voice.synthesis", version: "1.0.0" }]
530
+ },
531
+ configSchema: {
532
+ schema: {
533
+ type: "object",
534
+ properties: {
535
+ defaultVoiceId: {
536
+ type: "string",
537
+ description: "Optional default voice identifier for synthesis requests."
538
+ }
539
+ }
540
+ },
541
+ example: {
542
+ defaultVoiceId: "pNInz6obpgDQGcFmaJgB"
543
+ }
544
+ },
545
+ secretSchema: {
546
+ schema: {
547
+ type: "object",
548
+ required: ["apiKey"],
549
+ properties: {
550
+ apiKey: {
551
+ type: "string",
552
+ description: "ElevenLabs API key with text-to-speech permissions."
553
+ }
554
+ }
555
+ },
556
+ example: {
557
+ apiKey: "eleven-***"
558
+ }
559
+ },
560
+ healthCheck: {
561
+ method: "custom",
562
+ timeoutMs: 4000
563
+ },
564
+ docsUrl: "https://elevenlabs.io/docs/api-reference/text-to-speech",
565
+ constraints: {
566
+ rateLimit: {
567
+ rpm: 120
568
+ }
569
+ },
570
+ byokSetup: {
571
+ setupInstructions: "Create an ElevenLabs API key and ensure the desired voices are accessible to the key scope."
572
+ }
573
+ });
574
+ function registerElevenLabsIntegration(registry) {
575
+ return registry.register(elevenLabsIntegrationSpec);
576
+ }
577
+
578
+ // src/integrations/providers/gradium.ts
579
+ import { StabilityEnum as StabilityEnum8 } from "@contractspec/lib.contracts-spec/ownership";
580
+ var gradiumIntegrationSpec = defineIntegration({
581
+ meta: {
582
+ key: "ai-voice.gradium",
583
+ version: "1.0.0",
584
+ category: "ai-voice",
585
+ title: "Gradium Text-to-Speech",
586
+ description: "Gradium integration for low-latency voice synthesis and voice catalog access.",
587
+ domain: "ai",
588
+ owners: ["platform.ai"],
589
+ tags: ["voice", "tts", "realtime"],
590
+ stability: StabilityEnum8.Experimental
591
+ },
592
+ supportedModes: ["byok"],
593
+ capabilities: {
594
+ provides: [{ key: "ai.voice.synthesis", version: "1.0.0" }]
595
+ },
596
+ configSchema: {
597
+ schema: {
598
+ type: "object",
599
+ properties: {
600
+ defaultVoiceId: {
601
+ type: "string",
602
+ description: "Optional default voice identifier used for synthesis."
603
+ },
604
+ region: {
605
+ type: "string",
606
+ enum: ["eu", "us"],
607
+ description: "Gradium region used by the SDK (eu or us)."
608
+ },
609
+ baseUrl: {
610
+ type: "string",
611
+ description: "Optional API base URL override for private routing or proxies."
612
+ },
613
+ timeoutMs: {
614
+ type: "number",
615
+ description: "Optional request timeout in milliseconds."
616
+ },
617
+ outputFormat: {
618
+ type: "string",
619
+ enum: [
620
+ "wav",
621
+ "pcm",
622
+ "opus",
623
+ "ulaw_8000",
624
+ "alaw_8000",
625
+ "pcm_16000",
626
+ "pcm_24000"
627
+ ],
628
+ description: "Optional default output format used when no format is specified."
629
+ }
630
+ }
631
+ },
632
+ example: {
633
+ defaultVoiceId: "YTpq7expH9539ERJ",
634
+ region: "eu",
635
+ timeoutMs: 15000,
636
+ outputFormat: "wav"
637
+ }
638
+ },
639
+ secretSchema: {
640
+ schema: {
641
+ type: "object",
642
+ required: ["apiKey"],
643
+ properties: {
644
+ apiKey: {
645
+ type: "string",
646
+ description: "Gradium API key with TTS access."
647
+ }
648
+ }
649
+ },
650
+ example: {
651
+ apiKey: "gd_***"
652
+ }
653
+ },
654
+ healthCheck: {
655
+ method: "custom",
656
+ timeoutMs: 5000
657
+ },
658
+ docsUrl: "https://gradium.ai/api_docs.html",
659
+ byokSetup: {
660
+ setupInstructions: "Create a Gradium API key, select the target region, and store credentials in your tenant secret provider."
661
+ }
662
+ });
663
+ function registerGradiumIntegration(registry) {
664
+ return registry.register(gradiumIntegrationSpec);
665
+ }
666
+
667
+ // src/integrations/providers/fal.ts
668
+ import { StabilityEnum as StabilityEnum9 } from "@contractspec/lib.contracts-spec/ownership";
669
+ var falIntegrationSpec = defineIntegration({
670
+ meta: {
671
+ key: "ai-voice.fal",
672
+ version: "1.0.0",
673
+ category: "ai-voice",
674
+ title: "Fal Chatterbox Text-to-Speech",
675
+ description: "Fal integration for voice synthesis using Chatterbox text-to-speech models.",
676
+ domain: "ai",
677
+ owners: ["platform.ai"],
678
+ tags: ["voice", "tts", "chatterbox"],
679
+ stability: StabilityEnum9.Experimental
680
+ },
681
+ supportedModes: ["byok"],
682
+ capabilities: {
683
+ provides: [{ key: "ai.voice.synthesis", version: "1.0.0" }]
684
+ },
685
+ configSchema: {
686
+ schema: {
687
+ type: "object",
688
+ properties: {
689
+ modelId: {
690
+ type: "string",
691
+ description: "Fal model endpoint identifier (e.g. fal-ai/chatterbox/text-to-speech)."
692
+ },
693
+ defaultVoiceUrl: {
694
+ type: "string",
695
+ description: "Optional reference audio URL used as default voice conditioning input."
696
+ },
697
+ defaultExaggeration: {
698
+ type: "number",
699
+ minimum: 0,
700
+ maximum: 1,
701
+ description: "Optional default exaggeration value for speech output."
702
+ },
703
+ defaultTemperature: {
704
+ type: "number",
705
+ minimum: 0.05,
706
+ maximum: 2,
707
+ description: "Optional default temperature for synthesis requests."
708
+ },
709
+ defaultCfg: {
710
+ type: "number",
711
+ minimum: 0.1,
712
+ maximum: 1,
713
+ description: "Optional default cfg value for synthesis requests."
714
+ },
715
+ pollIntervalMs: {
716
+ type: "number",
717
+ description: "Optional queue polling interval in milliseconds."
718
+ }
719
+ }
720
+ },
721
+ example: {
722
+ modelId: "fal-ai/chatterbox/text-to-speech",
723
+ defaultVoiceUrl: "https://storage.googleapis.com/chatterbox-demo-samples/prompts/male_rickmorty.mp3",
724
+ defaultExaggeration: 0.25,
725
+ defaultTemperature: 0.7,
726
+ defaultCfg: 0.5,
727
+ pollIntervalMs: 1000
728
+ }
729
+ },
730
+ secretSchema: {
731
+ schema: {
732
+ type: "object",
733
+ required: ["apiKey"],
734
+ properties: {
735
+ apiKey: {
736
+ type: "string",
737
+ description: "Fal API key (FAL_KEY)."
738
+ }
739
+ }
740
+ },
741
+ example: {
742
+ apiKey: "key-id:key-secret"
743
+ }
744
+ },
745
+ healthCheck: {
746
+ method: "custom",
747
+ timeoutMs: 7000
748
+ },
749
+ docsUrl: "https://fal.ai/models/fal-ai/chatterbox/text-to-speech/api",
750
+ byokSetup: {
751
+ setupInstructions: "Create a Fal API key and configure the desired voice model endpoint before connecting tenants."
752
+ }
753
+ });
754
+ function registerFalIntegration(registry) {
755
+ return registry.register(falIntegrationSpec);
756
+ }
757
+
758
+ // src/integrations/providers/gmail.ts
759
+ import { StabilityEnum as StabilityEnum10 } from "@contractspec/lib.contracts-spec/ownership";
760
+ var gmailIntegrationSpec = defineIntegration({
761
+ meta: {
762
+ key: "email.gmail",
763
+ version: "1.0.0",
764
+ category: "email",
765
+ title: "Google Gmail API",
766
+ description: "Gmail integration supporting inbound thread ingestion and outbound transactional email.",
767
+ domain: "communications",
768
+ owners: ["platform.messaging"],
769
+ tags: ["email", "gmail"],
770
+ stability: StabilityEnum10.Beta
771
+ },
772
+ supportedModes: ["managed", "byok"],
773
+ capabilities: {
774
+ provides: [
775
+ { key: "email.inbound", version: "1.0.0" },
776
+ { key: "email.outbound", version: "1.0.0" }
777
+ ]
778
+ },
779
+ configSchema: {
780
+ schema: {
781
+ type: "object",
782
+ properties: {
783
+ labelIds: {
784
+ type: "array",
785
+ items: { type: "string" },
786
+ description: "Optional list of label IDs to scope inbound sync."
787
+ },
788
+ includeSpamTrash: {
789
+ type: "boolean",
790
+ description: "Whether to include spam or trash messages during sync."
791
+ }
792
+ }
793
+ },
794
+ example: {
795
+ labelIds: ["INBOX"],
796
+ includeSpamTrash: false
797
+ }
798
+ },
799
+ secretSchema: {
800
+ schema: {
801
+ type: "object",
802
+ required: ["clientId", "clientSecret", "refreshToken"],
803
+ properties: {
804
+ clientId: {
805
+ type: "string",
806
+ description: "OAuth client ID for the Google Cloud project."
807
+ },
808
+ clientSecret: {
809
+ type: "string",
810
+ description: "OAuth client secret for the Google Cloud project."
811
+ },
812
+ refreshToken: {
813
+ type: "string",
814
+ description: "OAuth refresh token for delegated Gmail access."
815
+ },
816
+ redirectUri: {
817
+ type: "string",
818
+ description: "Optional redirect URI used when issuing the refresh token."
819
+ }
820
+ }
821
+ },
822
+ example: {
823
+ clientId: "xxx.apps.googleusercontent.com",
824
+ clientSecret: "secret",
825
+ refreshToken: "refresh-token"
826
+ }
827
+ },
828
+ healthCheck: {
829
+ method: "custom",
830
+ timeoutMs: 4000
831
+ },
832
+ docsUrl: "https://developers.google.com/gmail/api",
833
+ constraints: {
834
+ rateLimit: {
835
+ rpm: 600
836
+ }
837
+ },
838
+ byokSetup: {
839
+ setupInstructions: "Create an OAuth consent screen and credentials within Google Cloud Console, then authorize the Gmail scopes and store the resulting refresh token."
840
+ }
841
+ });
842
+ function registerGmailIntegration(registry) {
843
+ return registry.register(gmailIntegrationSpec);
844
+ }
845
+
846
+ // src/integrations/providers/google-calendar.ts
847
+ import { StabilityEnum as StabilityEnum11 } from "@contractspec/lib.contracts-spec/ownership";
848
+ var googleCalendarIntegrationSpec = defineIntegration({
849
+ meta: {
850
+ key: "calendar.google",
851
+ version: "1.0.0",
852
+ category: "calendar",
853
+ title: "Google Calendar API",
854
+ description: "Google Calendar integration for event creation, updates, and scheduling automations.",
855
+ domain: "productivity",
856
+ owners: ["platform.messaging"],
857
+ tags: ["calendar", "google"],
858
+ stability: StabilityEnum11.Beta
859
+ },
860
+ supportedModes: ["managed", "byok"],
861
+ capabilities: {
862
+ provides: [{ key: "calendar.events", version: "1.0.0" }]
863
+ },
864
+ configSchema: {
865
+ schema: {
866
+ type: "object",
867
+ properties: {
868
+ calendarId: {
869
+ type: "string",
870
+ description: "Default calendar identifier (defaults to primary)."
871
+ }
872
+ }
873
+ },
874
+ example: {
875
+ calendarId: "primary"
876
+ }
877
+ },
878
+ secretSchema: {
879
+ schema: {
880
+ type: "object",
881
+ required: ["clientEmail", "privateKey"],
882
+ properties: {
883
+ clientEmail: {
884
+ type: "string",
885
+ description: "Service account client email."
886
+ },
887
+ privateKey: {
888
+ type: "string",
889
+ description: "Service account private key."
890
+ },
891
+ projectId: {
892
+ type: "string",
893
+ description: "Google Cloud project ID."
894
+ }
895
+ }
896
+ },
897
+ example: {
898
+ clientEmail: "svc-calendar@example.iam.gserviceaccount.com",
899
+ privateKey: "-----BEGIN PRIVATE KEY-----...",
900
+ projectId: "calendar-project"
901
+ }
902
+ },
903
+ healthCheck: {
904
+ method: "custom",
905
+ timeoutMs: 4000
906
+ },
907
+ docsUrl: "https://developers.google.com/calendar/api",
908
+ constraints: {},
909
+ byokSetup: {
910
+ setupInstructions: "Create a Google service account with Calendar access and share the target calendars with the service account email."
911
+ }
912
+ });
913
+ function registerGoogleCalendarIntegration(registry) {
914
+ return registry.register(googleCalendarIntegrationSpec);
915
+ }
916
+
917
+ // src/integrations/providers/twilio-sms.ts
918
+ import { StabilityEnum as StabilityEnum12 } from "@contractspec/lib.contracts-spec/ownership";
919
+ var twilioSmsIntegrationSpec = defineIntegration({
920
+ meta: {
921
+ key: "sms.twilio",
922
+ version: "1.0.0",
923
+ category: "sms",
924
+ title: "Twilio Messaging",
925
+ description: "Twilio SMS integration for transactional and notification messaging.",
926
+ domain: "communications",
927
+ owners: ["platform.messaging"],
928
+ tags: ["sms", "messaging"],
929
+ stability: StabilityEnum12.Stable
930
+ },
931
+ supportedModes: ["managed", "byok"],
932
+ capabilities: {
933
+ provides: [{ key: "sms.outbound", version: "1.0.0" }]
934
+ },
935
+ configSchema: {
936
+ schema: {
937
+ type: "object",
938
+ properties: {
939
+ fromNumber: {
940
+ type: "string",
941
+ description: "Default Twilio phone number used as sender."
942
+ }
943
+ }
944
+ },
945
+ example: {
946
+ fromNumber: "+15551234567"
947
+ }
948
+ },
949
+ secretSchema: {
950
+ schema: {
951
+ type: "object",
952
+ required: ["accountSid", "authToken"],
953
+ properties: {
954
+ accountSid: {
955
+ type: "string",
956
+ description: "Twilio Account SID."
957
+ },
958
+ authToken: {
959
+ type: "string",
960
+ description: "Twilio Auth Token."
961
+ }
962
+ }
963
+ },
964
+ example: {
965
+ accountSid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
966
+ authToken: "auth-token"
967
+ }
968
+ },
969
+ healthCheck: {
970
+ method: "custom",
971
+ timeoutMs: 3000
972
+ },
973
+ docsUrl: "https://www.twilio.com/docs/sms/api",
974
+ constraints: {
975
+ rateLimit: {
976
+ rpm: 200
977
+ }
978
+ },
979
+ byokSetup: {
980
+ setupInstructions: "Provide a Twilio account SID, auth token, and verify the outbound sending numbers used by the integration."
981
+ }
982
+ });
983
+ function registerTwilioSmsIntegration(registry) {
984
+ return registry.register(twilioSmsIntegrationSpec);
985
+ }
986
+
987
+ // src/integrations/providers/gcs-storage.ts
988
+ import { StabilityEnum as StabilityEnum13 } from "@contractspec/lib.contracts-spec/ownership";
989
+ var gcsStorageIntegrationSpec = defineIntegration({
990
+ meta: {
991
+ key: "storage.gcs",
992
+ version: "1.0.0",
993
+ category: "storage",
994
+ title: "Google Cloud Storage Buckets",
995
+ description: "Google Cloud Storage integration for object storage and retrieval.",
996
+ domain: "infrastructure",
997
+ owners: ["platform.infrastructure"],
998
+ tags: ["storage", "gcs", "google-cloud"],
999
+ stability: StabilityEnum13.Beta
1000
+ },
1001
+ supportedModes: ["managed", "byok"],
1002
+ capabilities: {
1003
+ provides: [{ key: "storage.objects", version: "1.0.0" }]
1004
+ },
1005
+ configSchema: {
1006
+ schema: {
1007
+ type: "object",
1008
+ required: ["bucket"],
1009
+ properties: {
1010
+ bucket: {
1011
+ type: "string",
1012
+ description: "Primary bucket name used for storing objects."
1013
+ },
1014
+ prefix: {
1015
+ type: "string",
1016
+ description: "Optional prefix applied to object keys."
1017
+ }
1018
+ }
1019
+ },
1020
+ example: {
1021
+ bucket: "pfo-tenant-assets",
1022
+ prefix: "documents/"
1023
+ }
1024
+ },
1025
+ secretSchema: {
1026
+ schema: {
1027
+ type: "object",
1028
+ properties: {
1029
+ type: {
1030
+ type: "string",
1031
+ description: "Service account type field from Google credentials JSON (if provided)."
1032
+ },
1033
+ client_email: { type: "string" },
1034
+ private_key: { type: "string" },
1035
+ project_id: { type: "string" }
1036
+ }
1037
+ },
1038
+ example: {
1039
+ type: "service_account",
1040
+ client_email: "svc-account@example.iam.gserviceaccount.com",
1041
+ private_key: "-----BEGIN PRIVATE KEY-----...",
1042
+ project_id: "example-project"
1043
+ }
1044
+ },
1045
+ healthCheck: {
1046
+ method: "ping",
1047
+ timeoutMs: 4000
1048
+ },
1049
+ docsUrl: "https://cloud.google.com/storage/docs/apis",
1050
+ constraints: {
1051
+ quotas: {
1052
+ storageGb: 5120
1053
+ }
1054
+ },
1055
+ byokSetup: {
1056
+ setupInstructions: "Create a Google Cloud service account with Storage Object Admin role and upload the JSON credentials to the secret store."
1057
+ }
1058
+ });
1059
+ function registerGcsStorageIntegration(registry) {
1060
+ return registry.register(gcsStorageIntegrationSpec);
1061
+ }
1062
+
1063
+ // src/integrations/providers/powens.ts
1064
+ import { StabilityEnum as StabilityEnum14 } from "@contractspec/lib.contracts-spec/ownership";
1065
+ var powensIntegrationSpec = defineIntegration({
1066
+ meta: {
1067
+ key: "openbanking.powens",
1068
+ version: "1.0.0",
1069
+ category: "open-banking",
1070
+ title: "Powens Open Banking (Read)",
1071
+ description: "Read-only Open Banking integration powered by Powens, exposing accounts, transactions, and balances.",
1072
+ domain: "finance",
1073
+ owners: ["platform.finance"],
1074
+ tags: ["open-banking", "powens", "finance"],
1075
+ stability: StabilityEnum14.Experimental
1076
+ },
1077
+ supportedModes: ["byok"],
1078
+ capabilities: {
1079
+ provides: [
1080
+ { key: "openbanking.accounts.read", version: "1.0.0" },
1081
+ { key: "openbanking.transactions.read", version: "1.0.0" },
1082
+ { key: "openbanking.balances.read", version: "1.0.0" }
1083
+ ]
1084
+ },
1085
+ configSchema: {
1086
+ schema: {
1087
+ type: "object",
1088
+ required: ["environment"],
1089
+ properties: {
1090
+ environment: {
1091
+ type: "string",
1092
+ enum: ["sandbox", "production"],
1093
+ description: "Powens environment to target. Sandbox uses Powens test API base URL, production uses live endpoints."
1094
+ },
1095
+ baseUrl: {
1096
+ type: "string",
1097
+ description: "Optional override for the Powens API base URL. Defaults to Powens environment defaults."
1098
+ },
1099
+ region: {
1100
+ type: "string",
1101
+ description: "Optional Powens region identifier when targeting a specific data residency cluster."
1102
+ },
1103
+ pollingIntervalMs: {
1104
+ type: "number",
1105
+ description: "Optional custom polling interval in milliseconds for background sync jobs (defaults to platform standard)."
1106
+ }
1107
+ }
1108
+ },
1109
+ example: {
1110
+ environment: "sandbox",
1111
+ baseUrl: "https://api-sandbox.powens.com/v2",
1112
+ region: "eu-west-1",
1113
+ pollingIntervalMs: 300000
1114
+ }
1115
+ },
1116
+ secretSchema: {
1117
+ schema: {
1118
+ type: "object",
1119
+ required: ["clientId", "clientSecret"],
1120
+ properties: {
1121
+ clientId: {
1122
+ type: "string",
1123
+ description: "Powens OAuth client identifier obtained from the Powens Console (BYOK project)."
1124
+ },
1125
+ clientSecret: {
1126
+ type: "string",
1127
+ description: "Powens OAuth client secret used to exchange for access tokens."
1128
+ },
1129
+ apiKey: {
1130
+ type: "string",
1131
+ description: "Optional Powens API key (if the tenant project exposes a dedicated API token)."
1132
+ },
1133
+ webhookSecret: {
1134
+ type: "string",
1135
+ description: "Optional webhook signing secret used to verify Powens webhook payloads."
1136
+ }
1137
+ }
1138
+ },
1139
+ example: {
1140
+ clientId: "powens-client-id",
1141
+ clientSecret: "powens-client-secret",
1142
+ apiKey: "powens-api-key",
1143
+ webhookSecret: "powens-webhook-secret"
1144
+ }
1145
+ },
1146
+ healthCheck: {
1147
+ method: "ping",
1148
+ timeoutMs: 8000
1149
+ },
1150
+ docsUrl: "https://docs.powens.com/",
1151
+ constraints: {
1152
+ rateLimit: {
1153
+ rph: 1e4,
1154
+ rpm: 600
1155
+ }
1156
+ },
1157
+ byokSetup: {
1158
+ setupInstructions: "Create a Powens BYOK project, generate OAuth credentials, and optionally configure webhook delivery for account/transaction updates.",
1159
+ requiredScopes: ["accounts:read", "transactions:read", "balances:read"]
1160
+ }
1161
+ });
1162
+ function registerPowensIntegration(registry) {
1163
+ return registry.register(powensIntegrationSpec);
1164
+ }
1165
+
1166
+ // src/integrations/providers/posthog.ts
1167
+ import { StabilityEnum as StabilityEnum15 } from "@contractspec/lib.contracts-spec/ownership";
1168
+ var posthogIntegrationSpec = defineIntegration({
1169
+ meta: {
1170
+ key: "analytics.posthog",
1171
+ version: "1.1.0",
1172
+ category: "analytics",
1173
+ title: "PostHog",
1174
+ description: "PostHog integration for product analytics, feature flags, HogQL queries, and LLM analytics with evaluations.",
1175
+ domain: "analytics",
1176
+ owners: ["@platform.integrations"],
1177
+ tags: ["analytics", "posthog", "llm", "ai"],
1178
+ stability: StabilityEnum15.Beta
1179
+ },
1180
+ supportedModes: ["managed", "byok"],
1181
+ capabilities: {
1182
+ provides: [
1183
+ { key: "analytics.events", version: "1.0.0" },
1184
+ { key: "analytics.feature-flags", version: "1.0.0" },
1185
+ { key: "analytics.query", version: "1.0.0" },
1186
+ { key: "analytics.events.read", version: "1.0.0" },
1187
+ { key: "analytics.persons", version: "1.0.0" },
1188
+ { key: "analytics.insights", version: "1.0.0" },
1189
+ { key: "analytics.cohorts", version: "1.0.0" },
1190
+ { key: "analytics.annotations", version: "1.0.0" },
1191
+ { key: "analytics.llm-tracing", version: "1.0.0" },
1192
+ { key: "analytics.llm-evaluations", version: "1.0.0" }
1193
+ ]
1194
+ },
1195
+ configSchema: {
1196
+ schema: {
1197
+ type: "object",
1198
+ properties: {
1199
+ host: {
1200
+ type: "string",
1201
+ description: "PostHog host (e.g., https://app.posthog.com or self-hosted URL)."
1202
+ },
1203
+ projectId: {
1204
+ type: "string",
1205
+ description: "PostHog project ID for API queries."
1206
+ },
1207
+ mcpUrl: {
1208
+ type: "string",
1209
+ description: "Optional MCP endpoint URL for PostHog tools."
1210
+ }
1211
+ }
1212
+ },
1213
+ example: {
1214
+ host: "https://app.posthog.com",
1215
+ projectId: "12345"
1216
+ }
1217
+ },
1218
+ secretSchema: {
1219
+ schema: {
1220
+ type: "object",
1221
+ required: ["personalApiKey"],
1222
+ properties: {
1223
+ personalApiKey: {
1224
+ type: "string",
1225
+ description: "PostHog personal API key (required for API reads/writes)."
1226
+ },
1227
+ projectApiKey: {
1228
+ type: "string",
1229
+ description: "PostHog project API key (required for capture/ingest events)."
1230
+ }
1231
+ }
1232
+ },
1233
+ example: {
1234
+ personalApiKey: "phx_personal_api_key",
1235
+ projectApiKey: "phc_project_api_key"
1236
+ }
1237
+ },
1238
+ healthCheck: {
1239
+ method: "custom",
1240
+ timeoutMs: 5000
1241
+ },
1242
+ docsUrl: "https://posthog.com/docs",
1243
+ byokSetup: {
1244
+ setupInstructions: "Generate a PostHog personal API key for read/write operations and a project API key for event capture."
1245
+ }
1246
+ });
1247
+ function registerPosthogIntegration(registry) {
1248
+ return registry.register(posthogIntegrationSpec);
1249
+ }
1250
+
1251
+ // src/integrations/providers/posthog-llm-telemetry.ts
1252
+ import { StabilityEnum as StabilityEnum16 } from "@contractspec/lib.contracts-spec/ownership";
1253
+ var posthogLLMTelemetrySpec = {
1254
+ meta: {
1255
+ key: "analytics.posthog.llm",
1256
+ version: "1.0.0",
1257
+ title: "PostHog LLM Analytics Telemetry",
1258
+ description: "Telemetry events for PostHog LLM Analytics: generation tracing, token usage, and evaluation-ready metadata.",
1259
+ domain: "analytics",
1260
+ owners: ["@platform.integrations"],
1261
+ tags: ["analytics", "posthog", "llm", "ai", "telemetry"],
1262
+ stability: StabilityEnum16.Beta
1263
+ },
1264
+ events: [
1265
+ {
1266
+ key: "posthog.llm.generation",
1267
+ version: "1.0.0",
1268
+ semantics: {
1269
+ who: "AI agent or LLM consumer",
1270
+ what: "Captures an LLM generation call with full observability metadata",
1271
+ why: "Enable LLM performance monitoring, cost tracking, and automated quality evaluations via PostHog"
1272
+ },
1273
+ properties: {
1274
+ $ai_model: {
1275
+ type: "string",
1276
+ required: true,
1277
+ description: "The LLM model identifier (e.g., gpt-4o, claude-sonnet-4-20250514)"
1278
+ },
1279
+ $ai_provider: {
1280
+ type: "string",
1281
+ required: true,
1282
+ description: "The LLM provider (e.g., openai, anthropic, contractspec)"
1283
+ },
1284
+ $ai_latency: {
1285
+ type: "number",
1286
+ required: false,
1287
+ description: "LLM call latency in seconds"
1288
+ },
1289
+ $ai_input_tokens: {
1290
+ type: "number",
1291
+ required: false,
1292
+ description: "Number of input/prompt tokens consumed"
1293
+ },
1294
+ $ai_output_tokens: {
1295
+ type: "number",
1296
+ required: false,
1297
+ description: "Number of output/completion tokens generated"
1298
+ },
1299
+ $ai_total_cost_usd: {
1300
+ type: "number",
1301
+ required: false,
1302
+ description: "Total cost in USD (input + output)"
1303
+ },
1304
+ $ai_is_error: {
1305
+ type: "boolean",
1306
+ required: false,
1307
+ description: "Whether the generation resulted in an error"
1308
+ },
1309
+ $ai_trace_id: {
1310
+ type: "string",
1311
+ required: false,
1312
+ description: "Trace ID for grouping related generations"
1313
+ },
1314
+ $ai_stream: {
1315
+ type: "boolean",
1316
+ required: false,
1317
+ description: "Whether the response was streamed"
1318
+ },
1319
+ $ai_time_to_first_token: {
1320
+ type: "number",
1321
+ required: false,
1322
+ description: "Time to first token in seconds (streaming only)"
1323
+ },
1324
+ $ai_tools: {
1325
+ type: "json",
1326
+ required: false,
1327
+ description: "Tools/functions available to the LLM"
1328
+ },
1329
+ $ai_input: {
1330
+ type: "json",
1331
+ required: false,
1332
+ pii: true,
1333
+ redact: true,
1334
+ description: "Messages sent to the LLM (may contain PII)"
1335
+ },
1336
+ $ai_output_choices: {
1337
+ type: "json",
1338
+ required: false,
1339
+ pii: true,
1340
+ redact: true,
1341
+ description: "Response choices from the LLM (may contain PII)"
1342
+ },
1343
+ contractspec_operation: {
1344
+ type: "string",
1345
+ required: false,
1346
+ description: "ContractSpec operation name"
1347
+ },
1348
+ contractspec_version: {
1349
+ type: "string",
1350
+ required: false,
1351
+ description: "ContractSpec operation version"
1352
+ },
1353
+ contractspec_agent_id: {
1354
+ type: "string",
1355
+ required: false,
1356
+ description: "ContractSpec agent identifier"
1357
+ },
1358
+ contractspec_finish_reason: {
1359
+ type: "string",
1360
+ required: false,
1361
+ description: "AI SDK finish reason (stop, tool-calls, error, etc.)"
1362
+ },
1363
+ contractspec_tool_count: {
1364
+ type: "number",
1365
+ required: false,
1366
+ description: "Number of tool calls made in this step"
1367
+ }
1368
+ },
1369
+ privacy: "internal",
1370
+ tags: ["llm", "generation", "posthog"]
1371
+ }
1372
+ ],
1373
+ config: {
1374
+ defaultRetentionDays: 90,
1375
+ defaultSamplingRate: 1,
1376
+ providers: [
1377
+ {
1378
+ type: "posthog",
1379
+ config: {
1380
+ eventName: "$ai_generation",
1381
+ enableEvaluations: true,
1382
+ evaluationTemplates: [
1383
+ "relevance",
1384
+ "helpfulness",
1385
+ "jailbreak",
1386
+ "hallucination",
1387
+ "toxicity"
1388
+ ]
1389
+ }
1390
+ }
1391
+ ]
1392
+ }
1393
+ };
1394
+ var POSTHOG_LLM_PII_FIELDS = [
1395
+ "$ai_input",
1396
+ "$ai_output_choices"
1397
+ ];
1398
+ var POSTHOG_LLM_TELEMETRY_EVENTS = {
1399
+ generation: "$ai_generation",
1400
+ span: "$ai_span",
1401
+ evaluation: "$ai_evaluation"
1402
+ };
1403
+ var POSTHOG_EVALUATION_TEMPLATES = {
1404
+ relevance: "relevance",
1405
+ helpfulness: "helpfulness",
1406
+ jailbreak: "jailbreak",
1407
+ hallucination: "hallucination",
1408
+ toxicity: "toxicity"
1409
+ };
1410
+ function redactPostHogLLMTelemetryPayload(payload) {
1411
+ const redacted = { ...payload };
1412
+ for (const field of POSTHOG_LLM_PII_FIELDS) {
1413
+ if (field in redacted) {
1414
+ redacted[field] = "[REDACTED]";
1415
+ }
1416
+ }
1417
+ return redacted;
1418
+ }
1419
+
1420
+ // src/integrations/providers/linear.ts
1421
+ import { StabilityEnum as StabilityEnum17 } from "@contractspec/lib.contracts-spec/ownership";
1422
+ var linearIntegrationSpec = defineIntegration({
1423
+ meta: {
1424
+ key: "project-management.linear",
1425
+ version: "1.0.0",
1426
+ category: "project-management",
1427
+ title: "Linear",
1428
+ description: "Linear integration for issue tracking and project management workflows.",
1429
+ domain: "productivity",
1430
+ owners: ["@platform.integrations"],
1431
+ tags: ["project-management", "linear"],
1432
+ stability: StabilityEnum17.Beta
1433
+ },
1434
+ supportedModes: ["managed", "byok"],
1435
+ capabilities: {
1436
+ provides: [{ key: "project-management.work-items", version: "1.0.0" }]
1437
+ },
1438
+ configSchema: {
1439
+ schema: {
1440
+ type: "object",
1441
+ required: ["teamId"],
1442
+ properties: {
1443
+ teamId: {
1444
+ type: "string",
1445
+ description: "Linear team ID that owns created issues."
1446
+ },
1447
+ projectId: {
1448
+ type: "string",
1449
+ description: "Optional default project ID for new issues."
1450
+ },
1451
+ stateId: {
1452
+ type: "string",
1453
+ description: "Optional default workflow state ID."
1454
+ },
1455
+ assigneeId: {
1456
+ type: "string",
1457
+ description: "Optional default assignee ID."
1458
+ },
1459
+ labelIds: {
1460
+ type: "array",
1461
+ items: { type: "string" },
1462
+ description: "Optional label IDs applied to each issue."
1463
+ },
1464
+ tagLabelMap: {
1465
+ type: "object",
1466
+ additionalProperties: { type: "string" },
1467
+ description: "Optional mapping of tags to Linear label IDs (tag -> labelId)."
1468
+ }
1469
+ }
1470
+ },
1471
+ example: {
1472
+ teamId: "team_123",
1473
+ projectId: "proj_456",
1474
+ labelIds: ["label_1", "label_2"]
1475
+ }
1476
+ },
1477
+ secretSchema: {
1478
+ schema: {
1479
+ type: "object",
1480
+ required: ["apiKey"],
1481
+ properties: {
1482
+ apiKey: {
1483
+ type: "string",
1484
+ description: "Linear API key (personal or service token)."
1485
+ }
1486
+ }
1487
+ },
1488
+ example: {
1489
+ apiKey: "lin_api_key"
1490
+ }
1491
+ },
1492
+ healthCheck: {
1493
+ method: "custom",
1494
+ timeoutMs: 4000
1495
+ },
1496
+ docsUrl: "https://developers.linear.app",
1497
+ constraints: {},
1498
+ byokSetup: {
1499
+ setupInstructions: "Create a Linear API key with issue:write permission and store it as a secret."
1500
+ }
1501
+ });
1502
+ function registerLinearIntegration(registry) {
1503
+ return registry.register(linearIntegrationSpec);
1504
+ }
1505
+
1506
+ // src/integrations/providers/jira.ts
1507
+ import { StabilityEnum as StabilityEnum18 } from "@contractspec/lib.contracts-spec/ownership";
1508
+ var jiraIntegrationSpec = defineIntegration({
1509
+ meta: {
1510
+ key: "project-management.jira",
1511
+ version: "1.0.0",
1512
+ category: "project-management",
1513
+ title: "Jira Cloud",
1514
+ description: "Jira Cloud integration for creating and tracking work items.",
1515
+ domain: "productivity",
1516
+ owners: ["@platform.integrations"],
1517
+ tags: ["project-management", "jira"],
1518
+ stability: StabilityEnum18.Beta
1519
+ },
1520
+ supportedModes: ["managed", "byok"],
1521
+ capabilities: {
1522
+ provides: [{ key: "project-management.work-items", version: "1.0.0" }]
1523
+ },
1524
+ configSchema: {
1525
+ schema: {
1526
+ type: "object",
1527
+ required: ["siteUrl"],
1528
+ properties: {
1529
+ siteUrl: {
1530
+ type: "string",
1531
+ description: "Jira Cloud site URL (e.g., https://acme.atlassian.net)."
1532
+ },
1533
+ projectKey: {
1534
+ type: "string",
1535
+ description: "Default Jira project key for new issues."
1536
+ },
1537
+ issueType: {
1538
+ type: "string",
1539
+ description: "Default Jira issue type (e.g., Task, Story)."
1540
+ },
1541
+ defaultLabels: {
1542
+ type: "array",
1543
+ items: { type: "string" },
1544
+ description: "Labels applied to each issue by default."
1545
+ },
1546
+ issueTypeMap: {
1547
+ type: "object",
1548
+ additionalProperties: { type: "string" },
1549
+ description: "Optional mapping from work item types to Jira issue types."
1550
+ }
1551
+ }
1552
+ },
1553
+ example: {
1554
+ siteUrl: "https://acme.atlassian.net",
1555
+ projectKey: "PM",
1556
+ issueType: "Task"
1557
+ }
1558
+ },
1559
+ secretSchema: {
1560
+ schema: {
1561
+ type: "object",
1562
+ required: ["email", "apiToken"],
1563
+ properties: {
1564
+ email: {
1565
+ type: "string",
1566
+ description: "Jira account email used for API token auth."
1567
+ },
1568
+ apiToken: {
1569
+ type: "string",
1570
+ description: "Jira Cloud API token for the account."
1571
+ }
1572
+ }
1573
+ },
1574
+ example: {
1575
+ email: "user@acme.com",
1576
+ apiToken: "jira_api_token"
1577
+ }
1578
+ },
1579
+ healthCheck: {
1580
+ method: "custom",
1581
+ timeoutMs: 4000
1582
+ },
1583
+ docsUrl: "https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/",
1584
+ constraints: {},
1585
+ byokSetup: {
1586
+ setupInstructions: "Create a Jira API token and store it with the associated account email."
1587
+ }
1588
+ });
1589
+ function registerJiraIntegration(registry) {
1590
+ return registry.register(jiraIntegrationSpec);
1591
+ }
1592
+
1593
+ // src/integrations/providers/notion.ts
1594
+ import { StabilityEnum as StabilityEnum19 } from "@contractspec/lib.contracts-spec/ownership";
1595
+ var notionIntegrationSpec = defineIntegration({
1596
+ meta: {
1597
+ key: "project-management.notion",
1598
+ version: "1.0.0",
1599
+ category: "project-management",
1600
+ title: "Notion",
1601
+ description: "Notion integration for creating shared project summaries and task entries.",
1602
+ domain: "productivity",
1603
+ owners: ["@platform.integrations"],
1604
+ tags: ["project-management", "notion"],
1605
+ stability: StabilityEnum19.Beta
1606
+ },
1607
+ supportedModes: ["managed", "byok"],
1608
+ capabilities: {
1609
+ provides: [{ key: "project-management.work-items", version: "1.0.0" }]
1610
+ },
1611
+ configSchema: {
1612
+ schema: {
1613
+ type: "object",
1614
+ properties: {
1615
+ databaseId: {
1616
+ type: "string",
1617
+ description: "Optional Notion database ID to store tasks."
1618
+ },
1619
+ summaryParentPageId: {
1620
+ type: "string",
1621
+ description: "Optional parent page ID for summary pages."
1622
+ },
1623
+ titleProperty: {
1624
+ type: "string",
1625
+ description: 'Database title property name (defaults to "Name").'
1626
+ },
1627
+ statusProperty: {
1628
+ type: "string",
1629
+ description: "Database status/select property name."
1630
+ },
1631
+ priorityProperty: {
1632
+ type: "string",
1633
+ description: "Database priority/select property name."
1634
+ },
1635
+ tagsProperty: {
1636
+ type: "string",
1637
+ description: "Database multi-select tags property name."
1638
+ },
1639
+ dueDateProperty: {
1640
+ type: "string",
1641
+ description: "Database date property name for due dates."
1642
+ },
1643
+ descriptionProperty: {
1644
+ type: "string",
1645
+ description: "Database rich-text property for descriptions."
1646
+ }
1647
+ }
1648
+ },
1649
+ example: {
1650
+ databaseId: "xxxxxxxxxxxxxxxx",
1651
+ summaryParentPageId: "yyyyyyyyyyyyyyyy",
1652
+ titleProperty: "Name",
1653
+ statusProperty: "Status"
1654
+ }
1655
+ },
1656
+ secretSchema: {
1657
+ schema: {
1658
+ type: "object",
1659
+ required: ["apiKey"],
1660
+ properties: {
1661
+ apiKey: {
1662
+ type: "string",
1663
+ description: "Notion integration secret token."
1664
+ }
1665
+ }
1666
+ },
1667
+ example: {
1668
+ apiKey: "secret_notion_token"
1669
+ }
1670
+ },
1671
+ healthCheck: {
1672
+ method: "custom",
1673
+ timeoutMs: 4000
1674
+ },
1675
+ docsUrl: "https://developers.notion.com",
1676
+ constraints: {},
1677
+ byokSetup: {
1678
+ setupInstructions: "Create a Notion internal integration, share the target database/page with it, and store the secret token."
1679
+ }
1680
+ });
1681
+ function registerNotionIntegration(registry) {
1682
+ return registry.register(notionIntegrationSpec);
1683
+ }
1684
+
1685
+ // src/integrations/providers/granola.ts
1686
+ import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1687
+ var granolaIntegrationSpec = defineIntegration({
1688
+ meta: {
1689
+ key: "meeting-recorder.granola",
1690
+ version: "1.0.0",
1691
+ category: "meeting-recorder",
1692
+ title: "Granola Meeting Notes",
1693
+ description: "Granola meeting notes and transcripts via Enterprise API or MCP transport.",
1694
+ domain: "productivity",
1695
+ owners: ["platform.integrations"],
1696
+ tags: ["meeting-recorder", "granola", "transcripts"],
1697
+ stability: StabilityEnum20.Experimental
1698
+ },
1699
+ supportedModes: ["byok"],
1700
+ capabilities: {
1701
+ provides: [
1702
+ { key: "meeting-recorder.meetings.read", version: "1.0.0" },
1703
+ { key: "meeting-recorder.transcripts.read", version: "1.0.0" }
1704
+ ]
1705
+ },
1706
+ configSchema: {
1707
+ schema: {
1708
+ type: "object",
1709
+ properties: {
1710
+ baseUrl: {
1711
+ type: "string",
1712
+ description: "Optional override for the Granola API base URL. Defaults to https://public-api.granola.ai for API transport."
1713
+ },
1714
+ transport: {
1715
+ type: "string",
1716
+ enum: ["api", "mcp"],
1717
+ description: "Transport mode for Granola integration. Use api for Enterprise API or mcp for broader MCP access."
1718
+ },
1719
+ mcpUrl: {
1720
+ type: "string",
1721
+ description: "Optional override for Granola MCP URL. Defaults to https://mcp.granola.ai/mcp."
1722
+ },
1723
+ mcpHeaders: {
1724
+ type: "object",
1725
+ additionalProperties: { type: "string" },
1726
+ description: "Optional static headers for MCP gateway/proxy setups."
1727
+ },
1728
+ pageSize: {
1729
+ type: "number",
1730
+ description: "Page size for listing notes (maximum 30 per Granola API)."
1731
+ }
1732
+ }
1733
+ },
1734
+ example: {
1735
+ transport: "mcp",
1736
+ mcpUrl: "https://mcp.granola.ai/mcp",
1737
+ pageSize: 10
1738
+ }
1739
+ },
1740
+ secretSchema: {
1741
+ schema: {
1742
+ type: "object",
1743
+ properties: {
1744
+ apiKey: {
1745
+ type: "string",
1746
+ description: "Granola API key used as a Bearer token for Enterprise API requests (transport=api)."
1747
+ },
1748
+ mcpAccessToken: {
1749
+ type: "string",
1750
+ description: "Optional bearer token for MCP proxy/gateway auth (transport=mcp)."
1751
+ }
1752
+ }
1753
+ },
1754
+ example: {
1755
+ mcpAccessToken: "granola-mcp-***"
1756
+ }
1757
+ },
1758
+ healthCheck: {
1759
+ method: "list",
1760
+ timeoutMs: 8000
1761
+ },
1762
+ docsUrl: "https://docs.granola.ai/help-center/sharing/integrations/mcp",
1763
+ byokSetup: {
1764
+ setupInstructions: "Use Granola MCP for browser OAuth access, or configure an Enterprise API key for REST transport."
1765
+ }
1766
+ });
1767
+ function registerGranolaIntegration(registry) {
1768
+ return registry.register(granolaIntegrationSpec);
1769
+ }
1770
+
1771
+ // src/integrations/providers/tldv.ts
1772
+ import { StabilityEnum as StabilityEnum21 } from "@contractspec/lib.contracts-spec/ownership";
1773
+ var tldvIntegrationSpec = defineIntegration({
1774
+ meta: {
1775
+ key: "meeting-recorder.tldv",
1776
+ version: "1.0.0",
1777
+ category: "meeting-recorder",
1778
+ title: "tl;dv Meeting Recorder",
1779
+ description: "tl;dv Public API for meeting recordings, transcripts, and webhook events.",
1780
+ domain: "productivity",
1781
+ owners: ["platform.integrations"],
1782
+ tags: ["meeting-recorder", "tldv", "transcripts"],
1783
+ stability: StabilityEnum21.Experimental
1784
+ },
1785
+ supportedModes: ["byok"],
1786
+ capabilities: {
1787
+ provides: [
1788
+ { key: "meeting-recorder.meetings.read", version: "1.0.0" },
1789
+ { key: "meeting-recorder.transcripts.read", version: "1.0.0" },
1790
+ { key: "meeting-recorder.webhooks", version: "1.0.0" }
1791
+ ]
1792
+ },
1793
+ configSchema: {
1794
+ schema: {
1795
+ type: "object",
1796
+ properties: {
1797
+ baseUrl: {
1798
+ type: "string",
1799
+ description: "Optional override for the tl;dv API base URL. Defaults to https://pasta.tldv.io/v1alpha1."
1800
+ },
1801
+ webhookUrl: {
1802
+ type: "string",
1803
+ description: "Webhook destination URL configured in tl;dv settings (MeetingReady/TranscriptReady)."
1804
+ },
1805
+ webhookEvents: {
1806
+ type: "array",
1807
+ items: { type: "string" },
1808
+ description: "Webhook triggers to enable (MeetingReady, TranscriptReady)."
1809
+ },
1810
+ webhookScope: {
1811
+ type: "string",
1812
+ description: "Webhook scope to configure (user, team, or organization)."
1813
+ }
1814
+ }
1815
+ },
1816
+ example: {
1817
+ baseUrl: "https://pasta.tldv.io/v1alpha1",
1818
+ webhookUrl: "https://example.com/webhooks/tldv",
1819
+ webhookEvents: ["MeetingReady", "TranscriptReady"],
1820
+ webhookScope: "team"
1821
+ }
1822
+ },
1823
+ secretSchema: {
1824
+ schema: {
1825
+ type: "object",
1826
+ required: ["apiKey"],
1827
+ properties: {
1828
+ apiKey: {
1829
+ type: "string",
1830
+ description: "tl;dv API key used in the x-api-key header for API requests."
1831
+ },
1832
+ webhookSecret: {
1833
+ type: "string",
1834
+ description: "Optional shared secret for webhook verification if configured in your environment."
1835
+ }
1836
+ }
1837
+ },
1838
+ example: {
1839
+ apiKey: "tldv-***",
1840
+ webhookSecret: "tldv-webhook-secret"
1841
+ }
1842
+ },
1843
+ healthCheck: {
1844
+ method: "ping",
1845
+ timeoutMs: 6000
1846
+ },
1847
+ docsUrl: "https://doc.tldv.io/index.html",
1848
+ byokSetup: {
1849
+ setupInstructions: "Generate a tl;dv API key and optionally configure MeetingReady/TranscriptReady webhooks."
1850
+ }
1851
+ });
1852
+ function registerTldvIntegration(registry) {
1853
+ return registry.register(tldvIntegrationSpec);
1854
+ }
1855
+
1856
+ // src/integrations/providers/fireflies.ts
1857
+ import { StabilityEnum as StabilityEnum22 } from "@contractspec/lib.contracts-spec/ownership";
1858
+ var firefliesIntegrationSpec = defineIntegration({
1859
+ meta: {
1860
+ key: "meeting-recorder.fireflies",
1861
+ version: "1.0.0",
1862
+ category: "meeting-recorder",
1863
+ title: "Fireflies.ai Meeting Recorder",
1864
+ description: "Fireflies GraphQL API for meeting transcripts, metadata, and webhook events.",
1865
+ domain: "productivity",
1866
+ owners: ["platform.integrations"],
1867
+ tags: ["meeting-recorder", "fireflies", "transcripts"],
1868
+ stability: StabilityEnum22.Experimental
1869
+ },
1870
+ supportedModes: ["byok"],
1871
+ capabilities: {
1872
+ provides: [
1873
+ { key: "meeting-recorder.meetings.read", version: "1.0.0" },
1874
+ { key: "meeting-recorder.transcripts.read", version: "1.0.0" },
1875
+ { key: "meeting-recorder.webhooks", version: "1.0.0" }
1876
+ ]
1877
+ },
1878
+ configSchema: {
1879
+ schema: {
1880
+ type: "object",
1881
+ properties: {
1882
+ baseUrl: {
1883
+ type: "string",
1884
+ description: "Optional override for the Fireflies GraphQL endpoint. Defaults to https://api.fireflies.ai/graphql."
1885
+ },
1886
+ webhookUrl: {
1887
+ type: "string",
1888
+ description: "Webhook destination URL configured in Fireflies developer settings."
1889
+ },
1890
+ webhookEvents: {
1891
+ type: "array",
1892
+ items: { type: "string" },
1893
+ description: "Webhook events to subscribe to (e.g., Transcription completed)."
1894
+ },
1895
+ transcriptsPageSize: {
1896
+ type: "number",
1897
+ description: "Number of transcripts to request per GraphQL query."
1898
+ }
1899
+ }
1900
+ },
1901
+ example: {
1902
+ baseUrl: "https://api.fireflies.ai/graphql",
1903
+ webhookUrl: "https://example.com/webhooks/fireflies",
1904
+ webhookEvents: ["Transcription completed"],
1905
+ transcriptsPageSize: 25
1906
+ }
1907
+ },
1908
+ secretSchema: {
1909
+ schema: {
1910
+ type: "object",
1911
+ required: ["apiKey"],
1912
+ properties: {
1913
+ apiKey: {
1914
+ type: "string",
1915
+ description: "Fireflies API key for GraphQL requests."
1916
+ },
1917
+ webhookSecret: {
1918
+ type: "string",
1919
+ description: "Optional webhook secret used to verify x-hub-signature HMAC payloads."
1920
+ }
1921
+ }
1922
+ },
1923
+ example: {
1924
+ apiKey: "fireflies-***",
1925
+ webhookSecret: "fireflies-webhook-secret"
1926
+ }
1927
+ },
1928
+ healthCheck: {
1929
+ method: "custom",
1930
+ timeoutMs: 6000
1931
+ },
1932
+ docsUrl: "https://docs.fireflies.ai/getting-started/introduction",
1933
+ byokSetup: {
1934
+ setupInstructions: "Create a Fireflies API key and optionally configure webhook settings in Developer Settings."
1935
+ }
1936
+ });
1937
+ function registerFirefliesIntegration(registry) {
1938
+ return registry.register(firefliesIntegrationSpec);
1939
+ }
1940
+
1941
+ // src/integrations/providers/fathom.ts
1942
+ import { StabilityEnum as StabilityEnum23 } from "@contractspec/lib.contracts-spec/ownership";
1943
+ var fathomIntegrationSpec = defineIntegration({
1944
+ meta: {
1945
+ key: "meeting-recorder.fathom",
1946
+ version: "1.0.0",
1947
+ category: "meeting-recorder",
1948
+ title: "Fathom Meeting Recorder",
1949
+ description: "Fathom External API for meetings, transcripts, and webhook events.",
1950
+ domain: "productivity",
1951
+ owners: ["platform.integrations"],
1952
+ tags: ["meeting-recorder", "fathom", "transcripts"],
1953
+ stability: StabilityEnum23.Experimental
1954
+ },
1955
+ supportedModes: ["byok"],
1956
+ capabilities: {
1957
+ provides: [
1958
+ { key: "meeting-recorder.meetings.read", version: "1.0.0" },
1959
+ { key: "meeting-recorder.transcripts.read", version: "1.0.0" },
1960
+ { key: "meeting-recorder.webhooks", version: "1.0.0" }
1961
+ ]
1962
+ },
1963
+ configSchema: {
1964
+ schema: {
1965
+ type: "object",
1966
+ properties: {
1967
+ baseUrl: {
1968
+ type: "string",
1969
+ description: "Optional override for the Fathom API base URL. Defaults to https://api.fathom.ai/external/v1."
1970
+ },
1971
+ webhookUrl: {
1972
+ type: "string",
1973
+ description: "Webhook destination URL used when registering Fathom webhooks."
1974
+ },
1975
+ includeTranscript: {
1976
+ type: "boolean",
1977
+ description: "Include transcript data in Fathom webhook payloads."
1978
+ },
1979
+ includeSummary: {
1980
+ type: "boolean",
1981
+ description: "Include summary data in Fathom webhook payloads."
1982
+ },
1983
+ includeActionItems: {
1984
+ type: "boolean",
1985
+ description: "Include action items in Fathom webhook payloads."
1986
+ },
1987
+ includeCrmMatches: {
1988
+ type: "boolean",
1989
+ description: "Include CRM matches in Fathom webhook payloads."
1990
+ },
1991
+ triggeredFor: {
1992
+ type: "array",
1993
+ items: { type: "string" },
1994
+ description: "Recording scopes to trigger webhooks for (e.g., my_recordings)."
1995
+ }
1996
+ }
1997
+ },
1998
+ example: {
1999
+ baseUrl: "https://api.fathom.ai/external/v1",
2000
+ webhookUrl: "https://example.com/webhooks/fathom",
2001
+ includeTranscript: true,
2002
+ includeSummary: true,
2003
+ includeActionItems: false,
2004
+ includeCrmMatches: false,
2005
+ triggeredFor: ["my_recordings"]
2006
+ }
2007
+ },
2008
+ secretSchema: {
2009
+ schema: {
2010
+ type: "object",
2011
+ required: ["apiKey"],
2012
+ properties: {
2013
+ apiKey: {
2014
+ type: "string",
2015
+ description: "Fathom API key used in the X-Api-Key header."
2016
+ },
2017
+ webhookSecret: {
2018
+ type: "string",
2019
+ description: "Optional webhook secret used to verify Fathom webhook signatures."
2020
+ }
2021
+ }
2022
+ },
2023
+ example: {
2024
+ apiKey: "fathom-***",
2025
+ webhookSecret: "whsec_***"
2026
+ }
2027
+ },
2028
+ healthCheck: {
2029
+ method: "list",
2030
+ timeoutMs: 8000
2031
+ },
2032
+ docsUrl: "https://developers.fathom.ai/",
2033
+ constraints: {
2034
+ rateLimit: {
2035
+ rpm: 60
2036
+ }
2037
+ },
2038
+ byokSetup: {
2039
+ setupInstructions: "Generate an API key in Fathom settings and optionally configure webhooks for meeting content readiness."
2040
+ }
2041
+ });
2042
+ function registerFathomIntegration(registry) {
2043
+ return registry.register(fathomIntegrationSpec);
2044
+ }
2045
+ // src/integrations/providers/registry.ts
2046
+ function createDefaultIntegrationSpecRegistry() {
2047
+ const registry = new IntegrationSpecRegistry;
2048
+ registerStripeIntegration(registry);
2049
+ registerPostmarkIntegration(registry);
2050
+ registerQdrantIntegration(registry);
2051
+ registerSupabaseVectorIntegration(registry);
2052
+ registerSupabasePostgresIntegration(registry);
2053
+ registerMistralIntegration(registry);
2054
+ registerElevenLabsIntegration(registry);
2055
+ registerGradiumIntegration(registry);
2056
+ registerFalIntegration(registry);
2057
+ registerGmailIntegration(registry);
2058
+ registerGoogleCalendarIntegration(registry);
2059
+ registerPosthogIntegration(registry);
2060
+ registerTwilioSmsIntegration(registry);
2061
+ registerGcsStorageIntegration(registry);
2062
+ registerPowensIntegration(registry);
2063
+ registerLinearIntegration(registry);
2064
+ registerJiraIntegration(registry);
2065
+ registerNotionIntegration(registry);
2066
+ registerGranolaIntegration(registry);
2067
+ registerTldvIntegration(registry);
2068
+ registerFirefliesIntegration(registry);
2069
+ registerFathomIntegration(registry);
2070
+ return registry;
2071
+ }
2072
+ // src/integrations/openbanking/models.ts
2073
+ import { ScalarTypeEnum, SchemaModel } from "@contractspec/lib.schema";
2074
+ var BankAccountRecord = new SchemaModel({
2075
+ name: "BankAccountRecord",
2076
+ description: "Canonical representation of a bank account synced from an open banking provider.",
2077
+ fields: {
2078
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
2079
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
2080
+ userId: { type: ScalarTypeEnum.ID(), isOptional: false },
2081
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
2082
+ externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2083
+ institutionId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2084
+ institutionName: {
2085
+ type: ScalarTypeEnum.NonEmptyString(),
2086
+ isOptional: false
2087
+ },
2088
+ institutionLogoUrl: { type: ScalarTypeEnum.URL(), isOptional: true },
2089
+ iban: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
2090
+ bic: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
2091
+ accountType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2092
+ currency: { type: ScalarTypeEnum.Currency(), isOptional: false },
2093
+ displayName: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2094
+ accountNumberMasked: {
2095
+ type: ScalarTypeEnum.String_unsecure(),
2096
+ isOptional: true
2097
+ },
2098
+ productCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
2099
+ balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
2100
+ availableBalance: {
2101
+ type: ScalarTypeEnum.Float_unsecure(),
2102
+ isOptional: true
2103
+ },
2104
+ lastSyncedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2105
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2106
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2107
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
2108
+ }
2109
+ });
2110
+ var BankTransactionRecord = new SchemaModel({
2111
+ name: "BankTransactionRecord",
2112
+ description: "Canonical transaction entry mapped from Powens into the open banking ledger.",
2113
+ fields: {
2114
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
2115
+ accountId: { type: ScalarTypeEnum.ID(), isOptional: false },
2116
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
2117
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
2118
+ externalId: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2119
+ amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },
2120
+ currency: { type: ScalarTypeEnum.Currency(), isOptional: false },
2121
+ date: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2122
+ bookingDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
2123
+ valueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },
2124
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
2125
+ counterpartyName: {
2126
+ type: ScalarTypeEnum.String_unsecure(),
2127
+ isOptional: true
2128
+ },
2129
+ counterpartyAccount: {
2130
+ type: ScalarTypeEnum.String_unsecure(),
2131
+ isOptional: true
2132
+ },
2133
+ merchantCategoryCode: {
2134
+ type: ScalarTypeEnum.String_unsecure(),
2135
+ isOptional: true
2136
+ },
2137
+ rawCategory: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
2138
+ standardizedCategory: {
2139
+ type: ScalarTypeEnum.String_unsecure(),
2140
+ isOptional: true
2141
+ },
2142
+ transactionType: {
2143
+ type: ScalarTypeEnum.NonEmptyString(),
2144
+ isOptional: false
2145
+ },
2146
+ status: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2147
+ runningBalance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },
2148
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
2149
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2150
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
2151
+ }
2152
+ });
2153
+ var AccountBalanceRecord = new SchemaModel({
2154
+ name: "AccountBalanceRecord",
2155
+ description: "Canonical balance snapshot computed from Powens balance payloads.",
2156
+ fields: {
2157
+ id: { type: ScalarTypeEnum.ID(), isOptional: false },
2158
+ accountId: { type: ScalarTypeEnum.ID(), isOptional: false },
2159
+ tenantId: { type: ScalarTypeEnum.ID(), isOptional: false },
2160
+ connectionId: { type: ScalarTypeEnum.ID(), isOptional: false },
2161
+ balanceType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
2162
+ currentBalance: {
2163
+ type: ScalarTypeEnum.Float_unsecure(),
2164
+ isOptional: false
2165
+ },
2166
+ availableBalance: {
2167
+ type: ScalarTypeEnum.Float_unsecure(),
2168
+ isOptional: true
2169
+ },
2170
+ currency: { type: ScalarTypeEnum.Currency(), isOptional: false },
2171
+ lastUpdatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2172
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
2173
+ metadata: { type: ScalarTypeEnum.JSONObject(), isOptional: true }
2174
+ }
2175
+ });
2176
+
2177
+ // src/integrations/openbanking/telemetry.ts
2178
+ var OPENBANKING_PII_FIELDS = [
2179
+ "iban",
2180
+ "bic",
2181
+ "accountNumberMasked",
2182
+ "accountNumber",
2183
+ "counterpartyName",
2184
+ "counterpartyAccount",
2185
+ "description",
2186
+ "merchantName",
2187
+ "merchantCategoryCode",
2188
+ "reference"
2189
+ ];
2190
+ var OPENBANKING_TELEMETRY_EVENTS = {
2191
+ accountsSynced: "openbanking.accounts.synced",
2192
+ accountsSyncFailed: "openbanking.accounts.sync_failed",
2193
+ transactionsSynced: "openbanking.transactions.synced",
2194
+ transactionsSyncFailed: "openbanking.transactions.sync_failed",
2195
+ balancesRefreshed: "openbanking.balances.refreshed",
2196
+ balancesRefreshFailed: "openbanking.balances.refresh_failed",
2197
+ overviewGenerated: "openbanking.overview.generated"
2198
+ };
2199
+ function redactOpenBankingTelemetryPayload(payload) {
2200
+ const redacted = {};
2201
+ for (const [key, value] of Object.entries(payload)) {
2202
+ if (OPENBANKING_PII_FIELDS.includes(key)) {
2203
+ redacted[key] = maskValue(value);
2204
+ } else if (Array.isArray(value)) {
2205
+ redacted[key] = value.map((item) => typeof item === "object" && item !== null ? redactOpenBankingTelemetryPayload(item) : item);
2206
+ } else if (typeof value === "object" && value !== null) {
2207
+ redacted[key] = redactOpenBankingTelemetryPayload(value);
2208
+ } else {
2209
+ redacted[key] = value;
2210
+ }
2211
+ }
2212
+ return redacted;
2213
+ }
2214
+ function maskValue(value) {
2215
+ if (value == null)
2216
+ return "";
2217
+ const str = String(value);
2218
+ if (str.length <= 4)
2219
+ return "*".repeat(str.length);
2220
+ return `${"*".repeat(Math.max(str.length - 4, 0))}${str.slice(-4)}`;
2221
+ }
2222
+
2223
+ // src/integrations/openbanking/contracts/accounts.ts
2224
+ import { ScalarTypeEnum as ScalarTypeEnum2, SchemaModel as SchemaModel2 } from "@contractspec/lib.schema";
2225
+ import {
2226
+ defineCommand,
2227
+ defineQuery
2228
+ } from "@contractspec/lib.contracts-spec/operations";
2229
+ var OpenBankingListAccountsInput = new SchemaModel2({
2230
+ name: "OpenBankingListAccountsInput",
2231
+ description: "Parameters for listing bank accounts through the open banking provider.",
2232
+ fields: {
2233
+ tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
2234
+ userId: { type: ScalarTypeEnum2.ID(), isOptional: false },
2235
+ connectionId: { type: ScalarTypeEnum2.ID(), isOptional: true },
2236
+ includeBalances: { type: ScalarTypeEnum2.Boolean(), isOptional: true },
2237
+ institutionId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
2238
+ cursor: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
2239
+ pageSize: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true }
2240
+ }
2241
+ });
2242
+ var OpenBankingListAccountsOutput = new SchemaModel2({
2243
+ name: "OpenBankingListAccountsOutput",
2244
+ description: "Paginated list of bank accounts available to the tenant and user.",
2245
+ fields: {
2246
+ accounts: {
2247
+ type: BankAccountRecord,
2248
+ isOptional: false,
2249
+ isArray: true
2250
+ },
2251
+ nextCursor: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
2252
+ hasMore: { type: ScalarTypeEnum2.Boolean(), isOptional: true }
2253
+ }
2254
+ });
2255
+ var OpenBankingGetAccountInput = new SchemaModel2({
2256
+ name: "OpenBankingGetAccountInput",
2257
+ description: "Parameters for retrieving a specific bank account.",
2258
+ fields: {
2259
+ tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
2260
+ accountId: { type: ScalarTypeEnum2.ID(), isOptional: false },
2261
+ includeBalances: { type: ScalarTypeEnum2.Boolean(), isOptional: true },
2262
+ includeLatestTransactions: {
2263
+ type: ScalarTypeEnum2.Boolean(),
2264
+ isOptional: true
2265
+ }
2266
+ }
2267
+ });
2268
+ var OpenBankingSyncAccountsInput = new SchemaModel2({
2269
+ name: "OpenBankingSyncAccountsInput",
2270
+ description: "Command payload to trigger an account synchronisation against the open banking provider.",
2271
+ fields: {
2272
+ tenantId: { type: ScalarTypeEnum2.ID(), isOptional: false },
2273
+ userId: { type: ScalarTypeEnum2.ID(), isOptional: true },
2274
+ connectionId: { type: ScalarTypeEnum2.ID(), isOptional: false },
2275
+ accountIds: {
2276
+ type: ScalarTypeEnum2.ID(),
2277
+ isArray: true,
2278
+ isOptional: true
2279
+ },
2280
+ forceFullRefresh: { type: ScalarTypeEnum2.Boolean(), isOptional: true },
2281
+ triggerWorkflows: { type: ScalarTypeEnum2.Boolean(), isOptional: true }
2282
+ }
2283
+ });
2284
+ var OpenBankingSyncAccountsOutput = new SchemaModel2({
2285
+ name: "OpenBankingSyncAccountsOutput",
2286
+ description: "Result of a bank account synchronisation run.",
2287
+ fields: {
2288
+ synced: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
2289
+ failed: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false },
2290
+ errors: {
2291
+ type: ScalarTypeEnum2.String_unsecure(),
2292
+ isArray: true,
2293
+ isOptional: true
2294
+ },
2295
+ nextSyncSuggestedAt: {
2296
+ type: ScalarTypeEnum2.DateTime(),
2297
+ isOptional: true
2298
+ }
2299
+ }
2300
+ });
2301
+ var OpenBankingListAccounts = defineQuery({
2302
+ meta: {
2303
+ key: "openbanking.accounts.list",
2304
+ version: "1.0.0",
2305
+ description: "List bank accounts available to a tenant/user via Powens Open Banking.",
2306
+ goal: "Provide downstream workflows with the set of accounts accessible via the configured open banking connection.",
2307
+ context: "Used by Pocket Family Office dashboards and sync workflows to enumerate bank accounts prior to syncing balances or transactions.",
2308
+ owners: ["@platform.finance"],
2309
+ tags: ["open-banking", "powens", "accounts"],
2310
+ stability: "experimental"
2311
+ },
2312
+ io: {
2313
+ input: OpenBankingListAccountsInput,
2314
+ output: OpenBankingListAccountsOutput
2315
+ },
2316
+ policy: {
2317
+ auth: "user"
2318
+ }
2319
+ });
2320
+ var OpenBankingGetAccount = defineQuery({
2321
+ meta: {
2322
+ key: "openbanking.accounts.get",
2323
+ version: "1.0.0",
2324
+ description: "Retrieve the canonical bank account record for the given account identifier.",
2325
+ goal: "Allow user-facing experiences and automations to display up-to-date account metadata.",
2326
+ context: "Invoked by UI surfaces and workflow automation steps that require detailed metadata for a specific bank account.",
2327
+ owners: ["@platform.finance"],
2328
+ tags: ["open-banking", "powens", "accounts"],
2329
+ stability: "experimental"
2330
+ },
2331
+ io: {
2332
+ input: OpenBankingGetAccountInput,
2333
+ output: BankAccountRecord
2334
+ },
2335
+ policy: {
2336
+ auth: "user"
2337
+ }
2338
+ });
2339
+ var OpenBankingSyncAccounts = defineCommand({
2340
+ meta: {
2341
+ key: "openbanking.accounts.sync",
2342
+ version: "1.0.0",
2343
+ description: "Initiate a synchronisation run to refresh bank account metadata from Powens.",
2344
+ goal: "Keep canonical bank account records aligned with the external open banking provider.",
2345
+ context: "Triggered by scheduled workflows or manual operator actions to reconcile account metadata prior to transaction/balance syncs.",
2346
+ owners: ["@platform.finance"],
2347
+ tags: ["open-banking", "powens", "accounts"],
2348
+ stability: "experimental"
2349
+ },
2350
+ io: {
2351
+ input: OpenBankingSyncAccountsInput,
2352
+ output: OpenBankingSyncAccountsOutput
2353
+ },
2354
+ policy: {
2355
+ auth: "admin"
2356
+ },
2357
+ telemetry: {
2358
+ success: {
2359
+ event: { key: OPENBANKING_TELEMETRY_EVENTS.accountsSynced },
2360
+ properties: ({ input, output }) => {
2361
+ const payload = input;
2362
+ const result = output;
2363
+ return {
2364
+ tenantId: payload?.tenantId,
2365
+ connectionId: payload?.connectionId,
2366
+ synced: result?.synced,
2367
+ failed: result?.failed
2368
+ };
2369
+ }
2370
+ },
2371
+ failure: {
2372
+ event: { key: OPENBANKING_TELEMETRY_EVENTS.accountsSyncFailed },
2373
+ properties: ({ input, error }) => {
2374
+ const payload = input;
2375
+ return {
2376
+ tenantId: payload?.tenantId,
2377
+ connectionId: payload?.connectionId,
2378
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
2379
+ };
2380
+ }
2381
+ }
2382
+ }
2383
+ });
2384
+ var openBankingAccountContracts = {
2385
+ OpenBankingListAccounts,
2386
+ OpenBankingGetAccount,
2387
+ OpenBankingSyncAccounts
2388
+ };
2389
+ function registerOpenBankingAccountContracts(registry2) {
2390
+ return registry2.register(OpenBankingListAccounts).register(OpenBankingGetAccount).register(OpenBankingSyncAccounts);
2391
+ }
2392
+
2393
+ // src/integrations/openbanking/contracts/transactions.ts
2394
+ import { ScalarTypeEnum as ScalarTypeEnum3, SchemaModel as SchemaModel3 } from "@contractspec/lib.schema";
2395
+ import {
2396
+ defineCommand as defineCommand2,
2397
+ defineQuery as defineQuery2
2398
+ } from "@contractspec/lib.contracts-spec/operations";
2399
+ var OpenBankingListTransactionsInput = new SchemaModel3({
2400
+ name: "OpenBankingListTransactionsInput",
2401
+ description: "Parameters for listing bank transactions from the canonical ledger.",
2402
+ fields: {
2403
+ tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
2404
+ accountId: { type: ScalarTypeEnum3.ID(), isOptional: false },
2405
+ from: { type: ScalarTypeEnum3.DateTime(), isOptional: true },
2406
+ to: { type: ScalarTypeEnum3.DateTime(), isOptional: true },
2407
+ cursor: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
2408
+ pageSize: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: true },
2409
+ direction: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
2410
+ minimumAmount: { type: ScalarTypeEnum3.Float_unsecure(), isOptional: true },
2411
+ maximumAmount: { type: ScalarTypeEnum3.Float_unsecure(), isOptional: true },
2412
+ category: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true }
2413
+ }
2414
+ });
2415
+ var OpenBankingListTransactionsOutput = new SchemaModel3({
2416
+ name: "OpenBankingListTransactionsOutput",
2417
+ description: "Paginated list of transactions for a bank account.",
2418
+ fields: {
2419
+ transactions: {
2420
+ type: BankTransactionRecord,
2421
+ isOptional: false,
2422
+ isArray: true
2423
+ },
2424
+ nextCursor: { type: ScalarTypeEnum3.String_unsecure(), isOptional: true },
2425
+ hasMore: { type: ScalarTypeEnum3.Boolean(), isOptional: true }
2426
+ }
2427
+ });
2428
+ var OpenBankingSyncTransactionsInput = new SchemaModel3({
2429
+ name: "OpenBankingSyncTransactionsInput",
2430
+ description: "Command payload to synchronise transactions from the open banking provider into the canonical ledger.",
2431
+ fields: {
2432
+ tenantId: { type: ScalarTypeEnum3.ID(), isOptional: false },
2433
+ accountId: { type: ScalarTypeEnum3.ID(), isOptional: false },
2434
+ from: { type: ScalarTypeEnum3.DateTime(), isOptional: true },
2435
+ to: { type: ScalarTypeEnum3.DateTime(), isOptional: true },
2436
+ connectionId: { type: ScalarTypeEnum3.ID(), isOptional: true },
2437
+ includePending: { type: ScalarTypeEnum3.Boolean(), isOptional: true },
2438
+ backfillDays: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: true }
2439
+ }
2440
+ });
2441
+ var OpenBankingSyncTransactionsOutput = new SchemaModel3({
2442
+ name: "OpenBankingSyncTransactionsOutput",
2443
+ description: "Result of a transaction synchronisation run.",
2444
+ fields: {
2445
+ synced: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: false },
2446
+ failed: { type: ScalarTypeEnum3.Int_unsecure(), isOptional: false },
2447
+ earliestSyncedAt: { type: ScalarTypeEnum3.DateTime(), isOptional: true },
2448
+ latestSyncedAt: { type: ScalarTypeEnum3.DateTime(), isOptional: true },
2449
+ nextSinceToken: {
2450
+ type: ScalarTypeEnum3.String_unsecure(),
2451
+ isOptional: true
2452
+ },
2453
+ errors: {
2454
+ type: ScalarTypeEnum3.String_unsecure(),
2455
+ isArray: true,
2456
+ isOptional: true
2457
+ }
2458
+ }
2459
+ });
2460
+ var OpenBankingListTransactions = defineQuery2({
2461
+ meta: {
2462
+ key: "openbanking.transactions.list",
2463
+ version: "1.0.0",
2464
+ description: "List bank transactions that have been normalised into the canonical ledger.",
2465
+ goal: "Allow downstream analytics and UI surfaces to page through canonical bank transactions.",
2466
+ context: "Used by Pocket Family Office dashboards, reconciliation workflows, and analytics data views.",
2467
+ owners: ["@platform.finance"],
2468
+ tags: ["open-banking", "powens", "transactions"],
2469
+ stability: "experimental"
2470
+ },
2471
+ io: {
2472
+ input: OpenBankingListTransactionsInput,
2473
+ output: OpenBankingListTransactionsOutput
2474
+ },
2475
+ policy: {
2476
+ auth: "user"
2477
+ }
2478
+ });
2479
+ var OpenBankingSyncTransactions = defineCommand2({
2480
+ meta: {
2481
+ key: "openbanking.transactions.sync",
2482
+ version: "1.0.0",
2483
+ description: "Synchronise transactions for a bank account by calling the configured open banking provider.",
2484
+ goal: "Ensure the canonical transaction ledger stays aligned with the external provider.",
2485
+ context: "Triggered by scheduled workflows or on-demand actions when activity is expected on an account.",
2486
+ owners: ["@platform.finance"],
2487
+ tags: ["open-banking", "powens", "transactions"],
2488
+ stability: "experimental"
2489
+ },
2490
+ io: {
2491
+ input: OpenBankingSyncTransactionsInput,
2492
+ output: OpenBankingSyncTransactionsOutput
2493
+ },
2494
+ policy: {
2495
+ auth: "admin"
2496
+ },
2497
+ telemetry: {
2498
+ success: {
2499
+ event: { key: OPENBANKING_TELEMETRY_EVENTS.transactionsSynced },
2500
+ properties: ({ input, output }) => {
2501
+ const payload = input;
2502
+ const result = output;
2503
+ return {
2504
+ tenantId: payload?.tenantId,
2505
+ accountId: payload?.accountId,
2506
+ synced: result?.synced,
2507
+ failed: result?.failed,
2508
+ earliestSyncedAt: result?.earliestSyncedAt,
2509
+ latestSyncedAt: result?.latestSyncedAt
2510
+ };
2511
+ }
2512
+ },
2513
+ failure: {
2514
+ event: { key: OPENBANKING_TELEMETRY_EVENTS.transactionsSyncFailed },
2515
+ properties: ({ input, error }) => {
2516
+ const payload = input;
2517
+ return {
2518
+ tenantId: payload?.tenantId,
2519
+ accountId: payload?.accountId,
2520
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
2521
+ };
2522
+ }
2523
+ }
2524
+ }
2525
+ });
2526
+ var openBankingTransactionContracts = {
2527
+ OpenBankingListTransactions,
2528
+ OpenBankingSyncTransactions
2529
+ };
2530
+ function registerOpenBankingTransactionContracts(registry2) {
2531
+ return registry2.register(OpenBankingListTransactions).register(OpenBankingSyncTransactions);
2532
+ }
2533
+
2534
+ // src/integrations/openbanking/contracts/balances.ts
2535
+ import { ScalarTypeEnum as ScalarTypeEnum4, SchemaModel as SchemaModel4 } from "@contractspec/lib.schema";
2536
+ import {
2537
+ defineCommand as defineCommand3,
2538
+ defineQuery as defineQuery3
2539
+ } from "@contractspec/lib.contracts-spec/operations";
2540
+ var OpenBankingGetBalancesInput = new SchemaModel4({
2541
+ name: "OpenBankingGetBalancesInput",
2542
+ description: "Parameters for retrieving bank account balances from the canonical ledger.",
2543
+ fields: {
2544
+ tenantId: { type: ScalarTypeEnum4.ID(), isOptional: false },
2545
+ accountId: { type: ScalarTypeEnum4.ID(), isOptional: false },
2546
+ balanceTypes: {
2547
+ type: ScalarTypeEnum4.String_unsecure(),
2548
+ isArray: true,
2549
+ isOptional: true
2550
+ }
2551
+ }
2552
+ });
2553
+ var OpenBankingGetBalancesOutput = new SchemaModel4({
2554
+ name: "OpenBankingGetBalancesOutput",
2555
+ description: "Canonical balances for a bank account.",
2556
+ fields: {
2557
+ balances: {
2558
+ type: AccountBalanceRecord,
2559
+ isOptional: false,
2560
+ isArray: true
2561
+ },
2562
+ asOf: { type: ScalarTypeEnum4.DateTime(), isOptional: true }
2563
+ }
2564
+ });
2565
+ var OpenBankingRefreshBalancesInput = new SchemaModel4({
2566
+ name: "OpenBankingRefreshBalancesInput",
2567
+ description: "Command payload to refresh balances for a bank account via the open banking provider.",
2568
+ fields: {
2569
+ tenantId: { type: ScalarTypeEnum4.ID(), isOptional: false },
2570
+ accountId: { type: ScalarTypeEnum4.ID(), isOptional: false },
2571
+ connectionId: { type: ScalarTypeEnum4.ID(), isOptional: true },
2572
+ balanceTypes: {
2573
+ type: ScalarTypeEnum4.String_unsecure(),
2574
+ isArray: true,
2575
+ isOptional: true
2576
+ },
2577
+ forceRefresh: { type: ScalarTypeEnum4.Boolean(), isOptional: true }
2578
+ }
2579
+ });
2580
+ var OpenBankingRefreshBalancesOutput = new SchemaModel4({
2581
+ name: "OpenBankingRefreshBalancesOutput",
2582
+ description: "Result of a balance refresh against the open banking provider.",
2583
+ fields: {
2584
+ balances: {
2585
+ type: AccountBalanceRecord,
2586
+ isOptional: false,
2587
+ isArray: true
2588
+ },
2589
+ refreshedAt: { type: ScalarTypeEnum4.DateTime(), isOptional: false },
2590
+ errors: {
2591
+ type: ScalarTypeEnum4.String_unsecure(),
2592
+ isArray: true,
2593
+ isOptional: true
2594
+ }
2595
+ }
2596
+ });
2597
+ var OpenBankingGetBalances = defineQuery3({
2598
+ meta: {
2599
+ key: "openbanking.balances.get",
2600
+ version: "1.0.0",
2601
+ description: "Retrieve the latest cached balances for a bank account.",
2602
+ goal: "Expose current and available balances required by dashboards and analytics.",
2603
+ context: "Used by Pocket Family Office UI surfaces and automation steps that require balance totals prior to generating summaries.",
2604
+ owners: ["@platform.finance"],
2605
+ tags: ["open-banking", "powens", "balances"],
2606
+ stability: "experimental"
2607
+ },
2608
+ io: {
2609
+ input: OpenBankingGetBalancesInput,
2610
+ output: OpenBankingGetBalancesOutput
2611
+ },
2612
+ policy: {
2613
+ auth: "user"
2614
+ }
2615
+ });
2616
+ var OpenBankingRefreshBalances = defineCommand3({
2617
+ meta: {
2618
+ key: "openbanking.balances.refresh",
2619
+ version: "1.0.0",
2620
+ description: "Refresh balances for a bank account via the configured open banking provider.",
2621
+ goal: "Ensure canonical balance records reflect the latest values from Powens.",
2622
+ context: "Triggered by scheduled workflows before generating summaries or forecasting cashflow.",
2623
+ owners: ["@platform.finance"],
2624
+ tags: ["open-banking", "powens", "balances"],
2625
+ stability: "experimental"
2626
+ },
2627
+ io: {
2628
+ input: OpenBankingRefreshBalancesInput,
2629
+ output: OpenBankingRefreshBalancesOutput
2630
+ },
2631
+ policy: {
2632
+ auth: "admin"
2633
+ },
2634
+ telemetry: {
2635
+ success: {
2636
+ event: { key: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshed },
2637
+ properties: ({ input, output }) => {
2638
+ const payload = input;
2639
+ const result = output;
2640
+ return {
2641
+ tenantId: payload?.tenantId,
2642
+ accountId: payload?.accountId,
2643
+ refreshedAt: result?.refreshedAt,
2644
+ balanceCount: Array.isArray(result?.balances) ? result?.balances.length : undefined
2645
+ };
2646
+ }
2647
+ },
2648
+ failure: {
2649
+ event: { key: OPENBANKING_TELEMETRY_EVENTS.balancesRefreshFailed },
2650
+ properties: ({ input, error }) => {
2651
+ const payload = input;
2652
+ return {
2653
+ tenantId: payload?.tenantId,
2654
+ accountId: payload?.accountId,
2655
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
2656
+ };
2657
+ }
2658
+ }
2659
+ }
2660
+ });
2661
+ var openBankingBalanceContracts = {
2662
+ OpenBankingGetBalances,
2663
+ OpenBankingRefreshBalances
2664
+ };
2665
+ function registerOpenBankingBalanceContracts(registry2) {
2666
+ return registry2.register(OpenBankingGetBalances).register(OpenBankingRefreshBalances);
2667
+ }
2668
+
2669
+ // src/integrations/openbanking/openbanking.feature.ts
2670
+ import { defineFeature } from "@contractspec/lib.contracts-spec/features";
2671
+ var OpenBankingFeature = defineFeature({
2672
+ meta: {
2673
+ key: "openbanking",
2674
+ version: "1.0.0",
2675
+ title: "Open Banking Integration",
2676
+ description: "Open banking account sync, balance refresh, and transaction synchronization",
2677
+ domain: "integrations",
2678
+ owners: ["@platform.finance"],
2679
+ tags: ["open-banking", "powens", "finance", "banking"],
2680
+ stability: "experimental"
2681
+ },
2682
+ operations: [
2683
+ { key: "openbanking.accounts.sync", version: "1.0.0" },
2684
+ { key: "openbanking.accounts.list", version: "1.0.0" },
2685
+ { key: "openbanking.accounts.get", version: "1.0.0" },
2686
+ { key: "openbanking.balances.refresh", version: "1.0.0" },
2687
+ { key: "openbanking.balances.get", version: "1.0.0" },
2688
+ { key: "openbanking.transactions.sync", version: "1.0.0" },
2689
+ { key: "openbanking.transactions.list", version: "1.0.0" }
2690
+ ],
2691
+ events: [],
2692
+ presentations: [],
2693
+ opToPresentation: [],
2694
+ presentationsTargets: [],
2695
+ capabilities: {
2696
+ provides: [{ key: "openbanking", version: "1.0.0" }],
2697
+ requires: [{ key: "identity", version: "1.0.0" }]
2698
+ }
2699
+ });
2700
+ // src/integrations/openbanking/contracts/index.ts
2701
+ function registerOpenBankingContracts(registry2) {
2702
+ return registerOpenBankingBalanceContracts(registerOpenBankingTransactionContracts(registerOpenBankingAccountContracts(registry2)));
2703
+ }
2704
+
2705
+ // src/integrations/openbanking/guards.ts
2706
+ var PRIMARY_SLOT_ID = "primaryOpenBanking";
2707
+ function ensurePrimaryOpenBankingIntegration(config) {
2708
+ const integration = config.integrations.find((item) => item.slot.slotId === PRIMARY_SLOT_ID);
2709
+ if (!integration) {
2710
+ return {
2711
+ ok: false,
2712
+ error: "primaryOpenBanking slot is not bound in the resolved app config."
2713
+ };
2714
+ }
2715
+ const status = integration.connection.status;
2716
+ if (status === "error" || status === "disconnected") {
2717
+ return {
2718
+ ok: false,
2719
+ integration,
2720
+ error: `primaryOpenBanking connection is in status "${status}".`
2721
+ };
2722
+ }
2723
+ if (status === "unknown") {
2724
+ return {
2725
+ ok: false,
2726
+ integration,
2727
+ error: "primaryOpenBanking connection health is unknown."
2728
+ };
2729
+ }
2730
+ return { ok: true, integration };
2731
+ }
2732
+ function assertPrimaryOpenBankingReady(config) {
2733
+ const result = ensurePrimaryOpenBankingIntegration(config);
2734
+ if (!result.ok) {
2735
+ throw new Error(result.error ?? "Open banking integration not available.");
2736
+ }
2737
+ if (!result.integration) {
2738
+ throw new Error(result.error ?? "Open banking integration not available.");
2739
+ }
2740
+ return result.integration;
2741
+ }
2742
+
2743
+ // src/integrations/meeting-recorder/models.ts
2744
+ import { ScalarTypeEnum as ScalarTypeEnum5, SchemaModel as SchemaModel5 } from "@contractspec/lib.schema";
2745
+ var MeetingParticipantRecord = new SchemaModel5({
2746
+ name: "MeetingParticipantRecord",
2747
+ description: "Canonical participant entry for meetings and transcripts from recorder providers.",
2748
+ fields: {
2749
+ id: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2750
+ externalId: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2751
+ name: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2752
+ email: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2753
+ role: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2754
+ isExternal: { type: ScalarTypeEnum5.Boolean(), isOptional: true },
2755
+ metadata: { type: ScalarTypeEnum5.JSONObject(), isOptional: true }
2756
+ }
2757
+ });
2758
+ var MeetingTranscriptSegmentRecord = new SchemaModel5({
2759
+ name: "MeetingTranscriptSegmentRecord",
2760
+ description: "A single transcript segment with speaker attribution.",
2761
+ fields: {
2762
+ index: { type: ScalarTypeEnum5.Int_unsecure(), isOptional: true },
2763
+ speakerId: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2764
+ speakerName: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2765
+ speakerEmail: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2766
+ text: { type: ScalarTypeEnum5.String_unsecure(), isOptional: false },
2767
+ startTimeMs: { type: ScalarTypeEnum5.Float_unsecure(), isOptional: true },
2768
+ endTimeMs: { type: ScalarTypeEnum5.Float_unsecure(), isOptional: true },
2769
+ startTime: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2770
+ endTime: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2771
+ confidence: { type: ScalarTypeEnum5.Float_unsecure(), isOptional: true },
2772
+ metadata: { type: ScalarTypeEnum5.JSONObject(), isOptional: true }
2773
+ }
2774
+ });
2775
+ var MeetingRecord = new SchemaModel5({
2776
+ name: "MeetingRecord",
2777
+ description: "Canonical meeting metadata synced from meeting recorder providers.",
2778
+ fields: {
2779
+ id: { type: ScalarTypeEnum5.ID(), isOptional: false },
2780
+ tenantId: { type: ScalarTypeEnum5.ID(), isOptional: false },
2781
+ connectionId: { type: ScalarTypeEnum5.ID(), isOptional: false },
2782
+ externalId: { type: ScalarTypeEnum5.NonEmptyString(), isOptional: false },
2783
+ title: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2784
+ summary: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2785
+ organizer: { type: MeetingParticipantRecord, isOptional: true },
2786
+ invitees: {
2787
+ type: MeetingParticipantRecord,
2788
+ isArray: true,
2789
+ isOptional: true
2790
+ },
2791
+ participants: {
2792
+ type: MeetingParticipantRecord,
2793
+ isArray: true,
2794
+ isOptional: true
2795
+ },
2796
+ scheduledStartAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2797
+ scheduledEndAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2798
+ recordingStartAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2799
+ recordingEndAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2800
+ durationSeconds: {
2801
+ type: ScalarTypeEnum5.Float_unsecure(),
2802
+ isOptional: true
2803
+ },
2804
+ meetingUrl: { type: ScalarTypeEnum5.URL(), isOptional: true },
2805
+ recordingUrl: { type: ScalarTypeEnum5.URL(), isOptional: true },
2806
+ shareUrl: { type: ScalarTypeEnum5.URL(), isOptional: true },
2807
+ sourcePlatform: {
2808
+ type: ScalarTypeEnum5.String_unsecure(),
2809
+ isOptional: true
2810
+ },
2811
+ language: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2812
+ transcriptAvailable: { type: ScalarTypeEnum5.Boolean(), isOptional: true },
2813
+ createdAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2814
+ updatedAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2815
+ metadata: { type: ScalarTypeEnum5.JSONObject(), isOptional: true }
2816
+ }
2817
+ });
2818
+ var MeetingTranscriptRecord = new SchemaModel5({
2819
+ name: "MeetingTranscriptRecord",
2820
+ description: "Canonical transcript payload for a recorded meeting.",
2821
+ fields: {
2822
+ id: { type: ScalarTypeEnum5.ID(), isOptional: false },
2823
+ meetingId: { type: ScalarTypeEnum5.ID(), isOptional: false },
2824
+ tenantId: { type: ScalarTypeEnum5.ID(), isOptional: false },
2825
+ connectionId: { type: ScalarTypeEnum5.ID(), isOptional: false },
2826
+ externalId: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2827
+ format: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2828
+ text: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2829
+ segments: {
2830
+ type: MeetingTranscriptSegmentRecord,
2831
+ isArray: true,
2832
+ isOptional: true
2833
+ },
2834
+ language: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2835
+ sourceUrl: { type: ScalarTypeEnum5.URL(), isOptional: true },
2836
+ generatedAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2837
+ metadata: { type: ScalarTypeEnum5.JSONObject(), isOptional: true },
2838
+ raw: { type: ScalarTypeEnum5.JSON(), isOptional: true }
2839
+ }
2840
+ });
2841
+ var MeetingRecorderWebhookEventRecord = new SchemaModel5({
2842
+ name: "MeetingRecorderWebhookEventRecord",
2843
+ description: "Normalized webhook event from a meeting recorder provider.",
2844
+ fields: {
2845
+ id: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2846
+ providerKey: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2847
+ eventType: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2848
+ meetingId: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2849
+ transcriptId: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2850
+ recordingId: { type: ScalarTypeEnum5.String_unsecure(), isOptional: true },
2851
+ receivedAt: { type: ScalarTypeEnum5.DateTime(), isOptional: true },
2852
+ verified: { type: ScalarTypeEnum5.Boolean(), isOptional: true },
2853
+ payload: { type: ScalarTypeEnum5.JSON(), isOptional: true },
2854
+ metadata: { type: ScalarTypeEnum5.JSONObject(), isOptional: true }
2855
+ }
2856
+ });
2857
+
2858
+ // src/integrations/meeting-recorder/contracts/meetings.ts
2859
+ import { ScalarTypeEnum as ScalarTypeEnum6, SchemaModel as SchemaModel6 } from "@contractspec/lib.schema";
2860
+ import {
2861
+ defineQuery as defineQuery4
2862
+ } from "@contractspec/lib.contracts-spec/operations";
2863
+ var MeetingRecorderListMeetingsInput = new SchemaModel6({
2864
+ name: "MeetingRecorderListMeetingsInput",
2865
+ description: "Parameters for listing meetings from a meeting recorder provider.",
2866
+ fields: {
2867
+ tenantId: { type: ScalarTypeEnum6.ID(), isOptional: false },
2868
+ connectionId: { type: ScalarTypeEnum6.ID(), isOptional: true },
2869
+ from: { type: ScalarTypeEnum6.DateTime(), isOptional: true },
2870
+ to: { type: ScalarTypeEnum6.DateTime(), isOptional: true },
2871
+ cursor: { type: ScalarTypeEnum6.String_unsecure(), isOptional: true },
2872
+ pageSize: { type: ScalarTypeEnum6.Int_unsecure(), isOptional: true },
2873
+ query: { type: ScalarTypeEnum6.String_unsecure(), isOptional: true },
2874
+ organizerEmail: {
2875
+ type: ScalarTypeEnum6.String_unsecure(),
2876
+ isOptional: true
2877
+ },
2878
+ participantEmail: {
2879
+ type: ScalarTypeEnum6.String_unsecure(),
2880
+ isOptional: true
2881
+ },
2882
+ includeTranscript: { type: ScalarTypeEnum6.Boolean(), isOptional: true },
2883
+ includeSummary: { type: ScalarTypeEnum6.Boolean(), isOptional: true }
2884
+ }
2885
+ });
2886
+ var MeetingRecorderListMeetingsOutput = new SchemaModel6({
2887
+ name: "MeetingRecorderListMeetingsOutput",
2888
+ description: "Paginated list of meetings for a recorder provider.",
2889
+ fields: {
2890
+ meetings: {
2891
+ type: MeetingRecord,
2892
+ isOptional: false,
2893
+ isArray: true
2894
+ },
2895
+ nextCursor: { type: ScalarTypeEnum6.String_unsecure(), isOptional: true },
2896
+ hasMore: { type: ScalarTypeEnum6.Boolean(), isOptional: true }
2897
+ }
2898
+ });
2899
+ var MeetingRecorderGetMeetingInput = new SchemaModel6({
2900
+ name: "MeetingRecorderGetMeetingInput",
2901
+ description: "Parameters for retrieving a single meeting record.",
2902
+ fields: {
2903
+ tenantId: { type: ScalarTypeEnum6.ID(), isOptional: false },
2904
+ meetingId: { type: ScalarTypeEnum6.ID(), isOptional: false },
2905
+ connectionId: { type: ScalarTypeEnum6.ID(), isOptional: true },
2906
+ includeTranscript: { type: ScalarTypeEnum6.Boolean(), isOptional: true },
2907
+ includeSummary: { type: ScalarTypeEnum6.Boolean(), isOptional: true }
2908
+ }
2909
+ });
2910
+ var MeetingRecorderListMeetings = defineQuery4({
2911
+ meta: {
2912
+ key: "meeting-recorder.meetings.list",
2913
+ version: "1.0.0",
2914
+ description: "List meetings recorded by the configured meeting provider.",
2915
+ goal: "Provide downstream workflows with recent meetings and metadata.",
2916
+ context: "Used by integration hubs and sync workflows to enumerate meetings before pulling transcripts.",
2917
+ owners: ["@platform.integrations"],
2918
+ tags: ["meeting-recorder", "meetings", "transcripts"],
2919
+ stability: "experimental"
2920
+ },
2921
+ io: {
2922
+ input: MeetingRecorderListMeetingsInput,
2923
+ output: MeetingRecorderListMeetingsOutput
2924
+ },
2925
+ policy: {
2926
+ auth: "user"
2927
+ }
2928
+ });
2929
+ var MeetingRecorderGetMeeting = defineQuery4({
2930
+ meta: {
2931
+ key: "meeting-recorder.meetings.get",
2932
+ version: "1.0.0",
2933
+ description: "Retrieve metadata for a single meeting recording.",
2934
+ goal: "Allow downstream experiences to display detailed meeting metadata.",
2935
+ context: "Used when drilling into a specific meeting from a transcript or integration dashboard.",
2936
+ owners: ["@platform.integrations"],
2937
+ tags: ["meeting-recorder", "meetings"],
2938
+ stability: "experimental"
2939
+ },
2940
+ io: {
2941
+ input: MeetingRecorderGetMeetingInput,
2942
+ output: MeetingRecord
2943
+ },
2944
+ policy: {
2945
+ auth: "user"
2946
+ }
2947
+ });
2948
+ var meetingRecorderMeetingContracts = {
2949
+ MeetingRecorderListMeetings,
2950
+ MeetingRecorderGetMeeting
2951
+ };
2952
+ function registerMeetingRecorderMeetingContracts(registry2) {
2953
+ return registry2.register(MeetingRecorderListMeetings).register(MeetingRecorderGetMeeting);
2954
+ }
2955
+
2956
+ // src/integrations/meeting-recorder/telemetry.ts
2957
+ var MEETING_RECORDER_PII_FIELDS = [
2958
+ "email",
2959
+ "organizerEmail",
2960
+ "participantEmail",
2961
+ "participants",
2962
+ "invitees",
2963
+ "attendees",
2964
+ "speakerName",
2965
+ "speakerEmail",
2966
+ "name",
2967
+ "phone",
2968
+ "phoneNumber",
2969
+ "displayName"
2970
+ ];
2971
+ var MEETING_RECORDER_TELEMETRY_EVENTS = {
2972
+ meetingsSynced: "meeting-recorder.meetings.synced",
2973
+ meetingsSyncFailed: "meeting-recorder.meetings.sync_failed",
2974
+ transcriptsFetched: "meeting-recorder.transcripts.fetched",
2975
+ transcriptsFetchFailed: "meeting-recorder.transcripts.fetch_failed",
2976
+ transcriptsSynced: "meeting-recorder.transcripts.synced",
2977
+ transcriptsSyncFailed: "meeting-recorder.transcripts.sync_failed",
2978
+ webhookReceived: "meeting-recorder.webhooks.received",
2979
+ webhookRejected: "meeting-recorder.webhooks.rejected"
2980
+ };
2981
+ function redactMeetingRecorderTelemetryPayload(payload) {
2982
+ const redacted = {};
2983
+ for (const [key, value] of Object.entries(payload)) {
2984
+ if (MEETING_RECORDER_PII_FIELDS.includes(key)) {
2985
+ redacted[key] = maskValue2(value);
2986
+ } else if (Array.isArray(value)) {
2987
+ redacted[key] = value.map((item) => typeof item === "object" && item !== null ? redactMeetingRecorderTelemetryPayload(item) : item);
2988
+ } else if (typeof value === "object" && value !== null) {
2989
+ redacted[key] = redactMeetingRecorderTelemetryPayload(value);
2990
+ } else {
2991
+ redacted[key] = value;
2992
+ }
2993
+ }
2994
+ return redacted;
2995
+ }
2996
+ function maskValue2(value) {
2997
+ if (value == null)
2998
+ return "";
2999
+ const str = String(value);
3000
+ if (str.length <= 4)
3001
+ return "*".repeat(str.length);
3002
+ return `${"*".repeat(Math.max(str.length - 4, 0))}${str.slice(-4)}`;
3003
+ }
3004
+
3005
+ // src/integrations/meeting-recorder/contracts/transcripts.ts
3006
+ import { ScalarTypeEnum as ScalarTypeEnum7, SchemaModel as SchemaModel7 } from "@contractspec/lib.schema";
3007
+ import {
3008
+ defineCommand as defineCommand4,
3009
+ defineQuery as defineQuery5
3010
+ } from "@contractspec/lib.contracts-spec/operations";
3011
+ var MeetingRecorderGetTranscriptInput = new SchemaModel7({
3012
+ name: "MeetingRecorderGetTranscriptInput",
3013
+ description: "Parameters for fetching a meeting transcript.",
3014
+ fields: {
3015
+ tenantId: { type: ScalarTypeEnum7.ID(), isOptional: false },
3016
+ meetingId: { type: ScalarTypeEnum7.ID(), isOptional: false },
3017
+ connectionId: { type: ScalarTypeEnum7.ID(), isOptional: true },
3018
+ includeSegments: { type: ScalarTypeEnum7.Boolean(), isOptional: true },
3019
+ format: { type: ScalarTypeEnum7.String_unsecure(), isOptional: true }
3020
+ }
3021
+ });
3022
+ var MeetingRecorderSyncTranscriptInput = new SchemaModel7({
3023
+ name: "MeetingRecorderSyncTranscriptInput",
3024
+ description: "Command payload to synchronise meeting transcripts.",
3025
+ fields: {
3026
+ tenantId: { type: ScalarTypeEnum7.ID(), isOptional: false },
3027
+ meetingId: { type: ScalarTypeEnum7.ID(), isOptional: false },
3028
+ connectionId: { type: ScalarTypeEnum7.ID(), isOptional: true },
3029
+ forceRefresh: { type: ScalarTypeEnum7.Boolean(), isOptional: true },
3030
+ triggerWebhooks: { type: ScalarTypeEnum7.Boolean(), isOptional: true }
3031
+ }
3032
+ });
3033
+ var MeetingRecorderSyncTranscriptOutput = new SchemaModel7({
3034
+ name: "MeetingRecorderSyncTranscriptOutput",
3035
+ description: "Result of a transcript synchronisation run.",
3036
+ fields: {
3037
+ synced: { type: ScalarTypeEnum7.Int_unsecure(), isOptional: false },
3038
+ failed: { type: ScalarTypeEnum7.Int_unsecure(), isOptional: false },
3039
+ errors: {
3040
+ type: ScalarTypeEnum7.String_unsecure(),
3041
+ isArray: true,
3042
+ isOptional: true
3043
+ },
3044
+ nextSyncSuggestedAt: {
3045
+ type: ScalarTypeEnum7.DateTime(),
3046
+ isOptional: true
3047
+ }
3048
+ }
3049
+ });
3050
+ var MeetingRecorderGetTranscript = defineQuery5({
3051
+ meta: {
3052
+ key: "meeting-recorder.transcripts.get",
3053
+ version: "1.0.0",
3054
+ description: "Fetch the transcript for a specific meeting recording.",
3055
+ goal: "Expose meeting transcripts for downstream knowledge and analytics flows.",
3056
+ context: "Used by agents and dashboards to access the transcript for a selected meeting.",
3057
+ owners: ["@platform.integrations"],
3058
+ tags: ["meeting-recorder", "transcripts"],
3059
+ stability: "experimental"
3060
+ },
3061
+ io: {
3062
+ input: MeetingRecorderGetTranscriptInput,
3063
+ output: MeetingTranscriptRecord
3064
+ },
3065
+ policy: {
3066
+ auth: "user"
3067
+ }
3068
+ });
3069
+ var MeetingRecorderSyncTranscript = defineCommand4({
3070
+ meta: {
3071
+ key: "meeting-recorder.transcripts.sync",
3072
+ version: "1.0.0",
3073
+ description: "Trigger a transcript sync from the meeting recorder provider.",
3074
+ goal: "Keep canonical transcripts aligned with external meeting providers.",
3075
+ context: "Invoked by scheduled jobs or webhooks when new transcripts are ready.",
3076
+ owners: ["@platform.integrations"],
3077
+ tags: ["meeting-recorder", "transcripts", "sync"],
3078
+ stability: "experimental"
3079
+ },
3080
+ io: {
3081
+ input: MeetingRecorderSyncTranscriptInput,
3082
+ output: MeetingRecorderSyncTranscriptOutput
3083
+ },
3084
+ policy: {
3085
+ auth: "admin"
3086
+ },
3087
+ telemetry: {
3088
+ success: {
3089
+ event: { key: MEETING_RECORDER_TELEMETRY_EVENTS.transcriptsSynced },
3090
+ properties: ({ input, output }) => {
3091
+ const payload = input;
3092
+ const result = output;
3093
+ return {
3094
+ tenantId: payload?.tenantId,
3095
+ meetingId: payload?.meetingId,
3096
+ synced: result?.synced,
3097
+ failed: result?.failed
3098
+ };
3099
+ }
3100
+ },
3101
+ failure: {
3102
+ event: { key: MEETING_RECORDER_TELEMETRY_EVENTS.transcriptsSyncFailed },
3103
+ properties: ({ input, error }) => {
3104
+ const payload = input;
3105
+ return {
3106
+ tenantId: payload?.tenantId,
3107
+ meetingId: payload?.meetingId,
3108
+ error: error instanceof Error ? error.message : String(error ?? "unknown")
3109
+ };
3110
+ }
3111
+ }
3112
+ }
3113
+ });
3114
+ var meetingRecorderTranscriptContracts = {
3115
+ MeetingRecorderGetTranscript,
3116
+ MeetingRecorderSyncTranscript
3117
+ };
3118
+ function registerMeetingRecorderTranscriptContracts(registry2) {
3119
+ return registry2.register(MeetingRecorderGetTranscript).register(MeetingRecorderSyncTranscript);
3120
+ }
3121
+
3122
+ // src/integrations/meeting-recorder/contracts/webhooks.ts
3123
+ import { ScalarTypeEnum as ScalarTypeEnum8, SchemaModel as SchemaModel8 } from "@contractspec/lib.schema";
3124
+ import {
3125
+ defineCommand as defineCommand5
3126
+ } from "@contractspec/lib.contracts-spec/operations";
3127
+ var MeetingRecorderWebhookIngestInput = new SchemaModel8({
3128
+ name: "MeetingRecorderWebhookIngestInput",
3129
+ description: "Payload for ingesting a meeting recorder webhook event.",
3130
+ fields: {
3131
+ tenantId: { type: ScalarTypeEnum8.ID(), isOptional: false },
3132
+ providerKey: { type: ScalarTypeEnum8.String_unsecure(), isOptional: false },
3133
+ connectionId: { type: ScalarTypeEnum8.ID(), isOptional: true },
3134
+ webhookId: { type: ScalarTypeEnum8.String_unsecure(), isOptional: true },
3135
+ headers: { type: ScalarTypeEnum8.JSON(), isOptional: true },
3136
+ payload: { type: ScalarTypeEnum8.JSON(), isOptional: false },
3137
+ receivedAt: { type: ScalarTypeEnum8.DateTime(), isOptional: true }
3138
+ }
3139
+ });
3140
+ var MeetingRecorderWebhookIngestOutput = new SchemaModel8({
3141
+ name: "MeetingRecorderWebhookIngestOutput",
3142
+ description: "Result of processing a meeting recorder webhook.",
3143
+ fields: {
3144
+ accepted: { type: ScalarTypeEnum8.Boolean(), isOptional: false },
3145
+ event: { type: MeetingRecorderWebhookEventRecord, isOptional: true }
3146
+ }
3147
+ });
3148
+ var MeetingRecorderWebhookIngest = defineCommand5({
3149
+ meta: {
3150
+ key: "meeting-recorder.webhooks.ingest",
3151
+ version: "1.0.0",
3152
+ description: "Ingest a webhook from a meeting recorder provider.",
3153
+ goal: "Trigger transcript syncs or downstream workflows without polling.",
3154
+ context: "Used by webhook handlers to validate and normalize provider webhook events.",
3155
+ owners: ["@platform.integrations"],
3156
+ tags: ["meeting-recorder", "webhooks", "transcripts"],
3157
+ stability: "experimental"
3158
+ },
3159
+ io: {
3160
+ input: MeetingRecorderWebhookIngestInput,
3161
+ output: MeetingRecorderWebhookIngestOutput
3162
+ },
3163
+ policy: {
3164
+ auth: "admin"
3165
+ }
3166
+ });
3167
+ var meetingRecorderWebhookContracts = {
3168
+ MeetingRecorderWebhookIngest
3169
+ };
3170
+ function registerMeetingRecorderWebhookContracts(registry2) {
3171
+ return registry2.register(MeetingRecorderWebhookIngest);
3172
+ }
3173
+
3174
+ // src/integrations/meeting-recorder/meeting-recorder.feature.ts
3175
+ import { defineFeature as defineFeature2 } from "@contractspec/lib.contracts-spec/features";
3176
+ var MeetingRecorderFeature = defineFeature2({
3177
+ meta: {
3178
+ key: "meeting-recorder",
3179
+ version: "1.0.0",
3180
+ title: "Meeting Recorder Integration",
3181
+ description: "Meeting metadata, transcript retrieval, and webhook ingestion for meeting recorder providers.",
3182
+ domain: "integrations",
3183
+ owners: ["@platform.integrations"],
3184
+ tags: ["meeting-recorder", "transcripts", "integrations"],
3185
+ stability: "experimental"
3186
+ },
3187
+ operations: [
3188
+ { key: "meeting-recorder.meetings.list", version: "1.0.0" },
3189
+ { key: "meeting-recorder.meetings.get", version: "1.0.0" },
3190
+ { key: "meeting-recorder.transcripts.get", version: "1.0.0" },
3191
+ { key: "meeting-recorder.transcripts.sync", version: "1.0.0" },
3192
+ { key: "meeting-recorder.webhooks.ingest", version: "1.0.0" }
3193
+ ],
3194
+ events: [],
3195
+ presentations: [],
3196
+ opToPresentation: [],
3197
+ presentationsTargets: [],
3198
+ capabilities: {
3199
+ provides: [{ key: "meeting-recorder", version: "1.0.0" }],
3200
+ requires: [{ key: "identity", version: "1.0.0" }]
3201
+ }
3202
+ });
3203
+ // src/integrations/meeting-recorder/contracts/index.ts
3204
+ function registerMeetingRecorderContracts(registry2) {
3205
+ return registerMeetingRecorderWebhookContracts(registerMeetingRecorderTranscriptContracts(registerMeetingRecorderMeetingContracts(registry2)));
3206
+ }
3207
+ export {
3208
+ twilioSmsIntegrationSpec,
3209
+ tldvIntegrationSpec,
3210
+ supabaseVectorIntegrationSpec,
3211
+ supabasePostgresIntegrationSpec,
3212
+ stripeIntegrationSpec,
3213
+ registerTwilioSmsIntegration,
3214
+ registerTldvIntegration,
3215
+ registerSupabaseVectorIntegration,
3216
+ registerSupabasePostgresIntegration,
3217
+ registerStripeIntegration,
3218
+ registerQdrantIntegration,
3219
+ registerPowensIntegration,
3220
+ registerPostmarkIntegration,
3221
+ registerPosthogIntegration,
3222
+ registerOpenBankingContracts,
3223
+ registerNotionIntegration,
3224
+ registerMistralIntegration,
3225
+ registerMeetingRecorderContracts,
3226
+ registerLinearIntegration,
3227
+ registerJiraIntegration,
3228
+ registerGranolaIntegration,
3229
+ registerGradiumIntegration,
3230
+ registerGoogleCalendarIntegration,
3231
+ registerGmailIntegration,
3232
+ registerGcsStorageIntegration,
3233
+ registerFirefliesIntegration,
3234
+ registerFathomIntegration,
3235
+ registerFalIntegration,
3236
+ registerElevenLabsIntegration,
3237
+ redactPostHogLLMTelemetryPayload,
3238
+ redactOpenBankingTelemetryPayload,
3239
+ redactMeetingRecorderTelemetryPayload,
3240
+ qdrantIntegrationSpec,
3241
+ powensIntegrationSpec,
3242
+ postmarkIntegrationSpec,
3243
+ posthogLLMTelemetrySpec,
3244
+ posthogIntegrationSpec,
3245
+ notionIntegrationSpec,
3246
+ mistralIntegrationSpec,
3247
+ makeIntegrationSpecKey,
3248
+ linearIntegrationSpec,
3249
+ jiraIntegrationSpec,
3250
+ granolaIntegrationSpec,
3251
+ gradiumIntegrationSpec,
3252
+ googleCalendarIntegrationSpec,
3253
+ gmailIntegrationSpec,
3254
+ gcsStorageIntegrationSpec,
3255
+ firefliesIntegrationSpec,
3256
+ fathomIntegrationSpec,
3257
+ falIntegrationSpec,
3258
+ ensurePrimaryOpenBankingIntegration,
3259
+ elevenLabsIntegrationSpec,
3260
+ defineIntegration,
3261
+ createDefaultIntegrationSpecRegistry,
3262
+ assertPrimaryOpenBankingReady,
3263
+ POSTHOG_LLM_TELEMETRY_EVENTS,
3264
+ POSTHOG_LLM_PII_FIELDS,
3265
+ POSTHOG_EVALUATION_TEMPLATES,
3266
+ OpenBankingSyncTransactions,
3267
+ OpenBankingSyncAccounts,
3268
+ OpenBankingRefreshBalances,
3269
+ OpenBankingListTransactions,
3270
+ OpenBankingListAccounts,
3271
+ OpenBankingGetBalances,
3272
+ OpenBankingGetAccount,
3273
+ OpenBankingFeature,
3274
+ OPENBANKING_TELEMETRY_EVENTS,
3275
+ OPENBANKING_PII_FIELDS,
3276
+ MeetingTranscriptSegmentRecord,
3277
+ MeetingTranscriptRecord as MeetingTranscriptRecordModel,
3278
+ MeetingRecorderWebhookIngest,
3279
+ MeetingRecorderWebhookEventRecord,
3280
+ MeetingRecorderSyncTranscript,
3281
+ MeetingRecorderListMeetings,
3282
+ MeetingRecorderGetTranscript,
3283
+ MeetingRecorderGetMeeting,
3284
+ MeetingRecorderFeature,
3285
+ MeetingRecord as MeetingRecordModel,
3286
+ MeetingParticipantRecord,
3287
+ MEETING_RECORDER_TELEMETRY_EVENTS,
3288
+ MEETING_RECORDER_PII_FIELDS,
3289
+ IntegrationSpecRegistry,
3290
+ BankTransactionRecord,
3291
+ BankAccountRecord,
3292
+ AccountBalanceRecord
3293
+ };