@lssm/lib.contracts 0.0.0-canary-20251207012602 → 0.0.0-canary-20251207043720

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 (404) hide show
  1. package/dist/_virtual/rolldown_runtime.js +1 -0
  2. package/dist/app-config/contracts.js +1 -1
  3. package/dist/app-config/events.js +1 -1
  4. package/dist/app-config/lifecycle-contracts.js +1 -1
  5. package/dist/events.js +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/integrations/contracts.js +1 -1
  8. package/dist/integrations/openbanking/contracts/accounts.js +1 -1
  9. package/dist/integrations/openbanking/contracts/balances.js +1 -1
  10. package/dist/integrations/openbanking/contracts/transactions.js +1 -1
  11. package/dist/integrations/openbanking/models.js +1 -1
  12. package/dist/integrations/secrets/gcp-secret-manager.js +1 -1
  13. package/dist/jobs/scaleway-sqs-queue.js +1 -1
  14. package/dist/knowledge/contracts.js +1 -1
  15. package/dist/node_modules/@pothos/plugin-complexity/esm/calculate-complexity.js +1 -0
  16. package/dist/node_modules/@pothos/plugin-complexity/esm/defaults.js +1 -0
  17. package/dist/node_modules/@pothos/plugin-complexity/esm/index.js +1 -0
  18. package/dist/node_modules/@pothos/plugin-complexity/esm/types.js +1 -0
  19. package/dist/node_modules/@pothos/plugin-complexity/esm/util.js +1 -0
  20. package/dist/node_modules/@pothos/plugin-complexity/esm/validator.js +1 -0
  21. package/dist/node_modules/@pothos/plugin-dataloader/esm/field-builder.js +1 -0
  22. package/dist/node_modules/@pothos/plugin-dataloader/esm/index.js +1 -0
  23. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/index.js +1 -0
  24. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/interface.js +1 -0
  25. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/node.js +1 -0
  26. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/object.js +1 -0
  27. package/dist/node_modules/@pothos/plugin-dataloader/esm/refs/union.js +1 -0
  28. package/dist/node_modules/@pothos/plugin-dataloader/esm/schema-builder.js +1 -0
  29. package/dist/node_modules/@pothos/plugin-dataloader/esm/util.js +1 -0
  30. package/dist/node_modules/@pothos/plugin-prisma/esm/connection-helpers.js +1 -0
  31. package/dist/node_modules/@pothos/plugin-prisma/esm/field-builder.js +1 -0
  32. package/dist/node_modules/@pothos/plugin-prisma/esm/index.js +1 -0
  33. package/dist/node_modules/@pothos/plugin-prisma/esm/interface-ref.js +1 -0
  34. package/dist/node_modules/@pothos/plugin-prisma/esm/model-loader.js +1 -0
  35. package/dist/node_modules/@pothos/plugin-prisma/esm/node-ref.js +1 -0
  36. package/dist/node_modules/@pothos/plugin-prisma/esm/object-ref.js +1 -0
  37. package/dist/node_modules/@pothos/plugin-prisma/esm/prisma-field-builder.js +1 -0
  38. package/dist/node_modules/@pothos/plugin-prisma/esm/schema-builder.js +1 -0
  39. package/dist/node_modules/@pothos/plugin-prisma/esm/types.js +0 -0
  40. package/dist/node_modules/@pothos/plugin-prisma/esm/util/cursors.js +1 -0
  41. package/dist/node_modules/@pothos/plugin-prisma/esm/util/datamodel.js +1 -0
  42. package/dist/node_modules/@pothos/plugin-prisma/esm/util/deep-equal.js +1 -0
  43. package/dist/node_modules/@pothos/plugin-prisma/esm/util/description.js +1 -0
  44. package/dist/node_modules/@pothos/plugin-prisma/esm/util/get-client.js +1 -0
  45. package/dist/node_modules/@pothos/plugin-prisma/esm/util/loader-map.js +1 -0
  46. package/dist/node_modules/@pothos/plugin-prisma/esm/util/map-query.js +1 -0
  47. package/dist/node_modules/@pothos/plugin-prisma/esm/util/relation-map.js +1 -0
  48. package/dist/node_modules/@pothos/plugin-prisma/esm/util/selections.js +1 -0
  49. package/dist/node_modules/@pothos/plugin-prisma/esm/util/usage.js +1 -0
  50. package/dist/node_modules/@pothos/plugin-tracing/esm/index.js +1 -0
  51. package/dist/node_modules/@pothos/plugin-tracing/esm/util.js +1 -0
  52. package/dist/node_modules/dataloader/index.js +7 -0
  53. package/dist/node_modules/graphql/error/GraphQLError.js +5 -0
  54. package/dist/node_modules/graphql/error/index.js +1 -0
  55. package/dist/node_modules/graphql/error/locatedError.js +1 -0
  56. package/dist/node_modules/graphql/error/syntaxError.js +1 -0
  57. package/dist/node_modules/graphql/execution/collectFields.js +1 -0
  58. package/dist/node_modules/graphql/execution/execute.js +1 -0
  59. package/dist/node_modules/graphql/execution/index.js +1 -0
  60. package/dist/node_modules/graphql/execution/mapAsyncIterator.js +1 -0
  61. package/dist/node_modules/graphql/execution/subscribe.js +1 -0
  62. package/dist/node_modules/graphql/execution/values.js +1 -0
  63. package/dist/node_modules/graphql/graphql.js +1 -0
  64. package/dist/node_modules/graphql/index.js +1 -0
  65. package/dist/node_modules/graphql/jsutils/Path.js +1 -0
  66. package/dist/node_modules/graphql/jsutils/devAssert.js +1 -0
  67. package/dist/node_modules/graphql/jsutils/didYouMean.js +1 -0
  68. package/dist/node_modules/graphql/jsutils/groupBy.js +1 -0
  69. package/dist/node_modules/graphql/jsutils/identityFunc.js +1 -0
  70. package/dist/node_modules/graphql/jsutils/inspect.js +1 -0
  71. package/dist/node_modules/graphql/jsutils/instanceOf.js +12 -0
  72. package/dist/node_modules/graphql/jsutils/invariant.js +1 -0
  73. package/dist/node_modules/graphql/jsutils/isAsyncIterable.js +1 -0
  74. package/dist/node_modules/graphql/jsutils/isIterableObject.js +1 -0
  75. package/dist/node_modules/graphql/jsutils/isObjectLike.js +1 -0
  76. package/dist/node_modules/graphql/jsutils/isPromise.js +1 -0
  77. package/dist/node_modules/graphql/jsutils/keyMap.js +1 -0
  78. package/dist/node_modules/graphql/jsutils/keyValMap.js +1 -0
  79. package/dist/node_modules/graphql/jsutils/mapValue.js +1 -0
  80. package/dist/node_modules/graphql/jsutils/memoize3.js +1 -0
  81. package/dist/node_modules/graphql/jsutils/naturalCompare.js +1 -0
  82. package/dist/node_modules/graphql/jsutils/printPathArray.js +1 -0
  83. package/dist/node_modules/graphql/jsutils/promiseForObject.js +1 -0
  84. package/dist/node_modules/graphql/jsutils/promiseReduce.js +1 -0
  85. package/dist/node_modules/graphql/jsutils/suggestionList.js +1 -0
  86. package/dist/node_modules/graphql/jsutils/toError.js +1 -0
  87. package/dist/node_modules/graphql/jsutils/toObjMap.js +1 -0
  88. package/dist/node_modules/graphql/language/ast.js +1 -0
  89. package/dist/node_modules/graphql/language/blockString.js +3 -0
  90. package/dist/node_modules/graphql/language/characterClasses.js +1 -0
  91. package/dist/node_modules/graphql/language/directiveLocation.js +1 -0
  92. package/dist/node_modules/graphql/language/index.js +1 -0
  93. package/dist/node_modules/graphql/language/kinds.js +1 -0
  94. package/dist/node_modules/graphql/language/lexer.js +3 -0
  95. package/dist/node_modules/graphql/language/location.js +1 -0
  96. package/dist/node_modules/graphql/language/parser.js +1 -0
  97. package/dist/node_modules/graphql/language/predicates.js +1 -0
  98. package/dist/node_modules/graphql/language/printLocation.js +2 -0
  99. package/dist/node_modules/graphql/language/printString.js +1 -0
  100. package/dist/node_modules/graphql/language/printer.js +34 -0
  101. package/dist/node_modules/graphql/language/schemaCoordinateLexer.js +1 -0
  102. package/dist/node_modules/graphql/language/source.js +1 -0
  103. package/dist/node_modules/graphql/language/tokenKind.js +1 -0
  104. package/dist/node_modules/graphql/language/visitor.js +1 -0
  105. package/dist/node_modules/graphql/type/assertName.js +1 -0
  106. package/dist/node_modules/graphql/type/definition.js +1 -0
  107. package/dist/node_modules/graphql/type/directives.js +1 -0
  108. package/dist/node_modules/graphql/type/index.js +1 -0
  109. package/dist/node_modules/graphql/type/introspection.js +3 -0
  110. package/dist/node_modules/graphql/type/scalars.js +1 -0
  111. package/dist/node_modules/graphql/type/schema.js +1 -0
  112. package/dist/node_modules/graphql/type/validate.js +3 -0
  113. package/dist/node_modules/graphql/utilities/TypeInfo.js +1 -0
  114. package/dist/node_modules/graphql/utilities/assertValidName.js +1 -0
  115. package/dist/node_modules/graphql/utilities/astFromValue.js +1 -0
  116. package/dist/node_modules/graphql/utilities/buildASTSchema.js +1 -0
  117. package/dist/node_modules/graphql/utilities/buildClientSchema.js +1 -0
  118. package/dist/node_modules/graphql/utilities/coerceInputValue.js +1 -0
  119. package/dist/node_modules/graphql/utilities/concatAST.js +1 -0
  120. package/dist/node_modules/graphql/utilities/extendSchema.js +1 -0
  121. package/dist/node_modules/graphql/utilities/findBreakingChanges.js +1 -0
  122. package/dist/node_modules/graphql/utilities/getIntrospectionQuery.js +107 -0
  123. package/dist/node_modules/graphql/utilities/getOperationAST.js +1 -0
  124. package/dist/node_modules/graphql/utilities/getOperationRootType.js +1 -0
  125. package/dist/node_modules/graphql/utilities/index.js +1 -0
  126. package/dist/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
  127. package/dist/node_modules/graphql/utilities/lexicographicSortSchema.js +1 -0
  128. package/dist/node_modules/graphql/utilities/printSchema.js +13 -0
  129. package/dist/node_modules/graphql/utilities/resolveSchemaCoordinate.js +1 -0
  130. package/dist/node_modules/graphql/utilities/separateOperations.js +1 -0
  131. package/dist/node_modules/graphql/utilities/sortValueNode.js +1 -0
  132. package/dist/node_modules/graphql/utilities/stripIgnoredCharacters.js +1 -0
  133. package/dist/node_modules/graphql/utilities/typeComparators.js +1 -0
  134. package/dist/node_modules/graphql/utilities/typeFromAST.js +1 -0
  135. package/dist/node_modules/graphql/utilities/valueFromAST.js +1 -0
  136. package/dist/node_modules/graphql/utilities/valueFromASTUntyped.js +1 -0
  137. package/dist/node_modules/graphql/validation/ValidationContext.js +1 -0
  138. package/dist/node_modules/graphql/validation/index.js +1 -0
  139. package/dist/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +1 -0
  140. package/dist/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +1 -0
  141. package/dist/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +1 -0
  142. package/dist/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +1 -0
  143. package/dist/node_modules/graphql/validation/rules/KnownDirectivesRule.js +1 -0
  144. package/dist/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +1 -0
  145. package/dist/node_modules/graphql/validation/rules/KnownTypeNamesRule.js +1 -0
  146. package/dist/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +1 -0
  147. package/dist/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +1 -0
  148. package/dist/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js +1 -0
  149. package/dist/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +1 -0
  150. package/dist/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +1 -0
  151. package/dist/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +1 -0
  152. package/dist/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +1 -0
  153. package/dist/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +1 -0
  154. package/dist/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +1 -0
  155. package/dist/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +1 -0
  156. package/dist/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +1 -0
  157. package/dist/node_modules/graphql/validation/rules/ScalarLeafsRule.js +1 -0
  158. package/dist/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +1 -0
  159. package/dist/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +1 -0
  160. package/dist/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +1 -0
  161. package/dist/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +1 -0
  162. package/dist/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +1 -0
  163. package/dist/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +1 -0
  164. package/dist/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +1 -0
  165. package/dist/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +1 -0
  166. package/dist/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +1 -0
  167. package/dist/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +1 -0
  168. package/dist/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +1 -0
  169. package/dist/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +1 -0
  170. package/dist/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +1 -0
  171. package/dist/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +1 -0
  172. package/dist/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +1 -0
  173. package/dist/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +1 -0
  174. package/dist/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +1 -0
  175. package/dist/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +1 -0
  176. package/dist/node_modules/graphql/validation/specifiedRules.js +1 -0
  177. package/dist/node_modules/graphql/validation/validate.js +5 -0
  178. package/dist/node_modules/graphql/version.js +1 -0
  179. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js +1 -0
  180. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js +1 -0
  181. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +1 -0
  182. package/dist/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +1 -0
  183. package/dist/node_modules/zod-to-json-schema/dist/esm/index.js +1 -0
  184. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js +1 -0
  185. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +1 -0
  186. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +1 -0
  187. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +1 -0
  188. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +1 -0
  189. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +1 -0
  190. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +1 -0
  191. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +1 -0
  192. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +1 -0
  193. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +1 -0
  194. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +1 -0
  195. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +1 -0
  196. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +1 -0
  197. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +1 -0
  198. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +1 -0
  199. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +1 -0
  200. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +1 -0
  201. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +1 -0
  202. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +1 -0
  203. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +1 -0
  204. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +1 -0
  205. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +1 -0
  206. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +1 -0
  207. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +1 -0
  208. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +1 -0
  209. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +1 -0
  210. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +3 -0
  211. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +1 -0
  212. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +1 -0
  213. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +1 -0
  214. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +1 -0
  215. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js +1 -0
  216. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +1 -0
  217. package/dist/onboarding-base.js +1 -1
  218. package/dist/server/graphql-pothos.js +1 -1
  219. package/dist/server/graphql-schema-export.js +1 -1
  220. package/dist/server/provider-mcp.js +1 -1
  221. package/package.json +183 -175
  222. package/dist/app-config/branding.d.ts +0 -55
  223. package/dist/app-config/contracts.d.ts +0 -244
  224. package/dist/app-config/events.d.ts +0 -122
  225. package/dist/app-config/index.d.ts +0 -8
  226. package/dist/app-config/lifecycle-contracts.d.ts +0 -382
  227. package/dist/app-config/lifecycle.d.ts +0 -27
  228. package/dist/app-config/runtime.d.ts +0 -114
  229. package/dist/app-config/spec.d.ts +0 -175
  230. package/dist/app-config/validation.d.ts +0 -47
  231. package/dist/capabilities/openbanking.d.ts +0 -9
  232. package/dist/capabilities.d.ts +0 -45
  233. package/dist/client/index.d.ts +0 -6
  234. package/dist/client/react/drivers/rn-reusables.d.ts +0 -22
  235. package/dist/client/react/drivers/shadcn.d.ts +0 -12
  236. package/dist/client/react/feature-render.d.ts +0 -19
  237. package/dist/client/react/form-render.d.ts +0 -91
  238. package/dist/client/react/index.d.ts +0 -5
  239. package/dist/contracts-adapter-hydration.d.ts +0 -15
  240. package/dist/contracts-adapter-input.d.ts +0 -10
  241. package/dist/data-views/query-generator.d.ts +0 -39
  242. package/dist/data-views/runtime.d.ts +0 -26
  243. package/dist/data-views.d.ts +0 -131
  244. package/dist/events.d.ts +0 -44
  245. package/dist/experiments/evaluator.d.ts +0 -37
  246. package/dist/experiments/spec-resolver.d.ts +0 -16
  247. package/dist/experiments/spec.d.ts +0 -89
  248. package/dist/features.d.ts +0 -87
  249. package/dist/forms.d.ts +0 -258
  250. package/dist/graphql-federation/dist/index.js +0 -1
  251. package/dist/index.d.ts +0 -132
  252. package/dist/install.d.ts +0 -76
  253. package/dist/integrations/binding.d.ts +0 -17
  254. package/dist/integrations/connection.d.ts +0 -51
  255. package/dist/integrations/contracts.d.ts +0 -435
  256. package/dist/integrations/health.d.ts +0 -21
  257. package/dist/integrations/index.d.ts +0 -53
  258. package/dist/integrations/openbanking/contracts/accounts.d.ts +0 -287
  259. package/dist/integrations/openbanking/contracts/balances.d.ts +0 -163
  260. package/dist/integrations/openbanking/contracts/index.d.ts +0 -9
  261. package/dist/integrations/openbanking/contracts/transactions.d.ts +0 -211
  262. package/dist/integrations/openbanking/guards.d.ts +0 -12
  263. package/dist/integrations/openbanking/models.d.ts +0 -228
  264. package/dist/integrations/openbanking/telemetry.d.ts +0 -15
  265. package/dist/integrations/providers/calendar.d.ts +0 -78
  266. package/dist/integrations/providers/elevenlabs.d.ts +0 -7
  267. package/dist/integrations/providers/email.d.ts +0 -86
  268. package/dist/integrations/providers/embedding.d.ts +0 -24
  269. package/dist/integrations/providers/gcs-storage.d.ts +0 -7
  270. package/dist/integrations/providers/gmail.d.ts +0 -7
  271. package/dist/integrations/providers/google-calendar.d.ts +0 -7
  272. package/dist/integrations/providers/impls/elevenlabs-voice.d.ts +0 -20
  273. package/dist/integrations/providers/impls/gcs-storage.d.ts +0 -24
  274. package/dist/integrations/providers/impls/gmail-inbound.d.ts +0 -26
  275. package/dist/integrations/providers/impls/gmail-outbound.d.ts +0 -18
  276. package/dist/integrations/providers/impls/google-calendar.d.ts +0 -23
  277. package/dist/integrations/providers/impls/index.d.ts +0 -15
  278. package/dist/integrations/providers/impls/mistral-embedding.d.ts +0 -23
  279. package/dist/integrations/providers/impls/mistral-llm.d.ts +0 -31
  280. package/dist/integrations/providers/impls/postmark-email.d.ts +0 -19
  281. package/dist/integrations/providers/impls/powens-client.d.ts +0 -124
  282. package/dist/integrations/providers/impls/powens-openbanking.d.ts +0 -27
  283. package/dist/integrations/providers/impls/provider-factory.d.ts +0 -26
  284. package/dist/integrations/providers/impls/qdrant-vector.d.ts +0 -24
  285. package/dist/integrations/providers/impls/stripe-payments.d.ts +0 -28
  286. package/dist/integrations/providers/impls/twilio-sms.d.ts +0 -20
  287. package/dist/integrations/providers/index.d.ts +0 -36
  288. package/dist/integrations/providers/llm.d.ts +0 -82
  289. package/dist/integrations/providers/mistral.d.ts +0 -7
  290. package/dist/integrations/providers/openbanking.d.ts +0 -128
  291. package/dist/integrations/providers/payments.d.ts +0 -109
  292. package/dist/integrations/providers/postmark.d.ts +0 -7
  293. package/dist/integrations/providers/powens.d.ts +0 -7
  294. package/dist/integrations/providers/qdrant.d.ts +0 -7
  295. package/dist/integrations/providers/sms.d.ts +0 -34
  296. package/dist/integrations/providers/storage.d.ts +0 -60
  297. package/dist/integrations/providers/stripe.d.ts +0 -7
  298. package/dist/integrations/providers/twilio-sms.d.ts +0 -7
  299. package/dist/integrations/providers/vector-store.d.ts +0 -43
  300. package/dist/integrations/providers/voice.d.ts +0 -34
  301. package/dist/integrations/runtime.d.ts +0 -99
  302. package/dist/integrations/secrets/env-secret-provider.d.ts +0 -31
  303. package/dist/integrations/secrets/gcp-secret-manager.d.ts +0 -32
  304. package/dist/integrations/secrets/index.d.ts +0 -5
  305. package/dist/integrations/secrets/manager.d.ts +0 -47
  306. package/dist/integrations/secrets/provider.d.ts +0 -52
  307. package/dist/integrations/spec.d.ts +0 -79
  308. package/dist/jobs/define-job.d.ts +0 -12
  309. package/dist/jobs/gcp-cloud-tasks.d.ts +0 -41
  310. package/dist/jobs/gcp-pubsub.d.ts +0 -25
  311. package/dist/jobs/handlers/gmail-sync-handler.d.ts +0 -9
  312. package/dist/jobs/handlers/index.d.ts +0 -9
  313. package/dist/jobs/handlers/ping-handler.d.ts +0 -10
  314. package/dist/jobs/handlers/storage-document-handler.d.ts +0 -12
  315. package/dist/jobs/index.d.ts +0 -10
  316. package/dist/jobs/memory-queue.d.ts +0 -18
  317. package/dist/jobs/queue.d.ts +0 -26
  318. package/dist/jobs/scaleway-sqs-queue.d.ts +0 -30
  319. package/dist/jsonschema.d.ts +0 -26
  320. package/dist/knowledge/binding.d.ts +0 -25
  321. package/dist/knowledge/contracts.d.ts +0 -316
  322. package/dist/knowledge/index.d.ts +0 -10
  323. package/dist/knowledge/ingestion/document-processor.d.ts +0 -24
  324. package/dist/knowledge/ingestion/embedding-service.d.ts +0 -12
  325. package/dist/knowledge/ingestion/gmail-adapter.d.ts +0 -18
  326. package/dist/knowledge/ingestion/index.d.ts +0 -6
  327. package/dist/knowledge/ingestion/storage-adapter.d.ts +0 -15
  328. package/dist/knowledge/ingestion/vector-indexer.d.ts +0 -18
  329. package/dist/knowledge/query/index.d.ts +0 -2
  330. package/dist/knowledge/query/service.d.ts +0 -29
  331. package/dist/knowledge/runtime.d.ts +0 -32
  332. package/dist/knowledge/source.d.ts +0 -32
  333. package/dist/knowledge/spaces/email-threads.d.ts +0 -7
  334. package/dist/knowledge/spaces/financial-docs.d.ts +0 -7
  335. package/dist/knowledge/spaces/financial-overview.d.ts +0 -7
  336. package/dist/knowledge/spaces/index.d.ts +0 -7
  337. package/dist/knowledge/spaces/product-canon.d.ts +0 -7
  338. package/dist/knowledge/spaces/support-faq.d.ts +0 -7
  339. package/dist/knowledge/spaces/uploaded-docs.d.ts +0 -7
  340. package/dist/knowledge/spec.d.ts +0 -52
  341. package/dist/markdown.d.ts +0 -21
  342. package/dist/migrations.d.ts +0 -52
  343. package/dist/onboarding-base.d.ts +0 -137
  344. package/dist/ownership.d.ts +0 -75
  345. package/dist/policy/engine.d.ts +0 -39
  346. package/dist/policy/opa-adapter.d.ts +0 -45
  347. package/dist/policy/spec.d.ts +0 -114
  348. package/dist/presentations.backcompat.d.ts +0 -7
  349. package/dist/presentations.d.ts +0 -96
  350. package/dist/presentations.v2.d.ts +0 -115
  351. package/dist/prompt.d.ts +0 -60
  352. package/dist/promptRegistry.d.ts +0 -15
  353. package/dist/regenerator/adapters.d.ts +0 -19
  354. package/dist/regenerator/executor.d.ts +0 -70
  355. package/dist/regenerator/index.d.ts +0 -7
  356. package/dist/regenerator/service.d.ts +0 -33
  357. package/dist/regenerator/sinks.d.ts +0 -26
  358. package/dist/regenerator/types.d.ts +0 -107
  359. package/dist/regenerator/utils.d.ts +0 -9
  360. package/dist/registry.d.ts +0 -72
  361. package/dist/resources.d.ts +0 -64
  362. package/dist/schema/dist/EnumType.js +0 -1
  363. package/dist/schema/dist/FieldType.js +0 -1
  364. package/dist/schema/dist/ScalarTypeEnum.js +0 -1
  365. package/dist/schema/dist/SchemaModel.js +0 -1
  366. package/dist/schema/dist/entity/defineEntity.js +0 -1
  367. package/dist/schema/dist/entity/index.js +0 -1
  368. package/dist/schema/dist/entity/types.js +0 -1
  369. package/dist/schema/dist/index.js +0 -1
  370. package/dist/schema-to-markdown.d.ts +0 -54
  371. package/dist/server/graphql-pothos.d.ts +0 -31
  372. package/dist/server/graphql-schema-export.d.ts +0 -6
  373. package/dist/server/index.d.ts +0 -9
  374. package/dist/server/provider-mcp.d.ts +0 -51
  375. package/dist/server/rest-elysia.d.ts +0 -40
  376. package/dist/server/rest-express.d.ts +0 -16
  377. package/dist/server/rest-generic.d.ts +0 -32
  378. package/dist/server/rest-next-app.d.ts +0 -35
  379. package/dist/server/rest-next-mcp.d.ts +0 -11
  380. package/dist/server/rest-next-pages.d.ts +0 -9
  381. package/dist/spec.d.ts +0 -171
  382. package/dist/telemetry/anomaly.d.ts +0 -27
  383. package/dist/telemetry/index.d.ts +0 -4
  384. package/dist/telemetry/spec.d.ts +0 -98
  385. package/dist/telemetry/tracker.d.ts +0 -51
  386. package/dist/tests/index.d.ts +0 -3
  387. package/dist/tests/runner.d.ts +0 -43
  388. package/dist/tests/spec.d.ts +0 -89
  389. package/dist/themes.d.ts +0 -55
  390. package/dist/translations/catalog.d.ts +0 -28
  391. package/dist/translations/tenant.d.ts +0 -15
  392. package/dist/types/all.d.ts +0 -60
  393. package/dist/types.d.ts +0 -88
  394. package/dist/workflow/adapters/db-adapter.d.ts +0 -34
  395. package/dist/workflow/adapters/file-adapter.d.ts +0 -14
  396. package/dist/workflow/adapters/index.d.ts +0 -4
  397. package/dist/workflow/adapters/memory-store.d.ts +0 -18
  398. package/dist/workflow/expression.d.ts +0 -9
  399. package/dist/workflow/index.d.ts +0 -10
  400. package/dist/workflow/runner.d.ts +0 -74
  401. package/dist/workflow/sla-monitor.d.ts +0 -20
  402. package/dist/workflow/spec.d.ts +0 -99
  403. package/dist/workflow/state.d.ts +0 -35
  404. package/dist/workflow/validation.d.ts +0 -28
@@ -1,64 +0,0 @@
1
- import { Tag } from "./ownership.js";
2
- import { z as z$1 } from "zod";
3
-
4
- //#region src/resources.d.ts
5
- interface ResourceMeta {
6
- /** URI scheme, e.g. "content://doc/{id}" or "marketplace://offers/{city}/{tag}" */
7
- uriTemplate: string;
8
- /** Human title for discovery */
9
- title: string;
10
- /** Short description */
11
- description?: string;
12
- /** MIME type for resource body */
13
- mimeType: string;
14
- /** Tags for filtering/grouping */
15
- tags?: Tag[];
16
- }
17
- interface ResourceTemplateSpec<I extends z$1.ZodType> {
18
- meta: ResourceMeta;
19
- /** Arguments to materialize the URI (zod validates input) */
20
- input: I;
21
- /**
22
- * Resolve returns the resource body and a resolved URI.
23
- * It MUST be read-only (no side effects).
24
- */
25
- resolve: (args: z$1.infer<I>, ctx: {
26
- userId?: string | null;
27
- orgId?: string | null;
28
- locale?: string;
29
- }) => Promise<{
30
- uri: string;
31
- mimeType?: string;
32
- data: Uint8Array | string;
33
- }>;
34
- }
35
- declare function defineResourceTemplate<I extends z$1.ZodType>(spec: ResourceTemplateSpec<I>): ResourceTemplateSpec<I>;
36
- declare class ResourceRegistry {
37
- private templates;
38
- register<I extends z$1.ZodType>(tmpl: ResourceTemplateSpec<I>): this;
39
- listTemplates(): ResourceTemplateSpec<any>[];
40
- /** Try to match a concrete URI to a template by naive pattern substitution */
41
- match(uri: string): {
42
- tmpl: ResourceTemplateSpec<any>;
43
- params: Record<string, string>;
44
- } | undefined;
45
- }
46
- interface ResourceRefDescriptor<Many extends boolean> {
47
- kind: 'resource_ref';
48
- /** URI template, e.g. 'strit://spot/{id}' */
49
- uriTemplate: string;
50
- /** Variable name inside result payload to substitute into template; defaults to 'id' */
51
- varName?: string;
52
- /** Optional GraphQL type name to use when exposing over GraphQL (e.g., 'Spot') */
53
- graphQLType: string;
54
- /** Cardinality: when present and true, the handler returns an array of resources */
55
- many: Many;
56
- }
57
- declare function resourceRef<Many extends boolean>(uriTemplate: string, opts: {
58
- varName?: string;
59
- graphQLType: string;
60
- many: Many;
61
- }): ResourceRefDescriptor<Many>;
62
- declare function isResourceRef(x: unknown): x is ResourceRefDescriptor<boolean>;
63
- //#endregion
64
- export { ResourceMeta, ResourceRefDescriptor, ResourceRegistry, ResourceTemplateSpec, defineResourceTemplate, isResourceRef, resourceRef };
@@ -1 +0,0 @@
1
- import{z as e}from"zod";import"graphql";
@@ -1 +0,0 @@
1
- import{z as e}from"zod";import{GraphQLScalarType as t}from"graphql";var n=class extends t{zodSchema;jsonSchemaDef;constructor(e){super(e),this.zodSchema=e.zod,this.jsonSchemaDef=e.jsonSchema}getZod(){return this.zodSchema}getPothos(){return this}getJson(){return typeof this.jsonSchemaDef==`function`?this.jsonSchemaDef():this.jsonSchemaDef}getJsonSchemaDef(){return this.jsonSchemaDef}getJsonSchema(){let e=t=>{let n=typeof t==`function`?t():t;if(Array.isArray(n))return n.map(t=>e(t));if(n&&typeof n==`object`){let t={};for(let[r,i]of Object.entries(n))t[r]=e(i);return t}return n};return e(this.getJson())}};export{n};
@@ -1 +0,0 @@
1
- import{n as e}from"./FieldType.js";import{z as t}from"zod";import{Kind as n}from"graphql";const r=/^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/,i=/^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/,a=/^[+]?\d[\d\s().-]{3,}$/,o=/^[A-Z]{3}$/,s=/^[A-Z]{2}$/,c=-180,l={String_unsecure:()=>new e({name:`String_unsecure`,description:`Unvalidated string scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),Int_unsecure:()=>new e({name:`Int_unsecure`,description:`Unvalidated integer scalar`,zod:t.number().int(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().int().parse(n)},serialize:e=>Math.trunc(typeof e==`number`?e:Number(e)),parseLiteral:e=>{if(e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`integer`}}),Float_unsecure:()=>new e({name:`Float_unsecure`,description:`Unvalidated float scalar`,zod:t.number(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().parse(n)},serialize:e=>Number(e),parseLiteral:e=>{if(e.kind!==n.FLOAT&&e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`number`}}),Boolean:()=>new e({name:`Boolean`,description:`Unvalidated boolean scalar`,zod:t.boolean(),parseValue:e=>t.coerce.boolean().parse(e),serialize:e=>!!e,parseLiteral:e=>{if(e.kind!==n.BOOLEAN)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`boolean`}}),ID:()=>new e({name:`ID`,description:`Unvalidated id scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),JSON:()=>new e({name:`JSON`,zod:t.any(),parseValue:e=>e,serialize:e=>e,jsonSchema:{}}),JSONObject:()=>new e({name:`JSONObject`,zod:t.record(t.string(),t.any()),parseValue:e=>t.record(t.string(),t.any()).parse(e),serialize:e=>e??{},jsonSchema:{type:`object`}}),Date:()=>new e({name:`Date`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString().split(`T`)[0]:String(e),jsonSchema:{type:`string`,format:`date`}}),DateTime:()=>new e({name:`DateTime`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString():String(e),jsonSchema:{type:`string`,format:`date-time`}}),Time:()=>new e({name:`Time`,zod:t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),parseValue:e=>t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:`^\\d{2}:\\d{2}(:\\d{2})?$`}}),EmailAddress:()=>new e({name:`EmailAddress`,zod:t.string().email(),parseValue:e=>t.string().email().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`email`}}),URL:()=>new e({name:`URL`,zod:t.string().url(),parseValue:e=>t.string().url().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`uri`}}),PhoneNumber:()=>new e({name:`PhoneNumber`,zod:t.string().regex(a),parseValue:e=>t.string().regex(a).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:a.source}}),NonEmptyString:()=>new e({name:`NonEmptyString`,zod:t.string().min(1),parseValue:e=>t.string().min(1).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,minLength:1}}),Locale:()=>new e({name:`Locale`,zod:t.string().regex(r),parseValue:e=>t.string().regex(r).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:r.source}}),TimeZone:()=>new e({name:`TimeZone`,zod:t.string().regex(i),parseValue:e=>t.string().regex(i).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:i.source}}),Latitude:()=>new e({name:`Latitude`,zod:t.number().min(-90).max(90),parseValue:e=>t.coerce.number().min(-90).max(90).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:-90,maximum:90}}),Longitude:()=>new e({name:`Longitude`,zod:t.number().min(c).max(180),parseValue:e=>t.coerce.number().min(c).max(180).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:c,maximum:180}}),Currency:()=>new e({name:`Currency`,zod:t.string().regex(o),parseValue:e=>t.string().regex(o).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:o.source}}),CountryCode:()=>new e({name:`CountryCode`,zod:t.string().regex(s),parseValue:e=>t.string().regex(s).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:s.source}})};export{l};
@@ -1 +0,0 @@
1
- import"./EnumType.js";import"./FieldType.js";import{z as e}from"zod";var t=class{constructor(e){this.config=e}getZod(){let t=Object.entries(this.config.fields).reduce((t,[n,r])=>{let i=r.type.getZod(),a=r.isArray?e.array(i):i;return t[n]=r.isOptional?a.optional():a,t},{});return e.object(t)}getPothosInput(){return this.config.name}};const n=e=>new t(e);export{n,t};
@@ -1 +0,0 @@
1
- import{z as e}from"zod";
@@ -1 +0,0 @@
1
- import"./defineEntity.js";import"./types.js";
@@ -1 +0,0 @@
1
- import{z as e}from"zod";
@@ -1 +0,0 @@
1
- import"./EnumType.js";import{n as e}from"./FieldType.js";import{l as t}from"./ScalarTypeEnum.js";import{n,t as r}from"./SchemaModel.js";import"./entity/defineEntity.js";import"./entity/index.js";
@@ -1,54 +0,0 @@
1
- import { AnySchemaModel } from "@lssm/lib.schema";
2
-
3
- //#region src/schema-to-markdown.d.ts
4
-
5
- /**
6
- * Options for schema-to-markdown generation
7
- */
8
- interface SchemaMarkdownOptions {
9
- /** Title for the markdown section */
10
- title?: string;
11
- /** Description to include below the title */
12
- description?: string;
13
- /** Output format: table for lists, list for simple items, detail for single objects */
14
- format?: 'table' | 'list' | 'detail' | 'auto';
15
- /** Maximum number of items to render (for arrays) */
16
- maxItems?: number;
17
- /** Only include these fields (if not specified, all fields are included) */
18
- includeFields?: string[];
19
- /** Exclude these fields from output */
20
- excludeFields?: string[];
21
- /** Custom field labels (field name -> display label) */
22
- fieldLabels?: Record<string, string>;
23
- /** Fields to use for summary in list format */
24
- summaryFields?: string[];
25
- /** Nesting depth for nested schemas (default: 2) */
26
- maxDepth?: number;
27
- }
28
- /**
29
- * Generate markdown from a SchemaModel and data.
30
- * Automatically detects array vs object data and formats accordingly.
31
- */
32
- declare function schemaToMarkdown(schema: AnySchemaModel, data: unknown, options?: SchemaMarkdownOptions): string;
33
- /**
34
- * Generate a markdown table from array data using schema fields as columns.
35
- */
36
- declare function schemaToMarkdownTable(schema: AnySchemaModel, items: unknown[], options?: SchemaMarkdownOptions): string;
37
- /**
38
- * Generate a markdown list from array data.
39
- * Uses summaryFields to create concise list items.
40
- */
41
- declare function schemaToMarkdownList(schema: AnySchemaModel, items: unknown[], options?: SchemaMarkdownOptions): string;
42
- /**
43
- * Generate a markdown detail view (key-value pairs) from object data.
44
- */
45
- declare function schemaToMarkdownDetail(schema: AnySchemaModel, item: unknown, options?: SchemaMarkdownOptions): string;
46
- /**
47
- * Generate markdown summary statistics for numeric fields in array data.
48
- */
49
- declare function schemaToMarkdownSummary(schema: AnySchemaModel, items: unknown[], options?: {
50
- numericFields?: string[];
51
- countByField?: string;
52
- }): string;
53
- //#endregion
54
- export { SchemaMarkdownOptions, schemaToMarkdown, schemaToMarkdownDetail, schemaToMarkdownList, schemaToMarkdownSummary, schemaToMarkdownTable };
@@ -1,31 +0,0 @@
1
- import { ResourceRegistry } from "../resources.js";
2
- import { SpecRegistry } from "../registry.js";
3
- import "@pothos/plugin-prisma";
4
- import "@pothos/plugin-complexity";
5
- import "@pothos/plugin-relay";
6
- import "@pothos/plugin-dataloader";
7
- import "@pothos/plugin-tracing";
8
- import { SchemaTypes } from "@pothos/core";
9
-
10
- //#region src/server/graphql-pothos.d.ts
11
-
12
- /**
13
- * Registers all ContractSpecs from a SpecRegistry onto a Pothos SchemaBuilder.
14
- *
15
- * This adapter:
16
- * 1. Discovers output types from specs and registers them as Pothos object types.
17
- * 2. Maps `ContractSpec` inputs to Pothos input types.
18
- * 3. Mounts `query` specs as `Query` fields and `command` specs as `Mutation` fields.
19
- * 4. Wraps the resolver to:
20
- * - Enforce auth policies (basic check).
21
- * - Build a `HandlerCtx`.
22
- * - Execute via `SpecRegistry`.
23
- * - Hydrate resource references if applicable.
24
- *
25
- * @param builder - The Pothos SchemaBuilder instance.
26
- * @param reg - The SpecRegistry containing operations.
27
- * @param resources - (Optional) ResourceRegistry for hydrating resource references.
28
- */
29
- declare function registerContractsOnBuilder<T extends SchemaTypes>(builder: PothosSchemaTypes.SchemaBuilder<T>, reg: SpecRegistry, resources?: ResourceRegistry): void;
30
- //#endregion
31
- export { registerContractsOnBuilder };
@@ -1,6 +0,0 @@
1
- import { GraphQLSchema } from "graphql";
2
-
3
- //#region src/server/graphql-schema-export.d.ts
4
- declare const exportContractsToGraphQLSchema: (schema: GraphQLSchema, outputPathDir: string) => Promise<void>;
5
- //#endregion
6
- export { exportContractsToGraphQLSchema };
@@ -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 };