@lssm/lib.contracts 1.11.1 → 1.41.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 (457) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/rolldown_runtime.js +1 -0
  3. package/dist/app-config/app-config.feature.js +1 -0
  4. package/dist/app-config/contracts.js +1 -1
  5. package/dist/app-config/docs/app-config.docblock.js +220 -0
  6. package/dist/app-config/events.js +1 -1
  7. package/dist/app-config/index.js +1 -1
  8. package/dist/app-config/lifecycle-contracts.js +1 -1
  9. package/dist/capabilities/docs/capabilities.docblock.js +1 -0
  10. package/dist/contract-registry/index.js +1 -0
  11. package/dist/contract-registry/schemas.js +1 -0
  12. package/dist/contract-registry/types.js +0 -0
  13. package/dist/data-views/docs/data-views.docblock.js +1 -0
  14. package/dist/docs/PUBLISHING.docblock.js +76 -0
  15. package/dist/docs/accessibility_wcag_compliance_specs.docblock.js +350 -0
  16. package/dist/docs/index.js +1 -0
  17. package/dist/docs/meta.docs.js +13 -0
  18. package/dist/docs/presentations.js +1 -0
  19. package/dist/docs/registry.js +1 -0
  20. package/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +383 -0
  21. package/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +68 -0
  22. package/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +140 -0
  23. package/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +86 -0
  24. package/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +1 -0
  25. package/dist/docs/tech/auth/better-auth-nextjs.docblock.js +58 -0
  26. package/dist/docs/tech/contracts/README.docblock.js +1 -0
  27. package/dist/docs/tech/contracts/create-subscription.docblock.js +1 -0
  28. package/dist/docs/tech/contracts/graphql-typed-outputs.docblock.js +180 -0
  29. package/dist/docs/tech/contracts/migrations.docblock.js +1 -0
  30. package/dist/docs/tech/contracts/openapi-export.docblock.js +38 -0
  31. package/dist/docs/tech/contracts/ops-to-presentation-linking.docblock.js +62 -0
  32. package/dist/docs/tech/contracts/overlays.docblock.js +68 -0
  33. package/dist/docs/tech/contracts/tests.docblock.js +132 -0
  34. package/dist/docs/tech/contracts/themes.docblock.js +1 -0
  35. package/dist/docs/tech/contracts/vertical-pocket-family-office.docblock.js +106 -0
  36. package/dist/docs/tech/lifecycle-stage-system.docblock.js +213 -0
  37. package/dist/docs/tech/llm/llm-integration.docblock.js +289 -0
  38. package/dist/docs/tech/mcp-endpoints.docblock.js +1 -0
  39. package/dist/docs/tech/presentation-runtime.docblock.js +1 -0
  40. package/dist/docs/tech/schema/README.docblock.js +262 -0
  41. package/dist/docs/tech/studio/learning-events.docblock.js +1 -0
  42. package/dist/docs/tech/studio/learning-journeys.docblock.js +57 -0
  43. package/dist/docs/tech/studio/platform-admin-panel.docblock.js +63 -0
  44. package/dist/docs/tech/studio/project-access-teams.docblock.js +36 -0
  45. package/dist/docs/tech/studio/project-routing.docblock.js +1 -0
  46. package/dist/docs/tech/studio/sandbox-unlogged.docblock.js +20 -0
  47. package/dist/docs/tech/studio/team-invitations.docblock.js +65 -0
  48. package/dist/docs/tech/studio/workspace-ops.docblock.js +1 -0
  49. package/dist/docs/tech/studio/workspaces.docblock.js +41 -0
  50. package/dist/docs/tech/telemetry-ingest.docblock.js +122 -0
  51. package/dist/docs/tech/templates/runtime.docblock.js +1 -0
  52. package/dist/docs/tech/vscode-extension.docblock.js +68 -0
  53. package/dist/docs/tech/workflows/overview.docblock.js +1 -0
  54. package/dist/docs/tech-contracts.docs.js +76 -0
  55. package/dist/docs/types.js +0 -0
  56. package/dist/events.js +1 -1
  57. package/dist/experiments/docs/experiments.docblock.js +128 -0
  58. package/dist/forms/docs/forms.docblock.js +1 -0
  59. package/dist/index.js +1 -1
  60. package/dist/install.js +1 -1
  61. package/dist/integrations/contracts.js +1 -1
  62. package/dist/integrations/docs/integrations.docblock.js +1 -0
  63. package/dist/integrations/index.js +1 -1
  64. package/dist/integrations/openbanking/contracts/accounts.js +1 -1
  65. package/dist/integrations/openbanking/contracts/balances.js +1 -1
  66. package/dist/integrations/openbanking/contracts/index.js +1 -1
  67. package/dist/integrations/openbanking/contracts/transactions.js +1 -1
  68. package/dist/integrations/openbanking/models.js +1 -1
  69. package/dist/integrations/openbanking/openbanking.feature.js +1 -0
  70. package/dist/integrations/providers/impls/index.js +1 -1
  71. package/dist/integrations/providers/impls/provider-factory.js +1 -1
  72. package/dist/integrations/providers/index.js +1 -1
  73. package/dist/integrations/providers/registry.js +1 -0
  74. package/dist/integrations/secrets/aws-secret-manager.js +1 -0
  75. package/dist/integrations/secrets/gcp-secret-manager.js +1 -1
  76. package/dist/integrations/secrets/index.js +1 -1
  77. package/dist/integrations/secrets/scaleway-secret-manager.js +1 -0
  78. package/dist/jobs/define-job.js +1 -0
  79. package/dist/jobs/gcp-cloud-tasks.js +1 -1
  80. package/dist/jobs/gcp-pubsub.js +1 -1
  81. package/dist/jobs/handlers/index.js +1 -1
  82. package/dist/jobs/handlers/ping-handler.js +1 -0
  83. package/dist/jobs/index.js +1 -1
  84. package/dist/jobs/memory-queue.js +1 -1
  85. package/dist/jobs/queue.js +1 -0
  86. package/dist/jobs/scaleway-sqs-queue.js +1 -0
  87. package/dist/knowledge/contracts.js +1 -1
  88. package/dist/knowledge/docs/knowledge.docblock.js +138 -0
  89. package/dist/llm/exporters.js +8 -0
  90. package/dist/llm/index.js +1 -0
  91. package/dist/llm/prompts.js +220 -0
  92. package/dist/llm/types.js +0 -0
  93. package/dist/node_modules/@pothos/plugin-complexity/esm/calculate-complexity.js +1 -0
  94. package/dist/node_modules/@pothos/plugin-complexity/esm/defaults.js +1 -0
  95. package/dist/node_modules/@pothos/plugin-complexity/esm/index.js +1 -0
  96. package/dist/node_modules/@pothos/plugin-complexity/esm/types.js +1 -0
  97. package/dist/node_modules/@pothos/plugin-complexity/esm/util.js +1 -0
  98. package/dist/node_modules/@pothos/plugin-complexity/esm/validator.js +1 -0
  99. package/dist/node_modules/@pothos/plugin-dataloader/esm/field-builder.js +1 -0
  100. package/dist/node_modules/@pothos/plugin-dataloader/esm/index.js +1 -0
  101. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/index.js +1 -0
  102. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/interface.js +1 -0
  103. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/node.js +1 -0
  104. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/object.js +1 -0
  105. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/union.js +1 -0
  106. package/dist/node_modules/@pothos/plugin-dataloader/esm/schema-builder.js +1 -0
  107. package/dist/node_modules/@pothos/plugin-dataloader/esm/util.js +1 -0
  108. package/dist/node_modules/@pothos/plugin-prisma/esm/connection-helpers.js +1 -0
  109. package/dist/node_modules/@pothos/plugin-prisma/esm/field-builder.js +1 -0
  110. package/dist/node_modules/@pothos/plugin-prisma/esm/index.js +1 -0
  111. package/dist/node_modules/@pothos/plugin-prisma/esm/interface-ref.js +1 -0
  112. package/dist/node_modules/@pothos/plugin-prisma/esm/model-loader.js +1 -0
  113. package/dist/node_modules/@pothos/plugin-prisma/esm/node-ref.js +1 -0
  114. package/dist/node_modules/@pothos/plugin-prisma/esm/object-ref.js +1 -0
  115. package/dist/node_modules/@pothos/plugin-prisma/esm/prisma-field-builder.js +1 -0
  116. package/dist/node_modules/@pothos/plugin-prisma/esm/schema-builder.js +1 -0
  117. package/dist/node_modules/@pothos/plugin-prisma/esm/types.js +0 -0
  118. package/dist/node_modules/@pothos/plugin-prisma/esm/util/cursors.js +1 -0
  119. package/dist/node_modules/@pothos/plugin-prisma/esm/util/datamodel.js +1 -0
  120. package/dist/node_modules/@pothos/plugin-prisma/esm/util/deep-equal.js +1 -0
  121. package/dist/node_modules/@pothos/plugin-prisma/esm/util/description.js +1 -0
  122. package/dist/node_modules/@pothos/plugin-prisma/esm/util/get-client.js +1 -0
  123. package/dist/node_modules/@pothos/plugin-prisma/esm/util/loader-map.js +1 -0
  124. package/dist/node_modules/@pothos/plugin-prisma/esm/util/map-query.js +1 -0
  125. package/dist/node_modules/@pothos/plugin-prisma/esm/util/relation-map.js +1 -0
  126. package/dist/node_modules/@pothos/plugin-prisma/esm/util/selections.js +1 -0
  127. package/dist/node_modules/@pothos/plugin-prisma/esm/util/usage.js +1 -0
  128. package/dist/node_modules/@pothos/plugin-tracing/esm/index.js +1 -0
  129. package/dist/node_modules/@pothos/plugin-tracing/esm/util.js +1 -0
  130. package/dist/node_modules/dataloader/index.js +7 -0
  131. package/dist/node_modules/graphql/error/GraphQLError.js +5 -0
  132. package/dist/node_modules/graphql/error/index.js +1 -0
  133. package/dist/node_modules/graphql/error/locatedError.js +1 -0
  134. package/dist/node_modules/graphql/error/syntaxError.js +1 -0
  135. package/dist/node_modules/graphql/execution/collectFields.js +1 -0
  136. package/dist/node_modules/graphql/execution/execute.js +1 -0
  137. package/dist/node_modules/graphql/execution/index.js +1 -0
  138. package/dist/node_modules/graphql/execution/mapAsyncIterator.js +1 -0
  139. package/dist/node_modules/graphql/execution/subscribe.js +1 -0
  140. package/dist/node_modules/graphql/execution/values.js +1 -0
  141. package/dist/node_modules/graphql/graphql.js +1 -0
  142. package/dist/node_modules/graphql/index.js +1 -0
  143. package/dist/node_modules/graphql/jsutils/Path.js +1 -0
  144. package/dist/node_modules/graphql/jsutils/devAssert.js +1 -0
  145. package/dist/node_modules/graphql/jsutils/didYouMean.js +1 -0
  146. package/dist/node_modules/graphql/jsutils/groupBy.js +1 -0
  147. package/dist/node_modules/graphql/jsutils/identityFunc.js +1 -0
  148. package/dist/node_modules/graphql/jsutils/inspect.js +1 -0
  149. package/dist/node_modules/graphql/jsutils/instanceOf.js +12 -0
  150. package/dist/node_modules/graphql/jsutils/invariant.js +1 -0
  151. package/dist/node_modules/graphql/jsutils/isAsyncIterable.js +1 -0
  152. package/dist/node_modules/graphql/jsutils/isIterableObject.js +1 -0
  153. package/dist/node_modules/graphql/jsutils/isObjectLike.js +1 -0
  154. package/dist/node_modules/graphql/jsutils/isPromise.js +1 -0
  155. package/dist/node_modules/graphql/jsutils/keyMap.js +1 -0
  156. package/dist/node_modules/graphql/jsutils/keyValMap.js +1 -0
  157. package/dist/node_modules/graphql/jsutils/mapValue.js +1 -0
  158. package/dist/node_modules/graphql/jsutils/memoize3.js +1 -0
  159. package/dist/node_modules/graphql/jsutils/naturalCompare.js +1 -0
  160. package/dist/node_modules/graphql/jsutils/printPathArray.js +1 -0
  161. package/dist/node_modules/graphql/jsutils/promiseForObject.js +1 -0
  162. package/dist/node_modules/graphql/jsutils/promiseReduce.js +1 -0
  163. package/dist/node_modules/graphql/jsutils/suggestionList.js +1 -0
  164. package/dist/node_modules/graphql/jsutils/toError.js +1 -0
  165. package/dist/node_modules/graphql/jsutils/toObjMap.js +1 -0
  166. package/dist/node_modules/graphql/language/ast.js +1 -0
  167. package/dist/node_modules/graphql/language/blockString.js +3 -0
  168. package/dist/node_modules/graphql/language/characterClasses.js +1 -0
  169. package/dist/node_modules/graphql/language/directiveLocation.js +1 -0
  170. package/dist/node_modules/graphql/language/index.js +1 -0
  171. package/dist/node_modules/graphql/language/kinds.js +1 -0
  172. package/dist/node_modules/graphql/language/lexer.js +3 -0
  173. package/dist/node_modules/graphql/language/location.js +1 -0
  174. package/dist/node_modules/graphql/language/parser.js +1 -0
  175. package/dist/node_modules/graphql/language/predicates.js +1 -0
  176. package/dist/node_modules/graphql/language/printLocation.js +2 -0
  177. package/dist/node_modules/graphql/language/printString.js +1 -0
  178. package/dist/node_modules/graphql/language/printer.js +34 -0
  179. package/dist/node_modules/graphql/language/schemaCoordinateLexer.js +1 -0
  180. package/dist/node_modules/graphql/language/source.js +1 -0
  181. package/dist/node_modules/graphql/language/tokenKind.js +1 -0
  182. package/dist/node_modules/graphql/language/visitor.js +1 -0
  183. package/dist/node_modules/graphql/type/assertName.js +1 -0
  184. package/dist/node_modules/graphql/type/definition.js +1 -0
  185. package/dist/node_modules/graphql/type/directives.js +1 -0
  186. package/dist/node_modules/graphql/type/index.js +1 -0
  187. package/dist/node_modules/graphql/type/introspection.js +3 -0
  188. package/dist/node_modules/graphql/type/scalars.js +1 -0
  189. package/dist/node_modules/graphql/type/schema.js +1 -0
  190. package/dist/node_modules/graphql/type/validate.js +3 -0
  191. package/dist/node_modules/graphql/utilities/TypeInfo.js +1 -0
  192. package/dist/node_modules/graphql/utilities/assertValidName.js +1 -0
  193. package/dist/node_modules/graphql/utilities/astFromValue.js +1 -0
  194. package/dist/node_modules/graphql/utilities/buildASTSchema.js +1 -0
  195. package/dist/node_modules/graphql/utilities/buildClientSchema.js +1 -0
  196. package/dist/node_modules/graphql/utilities/coerceInputValue.js +1 -0
  197. package/dist/node_modules/graphql/utilities/concatAST.js +1 -0
  198. package/dist/node_modules/graphql/utilities/extendSchema.js +1 -0
  199. package/dist/node_modules/graphql/utilities/findBreakingChanges.js +1 -0
  200. package/dist/node_modules/graphql/utilities/getIntrospectionQuery.js +107 -0
  201. package/dist/node_modules/graphql/utilities/getOperationAST.js +1 -0
  202. package/dist/node_modules/graphql/utilities/getOperationRootType.js +1 -0
  203. package/dist/node_modules/graphql/utilities/index.js +1 -0
  204. package/dist/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
  205. package/dist/node_modules/graphql/utilities/lexicographicSortSchema.js +1 -0
  206. package/dist/node_modules/graphql/utilities/printSchema.js +13 -0
  207. package/dist/node_modules/graphql/utilities/resolveSchemaCoordinate.js +1 -0
  208. package/dist/node_modules/graphql/utilities/separateOperations.js +1 -0
  209. package/dist/node_modules/graphql/utilities/sortValueNode.js +1 -0
  210. package/dist/node_modules/graphql/utilities/stripIgnoredCharacters.js +1 -0
  211. package/dist/node_modules/graphql/utilities/typeComparators.js +1 -0
  212. package/dist/node_modules/graphql/utilities/typeFromAST.js +1 -0
  213. package/dist/node_modules/graphql/utilities/valueFromAST.js +1 -0
  214. package/dist/node_modules/graphql/utilities/valueFromASTUntyped.js +1 -0
  215. package/dist/node_modules/graphql/validation/ValidationContext.js +1 -0
  216. package/dist/node_modules/graphql/validation/index.js +1 -0
  217. package/dist/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +1 -0
  218. package/dist/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +1 -0
  219. package/dist/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +1 -0
  220. package/dist/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +1 -0
  221. package/dist/node_modules/graphql/validation/rules/KnownDirectivesRule.js +1 -0
  222. package/dist/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +1 -0
  223. package/dist/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +1 -0
  224. package/dist/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +1 -0
  225. package/dist/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +1 -0
  226. package/dist/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +1 -0
  227. package/dist/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +1 -0
  228. package/dist/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +1 -0
  229. package/dist/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +1 -0
  230. package/dist/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +1 -0
  231. package/dist/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +1 -0
  232. package/dist/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +1 -0
  233. package/dist/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +1 -0
  234. package/dist/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +1 -0
  235. package/dist/node_modules/graphql/validation/rules/ScalarLeafsRule.js +1 -0
  236. package/dist/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +1 -0
  237. package/dist/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +1 -0
  238. package/dist/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +1 -0
  239. package/dist/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +1 -0
  240. package/dist/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +1 -0
  241. package/dist/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +1 -0
  242. package/dist/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +1 -0
  243. package/dist/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +1 -0
  244. package/dist/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +1 -0
  245. package/dist/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +1 -0
  246. package/dist/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +1 -0
  247. package/dist/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +1 -0
  248. package/dist/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +1 -0
  249. package/dist/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +1 -0
  250. package/dist/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +1 -0
  251. package/dist/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +1 -0
  252. package/dist/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +1 -0
  253. package/dist/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +1 -0
  254. package/dist/node_modules/graphql/validation/specifiedRules.js +1 -0
  255. package/dist/node_modules/graphql/validation/validate.js +5 -0
  256. package/dist/node_modules/graphql/version.js +1 -0
  257. package/dist/onboarding-base.js +1 -1
  258. package/dist/openapi.js +1 -0
  259. package/dist/openbanking/docs/openbanking.docblock.js +109 -0
  260. package/dist/policy/docs/policy.docblock.js +1 -0
  261. package/dist/presentations/docs/presentations-conventions.docblock.js +8 -0
  262. package/dist/presentations.js +1 -1
  263. package/dist/presentations.v2.js +7 -1
  264. package/dist/prompt.js +1 -1
  265. package/dist/promptRegistry.js +1 -1
  266. package/dist/regenerator/docs/regenerator.docblock.js +184 -0
  267. package/dist/registry.js +1 -1
  268. package/dist/resources.js +1 -1
  269. package/dist/schema-to-markdown.js +10 -0
  270. package/dist/server/graphql-pothos.js +1 -1
  271. package/dist/server/index.js +1 -1
  272. package/dist/server/mcp/createMcpServer.js +1 -0
  273. package/dist/server/mcp/mcpTypes.js +0 -0
  274. package/dist/server/mcp/registerPresentations.js +1 -0
  275. package/dist/server/mcp/registerPrompts.js +3 -0
  276. package/dist/server/mcp/registerResources.js +1 -0
  277. package/dist/server/mcp/registerTools.js +1 -0
  278. package/dist/server/provider-mcp.js +1 -1
  279. package/dist/telemetry/docs/telemetry.docblock.js +139 -0
  280. package/package.json +353 -193
  281. package/dist/app-config/branding.d.ts +0 -55
  282. package/dist/app-config/contracts.d.ts +0 -244
  283. package/dist/app-config/events.d.ts +0 -122
  284. package/dist/app-config/index.d.ts +0 -8
  285. package/dist/app-config/lifecycle-contracts.d.ts +0 -382
  286. package/dist/app-config/lifecycle.d.ts +0 -27
  287. package/dist/app-config/runtime.d.ts +0 -114
  288. package/dist/app-config/spec.d.ts +0 -175
  289. package/dist/app-config/validation.d.ts +0 -47
  290. package/dist/capabilities/openbanking.d.ts +0 -9
  291. package/dist/capabilities.d.ts +0 -45
  292. package/dist/client/index.d.ts +0 -6
  293. package/dist/client/react/drivers/rn-reusables.d.ts +0 -22
  294. package/dist/client/react/drivers/shadcn.d.ts +0 -12
  295. package/dist/client/react/feature-render.d.ts +0 -20
  296. package/dist/client/react/form-render.d.ts +0 -91
  297. package/dist/client/react/index.d.ts +0 -5
  298. package/dist/contracts-adapter-hydration.d.ts +0 -15
  299. package/dist/contracts-adapter-input.d.ts +0 -10
  300. package/dist/data-views/query-generator.d.ts +0 -39
  301. package/dist/data-views/runtime.d.ts +0 -26
  302. package/dist/data-views.d.ts +0 -131
  303. package/dist/events.d.ts +0 -44
  304. package/dist/experiments/evaluator.d.ts +0 -37
  305. package/dist/experiments/spec-resolver.d.ts +0 -16
  306. package/dist/experiments/spec.d.ts +0 -89
  307. package/dist/features.d.ts +0 -87
  308. package/dist/forms.d.ts +0 -258
  309. package/dist/graphql-federation/dist/index.js +0 -1
  310. package/dist/index.d.ts +0 -130
  311. package/dist/install.d.ts +0 -76
  312. package/dist/integrations/binding.d.ts +0 -17
  313. package/dist/integrations/connection.d.ts +0 -51
  314. package/dist/integrations/contracts.d.ts +0 -435
  315. package/dist/integrations/health.d.ts +0 -21
  316. package/dist/integrations/index.d.ts +0 -53
  317. package/dist/integrations/openbanking/contracts/accounts.d.ts +0 -287
  318. package/dist/integrations/openbanking/contracts/balances.d.ts +0 -163
  319. package/dist/integrations/openbanking/contracts/index.d.ts +0 -9
  320. package/dist/integrations/openbanking/contracts/transactions.d.ts +0 -211
  321. package/dist/integrations/openbanking/guards.d.ts +0 -12
  322. package/dist/integrations/openbanking/models.d.ts +0 -228
  323. package/dist/integrations/openbanking/telemetry.d.ts +0 -15
  324. package/dist/integrations/providers/calendar.d.ts +0 -78
  325. package/dist/integrations/providers/elevenlabs.d.ts +0 -7
  326. package/dist/integrations/providers/email.d.ts +0 -86
  327. package/dist/integrations/providers/embedding.d.ts +0 -24
  328. package/dist/integrations/providers/gcs-storage.d.ts +0 -7
  329. package/dist/integrations/providers/gmail.d.ts +0 -7
  330. package/dist/integrations/providers/google-calendar.d.ts +0 -7
  331. package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +0 -20
  332. package/dist/integrations/providers/impls/gcs-storage.d.ts +0 -24
  333. package/dist/integrations/providers/impls/gmail-inbound.d.ts +0 -26
  334. package/dist/integrations/providers/impls/gmail-outbound.d.ts +0 -18
  335. package/dist/integrations/providers/impls/google-calendar.d.ts +0 -23
  336. package/dist/integrations/providers/impls/index.d.ts +0 -15
  337. package/dist/integrations/providers/impls/mistral-embedding.d.ts +0 -23
  338. package/dist/integrations/providers/impls/mistral-llm.d.ts +0 -31
  339. package/dist/integrations/providers/impls/postmark-email.d.ts +0 -19
  340. package/dist/integrations/providers/impls/powens-client.d.ts +0 -124
  341. package/dist/integrations/providers/impls/powens-openbanking.d.ts +0 -27
  342. package/dist/integrations/providers/impls/provider-factory.d.ts +0 -26
  343. package/dist/integrations/providers/impls/qdrant-vector.d.ts +0 -24
  344. package/dist/integrations/providers/impls/stripe-payments.d.ts +0 -28
  345. package/dist/integrations/providers/impls/twilio-sms.d.ts +0 -20
  346. package/dist/integrations/providers/index.d.ts +0 -36
  347. package/dist/integrations/providers/llm.d.ts +0 -82
  348. package/dist/integrations/providers/mistral.d.ts +0 -7
  349. package/dist/integrations/providers/openbanking.d.ts +0 -128
  350. package/dist/integrations/providers/payments.d.ts +0 -109
  351. package/dist/integrations/providers/postmark.d.ts +0 -7
  352. package/dist/integrations/providers/powens.d.ts +0 -7
  353. package/dist/integrations/providers/qdrant.d.ts +0 -7
  354. package/dist/integrations/providers/sms.d.ts +0 -34
  355. package/dist/integrations/providers/storage.d.ts +0 -60
  356. package/dist/integrations/providers/stripe.d.ts +0 -7
  357. package/dist/integrations/providers/twilio-sms.d.ts +0 -7
  358. package/dist/integrations/providers/vector-store.d.ts +0 -43
  359. package/dist/integrations/providers/voice.d.ts +0 -34
  360. package/dist/integrations/runtime.d.ts +0 -99
  361. package/dist/integrations/secrets/env-secret-provider.d.ts +0 -31
  362. package/dist/integrations/secrets/gcp-secret-manager.d.ts +0 -32
  363. package/dist/integrations/secrets/index.d.ts +0 -5
  364. package/dist/integrations/secrets/manager.d.ts +0 -47
  365. package/dist/integrations/secrets/provider.d.ts +0 -52
  366. package/dist/integrations/spec.d.ts +0 -79
  367. package/dist/jobs/gcp-cloud-tasks.d.ts +0 -41
  368. package/dist/jobs/gcp-pubsub.d.ts +0 -25
  369. package/dist/jobs/handlers/gmail-sync-handler.d.ts +0 -9
  370. package/dist/jobs/handlers/index.d.ts +0 -3
  371. package/dist/jobs/handlers/storage-document-handler.d.ts +0 -12
  372. package/dist/jobs/index.d.ts +0 -7
  373. package/dist/jobs/memory-queue.d.ts +0 -18
  374. package/dist/jobs/queue.d.ts +0 -26
  375. package/dist/jsonschema.d.ts +0 -26
  376. package/dist/knowledge/binding.d.ts +0 -25
  377. package/dist/knowledge/contracts.d.ts +0 -316
  378. package/dist/knowledge/index.d.ts +0 -10
  379. package/dist/knowledge/ingestion/document-processor.d.ts +0 -24
  380. package/dist/knowledge/ingestion/embedding-service.d.ts +0 -12
  381. package/dist/knowledge/ingestion/gmail-adapter.d.ts +0 -18
  382. package/dist/knowledge/ingestion/index.d.ts +0 -6
  383. package/dist/knowledge/ingestion/storage-adapter.d.ts +0 -15
  384. package/dist/knowledge/ingestion/vector-indexer.d.ts +0 -18
  385. package/dist/knowledge/query/index.d.ts +0 -2
  386. package/dist/knowledge/query/service.d.ts +0 -29
  387. package/dist/knowledge/runtime.d.ts +0 -32
  388. package/dist/knowledge/source.d.ts +0 -32
  389. package/dist/knowledge/spaces/email-threads.d.ts +0 -7
  390. package/dist/knowledge/spaces/financial-docs.d.ts +0 -7
  391. package/dist/knowledge/spaces/financial-overview.d.ts +0 -7
  392. package/dist/knowledge/spaces/index.d.ts +0 -7
  393. package/dist/knowledge/spaces/product-canon.d.ts +0 -7
  394. package/dist/knowledge/spaces/support-faq.d.ts +0 -7
  395. package/dist/knowledge/spaces/uploaded-docs.d.ts +0 -7
  396. package/dist/knowledge/spec.d.ts +0 -52
  397. package/dist/markdown.d.ts +0 -21
  398. package/dist/migrations.d.ts +0 -52
  399. package/dist/onboarding-base.d.ts +0 -137
  400. package/dist/ownership.d.ts +0 -75
  401. package/dist/policy/engine.d.ts +0 -39
  402. package/dist/policy/opa-adapter.d.ts +0 -45
  403. package/dist/policy/spec.d.ts +0 -114
  404. package/dist/presentations.backcompat.d.ts +0 -7
  405. package/dist/presentations.d.ts +0 -96
  406. package/dist/presentations.v2.d.ts +0 -95
  407. package/dist/prompt.d.ts +0 -60
  408. package/dist/promptRegistry.d.ts +0 -15
  409. package/dist/regenerator/adapters.d.ts +0 -19
  410. package/dist/regenerator/executor.d.ts +0 -70
  411. package/dist/regenerator/index.d.ts +0 -7
  412. package/dist/regenerator/service.d.ts +0 -33
  413. package/dist/regenerator/sinks.d.ts +0 -26
  414. package/dist/regenerator/types.d.ts +0 -107
  415. package/dist/regenerator/utils.d.ts +0 -9
  416. package/dist/registry.d.ts +0 -72
  417. package/dist/resources.d.ts +0 -64
  418. package/dist/schema/dist/EnumType.js +0 -1
  419. package/dist/schema/dist/FieldType.js +0 -1
  420. package/dist/schema/dist/ScalarTypeEnum.js +0 -1
  421. package/dist/schema/dist/SchemaModel.js +0 -1
  422. package/dist/schema/dist/index.js +0 -1
  423. package/dist/server/graphql-pothos.d.ts +0 -31
  424. package/dist/server/graphql-schema-export.d.ts +0 -6
  425. package/dist/server/graphql-schema-export.js +0 -1
  426. package/dist/server/index.d.ts +0 -9
  427. package/dist/server/provider-mcp.d.ts +0 -51
  428. package/dist/server/rest-elysia.d.ts +0 -40
  429. package/dist/server/rest-express.d.ts +0 -16
  430. package/dist/server/rest-generic.d.ts +0 -32
  431. package/dist/server/rest-next-app.d.ts +0 -35
  432. package/dist/server/rest-next-mcp.d.ts +0 -11
  433. package/dist/server/rest-next-pages.d.ts +0 -9
  434. package/dist/spec.d.ts +0 -171
  435. package/dist/telemetry/anomaly.d.ts +0 -27
  436. package/dist/telemetry/index.d.ts +0 -4
  437. package/dist/telemetry/spec.d.ts +0 -98
  438. package/dist/telemetry/tracker.d.ts +0 -51
  439. package/dist/tests/index.d.ts +0 -3
  440. package/dist/tests/runner.d.ts +0 -43
  441. package/dist/tests/spec.d.ts +0 -89
  442. package/dist/themes.d.ts +0 -55
  443. package/dist/translations/catalog.d.ts +0 -28
  444. package/dist/translations/tenant.d.ts +0 -15
  445. package/dist/types/all.d.ts +0 -60
  446. package/dist/types.d.ts +0 -88
  447. package/dist/workflow/adapters/db-adapter.d.ts +0 -34
  448. package/dist/workflow/adapters/file-adapter.d.ts +0 -14
  449. package/dist/workflow/adapters/index.d.ts +0 -4
  450. package/dist/workflow/adapters/memory-store.d.ts +0 -18
  451. package/dist/workflow/expression.d.ts +0 -9
  452. package/dist/workflow/index.d.ts +0 -10
  453. package/dist/workflow/runner.d.ts +0 -74
  454. package/dist/workflow/sla-monitor.d.ts +0 -20
  455. package/dist/workflow/spec.d.ts +0 -99
  456. package/dist/workflow/state.d.ts +0 -35
  457. package/dist/workflow/validation.d.ts +0 -28
@@ -1,9 +0,0 @@
1
- import { registerContractsOnBuilder } from "./graphql-pothos.js";
2
- import { exportContractsToGraphQLSchema } from "./graphql-schema-export.js";
3
- import { createMcpServer } from "./provider-mcp.js";
4
- import { RestOptions, createFetchHandler } from "./rest-generic.js";
5
- import { elysiaPlugin } from "./rest-elysia.js";
6
- import { expressRouter } from "./rest-express.js";
7
- import { makeNextAppHandler } from "./rest-next-app.js";
8
- import { makeNextPagesHandler } from "./rest-next-pages.js";
9
- export { RestOptions, createFetchHandler, createMcpServer, elysiaPlugin, exportContractsToGraphQLSchema, expressRouter, makeNextAppHandler, makeNextPagesHandler, registerContractsOnBuilder };
@@ -1,51 +0,0 @@
1
- import { ResourceRegistry } from "../resources.js";
2
- import { PresentationRegistry } from "../presentations.js";
3
- import { PresentationDescriptorV2 } from "../presentations.v2.js";
4
- import { HandlerCtx } from "../types.js";
5
- import { SpecRegistry } from "../registry.js";
6
- import { PromptRegistry } from "../promptRegistry.js";
7
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
-
9
- //#region src/server/provider-mcp.d.ts
10
-
11
- /**
12
- * Creates a unified Model Context Protocol (MCP) server exposing operations, resources, and prompts.
13
- *
14
- * This function takes registries for operations, resources, and prompts, and exposes them as
15
- * MCP Tools, Resources, and Prompts respectively. It enables AI agents to discover and interact
16
- * with the application's capabilities.
17
- *
18
- * Features:
19
- * - **Tools**: Exposes `command` operations as executable tools.
20
- * - **Resources**: Exposes `ResourceRegistry` entries and `PresentationSpec`s (Markdown/JSON) as read-only resources.
21
- * - **Prompts**: Exposes `PromptRegistry` entries as templated prompts.
22
- *
23
- * @param server - The `McpServer` instance to populate.
24
- * @param ops - Registry containing operations (tools).
25
- * @param resources - Registry containing data resources.
26
- * @param prompts - Registry containing prompt templates.
27
- * @param ctxFactories - Factories to create context for tools, resources, and prompts execution.
28
- * @returns The populated `McpServer` instance.
29
- */
30
- declare function createMcpServer(server: McpServer, ops: SpecRegistry, resources: ResourceRegistry, prompts: PromptRegistry, ctxFactories: {
31
- /** Factory for tool execution context (e.g., system actor) */
32
- toolCtx: () => HandlerCtx;
33
- /** Factory for prompt rendering context */
34
- promptCtx: () => {
35
- userId?: string | null;
36
- orgId?: string | null;
37
- locale?: string;
38
- };
39
- /** Factory for resource resolution context */
40
- resourceCtx: () => {
41
- userId?: string | null;
42
- orgId?: string | null;
43
- locale?: string;
44
- };
45
- /** Optional registry for V1 presentations */
46
- presentations?: PresentationRegistry;
47
- /** Optional list of V2 presentation descriptors */
48
- presentationsV2?: PresentationDescriptorV2[];
49
- }): McpServer;
50
- //#endregion
51
- export { createMcpServer };
@@ -1,40 +0,0 @@
1
- import { HandlerCtx } from "../types.js";
2
- import { SpecRegistry } from "../registry.js";
3
- import { RestOptions } from "./rest-generic.js";
4
- import { Elysia } from "elysia";
5
-
6
- //#region src/server/rest-elysia.d.ts
7
- /** Mount routes on an Elysia instance */
8
- declare function elysiaPlugin(app: Elysia, reg: SpecRegistry, ctxFactory: (c: {
9
- request: Request;
10
- store: any;
11
- }) => HandlerCtx, options?: RestOptions): Elysia<"", {
12
- decorator: {};
13
- store: {};
14
- derive: {};
15
- resolve: {};
16
- }, {
17
- typebox: {};
18
- error: {};
19
- }, {
20
- schema: {};
21
- standaloneSchema: {};
22
- macro: {};
23
- macroFn: {};
24
- parser: {};
25
- response: {};
26
- }, {}, {
27
- derive: {};
28
- resolve: {};
29
- schema: {};
30
- standaloneSchema: {};
31
- response: {};
32
- }, {
33
- derive: {};
34
- resolve: {};
35
- schema: {};
36
- standaloneSchema: {};
37
- response: {};
38
- }>;
39
- //#endregion
40
- export { elysiaPlugin };
@@ -1,16 +0,0 @@
1
- import { HandlerCtx } from "../types.js";
2
- import { SpecRegistry } from "../registry.js";
3
- import { RestOptions } from "./rest-generic.js";
4
- import { Request, Router } from "express";
5
-
6
- //#region src/server/rest-express.d.ts
7
-
8
- /**
9
- * Build an Express Router that proxies to the Fetch-style handler.
10
- * You can mount it at any base path; pass the same basePath in options.
11
- */
12
- declare function expressRouter(express: {
13
- Router: () => Router;
14
- }, reg: SpecRegistry, ctxFactory: (req: Request) => HandlerCtx, options?: RestOptions): Router;
15
- //#endregion
16
- export { expressRouter };
@@ -1,32 +0,0 @@
1
- import { HandlerCtx } from "../types.js";
2
- import { SpecRegistry } from "../registry.js";
3
-
4
- //#region src/server/rest-generic.d.ts
5
- interface RestOptions {
6
- /** Prefix all routes, e.g. "/api" */
7
- basePath?: string;
8
- /** If true, handle OPTIONS and set CORS headers */
9
- cors?: boolean | {
10
- origin?: string | '*';
11
- methods?: string[];
12
- headers?: string[];
13
- credentials?: boolean;
14
- maxAge?: number;
15
- };
16
- /** JSON spacing in responses (dev only ideally) */
17
- prettyJson?: number | false;
18
- /** Map thrown errors to {status, body} */
19
- onError?: (err: unknown) => {
20
- status: number;
21
- body: any;
22
- };
23
- }
24
- /**
25
- * Build a single Fetch-style handler: (req) => Response
26
- * - Discovers routes from SpecRegistry
27
- * - Validates with zod via registry.execute()
28
- * - Handles CORS (optional)
29
- */
30
- declare function createFetchHandler(reg: SpecRegistry, ctxFactory: (req: Request) => HandlerCtx, options?: RestOptions): (req: Request) => Promise<Response>;
31
- //#endregion
32
- export { RestOptions, createFetchHandler };
@@ -1,35 +0,0 @@
1
- import { HandlerCtx } from "../types.js";
2
- import { SpecRegistry } from "../registry.js";
3
- import { RestOptions } from "./rest-generic.js";
4
-
5
- //#region src/server/rest-next-app.d.ts
6
-
7
- /**
8
- * Creates a Next.js App Router route handler for ContractSpec operations.
9
- *
10
- * This function returns a handler suitable for `export const { GET, POST }` in a `route.ts` file.
11
- * It handles:
12
- * - Path parsing to determine the operation name and version.
13
- * - Body parsing (JSON).
14
- * - Context creation via `ctxFactory`.
15
- * - Execution via `SpecRegistry`.
16
- * - Response formatting (JSON success/error).
17
- *
18
- * @param reg - The SpecRegistry containing the operations.
19
- * @param ctxFactory - A factory function to build the `HandlerCtx` (e.g., auth, tenant) from the request.
20
- * @param options - Optional configuration for the REST handler.
21
- * @returns A function `(req: Request) => Promise<Response>`.
22
- *
23
- * @example
24
- * ```ts
25
- * // app/api/[...route]/route.ts
26
- * import { makeNextAppHandler } from '@lssm/lib.contracts/server/rest-next-app';
27
- * import { registry } from '@/lib/registry';
28
- *
29
- * const handler = makeNextAppHandler(registry, (req) => ({ actor: 'anonymous' }));
30
- * export { handler as GET, handler as POST };
31
- * ```
32
- */
33
- declare function makeNextAppHandler(reg: SpecRegistry, ctxFactory: (req: Request) => HandlerCtx, options?: RestOptions): (req: Request) => Promise<Response>;
34
- //#endregion
35
- export { makeNextAppHandler };
@@ -1,11 +0,0 @@
1
- import { HandlerCtx } from "../types.js";
2
- import { SpecRegistry } from "../registry.js";
3
-
4
- //#region src/server/rest-next-mcp.d.ts
5
- declare function makeNextMcpServerFromRegistry(reg: SpecRegistry, ctxFactory: () => HandlerCtx): {
6
- GET: (request: Request) => Promise<Response>;
7
- POST: (request: Request) => Promise<Response>;
8
- DELETE: (request: Request) => Promise<Response>;
9
- };
10
- //#endregion
11
- export { makeNextMcpServerFromRegistry };
@@ -1,9 +0,0 @@
1
- import { HandlerCtx } from "../types.js";
2
- import { SpecRegistry } from "../registry.js";
3
- import { RestOptions } from "./rest-generic.js";
4
- import { NextApiRequest, NextApiResponse } from "next";
5
-
6
- //#region src/server/rest-next-pages.d.ts
7
- declare function makeNextPagesHandler(reg: SpecRegistry, ctxFactory: (req: NextApiRequest) => HandlerCtx, options?: RestOptions): (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
8
- //#endregion
9
- export { makeNextPagesHandler };
package/dist/spec.d.ts DELETED
@@ -1,171 +0,0 @@
1
- import { Owner, Stability, Tag } from "./ownership.js";
2
- import { EventSpec } from "./events.js";
3
- import { ResourceRefDescriptor } from "./resources.js";
4
- import { PolicyRef } from "./policy/spec.js";
5
- import { TestSpecRef } from "./tests/spec.js";
6
- import { AnySchemaModel } from "@lssm/lib.schema";
7
-
8
- //#region src/spec.d.ts
9
-
10
- /**
11
- * Distinguishes between state-changing operations (command) and read-only operations (query).
12
- */
13
- type OpKind = 'command' | 'query';
14
- interface EmitDeclRef {
15
- ref: EventSpec<AnySchemaModel>;
16
- when: string;
17
- }
18
- interface EmitDeclInline {
19
- name: string;
20
- version: number;
21
- when: string;
22
- payload: AnySchemaModel;
23
- }
24
- /**
25
- * Declaration of an event that an operation may emit.
26
- * Can be a reference to an `EventSpec` or an inline definition.
27
- */
28
- type EmitDecl = EmitDeclRef | EmitDeclInline;
29
- declare const isEmitDeclRef: (e: EmitDecl) => e is EmitDeclRef;
30
- interface TelemetryTrigger {
31
- event: {
32
- name: string;
33
- version?: number;
34
- };
35
- properties?: (args: {
36
- input: unknown;
37
- output?: unknown;
38
- error?: unknown;
39
- }) => Record<string, unknown>;
40
- }
41
- /**
42
- * The core specification interface for any operation (Command or Query).
43
- *
44
- * @template Input - The Zod-backed schema model for the input payload.
45
- * @template Output - The Zod-backed schema model for the output payload, or a resource reference.
46
- * @template Events - Tuple of events that this operation may emit.
47
- */
48
- interface ContractSpec<Input extends AnySchemaModel, Output extends AnySchemaModel | ResourceRefDescriptor<boolean>, Events extends readonly EmitDecl[] | undefined = readonly EmitDecl[] | undefined> {
49
- meta: {
50
- /** Fully-qualified op name (e.g., "sigil.beginSignup") */
51
- name: string;
52
- /** Breaking changes => bump version */
53
- version: number;
54
- /** "command" changes state; "query" is read-only/idempotent */
55
- kind: OpKind;
56
- /** Lifecycle marker for comms & tooling */
57
- stability: Stability;
58
- /** Owners for CODEOWNERS / on-call / approvals */
59
- owners: Owner[];
60
- /** Search tags, grouping, docs navigation */
61
- tags: Tag[];
62
- /** Short human-friendly summary */
63
- description: string;
64
- /** Business goal: why this exists */
65
- goal: string;
66
- /** Background, constraints, scope edges (feeds docs & LLM context) */
67
- context: string;
68
- };
69
- io: {
70
- /** Zod schema for input payload */
71
- input: Input | null;
72
- /** Zod schema for output payload */
73
- output: Output;
74
- /** Named, typed errors this op may throw (optional) */
75
- errors?: Record<string, {
76
- description: string;
77
- http?: number;
78
- gqlCode?: string;
79
- when: string;
80
- }>;
81
- };
82
- policy: {
83
- /** Minimal auth category allowed to call this op */
84
- auth: 'anonymous' | 'user' | 'admin';
85
- /** Idempotency hint. Queries default true; commands default false. */
86
- idempotent?: boolean;
87
- /** Soft rate limit suggestion; adapter enforces via limiter */
88
- rateLimit?: {
89
- rpm: number;
90
- key: 'user' | 'org' | 'global';
91
- };
92
- /** Feature flags that must be ON for this op to run */
93
- flags?: string[];
94
- /** Whether a human must approve before action (e.g., risky commands) */
95
- escalate?: 'human_review' | null;
96
- /** JSONPath-like pointers to redact from logs/prompts */
97
- pii?: string[];
98
- /** Referenced policy specs governing access */
99
- policies?: PolicyRef[];
100
- /** Field-level overrides referencing policy specs */
101
- fieldPolicies?: {
102
- field: string;
103
- actions: ('read' | 'write')[];
104
- policy?: PolicyRef;
105
- }[];
106
- };
107
- sideEffects?: {
108
- /** Declared events this op may emit; runtime will guard against others */
109
- emits?: Events;
110
- /** Analytics intents (names); the service decides the sink */
111
- analytics?: string[];
112
- /** Audit intents (labels); the service decides storage */
113
- audit?: string[];
114
- };
115
- telemetry?: {
116
- success?: TelemetryTrigger;
117
- failure?: TelemetryTrigger;
118
- };
119
- tests?: TestSpecRef[];
120
- transport?: {
121
- rest?: {
122
- /** Override HTTP method (default: POST for commands, GET for queries) */
123
- method?: 'GET' | 'POST';
124
- /** Override path (default derived from meta.name/version) */
125
- path?: string;
126
- };
127
- gql?: {
128
- /** Override field name (default: dots→underscores + _vN) */
129
- field?: string;
130
- returns?: string;
131
- };
132
- mcp?: {
133
- /** Override tool identifier (default: "<name>.v<version>") */
134
- toolName?: string;
135
- };
136
- };
137
- acceptance?: {
138
- /** Gherkin-lite scenarios for docs & auto tests */
139
- scenarios?: {
140
- name: string;
141
- given: string[];
142
- when: string[];
143
- then: string[];
144
- }[];
145
- /** Request/response examples (used for docs & snapshot tests) */
146
- examples?: {
147
- name: string;
148
- input: unknown;
149
- output: unknown;
150
- }[];
151
- };
152
- }
153
- type AnyContractSpec = ContractSpec<AnySchemaModel, AnySchemaModel | ResourceRefDescriptor<boolean>>;
154
- /**
155
- * Helper to define a Command (write operation).
156
- * Sets `kind: 'command'` and defaults `idempotent: false`.
157
- */
158
- declare const defineCommand: <I extends AnySchemaModel, O extends AnySchemaModel | ResourceRefDescriptor<boolean>, E extends readonly EmitDecl[] | undefined = undefined>(spec: Omit<ContractSpec<I, O, E>, "meta" | "policy"> & {
159
- meta: Omit<ContractSpec<I, O, E>["meta"], "kind">;
160
- policy: Omit<ContractSpec<I, O, E>["policy"], "idempotent">;
161
- }) => ContractSpec<I, O, E>;
162
- /**
163
- * Helper to define a Query (read-only operation).
164
- * Sets `kind: 'query'` and forces `idempotent: true`.
165
- */
166
- declare const defineQuery: <I extends AnySchemaModel, O extends AnySchemaModel | ResourceRefDescriptor<boolean>, E extends readonly EmitDecl[] | undefined = undefined>(spec: Omit<ContractSpec<I, O, E>, "meta" | "policy"> & {
167
- meta: Omit<ContractSpec<I, O, E>["meta"], "kind">;
168
- policy: Omit<ContractSpec<I, O, E>["policy"], "idempotent">;
169
- }) => ContractSpec<I, O, E>;
170
- //#endregion
171
- export { AnyContractSpec, ContractSpec, EmitDecl, EmitDeclInline, EmitDeclRef, OpKind, TelemetryTrigger, defineCommand, defineQuery, isEmitDeclRef };
@@ -1,27 +0,0 @@
1
- import { TelemetryAnomalyDetectionConfig } from "./spec.js";
2
- import { TelemetryDispatch } from "./tracker.js";
3
-
4
- //#region src/telemetry/anomaly.d.ts
5
- interface TelemetryAnomalyEvent {
6
- dispatch: TelemetryDispatch;
7
- threshold: TelemetryAnomalyDetectionConfig;
8
- metric: string;
9
- value: number | undefined;
10
- type: 'min' | 'max';
11
- }
12
- interface TelemetryAnomalyMonitorOptions {
13
- onAnomaly?: (event: TelemetryAnomalyEvent) => void;
14
- now?: () => Date;
15
- }
16
- declare class TelemetryAnomalyMonitor {
17
- private readonly onAnomaly?;
18
- private readonly now;
19
- private readonly samples;
20
- constructor(options?: TelemetryAnomalyMonitorOptions);
21
- observe(dispatch: TelemetryDispatch): void;
22
- private extractMetric;
23
- private emit;
24
- reset(): void;
25
- }
26
- //#endregion
27
- export { TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions };
@@ -1,4 +0,0 @@
1
- import { TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyThreshold, TelemetryConfig, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySpec, makeTelemetryKey } from "./spec.js";
2
- import { TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions } from "./anomaly.js";
3
- import { RuntimeTelemetryProvider, TelemetryDispatch, TelemetryEventContext, TelemetryTracker, TelemetryTrackerOptions } from "./tracker.js";
4
- export { RuntimeTelemetryProvider, TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyEvent, TelemetryAnomalyMonitor, TelemetryAnomalyMonitorOptions, TelemetryAnomalyThreshold, TelemetryConfig, TelemetryDispatch, TelemetryEventContext, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySpec, TelemetryTracker, TelemetryTrackerOptions, makeTelemetryKey };
@@ -1,98 +0,0 @@
1
- import { OwnerShipMeta } from "../ownership.js";
2
-
3
- //#region src/telemetry/spec.d.ts
4
- type TelemetryPrivacyLevel = 'public' | 'internal' | 'pii' | 'sensitive';
5
- interface TelemetryMeta extends OwnerShipMeta {
6
- /** Fully-qualified telemetry spec name (e.g., "sigil.core"). */
7
- name: string;
8
- /** Incremented when telemetry definitions change in a breaking way. */
9
- version: number;
10
- /** Optional domain or bounded-context hint (e.g., "onboarding"). */
11
- domain: string;
12
- }
13
- interface TelemetryPropertyDef {
14
- type: 'string' | 'number' | 'boolean' | 'timestamp' | 'json';
15
- required?: boolean;
16
- pii?: boolean;
17
- redact?: boolean;
18
- description?: string;
19
- }
20
- interface TelemetryAnomalyThreshold {
21
- metric: string;
22
- min?: number;
23
- max?: number;
24
- }
25
- type TelemetryAnomalyAction = 'alert' | 'log' | 'trigger_regen';
26
- interface TelemetryAnomalyDetectionConfig {
27
- enabled: boolean;
28
- thresholds?: TelemetryAnomalyThreshold[];
29
- actions?: TelemetryAnomalyAction[];
30
- /**
31
- * Minimum sample size before evaluating thresholds.
32
- * Helps avoid false positives on small sample sizes.
33
- */
34
- minimumSample?: number;
35
- }
36
- interface TelemetrySamplingConfig {
37
- rate: number;
38
- conditions?: string[];
39
- }
40
- interface TelemetryRetentionConfig {
41
- days: number;
42
- policy?: 'archive' | 'delete';
43
- }
44
- interface TelemetryEventDef {
45
- /** Name of the event (should match EventSpec.name for cross-reference). */
46
- name: string;
47
- /** Version of the underlying event. */
48
- version: number;
49
- /** High-level semantics for docs/analyzers. */
50
- semantics: {
51
- who?: string;
52
- what: string;
53
- why?: string;
54
- };
55
- /** Detailed property metadata keyed by property name. */
56
- properties: Record<string, TelemetryPropertyDef>;
57
- /** Privacy level for the entire event. */
58
- privacy: TelemetryPrivacyLevel;
59
- /** Retention policy overrides. */
60
- retention?: TelemetryRetentionConfig;
61
- /** Sampling rules, defaulting to spec.config defaults. */
62
- sampling?: TelemetrySamplingConfig;
63
- /** Anomaly detection overrides. */
64
- anomalyDetection?: TelemetryAnomalyDetectionConfig;
65
- /** Optional tags for analytics/AI hints. */
66
- tags?: string[];
67
- }
68
- interface TelemetryProviderConfig {
69
- type: 'posthog' | 'segment' | 'opentelemetry' | 'internal';
70
- config: Record<string, unknown>;
71
- }
72
- interface TelemetryConfig {
73
- defaultRetentionDays?: number;
74
- defaultSamplingRate?: number;
75
- providers?: TelemetryProviderConfig[];
76
- anomalyDetection?: {
77
- enabled: boolean;
78
- checkIntervalMs?: number;
79
- };
80
- }
81
- interface TelemetrySpec {
82
- meta: TelemetryMeta;
83
- events: TelemetryEventDef[];
84
- config?: TelemetryConfig;
85
- }
86
- declare class TelemetryRegistry {
87
- private readonly items;
88
- private readonly eventsByKey;
89
- private readonly specByEventKey;
90
- register(spec: TelemetrySpec): this;
91
- list(): TelemetrySpec[];
92
- get(name: string, version?: number): TelemetrySpec | undefined;
93
- findEventDef(name: string, version?: number): TelemetryEventDef | undefined;
94
- getSpecForEvent(name: string, version?: number): TelemetrySpec | undefined;
95
- }
96
- declare function makeTelemetryKey(meta: TelemetryMeta): string;
97
- //#endregion
98
- export { TelemetryAnomalyAction, TelemetryAnomalyDetectionConfig, TelemetryAnomalyThreshold, TelemetryConfig, TelemetryEventDef, TelemetryMeta, TelemetryPrivacyLevel, TelemetryPropertyDef, TelemetryProviderConfig, TelemetryRegistry, TelemetryRetentionConfig, TelemetrySamplingConfig, TelemetrySpec, makeTelemetryKey };
@@ -1,51 +0,0 @@
1
- import { TelemetryEventDef, TelemetryRegistry, TelemetrySpec } from "./spec.js";
2
- import { TelemetryAnomalyMonitor } from "./anomaly.js";
3
-
4
- //#region src/telemetry/tracker.d.ts
5
- interface TelemetryEventContext {
6
- tenantId?: string;
7
- organizationId?: string | null;
8
- userId?: string | null;
9
- sessionId?: string | null;
10
- actor?: 'anonymous' | 'user' | 'admin';
11
- channel?: 'web' | 'mobile' | 'job' | 'agent';
12
- metadata?: Record<string, unknown>;
13
- }
14
- interface TelemetryDispatch {
15
- id: string;
16
- name: string;
17
- version: number;
18
- occurredAt: string;
19
- properties: Record<string, unknown>;
20
- privacy: TelemetryEventDef['privacy'];
21
- context: TelemetryEventContext;
22
- tags?: string[];
23
- spec: TelemetrySpec;
24
- definition: TelemetryEventDef;
25
- }
26
- interface RuntimeTelemetryProvider {
27
- id: string;
28
- send(event: TelemetryDispatch): Promise<void>;
29
- }
30
- interface TelemetryTrackerOptions {
31
- registry: TelemetryRegistry;
32
- providers?: RuntimeTelemetryProvider[];
33
- anomalyMonitor?: TelemetryAnomalyMonitor;
34
- random?: () => number;
35
- clock?: () => Date;
36
- }
37
- declare class TelemetryTracker {
38
- private readonly providers;
39
- private readonly registry;
40
- private readonly anomalyMonitor?;
41
- private readonly random;
42
- private readonly clock;
43
- constructor(options: TelemetryTrackerOptions);
44
- registerProvider(provider: RuntimeTelemetryProvider): void;
45
- unregisterProvider(providerId: string): void;
46
- track(name: string, version: number, properties: Record<string, unknown>, context?: TelemetryEventContext): Promise<boolean>;
47
- private shouldSample;
48
- private redactProperties;
49
- }
50
- //#endregion
51
- export { RuntimeTelemetryProvider, TelemetryDispatch, TelemetryEventContext, TelemetryTracker, TelemetryTrackerOptions };
@@ -1,3 +0,0 @@
1
- import { Action, Assertion, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, TestRegistry, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey } from "./spec.js";
2
- import { AssertionResult, ScenarioRunResult, TestRunResult, TestRunner, TestRunnerConfig } from "./runner.js";
3
- export { Action, Assertion, AssertionResult, CoverageRequirement, ExpectErrorAssertion, ExpectEventsAssertion, ExpectOutputAssertion, ExpectedEvent, Fixture, OperationTargetRef, ScenarioRunResult, TestRegistry, TestRunResult, TestRunner, TestRunnerConfig, TestScenario, TestSpec, TestSpecMeta, TestSpecRef, TestTarget, WorkflowTargetRef, makeTestKey };
@@ -1,43 +0,0 @@
1
- import { Assertion, TestScenario, TestSpec } from "./spec.js";
2
- import { HandlerCtx } from "../types.js";
3
- import { SpecRegistry } from "../registry.js";
4
- import "../index.js";
5
-
6
- //#region src/tests/runner.d.ts
7
- interface ScenarioRunResult {
8
- scenario: TestScenario;
9
- status: 'passed' | 'failed';
10
- error?: Error;
11
- assertionResults: AssertionResult[];
12
- }
13
- interface AssertionResult {
14
- assertion: Assertion;
15
- status: 'passed' | 'failed';
16
- message?: string;
17
- }
18
- interface TestRunResult {
19
- spec: TestSpec;
20
- scenarios: ScenarioRunResult[];
21
- passed: number;
22
- failed: number;
23
- }
24
- interface TestRunnerConfig {
25
- registry: SpecRegistry;
26
- createContext?: () => HandlerCtx | Promise<HandlerCtx>;
27
- beforeEach?: (scenario: TestScenario) => void | Promise<void>;
28
- afterEach?: (scenario: TestScenario, result: ScenarioRunResult) => void | Promise<void>;
29
- }
30
- declare class TestRunner {
31
- private readonly config;
32
- constructor(config: TestRunnerConfig);
33
- run(spec: TestSpec): Promise<TestRunResult>;
34
- private runScenario;
35
- private createContext;
36
- private executeOperation;
37
- private evaluateAssertion;
38
- private evaluateOutputAssertion;
39
- private evaluateErrorAssertion;
40
- private evaluateEventsAssertion;
41
- }
42
- //#endregion
43
- export { AssertionResult, ScenarioRunResult, TestRunResult, TestRunner, TestRunnerConfig };