@endora-commerce/platform 0.100.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 (657) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cli/dispatch.d.ts +146 -0
  4. package/dist/cli/dispatch.d.ts.map +1 -0
  5. package/dist/cli/dispatch.js +259 -0
  6. package/dist/cli/dispatch.js.map +1 -0
  7. package/dist/cli/index.d.ts +58 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/index.js +58 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/cli/module-commands.d.ts +118 -0
  12. package/dist/cli/module-commands.d.ts.map +1 -0
  13. package/dist/cli/module-commands.js +120 -0
  14. package/dist/cli/module-commands.js.map +1 -0
  15. package/dist/commands/actor.d.ts +19 -0
  16. package/dist/commands/actor.d.ts.map +1 -0
  17. package/dist/commands/actor.js +45 -0
  18. package/dist/commands/actor.js.map +1 -0
  19. package/dist/commands/audit-from-context.d.ts +24 -0
  20. package/dist/commands/audit-from-context.d.ts.map +1 -0
  21. package/dist/commands/audit-from-context.js +28 -0
  22. package/dist/commands/audit-from-context.js.map +1 -0
  23. package/dist/commands/command-bus.d.ts +40 -0
  24. package/dist/commands/command-bus.d.ts.map +1 -0
  25. package/dist/commands/command-bus.js +46 -0
  26. package/dist/commands/command-bus.js.map +1 -0
  27. package/dist/commands/command.d.ts +76 -0
  28. package/dist/commands/command.d.ts.map +1 -0
  29. package/dist/commands/command.js +2 -0
  30. package/dist/commands/command.js.map +1 -0
  31. package/dist/commands/index.d.ts +65 -0
  32. package/dist/commands/index.d.ts.map +1 -0
  33. package/dist/commands/index.js +57 -0
  34. package/dist/commands/index.js.map +1 -0
  35. package/dist/commands/reversible.d.ts +66 -0
  36. package/dist/commands/reversible.d.ts.map +1 -0
  37. package/dist/commands/reversible.js +41 -0
  38. package/dist/commands/reversible.js.map +1 -0
  39. package/dist/composition/compose-app.d.ts +305 -0
  40. package/dist/composition/compose-app.d.ts.map +1 -0
  41. package/dist/composition/compose-app.js +939 -0
  42. package/dist/composition/compose-app.js.map +1 -0
  43. package/dist/composition/index.d.ts +92 -0
  44. package/dist/composition/index.d.ts.map +1 -0
  45. package/dist/composition/index.js +175 -0
  46. package/dist/composition/index.js.map +1 -0
  47. package/dist/composition/newsletter-token-secret.d.ts +19 -0
  48. package/dist/composition/newsletter-token-secret.d.ts.map +1 -0
  49. package/dist/composition/newsletter-token-secret.js +24 -0
  50. package/dist/composition/newsletter-token-secret.js.map +1 -0
  51. package/dist/composition/process-runs-workers.d.ts +17 -0
  52. package/dist/composition/process-runs-workers.d.ts.map +1 -0
  53. package/dist/composition/process-runs-workers.js +19 -0
  54. package/dist/composition/process-runs-workers.js.map +1 -0
  55. package/dist/db/baseline-migration-inventory.d.ts +15 -0
  56. package/dist/db/baseline-migration-inventory.d.ts.map +1 -0
  57. package/dist/db/baseline-migration-inventory.js +115 -0
  58. package/dist/db/baseline-migration-inventory.js.map +1 -0
  59. package/dist/db/configured-entities.d.ts +74 -0
  60. package/dist/db/configured-entities.d.ts.map +1 -0
  61. package/dist/db/configured-entities.js +20 -0
  62. package/dist/db/configured-entities.js.map +1 -0
  63. package/dist/db/configured-migrations.d.ts +199 -0
  64. package/dist/db/configured-migrations.d.ts.map +1 -0
  65. package/dist/db/configured-migrations.js +181 -0
  66. package/dist/db/configured-migrations.js.map +1 -0
  67. package/dist/db/index.d.ts +54 -0
  68. package/dist/db/index.d.ts.map +1 -0
  69. package/dist/db/index.js +54 -0
  70. package/dist/db/index.js.map +1 -0
  71. package/dist/db/migrate.d.ts +21 -0
  72. package/dist/db/migrate.d.ts.map +1 -0
  73. package/dist/db/migrate.js +48 -0
  74. package/dist/db/migrate.js.map +1 -0
  75. package/dist/db/migration-order.d.ts +159 -0
  76. package/dist/db/migration-order.d.ts.map +1 -0
  77. package/dist/db/migration-order.js +273 -0
  78. package/dist/db/migration-order.js.map +1 -0
  79. package/dist/db/mikro-orm.config.d.ts +51 -0
  80. package/dist/db/mikro-orm.config.d.ts.map +1 -0
  81. package/dist/db/mikro-orm.config.js +64 -0
  82. package/dist/db/mikro-orm.config.js.map +1 -0
  83. package/dist/db/orm.d.ts +40 -0
  84. package/dist/db/orm.d.ts.map +1 -0
  85. package/dist/db/orm.js +25 -0
  86. package/dist/db/orm.js.map +1 -0
  87. package/dist/db/platform-schema.d.ts +102 -0
  88. package/dist/db/platform-schema.d.ts.map +1 -0
  89. package/dist/db/platform-schema.js +79 -0
  90. package/dist/db/platform-schema.js.map +1 -0
  91. package/dist/db/pluralizing-naming-strategy.d.ts +16 -0
  92. package/dist/db/pluralizing-naming-strategy.d.ts.map +1 -0
  93. package/dist/db/pluralizing-naming-strategy.js +66 -0
  94. package/dist/db/pluralizing-naming-strategy.js.map +1 -0
  95. package/dist/demo/guard.d.ts +101 -0
  96. package/dist/demo/guard.d.ts.map +1 -0
  97. package/dist/demo/guard.js +168 -0
  98. package/dist/demo/guard.js.map +1 -0
  99. package/dist/demo/host-command.d.ts +133 -0
  100. package/dist/demo/host-command.d.ts.map +1 -0
  101. package/dist/demo/host-command.js +113 -0
  102. package/dist/demo/host-command.js.map +1 -0
  103. package/dist/demo/index.d.ts +82 -0
  104. package/dist/demo/index.d.ts.map +1 -0
  105. package/dist/demo/index.js +82 -0
  106. package/dist/demo/index.js.map +1 -0
  107. package/dist/demo/packages.d.ts +67 -0
  108. package/dist/demo/packages.d.ts.map +1 -0
  109. package/dist/demo/packages.js +132 -0
  110. package/dist/demo/packages.js.map +1 -0
  111. package/dist/demo/plan.d.ts +111 -0
  112. package/dist/demo/plan.d.ts.map +1 -0
  113. package/dist/demo/plan.js +74 -0
  114. package/dist/demo/plan.js.map +1 -0
  115. package/dist/demo/report.d.ts +17 -0
  116. package/dist/demo/report.d.ts.map +1 -0
  117. package/dist/demo/report.js +85 -0
  118. package/dist/demo/report.js.map +1 -0
  119. package/dist/demo/runner.d.ts +207 -0
  120. package/dist/demo/runner.d.ts.map +1 -0
  121. package/dist/demo/runner.js +169 -0
  122. package/dist/demo/runner.js.map +1 -0
  123. package/dist/demo/scope.d.ts +44 -0
  124. package/dist/demo/scope.d.ts.map +1 -0
  125. package/dist/demo/scope.js +44 -0
  126. package/dist/demo/scope.js.map +1 -0
  127. package/dist/env/index.d.ts +68 -0
  128. package/dist/env/index.d.ts.map +1 -0
  129. package/dist/env/index.js +427 -0
  130. package/dist/env/index.js.map +1 -0
  131. package/dist/events/bus.d.ts +29 -0
  132. package/dist/events/bus.d.ts.map +1 -0
  133. package/dist/events/bus.js +67 -0
  134. package/dist/events/bus.js.map +1 -0
  135. package/dist/events/index.d.ts +19 -0
  136. package/dist/events/index.d.ts.map +1 -0
  137. package/dist/events/index.js +19 -0
  138. package/dist/events/index.js.map +1 -0
  139. package/dist/http/cursor.d.ts +10 -0
  140. package/dist/http/cursor.d.ts.map +1 -0
  141. package/dist/http/cursor.js +20 -0
  142. package/dist/http/cursor.js.map +1 -0
  143. package/dist/http/error-envelope.d.ts +127 -0
  144. package/dist/http/error-envelope.d.ts.map +1 -0
  145. package/dist/http/error-envelope.js +402 -0
  146. package/dist/http/error-envelope.js.map +1 -0
  147. package/dist/http/health.d.ts +88 -0
  148. package/dist/http/health.d.ts.map +1 -0
  149. package/dist/http/health.js +77 -0
  150. package/dist/http/health.js.map +1 -0
  151. package/dist/http/index.d.ts +50 -0
  152. package/dist/http/index.d.ts.map +1 -0
  153. package/dist/http/index.js +50 -0
  154. package/dist/http/index.js.map +1 -0
  155. package/dist/http/interceptors/dispatch.d.ts +14 -0
  156. package/dist/http/interceptors/dispatch.d.ts.map +1 -0
  157. package/dist/http/interceptors/dispatch.js +113 -0
  158. package/dist/http/interceptors/dispatch.js.map +1 -0
  159. package/dist/http/interceptors/index.d.ts +6 -0
  160. package/dist/http/interceptors/index.d.ts.map +1 -0
  161. package/dist/http/interceptors/index.js +5 -0
  162. package/dist/http/interceptors/index.js.map +1 -0
  163. package/dist/http/interceptors/registry.d.ts +44 -0
  164. package/dist/http/interceptors/registry.d.ts.map +1 -0
  165. package/dist/http/interceptors/registry.js +123 -0
  166. package/dist/http/interceptors/registry.js.map +1 -0
  167. package/dist/http/interceptors/route-table.d.ts +33 -0
  168. package/dist/http/interceptors/route-table.d.ts.map +1 -0
  169. package/dist/http/interceptors/route-table.js +39 -0
  170. package/dist/http/interceptors/route-table.js.map +1 -0
  171. package/dist/http/interceptors/types.d.ts +101 -0
  172. package/dist/http/interceptors/types.d.ts.map +1 -0
  173. package/dist/http/interceptors/types.js +2 -0
  174. package/dist/http/interceptors/types.js.map +1 -0
  175. package/dist/http/interceptors/validation.d.ts +22 -0
  176. package/dist/http/interceptors/validation.d.ts.map +1 -0
  177. package/dist/http/interceptors/validation.js +39 -0
  178. package/dist/http/interceptors/validation.js.map +1 -0
  179. package/dist/http/logger.d.ts +9 -0
  180. package/dist/http/logger.d.ts.map +1 -0
  181. package/dist/http/logger.js +25 -0
  182. package/dist/http/logger.js.map +1 -0
  183. package/dist/http/openapi.d.ts +21 -0
  184. package/dist/http/openapi.d.ts.map +1 -0
  185. package/dist/http/openapi.js +114 -0
  186. package/dist/http/openapi.js.map +1 -0
  187. package/dist/http/product-audience.d.ts +78 -0
  188. package/dist/http/product-audience.d.ts.map +1 -0
  189. package/dist/http/product-audience.js +92 -0
  190. package/dist/http/product-audience.js.map +1 -0
  191. package/dist/http/request-actor.d.ts +82 -0
  192. package/dist/http/request-actor.d.ts.map +1 -0
  193. package/dist/http/request-actor.js +2 -0
  194. package/dist/http/request-actor.js.map +1 -0
  195. package/dist/http/server.d.ts +60 -0
  196. package/dist/http/server.d.ts.map +1 -0
  197. package/dist/http/server.js +117 -0
  198. package/dist/http/server.js.map +1 -0
  199. package/dist/http/storefront-revalidator.d.ts +29 -0
  200. package/dist/http/storefront-revalidator.d.ts.map +1 -0
  201. package/dist/http/storefront-revalidator.js +34 -0
  202. package/dist/http/storefront-revalidator.js.map +1 -0
  203. package/dist/http/test-actor-carrier.d.ts +28 -0
  204. package/dist/http/test-actor-carrier.d.ts.map +1 -0
  205. package/dist/http/test-actor-carrier.js +10 -0
  206. package/dist/http/test-actor-carrier.js.map +1 -0
  207. package/dist/http/trusted-proxy.d.ts +48 -0
  208. package/dist/http/trusted-proxy.d.ts.map +1 -0
  209. package/dist/http/trusted-proxy.js +136 -0
  210. package/dist/http/trusted-proxy.js.map +1 -0
  211. package/dist/kernel/audit/audit-log-entry.entity.d.ts +33 -0
  212. package/dist/kernel/audit/audit-log-entry.entity.d.ts.map +1 -0
  213. package/dist/kernel/audit/audit-log-entry.entity.js +102 -0
  214. package/dist/kernel/audit/audit-log-entry.entity.js.map +1 -0
  215. package/dist/kernel/audit/audit-log-service.d.ts +63 -0
  216. package/dist/kernel/audit/audit-log-service.d.ts.map +1 -0
  217. package/dist/kernel/audit/audit-log-service.js +107 -0
  218. package/dist/kernel/audit/audit-log-service.js.map +1 -0
  219. package/dist/kernel/cache/in-process-cache-registry.d.ts +93 -0
  220. package/dist/kernel/cache/in-process-cache-registry.d.ts.map +1 -0
  221. package/dist/kernel/cache/in-process-cache-registry.js +78 -0
  222. package/dist/kernel/cache/in-process-cache-registry.js.map +1 -0
  223. package/dist/kernel/cache/shared-drop-marks.d.ts +39 -0
  224. package/dist/kernel/cache/shared-drop-marks.d.ts.map +1 -0
  225. package/dist/kernel/cache/shared-drop-marks.js +68 -0
  226. package/dist/kernel/cache/shared-drop-marks.js.map +1 -0
  227. package/dist/kernel/compose.d.ts +234 -0
  228. package/dist/kernel/compose.d.ts.map +1 -0
  229. package/dist/kernel/compose.js +279 -0
  230. package/dist/kernel/compose.js.map +1 -0
  231. package/dist/kernel/container.d.ts +95 -0
  232. package/dist/kernel/container.d.ts.map +1 -0
  233. package/dist/kernel/container.js +90 -0
  234. package/dist/kernel/container.js.map +1 -0
  235. package/dist/kernel/contribution-sinks.d.ts +106 -0
  236. package/dist/kernel/contribution-sinks.d.ts.map +1 -0
  237. package/dist/kernel/contribution-sinks.js +153 -0
  238. package/dist/kernel/contribution-sinks.js.map +1 -0
  239. package/dist/kernel/crypto/password-hasher.d.ts +3 -0
  240. package/dist/kernel/crypto/password-hasher.d.ts.map +1 -0
  241. package/dist/kernel/crypto/password-hasher.js +44 -0
  242. package/dist/kernel/crypto/password-hasher.js.map +1 -0
  243. package/dist/kernel/i18n/error-envelope-options.d.ts +56 -0
  244. package/dist/kernel/i18n/error-envelope-options.d.ts.map +1 -0
  245. package/dist/kernel/i18n/error-envelope-options.js +46 -0
  246. package/dist/kernel/i18n/error-envelope-options.js.map +1 -0
  247. package/dist/kernel/i18n/error-translation.d.ts +144 -0
  248. package/dist/kernel/i18n/error-translation.d.ts.map +1 -0
  249. package/dist/kernel/i18n/error-translation.js +84 -0
  250. package/dist/kernel/i18n/error-translation.js.map +1 -0
  251. package/dist/kernel/i18n/request-language.d.ts +80 -0
  252. package/dist/kernel/i18n/request-language.d.ts.map +1 -0
  253. package/dist/kernel/i18n/request-language.js +168 -0
  254. package/dist/kernel/i18n/request-language.js.map +1 -0
  255. package/dist/kernel/index.d.ts +142 -0
  256. package/dist/kernel/index.d.ts.map +1 -0
  257. package/dist/kernel/index.js +160 -0
  258. package/dist/kernel/index.js.map +1 -0
  259. package/dist/kernel/lazy-port.d.ts +59 -0
  260. package/dist/kernel/lazy-port.d.ts.map +1 -0
  261. package/dist/kernel/lazy-port.js +78 -0
  262. package/dist/kernel/lazy-port.js.map +1 -0
  263. package/dist/kernel/lifecycle/activation-resolver.d.ts +63 -0
  264. package/dist/kernel/lifecycle/activation-resolver.d.ts.map +1 -0
  265. package/dist/kernel/lifecycle/activation-resolver.js +70 -0
  266. package/dist/kernel/lifecycle/activation-resolver.js.map +1 -0
  267. package/dist/kernel/lifecycle/capability-registry.d.ts +145 -0
  268. package/dist/kernel/lifecycle/capability-registry.d.ts.map +1 -0
  269. package/dist/kernel/lifecycle/capability-registry.js +170 -0
  270. package/dist/kernel/lifecycle/capability-registry.js.map +1 -0
  271. package/dist/kernel/lifecycle/effective-state.d.ts +126 -0
  272. package/dist/kernel/lifecycle/effective-state.d.ts.map +1 -0
  273. package/dist/kernel/lifecycle/effective-state.js +111 -0
  274. package/dist/kernel/lifecycle/effective-state.js.map +1 -0
  275. package/dist/kernel/lifecycle/module-registration.entity.d.ts +57 -0
  276. package/dist/kernel/lifecycle/module-registration.entity.d.ts.map +1 -0
  277. package/dist/kernel/lifecycle/module-registration.entity.js +111 -0
  278. package/dist/kernel/lifecycle/module-registration.entity.js.map +1 -0
  279. package/dist/kernel/lifecycle/plugin-helpers.d.ts +165 -0
  280. package/dist/kernel/lifecycle/plugin-helpers.d.ts.map +1 -0
  281. package/dist/kernel/lifecycle/plugin-helpers.js +395 -0
  282. package/dist/kernel/lifecycle/plugin-helpers.js.map +1 -0
  283. package/dist/kernel/lifecycle/registry-cache.d.ts +318 -0
  284. package/dist/kernel/lifecycle/registry-cache.d.ts.map +1 -0
  285. package/dist/kernel/lifecycle/registry-cache.js +509 -0
  286. package/dist/kernel/lifecycle/registry-cache.js.map +1 -0
  287. package/dist/kernel/lifecycle/required-modules.d.ts +137 -0
  288. package/dist/kernel/lifecycle/required-modules.d.ts.map +1 -0
  289. package/dist/kernel/lifecycle/required-modules.js +80 -0
  290. package/dist/kernel/lifecycle/required-modules.js.map +1 -0
  291. package/dist/kernel/lifecycle/unique-module-ids.d.ts +58 -0
  292. package/dist/kernel/lifecycle/unique-module-ids.d.ts.map +1 -0
  293. package/dist/kernel/lifecycle/unique-module-ids.js +82 -0
  294. package/dist/kernel/lifecycle/unique-module-ids.js.map +1 -0
  295. package/dist/kernel/logging.d.ts +116 -0
  296. package/dist/kernel/logging.d.ts.map +1 -0
  297. package/dist/kernel/logging.js +71 -0
  298. package/dist/kernel/logging.js.map +1 -0
  299. package/dist/kernel/module-context.d.ts +563 -0
  300. package/dist/kernel/module-context.d.ts.map +1 -0
  301. package/dist/kernel/module-context.js +670 -0
  302. package/dist/kernel/module-context.js.map +1 -0
  303. package/dist/kernel/ports/audit.d.ts +115 -0
  304. package/dist/kernel/ports/audit.d.ts.map +1 -0
  305. package/dist/kernel/ports/audit.js +2 -0
  306. package/dist/kernel/ports/audit.js.map +1 -0
  307. package/dist/kernel/ports/organizations.d.ts +56 -0
  308. package/dist/kernel/ports/organizations.d.ts.map +1 -0
  309. package/dist/kernel/ports/organizations.js +2 -0
  310. package/dist/kernel/ports/organizations.js.map +1 -0
  311. package/dist/kernel/ports/provide.d.ts +14 -0
  312. package/dist/kernel/ports/provide.d.ts.map +1 -0
  313. package/dist/kernel/ports/provide.js +50 -0
  314. package/dist/kernel/ports/provide.js.map +1 -0
  315. package/dist/kernel/ports/require-admin.d.ts +61 -0
  316. package/dist/kernel/ports/require-admin.d.ts.map +1 -0
  317. package/dist/kernel/ports/require-admin.js +2 -0
  318. package/dist/kernel/ports/require-admin.js.map +1 -0
  319. package/dist/kernel/ports/require-customer.d.ts +17 -0
  320. package/dist/kernel/ports/require-customer.d.ts.map +1 -0
  321. package/dist/kernel/ports/require-customer.js +2 -0
  322. package/dist/kernel/ports/require-customer.js.map +1 -0
  323. package/dist/kernel/ports/sales-channel.d.ts +84 -0
  324. package/dist/kernel/ports/sales-channel.d.ts.map +1 -0
  325. package/dist/kernel/ports/sales-channel.js +2 -0
  326. package/dist/kernel/ports/sales-channel.js.map +1 -0
  327. package/dist/kernel/ports/settings.d.ts +59 -0
  328. package/dist/kernel/ports/settings.d.ts.map +1 -0
  329. package/dist/kernel/ports/settings.js +2 -0
  330. package/dist/kernel/ports/settings.js.map +1 -0
  331. package/dist/kernel/public-api-base-url.d.ts +98 -0
  332. package/dist/kernel/public-api-base-url.d.ts.map +1 -0
  333. package/dist/kernel/public-api-base-url.js +144 -0
  334. package/dist/kernel/public-api-base-url.js.map +1 -0
  335. package/dist/kernel/request-scope-hook.d.ts +63 -0
  336. package/dist/kernel/request-scope-hook.d.ts.map +1 -0
  337. package/dist/kernel/request-scope-hook.js +67 -0
  338. package/dist/kernel/request-scope-hook.js.map +1 -0
  339. package/dist/kernel/sales-channels/channel-bridge-registry.d.ts +109 -0
  340. package/dist/kernel/sales-channels/channel-bridge-registry.d.ts.map +1 -0
  341. package/dist/kernel/sales-channels/channel-bridge-registry.js +75 -0
  342. package/dist/kernel/sales-channels/channel-bridge-registry.js.map +1 -0
  343. package/dist/kernel/sales-channels/compose.d.ts +69 -0
  344. package/dist/kernel/sales-channels/compose.d.ts.map +1 -0
  345. package/dist/kernel/sales-channels/compose.js +43 -0
  346. package/dist/kernel/sales-channels/compose.js.map +1 -0
  347. package/dist/kernel/sales-channels/default-channel-reconciler.d.ts +66 -0
  348. package/dist/kernel/sales-channels/default-channel-reconciler.d.ts.map +1 -0
  349. package/dist/kernel/sales-channels/default-channel-reconciler.js +91 -0
  350. package/dist/kernel/sales-channels/default-channel-reconciler.js.map +1 -0
  351. package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts +28 -0
  352. package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts.map +1 -0
  353. package/dist/kernel/sales-channels/no-system-default-channel.error.js +33 -0
  354. package/dist/kernel/sales-channels/no-system-default-channel.error.js.map +1 -0
  355. package/dist/kernel/sales-channels/request-channel-assortment.d.ts +72 -0
  356. package/dist/kernel/sales-channels/request-channel-assortment.d.ts.map +1 -0
  357. package/dist/kernel/sales-channels/request-channel-assortment.js +83 -0
  358. package/dist/kernel/sales-channels/request-channel-assortment.js.map +1 -0
  359. package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts +157 -0
  360. package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts.map +1 -0
  361. package/dist/kernel/sales-channels/sales-channel-membership.service.js +302 -0
  362. package/dist/kernel/sales-channels/sales-channel-membership.service.js.map +1 -0
  363. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts +76 -0
  364. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts.map +1 -0
  365. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js +184 -0
  366. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js.map +1 -0
  367. package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts +82 -0
  368. package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts.map +1 -0
  369. package/dist/kernel/sales-channels/sales-channel-resolver.service.js +126 -0
  370. package/dist/kernel/sales-channels/sales-channel-resolver.service.js.map +1 -0
  371. package/dist/kernel/sales-channels/sales-channel.entity.d.ts +50 -0
  372. package/dist/kernel/sales-channels/sales-channel.entity.d.ts.map +1 -0
  373. package/dist/kernel/sales-channels/sales-channel.entity.js +132 -0
  374. package/dist/kernel/sales-channels/sales-channel.entity.js.map +1 -0
  375. package/dist/kernel/sales-channels/sales-channels-cache.d.ts +170 -0
  376. package/dist/kernel/sales-channels/sales-channels-cache.d.ts.map +1 -0
  377. package/dist/kernel/sales-channels/sales-channels-cache.js +243 -0
  378. package/dist/kernel/sales-channels/sales-channels-cache.js.map +1 -0
  379. package/dist/kernel/scope.d.ts +153 -0
  380. package/dist/kernel/scope.d.ts.map +1 -0
  381. package/dist/kernel/scope.js +172 -0
  382. package/dist/kernel/scope.js.map +1 -0
  383. package/dist/kernel/settings/compose.d.ts +49 -0
  384. package/dist/kernel/settings/compose.d.ts.map +1 -0
  385. package/dist/kernel/settings/compose.js +21 -0
  386. package/dist/kernel/settings/compose.js.map +1 -0
  387. package/dist/kernel/settings/manifest-reconciler.d.ts +78 -0
  388. package/dist/kernel/settings/manifest-reconciler.d.ts.map +1 -0
  389. package/dist/kernel/settings/manifest-reconciler.js +343 -0
  390. package/dist/kernel/settings/manifest-reconciler.js.map +1 -0
  391. package/dist/kernel/settings/secret-value-codec.d.ts +52 -0
  392. package/dist/kernel/settings/secret-value-codec.d.ts.map +1 -0
  393. package/dist/kernel/settings/secret-value-codec.js +102 -0
  394. package/dist/kernel/settings/secret-value-codec.js.map +1 -0
  395. package/dist/kernel/settings/setting-group.entity.d.ts +25 -0
  396. package/dist/kernel/settings/setting-group.entity.d.ts.map +1 -0
  397. package/dist/kernel/settings/setting-group.entity.js +79 -0
  398. package/dist/kernel/settings/setting-group.entity.js.map +1 -0
  399. package/dist/kernel/settings/setting-value.entity.d.ts +23 -0
  400. package/dist/kernel/settings/setting-value.entity.d.ts.map +1 -0
  401. package/dist/kernel/settings/setting-value.entity.js +66 -0
  402. package/dist/kernel/settings/setting-value.entity.js.map +1 -0
  403. package/dist/kernel/settings/setting.entity.d.ts +56 -0
  404. package/dist/kernel/settings/setting.entity.d.ts.map +1 -0
  405. package/dist/kernel/settings/setting.entity.js +147 -0
  406. package/dist/kernel/settings/setting.entity.js.map +1 -0
  407. package/dist/kernel/settings/settings-cache.d.ts +158 -0
  408. package/dist/kernel/settings/settings-cache.d.ts.map +1 -0
  409. package/dist/kernel/settings/settings-cache.js +253 -0
  410. package/dist/kernel/settings/settings-cache.js.map +1 -0
  411. package/dist/kernel/settings/settings.service.d.ts +142 -0
  412. package/dist/kernel/settings/settings.service.d.ts.map +1 -0
  413. package/dist/kernel/settings/settings.service.js +294 -0
  414. package/dist/kernel/settings/settings.service.js.map +1 -0
  415. package/dist/lifecycle/backend.d.ts +51 -0
  416. package/dist/lifecycle/backend.d.ts.map +1 -0
  417. package/dist/lifecycle/backend.js +40 -0
  418. package/dist/lifecycle/backend.js.map +1 -0
  419. package/dist/lifecycle/commands/activation.commands.d.ts +97 -0
  420. package/dist/lifecycle/commands/activation.commands.d.ts.map +1 -0
  421. package/dist/lifecycle/commands/activation.commands.js +142 -0
  422. package/dist/lifecycle/commands/activation.commands.js.map +1 -0
  423. package/dist/lifecycle/commands/disable.d.ts +3 -0
  424. package/dist/lifecycle/commands/disable.d.ts.map +1 -0
  425. package/dist/lifecycle/commands/disable.js +126 -0
  426. package/dist/lifecycle/commands/disable.js.map +1 -0
  427. package/dist/lifecycle/commands/enable.d.ts +3 -0
  428. package/dist/lifecycle/commands/enable.d.ts.map +1 -0
  429. package/dist/lifecycle/commands/enable.js +102 -0
  430. package/dist/lifecycle/commands/enable.js.map +1 -0
  431. package/dist/lifecycle/commands/install.d.ts +3 -0
  432. package/dist/lifecycle/commands/install.d.ts.map +1 -0
  433. package/dist/lifecycle/commands/install.js +263 -0
  434. package/dist/lifecycle/commands/install.js.map +1 -0
  435. package/dist/lifecycle/commands/operator-entry.d.ts +104 -0
  436. package/dist/lifecycle/commands/operator-entry.d.ts.map +1 -0
  437. package/dist/lifecycle/commands/operator-entry.js +127 -0
  438. package/dist/lifecycle/commands/operator-entry.js.map +1 -0
  439. package/dist/lifecycle/commands/operator-runtime.d.ts +147 -0
  440. package/dist/lifecycle/commands/operator-runtime.d.ts.map +1 -0
  441. package/dist/lifecycle/commands/operator-runtime.js +40 -0
  442. package/dist/lifecycle/commands/operator-runtime.js.map +1 -0
  443. package/dist/lifecycle/commands/status.d.ts +3 -0
  444. package/dist/lifecycle/commands/status.d.ts.map +1 -0
  445. package/dist/lifecycle/commands/status.js +108 -0
  446. package/dist/lifecycle/commands/status.js.map +1 -0
  447. package/dist/lifecycle/commands/uninstall.d.ts +3 -0
  448. package/dist/lifecycle/commands/uninstall.d.ts.map +1 -0
  449. package/dist/lifecycle/commands/uninstall.js +223 -0
  450. package/dist/lifecycle/commands/uninstall.js.map +1 -0
  451. package/dist/lifecycle/divergence-declaration.d.ts +74 -0
  452. package/dist/lifecycle/divergence-declaration.d.ts.map +1 -0
  453. package/dist/lifecycle/divergence-declaration.js +92 -0
  454. package/dist/lifecycle/divergence-declaration.js.map +1 -0
  455. package/dist/lifecycle/i18n/en.json +4 -0
  456. package/dist/lifecycle/i18n/pl.json +4 -0
  457. package/dist/lifecycle/index.d.ts +110 -0
  458. package/dist/lifecycle/index.d.ts.map +1 -0
  459. package/dist/lifecycle/index.js +189 -0
  460. package/dist/lifecycle/index.js.map +1 -0
  461. package/dist/lifecycle/manifest-registry.d.ts +244 -0
  462. package/dist/lifecycle/manifest-registry.d.ts.map +1 -0
  463. package/dist/lifecycle/manifest-registry.js +223 -0
  464. package/dist/lifecycle/manifest-registry.js.map +1 -0
  465. package/dist/lifecycle/manifest.d.ts +166 -0
  466. package/dist/lifecycle/manifest.d.ts.map +1 -0
  467. package/dist/lifecycle/manifest.js +121 -0
  468. package/dist/lifecycle/manifest.js.map +1 -0
  469. package/dist/lifecycle/plugin.d.ts +56 -0
  470. package/dist/lifecycle/plugin.d.ts.map +1 -0
  471. package/dist/lifecycle/plugin.js +59 -0
  472. package/dist/lifecycle/plugin.js.map +1 -0
  473. package/dist/lifecycle/resident.d.ts +16 -0
  474. package/dist/lifecycle/resident.d.ts.map +1 -0
  475. package/dist/lifecycle/resident.js +59 -0
  476. package/dist/lifecycle/resident.js.map +1 -0
  477. package/dist/lifecycle/routes.admin.d.ts +57 -0
  478. package/dist/lifecycle/routes.admin.d.ts.map +1 -0
  479. package/dist/lifecycle/routes.admin.js +162 -0
  480. package/dist/lifecycle/routes.admin.js.map +1 -0
  481. package/dist/lifecycle/routes.storefront.d.ts +26 -0
  482. package/dist/lifecycle/routes.storefront.d.ts.map +1 -0
  483. package/dist/lifecycle/routes.storefront.js +36 -0
  484. package/dist/lifecycle/routes.storefront.js.map +1 -0
  485. package/dist/lifecycle/services/deactivation-ledger.d.ts +216 -0
  486. package/dist/lifecycle/services/deactivation-ledger.d.ts.map +1 -0
  487. package/dist/lifecycle/services/deactivation-ledger.js +171 -0
  488. package/dist/lifecycle/services/deactivation-ledger.js.map +1 -0
  489. package/dist/lifecycle/services/dep-graph.d.ts +119 -0
  490. package/dist/lifecycle/services/dep-graph.d.ts.map +1 -0
  491. package/dist/lifecycle/services/dep-graph.js +334 -0
  492. package/dist/lifecycle/services/dep-graph.js.map +1 -0
  493. package/dist/lifecycle/services/gating-graph.d.ts +164 -0
  494. package/dist/lifecycle/services/gating-graph.d.ts.map +1 -0
  495. package/dist/lifecycle/services/gating-graph.js +203 -0
  496. package/dist/lifecycle/services/gating-graph.js.map +1 -0
  497. package/dist/lifecycle/services/lock.d.ts +27 -0
  498. package/dist/lifecycle/services/lock.d.ts.map +1 -0
  499. package/dist/lifecycle/services/lock.js +82 -0
  500. package/dist/lifecycle/services/lock.js.map +1 -0
  501. package/dist/lifecycle/services/manifest-loader.d.ts +125 -0
  502. package/dist/lifecycle/services/manifest-loader.d.ts.map +1 -0
  503. package/dist/lifecycle/services/manifest-loader.js +210 -0
  504. package/dist/lifecycle/services/manifest-loader.js.map +1 -0
  505. package/dist/lifecycle/services/migration-ownership.d.ts +36 -0
  506. package/dist/lifecycle/services/migration-ownership.d.ts.map +1 -0
  507. package/dist/lifecycle/services/migration-ownership.js +15 -0
  508. package/dist/lifecycle/services/migration-ownership.js.map +1 -0
  509. package/dist/lifecycle/services/module-id-claims.d.ts +38 -0
  510. package/dist/lifecycle/services/module-id-claims.d.ts.map +1 -0
  511. package/dist/lifecycle/services/module-id-claims.js +123 -0
  512. package/dist/lifecycle/services/module-id-claims.js.map +1 -0
  513. package/dist/lifecycle/services/module-origin.d.ts +55 -0
  514. package/dist/lifecycle/services/module-origin.d.ts.map +1 -0
  515. package/dist/lifecycle/services/module-origin.js +47 -0
  516. package/dist/lifecycle/services/module-origin.js.map +1 -0
  517. package/dist/lifecycle/services/orchestrator.d.ts +235 -0
  518. package/dist/lifecycle/services/orchestrator.d.ts.map +1 -0
  519. package/dist/lifecycle/services/orchestrator.js +954 -0
  520. package/dist/lifecycle/services/orchestrator.js.map +1 -0
  521. package/dist/lifecycle/services/presence-load.d.ts +281 -0
  522. package/dist/lifecycle/services/presence-load.d.ts.map +1 -0
  523. package/dist/lifecycle/services/presence-load.js +437 -0
  524. package/dist/lifecycle/services/presence-load.js.map +1 -0
  525. package/dist/lifecycle/services/static-registry.d.ts +47 -0
  526. package/dist/lifecycle/services/static-registry.d.ts.map +1 -0
  527. package/dist/lifecycle/services/static-registry.js +41 -0
  528. package/dist/lifecycle/services/static-registry.js.map +1 -0
  529. package/dist/migrations/20260424T165847_core_foundation_init.d.ts +25 -0
  530. package/dist/migrations/20260424T165847_core_foundation_init.d.ts.map +1 -0
  531. package/dist/migrations/20260424T165847_core_foundation_init.js +238 -0
  532. package/dist/migrations/20260424T165847_core_foundation_init.js.map +1 -0
  533. package/dist/migrations/20260425T050720_core_commerce_init.d.ts +19 -0
  534. package/dist/migrations/20260425T050720_core_commerce_init.d.ts.map +1 -0
  535. package/dist/migrations/20260425T050720_core_commerce_init.js +200 -0
  536. package/dist/migrations/20260425T050720_core_commerce_init.js.map +1 -0
  537. package/dist/migrations/20260430T101450_core_settings_init.d.ts +25 -0
  538. package/dist/migrations/20260430T101450_core_settings_init.d.ts.map +1 -0
  539. package/dist/migrations/20260430T101450_core_settings_init.js +113 -0
  540. package/dist/migrations/20260430T101450_core_settings_init.js.map +1 -0
  541. package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts +67 -0
  542. package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts.map +1 -0
  543. package/dist/migrations/20260430T170044_core_sales_channels_promote.js +101 -0
  544. package/dist/migrations/20260430T170044_core_sales_channels_promote.js.map +1 -0
  545. package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts +21 -0
  546. package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts.map +1 -0
  547. package/dist/migrations/20260506T200657_core_module_lifecycle_init.js +41 -0
  548. package/dist/migrations/20260506T200657_core_module_lifecycle_init.js.map +1 -0
  549. package/dist/migrations/20260514T111329_core_settings_global_value.d.ts +30 -0
  550. package/dist/migrations/20260514T111329_core_settings_global_value.d.ts.map +1 -0
  551. package/dist/migrations/20260514T111329_core_settings_global_value.js +34 -0
  552. package/dist/migrations/20260514T111329_core_settings_global_value.js.map +1 -0
  553. package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts +26 -0
  554. package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts.map +1 -0
  555. package/dist/migrations/20260611T140411_core_settings_secret_value_type.js +63 -0
  556. package/dist/migrations/20260611T140411_core_settings_secret_value_type.js.map +1 -0
  557. package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts +19 -0
  558. package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts.map +1 -0
  559. package/dist/migrations/20260611T140419_core_settings_enum_options.js +23 -0
  560. package/dist/migrations/20260611T140419_core_settings_enum_options.js.map +1 -0
  561. package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts +20 -0
  562. package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts.map +1 -0
  563. package/dist/migrations/20260629T090100_core_settings_hidden_flag.js +24 -0
  564. package/dist/migrations/20260629T090100_core_settings_hidden_flag.js.map +1 -0
  565. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts +27 -0
  566. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts.map +1 -0
  567. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js +32 -0
  568. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js.map +1 -0
  569. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts +24 -0
  570. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts.map +1 -0
  571. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js +57 -0
  572. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js.map +1 -0
  573. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts +39 -0
  574. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts.map +1 -0
  575. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js +59 -0
  576. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js.map +1 -0
  577. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts +34 -0
  578. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts.map +1 -0
  579. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js +38 -0
  580. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js.map +1 -0
  581. package/dist/migrations/baseline-migrations.generated.d.ts +2 -0
  582. package/dist/migrations/baseline-migrations.generated.d.ts.map +1 -0
  583. package/dist/migrations/baseline-migrations.generated.js +136 -0
  584. package/dist/migrations/baseline-migrations.generated.js.map +1 -0
  585. package/dist/migrations/index.d.ts +62 -0
  586. package/dist/migrations/index.d.ts.map +1 -0
  587. package/dist/migrations/index.js +75 -0
  588. package/dist/migrations/index.js.map +1 -0
  589. package/dist/overlay/deployment-roots.d.ts +37 -0
  590. package/dist/overlay/deployment-roots.d.ts.map +1 -0
  591. package/dist/overlay/deployment-roots.js +90 -0
  592. package/dist/overlay/deployment-roots.js.map +1 -0
  593. package/dist/overlay/index.d.ts +62 -0
  594. package/dist/overlay/index.d.ts.map +1 -0
  595. package/dist/overlay/index.js +62 -0
  596. package/dist/overlay/index.js.map +1 -0
  597. package/dist/overlay/overlay-runtime.d.ts +173 -0
  598. package/dist/overlay/overlay-runtime.d.ts.map +1 -0
  599. package/dist/overlay/overlay-runtime.js +281 -0
  600. package/dist/overlay/overlay-runtime.js.map +1 -0
  601. package/dist/overlay/resolve-overlay.d.ts +41 -0
  602. package/dist/overlay/resolve-overlay.d.ts.map +1 -0
  603. package/dist/overlay/resolve-overlay.js +72 -0
  604. package/dist/overlay/resolve-overlay.js.map +1 -0
  605. package/dist/packages/index.d.ts +57 -0
  606. package/dist/packages/index.d.ts.map +1 -0
  607. package/dist/packages/index.js +57 -0
  608. package/dist/packages/index.js.map +1 -0
  609. package/dist/packages/installed-packages.d.ts +79 -0
  610. package/dist/packages/installed-packages.d.ts.map +1 -0
  611. package/dist/packages/installed-packages.js +312 -0
  612. package/dist/packages/installed-packages.js.map +1 -0
  613. package/dist/packages/package-entity-lookup.d.ts +120 -0
  614. package/dist/packages/package-entity-lookup.d.ts.map +1 -0
  615. package/dist/packages/package-entity-lookup.js +17 -0
  616. package/dist/packages/package-entity-lookup.js.map +1 -0
  617. package/dist/packages/package-runtime.d.ts +177 -0
  618. package/dist/packages/package-runtime.d.ts.map +1 -0
  619. package/dist/packages/package-runtime.js +386 -0
  620. package/dist/packages/package-runtime.js.map +1 -0
  621. package/dist/tenancy/derived-scope.d.ts +43 -0
  622. package/dist/tenancy/derived-scope.d.ts.map +1 -0
  623. package/dist/tenancy/derived-scope.js +76 -0
  624. package/dist/tenancy/derived-scope.js.map +1 -0
  625. package/dist/tenancy/escape-hatch.d.ts +30 -0
  626. package/dist/tenancy/escape-hatch.d.ts.map +1 -0
  627. package/dist/tenancy/escape-hatch.js +50 -0
  628. package/dist/tenancy/escape-hatch.js.map +1 -0
  629. package/dist/tenancy/filters.d.ts +87 -0
  630. package/dist/tenancy/filters.d.ts.map +1 -0
  631. package/dist/tenancy/filters.js +126 -0
  632. package/dist/tenancy/filters.js.map +1 -0
  633. package/dist/tenancy/index.d.ts +63 -0
  634. package/dist/tenancy/index.d.ts.map +1 -0
  635. package/dist/tenancy/index.js +61 -0
  636. package/dist/tenancy/index.js.map +1 -0
  637. package/dist/tenancy/org-scoped.decorator.d.ts +150 -0
  638. package/dist/tenancy/org-scoped.decorator.d.ts.map +1 -0
  639. package/dist/tenancy/org-scoped.decorator.js +339 -0
  640. package/dist/tenancy/org-scoped.decorator.js.map +1 -0
  641. package/dist/tenancy/org-write-guard.d.ts +106 -0
  642. package/dist/tenancy/org-write-guard.d.ts.map +1 -0
  643. package/dist/tenancy/org-write-guard.js +141 -0
  644. package/dist/tenancy/org-write-guard.js.map +1 -0
  645. package/dist/tenancy/resolve-tenant-context.d.ts +91 -0
  646. package/dist/tenancy/resolve-tenant-context.d.ts.map +1 -0
  647. package/dist/tenancy/resolve-tenant-context.js +85 -0
  648. package/dist/tenancy/resolve-tenant-context.js.map +1 -0
  649. package/dist/tenancy/scoped-em.d.ts +10 -0
  650. package/dist/tenancy/scoped-em.d.ts.map +1 -0
  651. package/dist/tenancy/scoped-em.js +11 -0
  652. package/dist/tenancy/scoped-em.js.map +1 -0
  653. package/dist/tenancy/tenant-context.d.ts +154 -0
  654. package/dist/tenancy/tenant-context.d.ts.map +1 -0
  655. package/dist/tenancy/tenant-context.js +109 -0
  656. package/dist/tenancy/tenant-context.js.map +1 -0
  657. package/package.json +123 -0
@@ -0,0 +1,563 @@
1
+ import { type BuildResolver, type Constructor, type DisposableResolver, type Resolver } from 'awilix';
2
+ import type { FastifyInstance } from 'fastify';
3
+ import type { Worker } from 'bullmq';
4
+ import type { ModulePlugin } from '../http/server.js';
5
+ import type { EventBus } from '../events/bus.js';
6
+ import type { ApiInterceptorRegistry } from '../http/interceptors/index.js';
7
+ import type { InterceptorRegistration } from '../http/interceptors/types.js';
8
+ import { type DefineModuleWorkerOptions } from './lifecycle/plugin-helpers.js';
9
+ import type { KernelContainer, KernelCradle } from './container.js';
10
+ import { type PlatformLogger } from './logging.js';
11
+ /**
12
+ * `ModuleContext` — the only kernel surface a module sees (feature 072).
13
+ *
14
+ * A module's backend entry exports one `registerModule(ctx)` and its entity
15
+ * list, and nothing about it appears anywhere else. Every surface it can
16
+ * contribute goes through this object, which means the lifecycle gating of
17
+ * Constitution XVII holds **by construction**: `routes`, `worker` and
18
+ * `subscribe` are wrapped in the `_lifecycle` helpers here, so a module cannot
19
+ * forget to wrap and cannot gate per handler.
20
+ *
21
+ * Modules never import `awilix`; `scripts/check-container-imports.ts` enforces
22
+ * it, so the container stays swappable behind this seam.
23
+ */
24
+ /**
25
+ * What `ctx.asClass` / `ctx.asFunction` / `ctx.asValue` produce.
26
+ *
27
+ * These are awilix's own types, re-exported under kernel names so a module
28
+ * spells the container's vocabulary without importing `awilix` — that import is
29
+ * forbidden by a static check (T041), which is what keeps the container
30
+ * swappable behind `ModuleContext`.
31
+ */
32
+ export type Registration<T = unknown> = Resolver<T>;
33
+ /** The lifetime-selecting builder returned by `ctx.asClass` / `ctx.asFunction`. */
34
+ export type RegistrationBuilder<T> = BuildResolver<T> & DisposableResolver<T>;
35
+ /**
36
+ * A module's explicit boot phase (FR-021).
37
+ *
38
+ * Registration is lazy: a service nothing resolves is never constructed. Some
39
+ * work genuinely has to run at boot anyway — pushing a descriptor into another
40
+ * module's registry, seeding a system row, validating a cipher key — and it
41
+ * needs to resolve things, which registration may not do. So it is a named
42
+ * phase that runs **after every module has registered**, each hook inside its
43
+ * own `enterSystemScope`, rather than a side effect smuggled into a factory or
44
+ * into route attachment (where a `BACKEND_ROLE=worker` process would never
45
+ * reach it).
46
+ */
47
+ export type ModuleBootHook = () => void | Promise<void>;
48
+ /**
49
+ * Which module owns which registration name (T042).
50
+ *
51
+ * A name is owned by exactly one module. Two modules registering the same name
52
+ * is not "the later one wins" — it is a platform whose behaviour depends on
53
+ * registration order, and the bug it produces is unfindable because both
54
+ * modules look correct in isolation. Changing another module's registration is
55
+ * `ctx.di.decorate`, which is a different, deliberate act and is not routed
56
+ * through this ledger.
57
+ */
58
+ export interface RegistrationOwnership {
59
+ /** @throws {DuplicateRegistrationError} when another module already owns `name`. */
60
+ claim(name: string, moduleId: string): void;
61
+ ownerOf(name: string): string | undefined;
62
+ }
63
+ /** Two modules registered the same name. Names both, never just the loser. */
64
+ export declare class DuplicateRegistrationError extends Error {
65
+ readonly registrationName: string;
66
+ readonly owner: string;
67
+ readonly claimant: string;
68
+ constructor(registrationName: string, owner: string, claimant: string);
69
+ }
70
+ /**
71
+ * A module registered over a name a composition root supplies (D-156.6).
72
+ *
73
+ * This is the door beside the one {@link ForeignDecorationError} guards, and it
74
+ * stood open while that one was locked. `registerValues` claims no ownership,
75
+ * and `claim` threw only when a *different module* already owned the name — so for a
76
+ * root-registered name there was no prior owner, the claim succeeded, and
77
+ * awilix's `register` overwrote the entry. Any module could take `commandBus`,
78
+ * become its owner, and thereafter decorate it legally, because
79
+ * `ForeignDecorationError` fires only for a name someone else owns.
80
+ *
81
+ * Refusing the **wrap** while permitting the **replacement** is not a boundary:
82
+ * it reads as one and is not, and D-28 is explicit that replacement must be *a
83
+ * distinct, more explicit act* than decoration. Today it is the less explicit
84
+ * one, which is what this closes.
85
+ *
86
+ * The refused set is derived, never listed (D-100, D-156.5): a name the
87
+ * container already holds that no module claimed is exactly a name a
88
+ * composition root supplied — `registerValues` above the compose call, or
89
+ * `contribute()` in D-45's window. A root that starts or stops supplying a name
90
+ * changes the answer in the same run, and nothing has to be kept true by hand.
91
+ *
92
+ * There is no overlay exemption here, and that is not an oversight. A
93
+ * deployment's way to change what a root-supplied name resolves to is
94
+ * `ctx.di.decorate`, which it may do and which keeps core delegating; taking
95
+ * the name outright severs that, for every consumer at once, with nothing
96
+ * declared and nothing reported.
97
+ */
98
+ export declare class ForeignRegistrationError extends Error {
99
+ readonly registrationName: string;
100
+ readonly moduleId: string;
101
+ constructor(registrationName: string, moduleId: string);
102
+ }
103
+ /** A module resolved something while it was still registering (T043). */
104
+ export declare class EagerResolutionError extends Error {
105
+ readonly moduleId: string;
106
+ readonly registrationName: string;
107
+ constructor(moduleId: string, registrationName: string);
108
+ }
109
+ /**
110
+ * One applied decoration, as the override report lists it (T065).
111
+ *
112
+ * "Who is overriding what" is two questions, so the record answers both: the
113
+ * module that wrote the wrap, and the module that owns the registration being
114
+ * wrapped. A report that answers only the first sends its reader back to grep
115
+ * for the second, which is the state this replaces — a client override was
116
+ * discoverable by noticing a file existed under `apps/<deployment>/`.
117
+ */
118
+ export interface DecorationRecord {
119
+ readonly name: string;
120
+ readonly moduleId: string;
121
+ /** The module that registered `name`; `undefined` if a composition root did. */
122
+ readonly owner: string | undefined;
123
+ /** 1-based position in the wrapping chain for this name; innermost first. */
124
+ readonly depth: number;
125
+ }
126
+ /**
127
+ * Two modules decorate one name and nothing says which wraps which (T064).
128
+ *
129
+ * Decoration order is not a formatting question: `beta(acme(core))` and
130
+ * `acme(beta(core))` are different implementations, and a platform that picks
131
+ * between them by package load order picks by accident. The failure is loud at
132
+ * composition rather than deferred to whichever behaviour shows up in
133
+ * production.
134
+ *
135
+ * A module decorating the same name twice is *not* ambiguous — it wrote both
136
+ * wraps, in the order it wrote them — so this fires only across modules.
137
+ *
138
+ * **The remedy is the one that exists today** (D-156.7, D-156.11 item 2;
139
+ * feature 107 FR-042), and as of feature 107's P3 that is the field. This
140
+ * message sent its reader to `decorationOrder` once before and was corrected,
141
+ * because the field was passed by no composition root and its declared source
142
+ * — `endora.config.ts` — was an F11 artefact that never existed: an author
143
+ * could satisfy the instruction only by editing core's own `composition.ts`,
144
+ * which is the one thing an overlay is built to avoid.
145
+ *
146
+ * Both roots now read it from the deployment's own
147
+ * `backend/src/apps/<deployment>/divergence.ts`, which is a file in the
148
+ * deployment's own tree. That is the coupling `compose.ts`'
149
+ * `decorationOrder` doc block recorded — *"the day a root starts passing this,
150
+ * that message is what has to change with it"* — and this is that change. The
151
+ * old workaround (merge the two wraps into one overlay module) is withdrawn
152
+ * rather than kept beside it: two remedies for one refusal is an author
153
+ * choosing, and the declaration is the one that keeps the two modules apart.
154
+ */
155
+ export declare class AmbiguousDecorationError extends Error {
156
+ readonly registrationName: string;
157
+ readonly modules: readonly string[];
158
+ constructor(registrationName: string, modules: readonly string[], detail: string);
159
+ }
160
+ /**
161
+ * A module decorated a registration it does not own (issue #203).
162
+ *
163
+ * `decorate` used to check only that *something* was registered under the name.
164
+ * Both halves of the answer were already in hand at the call site — the
165
+ * decorating module's id, and the owner from the ownership ledger — and the
166
+ * record kept both while comparing neither, so any module could wrap any entry
167
+ * in the container: `commandBus` to observe every audited write,
168
+ * `auditLogService` to change what the audit records, another module's read
169
+ * port to sit between a consumer and its owner with nothing declared anywhere.
170
+ *
171
+ * Refused rather than ledgered. A ledger makes the platform's answer "we will
172
+ * notice", and what is at stake here is not a coupling to drain but the
173
+ * integrity of the audit path.
174
+ *
175
+ * The exemption is the **deployment's own** overlay module, which is a
176
+ * different act: core wrapping core is a coupling nothing declares, while a
177
+ * deployment wrapping core is the sanctioned per-deployment customisation seam
178
+ * (feature 072 replaced file shadowing with it). It is not a claim a module can
179
+ * make about itself — the generated composer sets it from the root the module
180
+ * was discovered under, `backend/src/apps/<deployment>/modules/`.
181
+ *
182
+ * **The exemption is total, and this paragraph is here because the one above it
183
+ * reads as though it were not** (D-156.4, D-156.11 item 3). `overlay` is a
184
+ * per-module boolean and the check below is name-unscoped, so an overlay module
185
+ * may wrap *anything the container holds* — not merely "core", but the
186
+ * root-registered set no module owns: `commandBus`, `auditLogService`,
187
+ * `eventBus`, `emFactory`. Those are precisely the names this error was
188
+ * introduced to defend — `commandBus` to observe every audited write,
189
+ * `auditLogService` to change what the audit records — so the rule as stated
190
+ * and the code as written disagree, and the code is the one that runs.
191
+ *
192
+ * **That is deliberate and it stays.** A deployment owns its instance outright:
193
+ * it edits its own `apps/<deployment>/` tree, it builds the image, and it
194
+ * answers to nobody but itself — so refusing it `commandBus` would defend the
195
+ * audit path against the one party entitled to change it, while a deployment
196
+ * that wanted to could simply do it another way. The defended set is a boundary
197
+ * against *strangers*, and a deployment is not one.
198
+ *
199
+ * This paragraph used to rest part of that argument on a second mechanism — a
200
+ * file under `backend/src/apps/<deployment>/decorations/` that could wrap any
201
+ * registration. That seam is retired: it was wired for one hard-coded name, and
202
+ * D-103 had already made an overlay module's `ctx.di.decorate` do the same job
203
+ * with none of its costs. The argument stands on the sentence above it, which
204
+ * never needed the second mechanism.
205
+ *
206
+ * **An installed extension package is** (D-156.1–D-156.9). `loadPackageModuleEntries`
207
+ * therefore sets no `overlay` flag, and that is the ruled behaviour rather than
208
+ * a placeholder: if a grant is ever built it is keyed per
209
+ * `(package, registration name)`, read from an artefact the instance owns and
210
+ * the package cannot write, and refused outright for any name whose owner is
211
+ * `undefined`. This flag is not the mechanism — widening it, re-typing it to an
212
+ * origin enum or setting it from a declaration hands a stranger the audit path
213
+ * along with whatever it asked for. Do not narrow the check below to match the
214
+ * older prose; the prose was what was wrong.
215
+ */
216
+ export declare class ForeignDecorationError extends Error {
217
+ readonly registrationName: string;
218
+ readonly moduleId: string;
219
+ /** The registering module, or `undefined` when a composition root registered it. */
220
+ readonly owner: string | undefined;
221
+ constructor(registrationName: string, moduleId: string,
222
+ /** The registering module, or `undefined` when a composition root registered it. */
223
+ owner: string | undefined);
224
+ }
225
+ /**
226
+ * The registration being wrapped belongs to an **installed extension package**
227
+ * (D-176 Q3, ruled by the owner on 2026-08-25).
228
+ *
229
+ * A per-deployment overlay may decorate anything core or another of the
230
+ * deployment's own modules registers — that seam is unchanged and is the whole
231
+ * of feature 072's answer to file shadowing. It may **not** decorate a
232
+ * registration an installed package owns, and until the drain landed it could
233
+ * not: `composition.ts` composes overlays before packages, so the name was not
234
+ * in the container yet and `hasRegistration` refused for a reason that had
235
+ * nothing to do with the wrap. The drain removes that accident, so the refusal
236
+ * has to be stated here or the same change would silently grant the capability
237
+ * the owner declined.
238
+ *
239
+ * **Why it is refused today.** The mechanism that would make it safe does not
240
+ * exist. A package's `exports` map publishes `registerModule`, its entities, its
241
+ * migrations and `./ports`; a container name it registers internally is
242
+ * published by none of them, so a deployment wrapping one is writing against a
243
+ * name the package never offered and can rename in a patch release.
244
+ * `check:port-shape` signal 3 already refuses a *module* resolving an
245
+ * unpublished container name — this is the same violation one level out. And
246
+ * feature 057's `tsc` contract gate does not transfer: there is no
247
+ * `*.interface.ts` here, so the compiler would hold the wrap to a `dist/*.d.ts`
248
+ * that moves under `pnpm update`, authored by someone the deployment does not
249
+ * employ.
250
+ *
251
+ * **Why it does not say "never".** D-106.2 has already committed the platform to
252
+ * third-party modules being first-class in schema; refusing decoration outright
253
+ * would make them second-class in behaviour with forking as the only recourse.
254
+ * The exit the owner named is a package **declaring** which of its registrations
255
+ * are decoratable — `./ports` is the natural home for it, where changing the
256
+ * shape costs a major bump — so the message says *not offered yet* rather than
257
+ * *forbidden*, and names it.
258
+ *
259
+ * **It also answers for a decorator that is not an overlay**, and that rules
260
+ * nothing D-176 left open. A core module or a second package wrapping a
261
+ * package's registration was refused before this error existed
262
+ * ({@link ForeignDecorationError}) and is refused after it; what moves is the
263
+ * reason the author is given, because `ForeignDecorationError`'s remedy is
264
+ * *"write it as an overlay module"* — advice that, for a package owner, leads
265
+ * straight back to this refusal.
266
+ */
267
+ export declare class PackageDecorationNotOfferedError extends Error {
268
+ readonly registrationName: string;
269
+ readonly moduleId: string;
270
+ /** The installed package's module id. */
271
+ readonly owner: string;
272
+ constructor(registrationName: string, moduleId: string,
273
+ /** The installed package's module id. */
274
+ owner: string);
275
+ }
276
+ /**
277
+ * One decoration, queued while the modules register and applied at the drain
278
+ * (D-176).
279
+ *
280
+ * `apply` is a closure over the deciding module's context — its id, its overlay
281
+ * marking, the container it registered into — so the guards run at the drain
282
+ * with everything they had at the call site. The `moduleId` beside it is what
283
+ * the composer attributes a failure to: the refusal no longer happens inside
284
+ * the decorating module's `registerModule`, so the entry has to carry it or the
285
+ * message loses the one fact an operator needs.
286
+ */
287
+ export interface PendingDecoration {
288
+ readonly moduleId: string;
289
+ readonly name: string;
290
+ apply(): void;
291
+ }
292
+ /**
293
+ * The composition's decoration queue — a **queue**, and the shape is the point.
294
+ *
295
+ * `ctx.di.decorate` enqueues and {@link composeModules} drains after the last
296
+ * module has registered, which is what makes registration order stop deciding
297
+ * whether a decoration is possible at all (D-45's sentence: registration
298
+ * resolves nothing, so its order is meaningless — true of every other seam, and
299
+ * `decorate` was the one that read and rewrote the container without resolving,
300
+ * so the `registering` guard never saw it).
301
+ *
302
+ * Call order is preserved because a queue preserves it. That is not incidental:
303
+ * {@link AmbiguousDecorationError} exempts a module decorating one name twice
304
+ * *because it wrote both wraps in the order it wrote them*, and a `Map` keyed by
305
+ * name would have to reconstruct that order rather than keep it.
306
+ */
307
+ export interface DecorationQueue {
308
+ enqueue(pending: PendingDecoration): void;
309
+ readonly pending: readonly PendingDecoration[];
310
+ }
311
+ export declare function createDecorationQueue(): DecorationQueue;
312
+ /**
313
+ * The composition-wide record of decorations, shared by every module context of
314
+ * one composition.
315
+ *
316
+ * It is shared for two reasons and both are defects if it is not. The private
317
+ * name a decoration parks its inner resolver under must be unique **per
318
+ * container**: a per-context counter gives the first decoration of two
319
+ * different modules the same private name, so the second overwrites the first's
320
+ * inner registration with the first's own wrapper and the chain resolves into
321
+ * itself. And the ambiguity check is by definition cross-module, so it cannot
322
+ * live in anything a single module owns.
323
+ */
324
+ export interface DecorationLedger {
325
+ /** @throws {AmbiguousDecorationError} when two modules decorate `name` unordered. */
326
+ record(name: string, moduleId: string, owner: string | undefined): DecorationRecord;
327
+ /** A private name for the resolver being wrapped, unique across the container. */
328
+ innerNameFor(name: string): string;
329
+ readonly entries: readonly DecorationRecord[];
330
+ }
331
+ export declare function createDecorationLedger(decorationOrder?: Readonly<Record<string, readonly string[]>>): DecorationLedger;
332
+ export declare function createRegistrationOwnership(): RegistrationOwnership;
333
+ export interface ModuleContext {
334
+ readonly module: {
335
+ readonly id: string;
336
+ readonly version: string;
337
+ };
338
+ readonly di: {
339
+ register(registrations: Record<string, Registration>): void;
340
+ /**
341
+ * Register a name **other modules resolve** — a port (FR-040).
342
+ *
343
+ * The difference from `register` is fail-closed cross-module resolution:
344
+ * resolving a port while this module is not effectively present throws
345
+ * `ModuleDisabledError` (503 `MODULE_DISABLED`, with `Retry-After`) rather
346
+ * than handing a consumer a live service belonging to a module the
347
+ * operator switched off (Constitution XVII).
348
+ *
349
+ * A module's *internal* registrations stay on `register`: gating those
350
+ * would break the one surface that must answer while its module is
351
+ * absent — `ctx.ungatedRoutes`, i.e. the liveness probe.
352
+ */
353
+ providePort<T>(name: string, registration: Registration<T>): void;
354
+ /**
355
+ * Wrap an existing registration (D-28: decoration, never replacement), so a
356
+ * client override keeps delegating to core and core fixes keep flowing
357
+ * through it.
358
+ */
359
+ decorate<T>(name: string, wrap: (inner: T, cradle: KernelCradle) => T): void;
360
+ };
361
+ asClass<T>(ctor: Constructor<T>): RegistrationBuilder<T>;
362
+ /**
363
+ * `C` is the cradle shape **this factory needs**, declared by the module and
364
+ * defaulted to the kernel's. Annotate the parameter and it is inferred:
365
+ *
366
+ * ```ts
367
+ * ctx.asFunction(({ emFactory, blogCacheService }: BlogCradle) => …)
368
+ * ```
369
+ *
370
+ * Widening it to `KernelCradle` would make every dependency `unknown` at the
371
+ * one place where naming the dependency is the point of the exercise.
372
+ */
373
+ asFunction<T, C = KernelCradle>(fn: (cradle: C) => T): RegistrationBuilder<T>;
374
+ asValue<T>(value: T): Registration<T>;
375
+ /**
376
+ * The resolution surface, for **deferred** use only — inside a route
377
+ * registrar, a worker processor, a subscriber or an `onBoot` hook. Reading a
378
+ * name from it while `registerModule` is still running throws
379
+ * {@link EagerResolutionError} (T043).
380
+ *
381
+ * Two things about it are load-bearing:
382
+ *
383
+ * - **It resolves through the container this module registered into**, and
384
+ * never through the ambient request scope. That makes what a name resolves
385
+ * to a property of the composition rather than of where the call happens,
386
+ * and it is why the module's registrations must be `singleton()` or
387
+ * `transient()`. Per-request state is read through its own accessor —
388
+ * `getResolvedChannel()` for the sales channel, `getTenantContext()` for
389
+ * tenancy — not through this cradle. Resolving `scoped()` registrations
390
+ * from a module belongs to Phase 5, where the generated composer owns the
391
+ * whole boot and one container is unambiguously *the* root.
392
+ * - **`C` is asserted by the caller**, because the container is the runtime
393
+ * authority and an unknown name throws rather than yielding `undefined`.
394
+ * Declaring the narrow shape a module needs is the port rule of
395
+ * `contracts/module-context.md` spelled in types.
396
+ */
397
+ cradle<C extends object = KernelCradle>(): C;
398
+ /** Wrapped in `defineModuleRoutes(module.id, …)` — gating holds at the registration seam. */
399
+ routes(register: (app: FastifyInstance) => Promise<void> | void): void;
400
+ /**
401
+ * Routes registered **outside** the module gate (D-36b). The exemption is
402
+ * narrow and structural: a surface that *reports on the platform* cannot be
403
+ * gated on a part of the platform without becoming circular. `_lifecycle`
404
+ * already registers its presence projection this way by hand
405
+ * (`routes.admin.ts:102-107`); a liveness or readiness probe is the same
406
+ * shape, and the failure it prevents is unrecoverable — a probe answering
407
+ * 503 because its module is off makes the orchestrator restart the
408
+ * container, get 503 again, and repeat, so nothing stays up long enough to
409
+ * serve the surface that would switch the module back on.
410
+ *
411
+ * `reason` is required and non-empty because that is the whole difference
412
+ * between an exemption and a way around the gate: it appears in the code
413
+ * next to the routes it covers, so the next reader can judge it.
414
+ */
415
+ ungatedRoutes(reason: string, register: (app: FastifyInstance) => Promise<void> | void): void;
416
+ /**
417
+ * A plugin registered on the **root** Fastify instance, uncapsulated (T078).
418
+ *
419
+ * `ctx.routes` and `ctx.ungatedRoutes` both register into an encapsulated
420
+ * child context, which is right for routes and wrong for a decoration every
421
+ * other module reads: a `decorateRequest` applied inside a child context is
422
+ * invisible to that context's siblings, so `auth` decorating `request.actor`
423
+ * through either of them would leave every other module's guards with no
424
+ * actor to read.
425
+ *
426
+ * The difference from `ungatedRoutes` is not one of degree. That one is about
427
+ * **the gate** — a surface that must answer while its module is off. This one
428
+ * is about **encapsulation** — a contribution that must apply to the whole
429
+ * application. A module can need either without the other.
430
+ *
431
+ * `reason` is required and non-empty: this is the one seam that can affect
432
+ * every module in a deployment, so its justification lives beside it.
433
+ */
434
+ rootPlugin(reason: string, plugin: ModulePlugin): void;
435
+ /** Wrapped in `defineModuleWorker(module.id, …)`. Takes a **constructed** `Worker`. */
436
+ worker<W extends Worker>(worker: W, options?: DefineModuleWorkerOptions): W;
437
+ /**
438
+ * Wrapped in `subscribeForModule(module.id, bus, …)`.
439
+ *
440
+ * The payload is `unknown` because that is what the `EventBus` hands a
441
+ * subscriber: its `Events` map defaults to `Record<string, EventBase>`, so no
442
+ * name-to-payload mapping exists to narrow from. Every subscriber in the tree
443
+ * already takes `(p: unknown)` and parses — see `ksef/plugin.ts`. A typed
444
+ * subscription needs the event catalogue that F3 introduces, not a cast here.
445
+ */
446
+ subscribe(event: string, handler: (payload: unknown) => void | Promise<void>): void;
447
+ /** API interceptors owned by this module; `module` is stamped from `module.id`. */
448
+ interceptors(entries: readonly Omit<InterceptorRegistration, 'module'>[]): void;
449
+ /**
450
+ * The explicit boot phase (FR-021). Runs once every module has registered,
451
+ * inside `enterSystemScope('boot: <module id>')`, so it may resolve.
452
+ *
453
+ * This is the only lifecycle hook a `ModuleContext` carries, and it runs on
454
+ * every boot of every process, including `BACKEND_ROLE=worker`. Install-time
455
+ * work belongs to the **other** lifecycle: a module that needs it exports
456
+ * `installHook` / `uninstallHook` from its `manifest.ts`, which the composer
457
+ * generator wires into the generated manifest index and the lifecycle
458
+ * orchestrator runs. There is deliberately no container-side equivalent
459
+ * (D-46) — `module:install` runs in a process that composes nothing, so a
460
+ * hook collected by the composition sink would never fire.
461
+ */
462
+ onBoot(hook: ModuleBootHook): void;
463
+ /**
464
+ * The platform's logger, bound to this module (issue #269).
465
+ *
466
+ * Every line it writes carries `module: '<this module's id>'`, and carries
467
+ * `reqId` when it is written during a request — neither of which the author
468
+ * names. The destination is whatever the composition root passed, which for
469
+ * every root that builds a server is the application's own pino instance from
470
+ * the moment `buildServer` returns; see `kernel/logging.ts` for what a line
471
+ * emitted before that, or from a process that builds no server, reaches.
472
+ *
473
+ * It is safe to keep: four modules hand it to a service that holds it for the
474
+ * life of the process, and both the destination and the request correlation
475
+ * are read per line rather than captured.
476
+ */
477
+ readonly log: PlatformLogger;
478
+ }
479
+ /**
480
+ * What one module contributed. The composer owns the sink and decides when to
481
+ * attach the plugins, so `registerModule` stays a pure declaration.
482
+ */
483
+ export interface ModuleRegistrationSink {
484
+ readonly plugins: ModulePlugin[];
485
+ /**
486
+ * Plugins a composition root registers on the **root** Fastify instance,
487
+ * uncapsulated (T078). Kept apart from `plugins` because a root places them
488
+ * at a different point: a module's routes go with its own surface, a root
489
+ * plugin goes where the whole application needs decorating.
490
+ */
491
+ readonly rootPlugins: ModulePlugin[];
492
+ readonly workers: Worker[];
493
+ readonly unsubscribes: Array<() => void>;
494
+ readonly bootHooks: ModuleBootHook[];
495
+ }
496
+ export declare function createModuleRegistrationSink(): ModuleRegistrationSink;
497
+ export interface ModuleContextOptions {
498
+ readonly module: {
499
+ readonly id: string;
500
+ readonly version: string;
501
+ };
502
+ readonly container: KernelContainer;
503
+ readonly eventBus: EventBus;
504
+ readonly sink: ModuleRegistrationSink;
505
+ readonly log: PlatformLogger;
506
+ /** Absent in composition roots that mount no interceptor surface (unit tests). */
507
+ readonly interceptorRegistry?: ApiInterceptorRegistry;
508
+ /**
509
+ * Shared across every module of one composition, so a name registered twice
510
+ * is caught naming both modules (T042). Absent for a hand-built context — a
511
+ * single module cannot collide with itself.
512
+ */
513
+ readonly ownership?: RegistrationOwnership;
514
+ /**
515
+ * Shared across every module of one composition, so the private name a
516
+ * decoration parks its inner resolver under is unique per container and the
517
+ * cross-module ambiguity check can see every decoration (T064/T065). Absent
518
+ * for a hand-built context — one module's decorations are ordered by the
519
+ * order it wrote them.
520
+ */
521
+ readonly decorations?: DecorationLedger;
522
+ /**
523
+ * Whether `registerModule` is still running for this composition. While it
524
+ * is, `ctx.cradle()` refuses to resolve (T043). Defaults to "no", so a
525
+ * context built by hand in a unit test resolves freely.
526
+ */
527
+ readonly isRegistering?: () => boolean;
528
+ /**
529
+ * This module belongs to the active **deployment**, not to core — it was
530
+ * discovered under `backend/src/apps/<deployment>/modules/` (issue #203).
531
+ *
532
+ * The one thing it buys is the exemption from the ownership rule on
533
+ * `ctx.di.decorate`: a deployment may wrap a core registration, because that
534
+ * is the customisation seam feature 072 put in place of file shadowing. It
535
+ * is set by the generated composer from the module's location, never by the
536
+ * module, so core cannot assert it.
537
+ */
538
+ readonly overlay?: boolean;
539
+ /**
540
+ * Where `ctx.di.decorate` puts its wraps until the registration pass is over
541
+ * (D-176). Passed by {@link composeModules}, which owns the drain.
542
+ *
543
+ * Absent for a hand-built context and for the post-registration context
544
+ * `contextFor` returns, and in both cases a decoration applies **at the
545
+ * call**, which is what it has always done: neither has a drain behind it, so
546
+ * queueing there would be a wrap nobody ever applies.
547
+ */
548
+ readonly decorationQueue?: DecorationQueue;
549
+ /**
550
+ * The module ids this composition took from **installed extension packages**
551
+ * (D-176 Q3).
552
+ *
553
+ * It answers one question — is the *owner* of the name being decorated a
554
+ * stranger's package — and it is passed by the composer from the entries it
555
+ * was handed, so a package cannot put itself in or out of it. It is
556
+ * deliberately not the `overlay` flag re-typed to an origin (D-156.4): that
557
+ * flag *grants*, this set *refuses*, and merging the two is how a grant
558
+ * mechanism acquires a member nobody meant to add.
559
+ */
560
+ readonly installedPackageModuleIds?: ReadonlySet<string>;
561
+ }
562
+ export declare function createModuleContext(options: ModuleContextOptions): ModuleContext;
563
+ //# sourceMappingURL=module-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-context.d.ts","sourceRoot":"","sources":["../../src/kernel/module-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACd,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAIL,KAAK,yBAAyB,EAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAOjE;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;AAEpD,mFAAmF;AACnF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAkB9E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,oFAAoF;IACpF,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ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