@happyvertical/smrt-core 0.30.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 (631) hide show
  1. package/AGENTS.md +124 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +265 -0
  5. package/bin/smrt-prebuild.js +26 -0
  6. package/dist/__tests__/fixtures/advisor-test-classes.d.ts +28 -0
  7. package/dist/__tests__/fixtures/advisor-test-classes.d.ts.map +1 -0
  8. package/dist/__tests__/fixtures/collection-coverage-fixtures.d.ts +12 -0
  9. package/dist/__tests__/fixtures/collection-coverage-fixtures.d.ts.map +1 -0
  10. package/dist/__tests__/fixtures/inheritance-resolver-fixtures.d.ts +28 -0
  11. package/dist/__tests__/fixtures/inheritance-resolver-fixtures.d.ts.map +1 -0
  12. package/dist/__tests__/fixtures/inheritance-test-classes.d.ts +43 -0
  13. package/dist/__tests__/fixtures/inheritance-test-classes.d.ts.map +1 -0
  14. package/dist/__tests__/fixtures/mcp-integration-test-classes.d.ts +18 -0
  15. package/dist/__tests__/fixtures/mcp-integration-test-classes.d.ts.map +1 -0
  16. package/dist/__tests__/fixtures/object-ai-memory-fixtures.d.ts +15 -0
  17. package/dist/__tests__/fixtures/object-ai-memory-fixtures.d.ts.map +1 -0
  18. package/dist/__tests__/fixtures/object-spec-test-classes.d.ts +13 -0
  19. package/dist/__tests__/fixtures/object-spec-test-classes.d.ts.map +1 -0
  20. package/dist/__tests__/fixtures/registry-test-classes.d.ts +23 -0
  21. package/dist/__tests__/fixtures/registry-test-classes.d.ts.map +1 -0
  22. package/dist/adapters/ai-usage.d.ts +23 -0
  23. package/dist/adapters/ai-usage.d.ts.map +1 -0
  24. package/dist/adapters/ai-usage.js +105 -0
  25. package/dist/adapters/ai-usage.js.map +1 -0
  26. package/dist/adapters/cost-rates.d.ts +20 -0
  27. package/dist/adapters/cost-rates.d.ts.map +1 -0
  28. package/dist/adapters/cost-rates.js +40 -0
  29. package/dist/adapters/cost-rates.js.map +1 -0
  30. package/dist/adapters/index.d.ts +19 -0
  31. package/dist/adapters/index.d.ts.map +1 -0
  32. package/dist/adapters/metrics.d.ts +111 -0
  33. package/dist/adapters/metrics.d.ts.map +1 -0
  34. package/dist/adapters/metrics.js +169 -0
  35. package/dist/adapters/metrics.js.map +1 -0
  36. package/dist/adapters/pubsub.d.ts +124 -0
  37. package/dist/adapters/pubsub.d.ts.map +1 -0
  38. package/dist/adapters/pubsub.js +121 -0
  39. package/dist/adapters/pubsub.js.map +1 -0
  40. package/dist/browser.d.ts +32 -0
  41. package/dist/browser.d.ts.map +1 -0
  42. package/dist/browser.js +68 -0
  43. package/dist/browser.js.map +1 -0
  44. package/dist/child-accessors.d.ts +27 -0
  45. package/dist/child-accessors.d.ts.map +1 -0
  46. package/dist/child-accessors.js +35 -0
  47. package/dist/child-accessors.js.map +1 -0
  48. package/dist/class.d.ts +313 -0
  49. package/dist/class.d.ts.map +1 -0
  50. package/dist/class.js +896 -0
  51. package/dist/class.js.map +1 -0
  52. package/dist/collection-cache.d.ts +110 -0
  53. package/dist/collection-cache.d.ts.map +1 -0
  54. package/dist/collection-cache.js +187 -0
  55. package/dist/collection-cache.js.map +1 -0
  56. package/dist/collection.d.ts +894 -0
  57. package/dist/collection.d.ts.map +1 -0
  58. package/dist/collection.js +1987 -0
  59. package/dist/collection.js.map +1 -0
  60. package/dist/config/global-config.d.ts +3 -0
  61. package/dist/config/global-config.d.ts.map +1 -0
  62. package/dist/config/global-config.js +19 -0
  63. package/dist/config/global-config.js.map +1 -0
  64. package/dist/config.d.ts +145 -0
  65. package/dist/config.d.ts.map +1 -0
  66. package/dist/config.js +57 -0
  67. package/dist/config.js.map +1 -0
  68. package/dist/consumer-plugin/index.d.ts +22 -0
  69. package/dist/consumer-plugin/index.d.ts.map +1 -0
  70. package/dist/consumer-plugin/index.js +452 -0
  71. package/dist/consumer-plugin/index.js.map +1 -0
  72. package/dist/consumer-plugin.d.ts +8 -0
  73. package/dist/consumer-plugin.d.ts.map +1 -0
  74. package/dist/consumer-plugin.js +5 -0
  75. package/dist/consumer-plugin.js.map +1 -0
  76. package/dist/database.d.ts +95 -0
  77. package/dist/database.d.ts.map +1 -0
  78. package/dist/database.js +32 -0
  79. package/dist/database.js.map +1 -0
  80. package/dist/decorators/compatibility.d.ts +14 -0
  81. package/dist/decorators/compatibility.d.ts.map +1 -0
  82. package/dist/decorators/compatibility.js +111 -0
  83. package/dist/decorators/compatibility.js.map +1 -0
  84. package/dist/decorators/index.d.ts +381 -0
  85. package/dist/decorators/index.d.ts.map +1 -0
  86. package/dist/decorators/index.js +104 -0
  87. package/dist/decorators/index.js.map +1 -0
  88. package/dist/dispatch/bus.d.ts +306 -0
  89. package/dist/dispatch/bus.d.ts.map +1 -0
  90. package/dist/dispatch/bus.js +583 -0
  91. package/dist/dispatch/bus.js.map +1 -0
  92. package/dist/dispatch/collections/DispatchSubscriptions.d.ts +79 -0
  93. package/dist/dispatch/collections/DispatchSubscriptions.d.ts.map +1 -0
  94. package/dist/dispatch/collections/DispatchSubscriptions.js +243 -0
  95. package/dist/dispatch/collections/DispatchSubscriptions.js.map +1 -0
  96. package/dist/dispatch/collections/Dispatches.d.ts +98 -0
  97. package/dist/dispatch/collections/Dispatches.d.ts.map +1 -0
  98. package/dist/dispatch/collections/Dispatches.js +358 -0
  99. package/dist/dispatch/collections/Dispatches.js.map +1 -0
  100. package/dist/dispatch/index.d.ts +47 -0
  101. package/dist/dispatch/index.d.ts.map +1 -0
  102. package/dist/dispatch/models/Dispatch.d.ts +101 -0
  103. package/dist/dispatch/models/Dispatch.d.ts.map +1 -0
  104. package/dist/dispatch/models/Dispatch.js +162 -0
  105. package/dist/dispatch/models/Dispatch.js.map +1 -0
  106. package/dist/dispatch/models/DispatchSubscription.d.ts +83 -0
  107. package/dist/dispatch/models/DispatchSubscription.d.ts.map +1 -0
  108. package/dist/dispatch/models/DispatchSubscription.js +112 -0
  109. package/dist/dispatch/models/DispatchSubscription.js.map +1 -0
  110. package/dist/dispatch/tenant-resolver.d.ts +98 -0
  111. package/dist/dispatch/tenant-resolver.d.ts.map +1 -0
  112. package/dist/dispatch/tenant-resolver.js +32 -0
  113. package/dist/dispatch/tenant-resolver.js.map +1 -0
  114. package/dist/dispatch/types.d.ts +149 -0
  115. package/dist/dispatch/types.d.ts.map +1 -0
  116. package/dist/embeddings/hash.d.ts +33 -0
  117. package/dist/embeddings/hash.d.ts.map +1 -0
  118. package/dist/embeddings/hash.js +37 -0
  119. package/dist/embeddings/hash.js.map +1 -0
  120. package/dist/embeddings/index.d.ts +36 -0
  121. package/dist/embeddings/index.d.ts.map +1 -0
  122. package/dist/embeddings/provider.d.ts +75 -0
  123. package/dist/embeddings/provider.d.ts.map +1 -0
  124. package/dist/embeddings/provider.js +170 -0
  125. package/dist/embeddings/provider.js.map +1 -0
  126. package/dist/embeddings/similarity.d.ts +47 -0
  127. package/dist/embeddings/similarity.d.ts.map +1 -0
  128. package/dist/embeddings/similarity.js +64 -0
  129. package/dist/embeddings/similarity.js.map +1 -0
  130. package/dist/embeddings/storage.d.ts +125 -0
  131. package/dist/embeddings/storage.d.ts.map +1 -0
  132. package/dist/embeddings/storage.js +283 -0
  133. package/dist/embeddings/storage.js.map +1 -0
  134. package/dist/embeddings/types.d.ts +250 -0
  135. package/dist/embeddings/types.d.ts.map +1 -0
  136. package/dist/errors.d.ts +363 -0
  137. package/dist/errors.d.ts.map +1 -0
  138. package/dist/errors.js +669 -0
  139. package/dist/errors.js.map +1 -0
  140. package/dist/generators/cli.d.ts +162 -0
  141. package/dist/generators/cli.d.ts.map +1 -0
  142. package/dist/generators/cli.js +462 -0
  143. package/dist/generators/cli.js.map +1 -0
  144. package/dist/generators/index.d.ts +13 -0
  145. package/dist/generators/index.d.ts.map +1 -0
  146. package/dist/generators/mcp-runtime-template.d.ts +60 -0
  147. package/dist/generators/mcp-runtime-template.d.ts.map +1 -0
  148. package/dist/generators/mcp-runtime-template.js +509 -0
  149. package/dist/generators/mcp-runtime-template.js.map +1 -0
  150. package/dist/generators/mcp.d.ts +231 -0
  151. package/dist/generators/mcp.d.ts.map +1 -0
  152. package/dist/generators/mcp.js +1220 -0
  153. package/dist/generators/mcp.js.map +1 -0
  154. package/dist/generators/rest.d.ts +171 -0
  155. package/dist/generators/rest.d.ts.map +1 -0
  156. package/dist/generators/rest.js +591 -0
  157. package/dist/generators/rest.js.map +1 -0
  158. package/dist/generators/swagger.d.ts +21 -0
  159. package/dist/generators/swagger.d.ts.map +1 -0
  160. package/dist/generators/swagger.js +307 -0
  161. package/dist/generators/swagger.js.map +1 -0
  162. package/dist/generators/tenant-gate.d.ts +74 -0
  163. package/dist/generators/tenant-gate.d.ts.map +1 -0
  164. package/dist/generators/tenant-gate.js +15 -0
  165. package/dist/generators/tenant-gate.js.map +1 -0
  166. package/dist/generators.d.ts +8 -0
  167. package/dist/generators.d.ts.map +1 -0
  168. package/dist/generators.js +19 -0
  169. package/dist/generators.js.map +1 -0
  170. package/dist/hierarchical.d.ts +103 -0
  171. package/dist/hierarchical.d.ts.map +1 -0
  172. package/dist/hierarchical.js +184 -0
  173. package/dist/hierarchical.js.map +1 -0
  174. package/dist/index.d.ts +57 -0
  175. package/dist/index.d.ts.map +1 -0
  176. package/dist/index.js +202 -0
  177. package/dist/index.js.map +1 -0
  178. package/dist/interceptors.d.ts +251 -0
  179. package/dist/interceptors.d.ts.map +1 -0
  180. package/dist/interceptors.js +259 -0
  181. package/dist/interceptors.js.map +1 -0
  182. package/dist/junction.d.ts +99 -0
  183. package/dist/junction.d.ts.map +1 -0
  184. package/dist/junction.js +136 -0
  185. package/dist/junction.js.map +1 -0
  186. package/dist/knowledge.d.ts +11 -0
  187. package/dist/knowledge.d.ts.map +1 -0
  188. package/dist/knowledge.js +310 -0
  189. package/dist/knowledge.js.map +1 -0
  190. package/dist/lazy-config.d.ts +160 -0
  191. package/dist/lazy-config.d.ts.map +1 -0
  192. package/dist/lazy-config.js +146 -0
  193. package/dist/lazy-config.js.map +1 -0
  194. package/dist/manifest/discover-base-classes.d.ts +78 -0
  195. package/dist/manifest/discover-base-classes.d.ts.map +1 -0
  196. package/dist/manifest/discover-base-classes.js +85 -0
  197. package/dist/manifest/discover-base-classes.js.map +1 -0
  198. package/dist/manifest/discover-smrt-packages.d.ts +48 -0
  199. package/dist/manifest/discover-smrt-packages.d.ts.map +1 -0
  200. package/dist/manifest/discover-smrt-packages.js +361 -0
  201. package/dist/manifest/discover-smrt-packages.js.map +1 -0
  202. package/dist/manifest/generator.d.ts +93 -0
  203. package/dist/manifest/generator.d.ts.map +1 -0
  204. package/dist/manifest/generator.js +380 -0
  205. package/dist/manifest/generator.js.map +1 -0
  206. package/dist/manifest/index.d.ts +16 -0
  207. package/dist/manifest/index.d.ts.map +1 -0
  208. package/dist/manifest/index.js +51 -0
  209. package/dist/manifest/index.js.map +1 -0
  210. package/dist/manifest/manager.d.ts +51 -0
  211. package/dist/manifest/manager.d.ts.map +1 -0
  212. package/dist/manifest/manager.js +89 -0
  213. package/dist/manifest/manager.js.map +1 -0
  214. package/dist/manifest/manifest-loader.d.ts +187 -0
  215. package/dist/manifest/manifest-loader.d.ts.map +1 -0
  216. package/dist/manifest/manifest-loader.js +847 -0
  217. package/dist/manifest/manifest-loader.js.map +1 -0
  218. package/dist/manifest/sources/composite.d.ts +22 -0
  219. package/dist/manifest/sources/composite.d.ts.map +1 -0
  220. package/dist/manifest/sources/composite.js +60 -0
  221. package/dist/manifest/sources/composite.js.map +1 -0
  222. package/dist/manifest/sources/embedded.d.ts +7 -0
  223. package/dist/manifest/sources/embedded.d.ts.map +1 -0
  224. package/dist/manifest/sources/embedded.js +30 -0
  225. package/dist/manifest/sources/embedded.js.map +1 -0
  226. package/dist/manifest/sources/explicit-paths.d.ts +17 -0
  227. package/dist/manifest/sources/explicit-paths.d.ts.map +1 -0
  228. package/dist/manifest/sources/explicit-paths.js +35 -0
  229. package/dist/manifest/sources/explicit-paths.js.map +1 -0
  230. package/dist/manifest/sources/fallback.d.ts +25 -0
  231. package/dist/manifest/sources/fallback.d.ts.map +1 -0
  232. package/dist/manifest/sources/fallback.js +63 -0
  233. package/dist/manifest/sources/fallback.js.map +1 -0
  234. package/dist/manifest/sources/index.d.ts +17 -0
  235. package/dist/manifest/sources/index.d.ts.map +1 -0
  236. package/dist/manifest/sources/local-test.d.ts +7 -0
  237. package/dist/manifest/sources/local-test.d.ts.map +1 -0
  238. package/dist/manifest/sources/local-test.js +21 -0
  239. package/dist/manifest/sources/local-test.js.map +1 -0
  240. package/dist/manifest/sources/static.d.ts +7 -0
  241. package/dist/manifest/sources/static.d.ts.map +1 -0
  242. package/dist/manifest/sources/static.js +19 -0
  243. package/dist/manifest/sources/static.js.map +1 -0
  244. package/dist/manifest/sources/test.d.ts +7 -0
  245. package/dist/manifest/sources/test.d.ts.map +1 -0
  246. package/dist/manifest/sources/test.js +21 -0
  247. package/dist/manifest/sources/test.js.map +1 -0
  248. package/dist/manifest/sources/types.d.ts +79 -0
  249. package/dist/manifest/sources/types.d.ts.map +1 -0
  250. package/dist/manifest/sources/types.js +61 -0
  251. package/dist/manifest/sources/types.js.map +1 -0
  252. package/dist/manifest/static-manifest.d.ts +4 -0
  253. package/dist/manifest/static-manifest.d.ts.map +1 -0
  254. package/dist/manifest/static-manifest.js +1535 -0
  255. package/dist/manifest/static-manifest.js.map +1 -0
  256. package/dist/manifest/store.d.ts +111 -0
  257. package/dist/manifest/store.d.ts.map +1 -0
  258. package/dist/manifest/store.js +431 -0
  259. package/dist/manifest/store.js.map +1 -0
  260. package/dist/manifest/test-manifest-loader.d.ts +3 -0
  261. package/dist/manifest/test-manifest-loader.d.ts.map +1 -0
  262. package/dist/manifest/test-manifest-stub.d.ts +4 -0
  263. package/dist/manifest/test-manifest-stub.d.ts.map +1 -0
  264. package/dist/manifest/test-manifest-stub.js +80013 -0
  265. package/dist/manifest/test-manifest-stub.js.map +1 -0
  266. package/dist/manifest.d.ts +8 -0
  267. package/dist/manifest.d.ts.map +1 -0
  268. package/dist/manifest.js +20 -0
  269. package/dist/manifest.js.map +1 -0
  270. package/dist/manifest.json +1489 -0
  271. package/dist/mcp-advisor/index.d.ts +499 -0
  272. package/dist/mcp-advisor/index.d.ts.map +1 -0
  273. package/dist/mcp-advisor/tools/add-ai-methods.d.ts +6 -0
  274. package/dist/mcp-advisor/tools/add-ai-methods.d.ts.map +1 -0
  275. package/dist/mcp-advisor/tools/configure-decorators.d.ts +6 -0
  276. package/dist/mcp-advisor/tools/configure-decorators.d.ts.map +1 -0
  277. package/dist/mcp-advisor/tools/generate-collection.d.ts +6 -0
  278. package/dist/mcp-advisor/tools/generate-collection.d.ts.map +1 -0
  279. package/dist/mcp-advisor/tools/generate-field-definitions.d.ts +6 -0
  280. package/dist/mcp-advisor/tools/generate-field-definitions.d.ts.map +1 -0
  281. package/dist/mcp-advisor/tools/generate-smrt-class.d.ts +6 -0
  282. package/dist/mcp-advisor/tools/generate-smrt-class.d.ts.map +1 -0
  283. package/dist/mcp-advisor/tools/get-object-config.d.ts +6 -0
  284. package/dist/mcp-advisor/tools/get-object-config.d.ts.map +1 -0
  285. package/dist/mcp-advisor/tools/get-object-schema.d.ts +10 -0
  286. package/dist/mcp-advisor/tools/get-object-schema.d.ts.map +1 -0
  287. package/dist/mcp-advisor/tools/list-registered-objects.d.ts +9 -0
  288. package/dist/mcp-advisor/tools/list-registered-objects.d.ts.map +1 -0
  289. package/dist/mcp-advisor/tools/preview-api-endpoints.d.ts +9 -0
  290. package/dist/mcp-advisor/tools/preview-api-endpoints.d.ts.map +1 -0
  291. package/dist/mcp-advisor/tools/preview-mcp-tools.d.ts +9 -0
  292. package/dist/mcp-advisor/tools/preview-mcp-tools.d.ts.map +1 -0
  293. package/dist/mcp-advisor/tools/validate-smrt-object.d.ts +6 -0
  294. package/dist/mcp-advisor/tools/validate-smrt-object.d.ts.map +1 -0
  295. package/dist/mcp-advisor/types.d.ts +209 -0
  296. package/dist/mcp-advisor/types.d.ts.map +1 -0
  297. package/dist/migrations/backfill-tracker.d.ts +84 -0
  298. package/dist/migrations/backfill-tracker.d.ts.map +1 -0
  299. package/dist/migrations/backfill-tracker.js +118 -0
  300. package/dist/migrations/backfill-tracker.js.map +1 -0
  301. package/dist/migrations/checksum.d.ts +43 -0
  302. package/dist/migrations/checksum.d.ts.map +1 -0
  303. package/dist/migrations/checksum.js +32 -0
  304. package/dist/migrations/checksum.js.map +1 -0
  305. package/dist/migrations/differ.d.ts +186 -0
  306. package/dist/migrations/differ.d.ts.map +1 -0
  307. package/dist/migrations/differ.js +601 -0
  308. package/dist/migrations/differ.js.map +1 -0
  309. package/dist/migrations/generator.d.ts +133 -0
  310. package/dist/migrations/generator.d.ts.map +1 -0
  311. package/dist/migrations/generator.js +328 -0
  312. package/dist/migrations/generator.js.map +1 -0
  313. package/dist/migrations/index.d.ts +20 -0
  314. package/dist/migrations/index.d.ts.map +1 -0
  315. package/dist/migrations/orchestrate.d.ts +148 -0
  316. package/dist/migrations/orchestrate.d.ts.map +1 -0
  317. package/dist/migrations/orchestrate.js +118 -0
  318. package/dist/migrations/orchestrate.js.map +1 -0
  319. package/dist/migrations/tracker.d.ts +134 -0
  320. package/dist/migrations/tracker.d.ts.map +1 -0
  321. package/dist/migrations/tracker.js +624 -0
  322. package/dist/migrations/tracker.js.map +1 -0
  323. package/dist/migrations/types.d.ts +221 -0
  324. package/dist/migrations/types.d.ts.map +1 -0
  325. package/dist/migrations.d.ts +7 -0
  326. package/dist/migrations.d.ts.map +1 -0
  327. package/dist/migrations.js +26 -0
  328. package/dist/migrations.js.map +1 -0
  329. package/dist/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js +56 -0
  330. package/dist/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js.map +1 -0
  331. package/dist/node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js +163 -0
  332. package/dist/node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
  333. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/assert-valid-pattern.js +13 -0
  334. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  335. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/ast.js +654 -0
  336. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  337. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/brace-expressions.js +111 -0
  338. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  339. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/escape.js +10 -0
  340. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  341. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/index.js +824 -0
  342. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/index.js.map +1 -0
  343. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/unescape.js +10 -0
  344. package/dist/node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  345. package/dist/object.d.ts +1202 -0
  346. package/dist/object.d.ts.map +1 -0
  347. package/dist/object.js +2731 -0
  348. package/dist/object.js.map +1 -0
  349. package/dist/polymorphic-association.d.ts +69 -0
  350. package/dist/polymorphic-association.d.ts.map +1 -0
  351. package/dist/polymorphic-association.js +96 -0
  352. package/dist/polymorphic-association.js.map +1 -0
  353. package/dist/prebuild/cli.d.ts +7 -0
  354. package/dist/prebuild/cli.d.ts.map +1 -0
  355. package/dist/prebuild/cli.js +29 -0
  356. package/dist/prebuild/cli.js.map +1 -0
  357. package/dist/prebuild/index.d.ts +22 -0
  358. package/dist/prebuild/index.d.ts.map +1 -0
  359. package/dist/prebuild/index.js +239 -0
  360. package/dist/prebuild/index.js.map +1 -0
  361. package/dist/prebuild.d.ts +8 -0
  362. package/dist/prebuild.d.ts.map +1 -0
  363. package/dist/prebuild.js +6 -0
  364. package/dist/prebuild.js.map +1 -0
  365. package/dist/registry/cache-config.d.ts +13 -0
  366. package/dist/registry/cache-config.d.ts.map +1 -0
  367. package/dist/registry/cache-config.js +17 -0
  368. package/dist/registry/cache-config.js.map +1 -0
  369. package/dist/registry/class-registration.d.ts +31 -0
  370. package/dist/registry/class-registration.d.ts.map +1 -0
  371. package/dist/registry/class-registration.js +1074 -0
  372. package/dist/registry/class-registration.js.map +1 -0
  373. package/dist/registry/collection-resolution.d.ts +45 -0
  374. package/dist/registry/collection-resolution.d.ts.map +1 -0
  375. package/dist/registry/collection-resolution.js +121 -0
  376. package/dist/registry/collection-resolution.js.map +1 -0
  377. package/dist/registry/collision-policy.d.ts +179 -0
  378. package/dist/registry/collision-policy.d.ts.map +1 -0
  379. package/dist/registry/collision-policy.js +153 -0
  380. package/dist/registry/collision-policy.js.map +1 -0
  381. package/dist/registry/diagnostics.d.ts +58 -0
  382. package/dist/registry/diagnostics.d.ts.map +1 -0
  383. package/dist/registry/diagnostics.js +54 -0
  384. package/dist/registry/diagnostics.js.map +1 -0
  385. package/dist/registry/embedding-manager.d.ts +23 -0
  386. package/dist/registry/embedding-manager.d.ts.map +1 -0
  387. package/dist/registry/embedding-manager.js +62 -0
  388. package/dist/registry/embedding-manager.js.map +1 -0
  389. package/dist/registry/index.d.ts +13 -0
  390. package/dist/registry/index.d.ts.map +1 -0
  391. package/dist/registry/inheritance-resolver.d.ts +13 -0
  392. package/dist/registry/inheritance-resolver.d.ts.map +1 -0
  393. package/dist/registry/inheritance-resolver.js +244 -0
  394. package/dist/registry/inheritance-resolver.js.map +1 -0
  395. package/dist/registry/manifest-field-merge.d.ts +4 -0
  396. package/dist/registry/manifest-field-merge.d.ts.map +1 -0
  397. package/dist/registry/manifest-field-merge.js +82 -0
  398. package/dist/registry/manifest-field-merge.js.map +1 -0
  399. package/dist/registry/name-resolver.d.ts +102 -0
  400. package/dist/registry/name-resolver.d.ts.map +1 -0
  401. package/dist/registry/name-resolver.js +241 -0
  402. package/dist/registry/name-resolver.js.map +1 -0
  403. package/dist/registry/relationship-graph.d.ts +16 -0
  404. package/dist/registry/relationship-graph.d.ts.map +1 -0
  405. package/dist/registry/relationship-graph.js +79 -0
  406. package/dist/registry/relationship-graph.js.map +1 -0
  407. package/dist/registry/schema-builder.d.ts +113 -0
  408. package/dist/registry/schema-builder.d.ts.map +1 -0
  409. package/dist/registry/schema-builder.js +474 -0
  410. package/dist/registry/schema-builder.js.map +1 -0
  411. package/dist/registry/shared-state.d.ts +62 -0
  412. package/dist/registry/shared-state.d.ts.map +1 -0
  413. package/dist/registry/shared-state.js +135 -0
  414. package/dist/registry/shared-state.js.map +1 -0
  415. package/dist/registry/types.d.ts +667 -0
  416. package/dist/registry/types.d.ts.map +1 -0
  417. package/dist/registry/validator.d.ts +13 -0
  418. package/dist/registry/validator.d.ts.map +1 -0
  419. package/dist/registry/validator.js +138 -0
  420. package/dist/registry/validator.js.map +1 -0
  421. package/dist/registry.d.ts +1358 -0
  422. package/dist/registry.d.ts.map +1 -0
  423. package/dist/registry.js +2301 -0
  424. package/dist/registry.js.map +1 -0
  425. package/dist/runtime/client.d.ts +34 -0
  426. package/dist/runtime/client.d.ts.map +1 -0
  427. package/dist/runtime/client.js +104 -0
  428. package/dist/runtime/client.js.map +1 -0
  429. package/dist/runtime/index.d.ts +10 -0
  430. package/dist/runtime/index.d.ts.map +1 -0
  431. package/dist/runtime/mcp.d.ts +47 -0
  432. package/dist/runtime/mcp.d.ts.map +1 -0
  433. package/dist/runtime/mcp.js +72 -0
  434. package/dist/runtime/mcp.js.map +1 -0
  435. package/dist/runtime/server.d.ts +92 -0
  436. package/dist/runtime/server.d.ts.map +1 -0
  437. package/dist/runtime/server.js +390 -0
  438. package/dist/runtime/server.js.map +1 -0
  439. package/dist/runtime/types.d.ts +58 -0
  440. package/dist/runtime/types.d.ts.map +1 -0
  441. package/dist/runtime.d.ts +8 -0
  442. package/dist/runtime.d.ts.map +1 -0
  443. package/dist/runtime.js +10 -0
  444. package/dist/runtime.js.map +1 -0
  445. package/dist/scanner/import-scanner.d.ts +7 -0
  446. package/dist/scanner/import-scanner.d.ts.map +1 -0
  447. package/dist/scanner/index.d.ts +12 -0
  448. package/dist/scanner/index.d.ts.map +1 -0
  449. package/dist/scanner/manifest-generator.d.ts +304 -0
  450. package/dist/scanner/manifest-generator.d.ts.map +1 -0
  451. package/dist/scanner/manifest-generator.js +1707 -0
  452. package/dist/scanner/manifest-generator.js.map +1 -0
  453. package/dist/scanner/test-file-patterns.d.ts +18 -0
  454. package/dist/scanner/test-file-patterns.d.ts.map +1 -0
  455. package/dist/scanner/test-file-patterns.js +16 -0
  456. package/dist/scanner/test-file-patterns.js.map +1 -0
  457. package/dist/scanner/types.d.ts +313 -0
  458. package/dist/scanner/types.d.ts.map +1 -0
  459. package/dist/scanner/types.js +2 -0
  460. package/dist/scanner/types.js.map +1 -0
  461. package/dist/scanner.d.ts +6 -0
  462. package/dist/scanner.d.ts.map +1 -0
  463. package/dist/scanner.js +6 -0
  464. package/dist/scanner.js.map +1 -0
  465. package/dist/schema/code-generator.d.ts +53 -0
  466. package/dist/schema/code-generator.d.ts.map +1 -0
  467. package/dist/schema/ddl/base-strategy.d.ts +80 -0
  468. package/dist/schema/ddl/base-strategy.d.ts.map +1 -0
  469. package/dist/schema/ddl/base-strategy.js +240 -0
  470. package/dist/schema/ddl/base-strategy.js.map +1 -0
  471. package/dist/schema/ddl/duckdb-strategy.d.ts +33 -0
  472. package/dist/schema/ddl/duckdb-strategy.d.ts.map +1 -0
  473. package/dist/schema/ddl/duckdb-strategy.js +74 -0
  474. package/dist/schema/ddl/duckdb-strategy.js.map +1 -0
  475. package/dist/schema/ddl/index.d.ts +53 -0
  476. package/dist/schema/ddl/index.d.ts.map +1 -0
  477. package/dist/schema/ddl/index.js +80 -0
  478. package/dist/schema/ddl/index.js.map +1 -0
  479. package/dist/schema/ddl/json-duckdb-strategy.d.ts +8 -0
  480. package/dist/schema/ddl/json-duckdb-strategy.d.ts.map +1 -0
  481. package/dist/schema/ddl/json-duckdb-strategy.js +14 -0
  482. package/dist/schema/ddl/json-duckdb-strategy.js.map +1 -0
  483. package/dist/schema/ddl/postgres-strategy.d.ts +29 -0
  484. package/dist/schema/ddl/postgres-strategy.d.ts.map +1 -0
  485. package/dist/schema/ddl/postgres-strategy.js +102 -0
  486. package/dist/schema/ddl/postgres-strategy.js.map +1 -0
  487. package/dist/schema/ddl/sqlite-strategy.d.ts +38 -0
  488. package/dist/schema/ddl/sqlite-strategy.d.ts.map +1 -0
  489. package/dist/schema/ddl/sqlite-strategy.js +74 -0
  490. package/dist/schema/ddl/sqlite-strategy.js.map +1 -0
  491. package/dist/schema/ddl/types.d.ts +114 -0
  492. package/dist/schema/ddl/types.d.ts.map +1 -0
  493. package/dist/schema/generator.d.ts +176 -0
  494. package/dist/schema/generator.d.ts.map +1 -0
  495. package/dist/schema/generator.js +1076 -0
  496. package/dist/schema/generator.js.map +1 -0
  497. package/dist/schema/index-utils.d.ts +19 -0
  498. package/dist/schema/index-utils.d.ts.map +1 -0
  499. package/dist/schema/index-utils.js +32 -0
  500. package/dist/schema/index-utils.js.map +1 -0
  501. package/dist/schema/index.d.ts +13 -0
  502. package/dist/schema/index.d.ts.map +1 -0
  503. package/dist/schema/override-system.d.ts +43 -0
  504. package/dist/schema/override-system.d.ts.map +1 -0
  505. package/dist/schema/schema-aggregator.d.ts +112 -0
  506. package/dist/schema/schema-aggregator.d.ts.map +1 -0
  507. package/dist/schema/schema-manager.d.ts +95 -0
  508. package/dist/schema/schema-manager.d.ts.map +1 -0
  509. package/dist/schema/schema-manager.js +283 -0
  510. package/dist/schema/schema-manager.js.map +1 -0
  511. package/dist/schema/sql-identifiers.d.ts +107 -0
  512. package/dist/schema/sql-identifiers.d.ts.map +1 -0
  513. package/dist/schema/sql-identifiers.js +190 -0
  514. package/dist/schema/sql-identifiers.js.map +1 -0
  515. package/dist/schema/table-verifier.d.ts +10 -0
  516. package/dist/schema/table-verifier.d.ts.map +1 -0
  517. package/dist/schema/table-verifier.js +37 -0
  518. package/dist/schema/table-verifier.js.map +1 -0
  519. package/dist/schema/types.d.ts +241 -0
  520. package/dist/schema/types.d.ts.map +1 -0
  521. package/dist/schema/utils.d.ts +32 -0
  522. package/dist/schema/utils.d.ts.map +1 -0
  523. package/dist/schema/utils.js +134 -0
  524. package/dist/schema/utils.js.map +1 -0
  525. package/dist/scripts/create-wrappers.js +89 -0
  526. package/dist/scripts/generate-manifest.js +155 -0
  527. package/dist/scripts/generate-test-manifest.js +77 -0
  528. package/dist/scripts/migrate-datetime-to-timestamp.ts +310 -0
  529. package/dist/scripts/prepack.js +49 -0
  530. package/dist/signals/bus.d.ts +64 -0
  531. package/dist/signals/bus.d.ts.map +1 -0
  532. package/dist/signals/bus.js +102 -0
  533. package/dist/signals/bus.js.map +1 -0
  534. package/dist/signals/index.d.ts +11 -0
  535. package/dist/signals/index.d.ts.map +1 -0
  536. package/dist/signals/sanitizer.d.ts +54 -0
  537. package/dist/signals/sanitizer.d.ts.map +1 -0
  538. package/dist/signals/sanitizer.js +111 -0
  539. package/dist/signals/sanitizer.js.map +1 -0
  540. package/dist/smrt-knowledge.json +335 -0
  541. package/dist/system/compatibility.d.ts +8 -0
  542. package/dist/system/compatibility.d.ts.map +1 -0
  543. package/dist/system/compatibility.js +409 -0
  544. package/dist/system/compatibility.js.map +1 -0
  545. package/dist/system/index.d.ts +9 -0
  546. package/dist/system/index.d.ts.map +1 -0
  547. package/dist/system/schema.d.ts +69 -0
  548. package/dist/system/schema.d.ts.map +1 -0
  549. package/dist/system/schema.js +271 -0
  550. package/dist/system/schema.js.map +1 -0
  551. package/dist/system/types.d.ts +135 -0
  552. package/dist/system/types.d.ts.map +1 -0
  553. package/dist/system-fields.d.ts +44 -0
  554. package/dist/system-fields.d.ts.map +1 -0
  555. package/dist/system-fields.js +55 -0
  556. package/dist/system-fields.js.map +1 -0
  557. package/dist/table-cache.d.ts +28 -0
  558. package/dist/table-cache.d.ts.map +1 -0
  559. package/dist/table-cache.js +21 -0
  560. package/dist/table-cache.js.map +1 -0
  561. package/dist/test-utils.d.ts +140 -0
  562. package/dist/test-utils.d.ts.map +1 -0
  563. package/dist/testing/database.d.ts +73 -0
  564. package/dist/testing/database.d.ts.map +1 -0
  565. package/dist/testing/database.js +204 -0
  566. package/dist/testing/database.js.map +1 -0
  567. package/dist/testing/index.d.ts +21 -0
  568. package/dist/testing/index.d.ts.map +1 -0
  569. package/dist/testing.d.ts +6 -0
  570. package/dist/testing.d.ts.map +1 -0
  571. package/dist/testing.js +5 -0
  572. package/dist/testing.js.map +1 -0
  573. package/dist/tools/index.d.ts +8 -0
  574. package/dist/tools/index.d.ts.map +1 -0
  575. package/dist/tools/tool-executor.d.ts +101 -0
  576. package/dist/tools/tool-executor.d.ts.map +1 -0
  577. package/dist/tools/tool-executor.js +142 -0
  578. package/dist/tools/tool-executor.js.map +1 -0
  579. package/dist/tools/tool-generator.d.ts +54 -0
  580. package/dist/tools/tool-generator.d.ts.map +1 -0
  581. package/dist/tools/tool-generator.js +121 -0
  582. package/dist/tools/tool-generator.js.map +1 -0
  583. package/dist/utils/chunk.d.ts +32 -0
  584. package/dist/utils/chunk.d.ts.map +1 -0
  585. package/dist/utils/chunk.js +14 -0
  586. package/dist/utils/chunk.js.map +1 -0
  587. package/dist/utils/import-workspace-module.d.ts +8 -0
  588. package/dist/utils/import-workspace-module.d.ts.map +1 -0
  589. package/dist/utils/import-workspace-module.js +81 -0
  590. package/dist/utils/import-workspace-module.js.map +1 -0
  591. package/dist/utils/json.d.ts +102 -0
  592. package/dist/utils/json.d.ts.map +1 -0
  593. package/dist/utils/json.js +43 -0
  594. package/dist/utils/json.js.map +1 -0
  595. package/dist/utils/lru-cache.d.ts +69 -0
  596. package/dist/utils/lru-cache.d.ts.map +1 -0
  597. package/dist/utils/lru-cache.js +100 -0
  598. package/dist/utils/lru-cache.js.map +1 -0
  599. package/dist/utils/naming.d.ts +16 -0
  600. package/dist/utils/naming.d.ts.map +1 -0
  601. package/dist/utils/naming.js +23 -0
  602. package/dist/utils/naming.js.map +1 -0
  603. package/dist/utils/qualified-names.d.ts +122 -0
  604. package/dist/utils/qualified-names.d.ts.map +1 -0
  605. package/dist/utils/qualified-names.js +82 -0
  606. package/dist/utils/qualified-names.js.map +1 -0
  607. package/dist/utils/scanner-module.d.ts +37 -0
  608. package/dist/utils/scanner-module.d.ts.map +1 -0
  609. package/dist/utils.d.ts +177 -0
  610. package/dist/utils.d.ts.map +1 -0
  611. package/dist/utils.js +185 -0
  612. package/dist/utils.js.map +1 -0
  613. package/dist/vite-plugin/import-build-aware.d.ts +68 -0
  614. package/dist/vite-plugin/import-build-aware.d.ts.map +1 -0
  615. package/dist/vite-plugin/import-build-aware.js +72 -0
  616. package/dist/vite-plugin/import-build-aware.js.map +1 -0
  617. package/dist/vite-plugin/index.d.ts +59 -0
  618. package/dist/vite-plugin/index.d.ts.map +1 -0
  619. package/dist/vite-plugin/index.js +1400 -0
  620. package/dist/vite-plugin/index.js.map +1 -0
  621. package/dist/vite-plugin/sveltekit-generator.d.ts +66 -0
  622. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -0
  623. package/dist/vite-plugin/sveltekit-generator.js +1375 -0
  624. package/dist/vite-plugin/sveltekit-generator.js.map +1 -0
  625. package/dist/vite-plugin/templates/default-ui.ts +432 -0
  626. package/dist/vite-plugin/templates/default.html +206 -0
  627. package/dist/vite-plugin.d.ts +8 -0
  628. package/dist/vite-plugin.d.ts.map +1 -0
  629. package/dist/vite-plugin.js +11 -0
  630. package/dist/vite-plugin.js.map +1 -0
  631. package/package.json +208 -0
@@ -0,0 +1,153 @@
1
+ const ROWS = [
2
+ // --- Cross-origin: constructor identity and stub replacement ----------
3
+ {
4
+ scenario: "same-constructor-reregistration",
5
+ match: (i) => i.sameConstructor,
6
+ policy: "accept",
7
+ reason: () => "Same constructor identity — module re-evaluation. Update metadata only."
8
+ },
9
+ {
10
+ // Decorator-only: the decorator fires after a manifest builder
11
+ // pre-registered a stub placeholder under this name. The real class
12
+ // takes over. Manifest-origin stub-to-stub arrivals fall through to
13
+ // the source-file / STI rows instead.
14
+ scenario: "manifest-stub-replacement",
15
+ match: (i) => i.origin === "decorator" && i.existingIsManifestStub && !i.sameConstructor,
16
+ policy: "replace",
17
+ reason: () => "Existing entry is a manifest stub placeholder; the real implementation takes over."
18
+ },
19
+ // --- Manifest-origin rows (checked before decorator-origin) -----------
20
+ {
21
+ scenario: "manifest-same-source-file",
22
+ match: (i) => i.origin === "manifest" && i.sameSourceFile,
23
+ policy: "skip",
24
+ reason: () => "Same source file — consumer manifest re-export, not a real collision."
25
+ },
26
+ {
27
+ scenario: "manifest-sti-child-wins",
28
+ match: (i) => i.origin === "manifest" && i.newExtendsExisting && !i.existingExtendsNew,
29
+ policy: "replace",
30
+ reason: () => "Manifest entry extends existing — STI child wins over parent."
31
+ },
32
+ {
33
+ scenario: "manifest-sti-parent-skip",
34
+ match: (i) => i.origin === "manifest" && i.existingExtendsNew && !i.newExtendsExisting,
35
+ policy: "skip",
36
+ reason: () => "Existing entry is the STI child of the incoming manifest parent; keep the child."
37
+ },
38
+ {
39
+ // Uses `existingHasAnyPackage` not `existingIsPackageQualified`: the
40
+ // pre-Release-C `allowCoexistingQualifiedRegistration` check only
41
+ // required both packages to be present and differ, regardless of
42
+ // whether they were scoped (`@scope/pkg`) or unscoped (`smrt-profiles`).
43
+ // Narrowing to scoped would silently drop coexistence for unscoped
44
+ // manifests. See PR #1140 review (willgriffin P2 at line 251).
45
+ scenario: "manifest-different-packages-qualified-coexist",
46
+ match: (i) => i.origin === "manifest" && !i.samePackage && i.hasNewQualifiedKey && i.existingHasAnyPackage,
47
+ policy: "coexist-qualified",
48
+ reason: () => "Different packages share a simple name; both registrations live under their qualified keys (issue #951)."
49
+ },
50
+ {
51
+ // Covers three related scenarios:
52
+ // (a) `samePackage` — decorator + manifest from the same
53
+ // package land on the same class; merge fields (issue #1000).
54
+ // (b) `existingHasNoPackage` — source registration hasn't been
55
+ // promoted to a qualified key yet and a manifest now provides
56
+ // the package identity (issue #951:144-200). The merge runs
57
+ // AND the caller aliases the existing entry under the new
58
+ // qualified key.
59
+ // (c) The same scenarios when the existing entry is a manifest
60
+ // stub from an earlier unqualified/local manifest registration
61
+ // — the pre-Release-C code merged whenever
62
+ // `!existing.packageName || packageName === existing.packageName`
63
+ // regardless of stub status. Release C preserves that: removing
64
+ // the `!existingIsManifestStub` gate lets a later
65
+ // package-qualified manifest upgrade a stub's fields + alias
66
+ // under the qualified key. See PR #1140 review (willgriffin P1
67
+ // at line 270).
68
+ scenario: "manifest-same-package-merge",
69
+ match: (i) => i.origin === "manifest" && (i.samePackage || i.existingHasNoPackage && i.hasNewQualifiedKey) && i.hasManifestContent,
70
+ policy: "merge-manifest",
71
+ reason: () => "Manifest arriving for an existing same-package or unqualified source registration; fold fields in and alias the qualified key if keys differ."
72
+ },
73
+ {
74
+ scenario: "manifest-default-skip",
75
+ match: (i) => i.origin === "manifest",
76
+ policy: "skip",
77
+ reason: () => "Manifest collision with no inheritance relationship; keep existing entry (pre-Release-C resolveManifestCollision default)."
78
+ },
79
+ // --- Decorator-origin rows --------------------------------------------
80
+ {
81
+ scenario: "decorator-exact-match-same-package-external",
82
+ match: (i) => i.origin === "decorator" && i.matchKind === "exact-key" && i.existingIsPackageQualified && i.samePackage && !i.sameConstructor,
83
+ policy: "accept",
84
+ reason: () => "External package manifest entry being replaced by its own decorator-registered class (issue #584)."
85
+ },
86
+ {
87
+ // pnpm-dup allows unscoped package names (old code didn't gate on
88
+ // scoped-only). `samePackage` already requires both sides to have a
89
+ // packageName and match, so no extra existingHasAnyPackage check
90
+ // is needed.
91
+ scenario: "decorator-case-insensitive-pnpm-duplicate",
92
+ match: (i) => i.origin === "decorator" && i.matchKind === "case-insensitive" && i.existingKeyIsQualified && i.samePackage && i.sameName && !i.sameConstructor,
93
+ policy: "accept",
94
+ reason: () => "pnpm store duplicated the same package; different physical constructors but semantically identical."
95
+ },
96
+ {
97
+ scenario: "decorator-bundled-context-known-package",
98
+ match: (i) => i.origin === "decorator" && i.newInBundledContext && i.existingIsPackageQualified,
99
+ policy: "accept",
100
+ reason: () => "Bundled output duplicated a known package class across chunks; treat as re-registration."
101
+ },
102
+ {
103
+ scenario: "decorator-same-source-file",
104
+ match: (i) => i.origin === "decorator" && i.sameSourceFile,
105
+ policy: "accept",
106
+ reason: () => "Same source file — module re-evaluated (vitest test-isolation or HMR)."
107
+ },
108
+ {
109
+ scenario: "decorator-unknown-source-fallback",
110
+ match: (i) => i.origin === "decorator" && !i.bothSourceFilesKnown,
111
+ policy: "accept",
112
+ reason: () => "Source file unavailable for comparison; allow re-registration rather than block legitimate updates."
113
+ },
114
+ // --- Cross-origin STI fallbacks (used by decorator path; manifest
115
+ // path has its own explicit rows above that come first) ------------
116
+ {
117
+ scenario: "sti-child-wins",
118
+ match: (i) => i.newExtendsExisting && !i.existingExtendsNew,
119
+ policy: "replace",
120
+ reason: () => "New class extends existing — STI child wins over parent."
121
+ },
122
+ {
123
+ scenario: "sti-parent-skip",
124
+ match: (i) => i.existingExtendsNew && !i.newExtendsExisting,
125
+ policy: "skip",
126
+ reason: () => "Existing entry extends new — STI child already registered."
127
+ },
128
+ // --- Default: unresolvable decorator collision ------------------------
129
+ {
130
+ scenario: "true-collision",
131
+ match: () => true,
132
+ policy: "throw",
133
+ reason: () => "Different constructors, different source files, no inheritance relationship. Unresolvable collision."
134
+ }
135
+ ];
136
+ function decideCollisionPolicy(inputs) {
137
+ for (const row of ROWS) {
138
+ if (row.match(inputs)) {
139
+ return {
140
+ policy: row.policy,
141
+ scenario: row.scenario,
142
+ reason: row.reason(inputs)
143
+ };
144
+ }
145
+ }
146
+ throw new Error(
147
+ `decideCollisionPolicy: no row matched (should be unreachable). Inputs: ${JSON.stringify(inputs)}`
148
+ );
149
+ }
150
+ export {
151
+ decideCollisionPolicy
152
+ };
153
+ //# sourceMappingURL=collision-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collision-policy.js","sources":["../../src/registry/collision-policy.ts"],"sourcesContent":["/**\n * Release C (#1134) — unified collision policy for class registration.\n *\n * `register()` and `registerFromManifest()` both need to decide what to do\n * when a new registration lands on an existing class with the same (or a\n * case-insensitive-matching) name. Before Release C the decision logic was\n * a ~300-line if/else tree duplicated across three code paths:\n *\n * - `register()` exact-match branch (class-registration.ts:159-275)\n * - `register()` case-insensitive branch (class-registration.ts:286-391)\n * - `resolveManifestCollision()` (class-registration.ts:876-929)\n *\n * This module collapses all three onto a single decision table. Each row\n * names a scenario that exists in the current test suite; the row order\n * encodes specificity (first match wins).\n *\n * # Invocation contract\n *\n * `decideCollisionPolicy(inputs)` is ONLY called when the caller has already\n * identified exactly one colliding candidate for the new registration. Two\n * cases MUST be handled upstream without consulting the table:\n *\n * 1. No colliding candidate exists → register fresh.\n * 2. Ambiguous simple name matches >1 existing entry across different\n * packages (`getCanonicalClassName()` returns undefined) → fall through\n * to the exact-key path and allow coexistence under qualified keys.\n * See issue #951 for the semantics being preserved.\n *\n * Feeding the ambiguous case through the table would lose the\n * `coexist-qualified` behavior that's crucial for multi-package apps.\n *\n * @see https://github.com/happyvertical/smrt/issues/1134\n */\n\nexport type RegistrationOrigin = 'decorator' | 'manifest';\n\n/**\n * How the colliding candidate was identified.\n *\n * - `exact-key` : `classes.get(name)` returned the candidate.\n * `existingKey === name`.\n * - `case-insensitive` : Iteration found a case-insensitive match on\n * either the registry key or the entry's `name`\n * property. `existingKey !== name`.\n * - `canonical-name` : Looked up via `getCanonicalClassName(simpleName)`\n * — unambiguous single match under a lowered\n * simple name. Used by the manifest path.\n */\nexport type MatchKind = 'exact-key' | 'case-insensitive' | 'canonical-name';\n\nexport type Policy =\n /** Keep existing identity, update metadata via `upsertExistingEntry`. */\n | 'accept'\n /** Drop existing, register new as replacement. */\n | 'replace'\n /**\n * Fold manifest fields into existing registration. The **caller MUST**:\n * (1) call `mergeManifestIntoExistingRegistration(existing, objectDef, packageName)`\n * (2) if `registrationKey !== existingCanonical`, alias the existing entry\n * under `registrationKey` via `classes.set()` + `constructorIndex.set()`\n * Both steps together preserve the `issue-951:144-200` contract.\n */\n | 'merge-manifest'\n /**\n * Different packages, different qualified keys. Both registrations stay\n * in the classes Map under their respective qualified keys. Ambiguity is\n * surfaced at `findClass` time. Preserves issue #951.\n */\n | 'coexist-qualified'\n /** Existing wins; silently ignore the new registration. */\n | 'skip'\n /** Unresolvable collision — raise a user-facing error. */\n | 'throw';\n\n/**\n * Every signal the decision table can read. Computed by the caller from\n * inspection of the new and existing registrations.\n */\nexport interface CollisionInputs {\n readonly origin: RegistrationOrigin;\n readonly matchKind: MatchKind;\n\n /** `new.ctor === existing.constructor` (decorator path only; false for manifest). */\n readonly sameConstructor: boolean;\n\n /** `new.sourceFile === existing.sourceFilePath`, both truthy. */\n readonly sameSourceFile: boolean;\n\n /** Both the new and existing registrations have known source files. */\n readonly bothSourceFilesKnown: boolean;\n\n /** `existing.constructor._isManifestStub === true`. */\n readonly existingIsManifestStub: boolean;\n\n /**\n * New registration's source file lives in a bundled output directory\n * (`.svelte-kit/output/`, `/dist/`, `/build/`, `.next/`, `.nuxt/`).\n */\n readonly newInBundledContext: boolean;\n\n /**\n * New class extends existing.\n * - decorator path: `new.ctor.prototype instanceof existing.constructor`\n * - manifest path : `new.objectDef.extends` names existing\n */\n readonly newExtendsExisting: boolean;\n\n /** Inverse direction: existing extends new. */\n readonly existingExtendsNew: boolean;\n\n /** `new.packageName === existing.packageName` (both truthy). */\n readonly samePackage: boolean;\n\n /**\n * `existing.packageName?.startsWith('@')` — existing entry came from a\n * **scoped** package manifest (e.g. `@happyvertical/smrt-core`). Used by\n * the external-package-replace (#584) and bundled-context scenarios\n * that were gated on `@` in pre-Release-C code.\n */\n readonly existingIsPackageQualified: boolean;\n\n /**\n * Existing entry carries any packageName, scoped or not. Broader than\n * `existingIsPackageQualified`. Used for the different-packages\n * coexistence scenario where pre-Release-C code only required both\n * packageNames to be present and different (unscoped manifests like\n * `smrt-profiles` count here).\n */\n readonly existingHasAnyPackage: boolean;\n\n /**\n * Case-sensitive equality between `new.name` and `existing.name`.\n * Used to distinguish a pnpm-duplicate (same exact name) from a genuine\n * case-insensitive collision (different names that lower to the same string).\n */\n readonly sameName: boolean;\n\n /**\n * New registration has (or can derive) a qualified key `@pkg:Name`.\n * Paired with `existingIsPackageQualified` to drive the different-packages\n * coexistence behavior from issue #951.\n */\n readonly hasNewQualifiedKey: boolean;\n\n /**\n * Existing registry key contains a `:` separator. Needed alongside\n * `existingIsPackageQualified` to identify valid pnpm-dup candidates\n * (old code required both).\n */\n readonly existingKeyIsQualified: boolean;\n\n /**\n * Manifest-origin only: the incoming `objectDef` carries at least one of\n * `fields`, `methods`, `schema`, or `decoratorConfig`. Without that, the\n * merge path has nothing to fold in and the caller should skip the\n * merge-manifest policy entirely.\n */\n readonly hasManifestContent: boolean;\n\n /**\n * Manifest-origin only: the new registration's qualified key differs\n * from the existing entry's canonical key. When true and the policy is\n * `merge-manifest`, the caller MUST also alias the existing entry under\n * the new qualified key (step 2 of the merge-manifest contract).\n */\n readonly registrationKeyDiffersFromExistingKey: boolean;\n\n /**\n * Existing registration has no `packageName` set. Distinct from\n * `!samePackage`: this specifically means the existing entry is a bare\n * source registration waiting for a package manifest to promote it. When\n * true and the new registration carries a packageName, merge-manifest\n * treats it as promotion rather than collision.\n */\n readonly existingHasNoPackage: boolean;\n}\n\nexport interface PolicyDecision {\n readonly policy: Policy;\n /** Stable id. Matches the scenario name in the test suite 1-to-1. */\n readonly scenario: string;\n /** Human-readable explanation. Used by verboseLog + the error message. */\n readonly reason: string;\n}\n\ninterface Row {\n readonly scenario: string;\n readonly match: (inputs: CollisionInputs) => boolean;\n readonly policy: Policy;\n readonly reason: (inputs: CollisionInputs) => string;\n}\n\n/**\n * Ordered decision table. First row whose `match` returns true wins.\n * Order reflects specificity — scenarios that narrow down earlier\n * scenarios come before them.\n *\n * Each row is named to match a scenario in the test suite so a reviewer\n * can bisect one-to-one between \"new class extends existing\" (the code)\n * and \"sti-child-wins\" (the test row and the verbose-log output).\n */\nconst ROWS: readonly Row[] = [\n // --- Cross-origin: constructor identity and stub replacement ----------\n\n {\n scenario: 'same-constructor-reregistration',\n match: (i) => i.sameConstructor,\n policy: 'accept',\n reason: () =>\n 'Same constructor identity — module re-evaluation. Update metadata only.',\n },\n\n {\n // Decorator-only: the decorator fires after a manifest builder\n // pre-registered a stub placeholder under this name. The real class\n // takes over. Manifest-origin stub-to-stub arrivals fall through to\n // the source-file / STI rows instead.\n scenario: 'manifest-stub-replacement',\n match: (i) =>\n i.origin === 'decorator' &&\n i.existingIsManifestStub &&\n !i.sameConstructor,\n policy: 'replace',\n reason: () =>\n 'Existing entry is a manifest stub placeholder; the real implementation takes over.',\n },\n\n // --- Manifest-origin rows (checked before decorator-origin) -----------\n\n {\n scenario: 'manifest-same-source-file',\n match: (i) => i.origin === 'manifest' && i.sameSourceFile,\n policy: 'skip',\n reason: () =>\n 'Same source file — consumer manifest re-export, not a real collision.',\n },\n\n {\n scenario: 'manifest-sti-child-wins',\n match: (i) =>\n i.origin === 'manifest' && i.newExtendsExisting && !i.existingExtendsNew,\n policy: 'replace',\n reason: () =>\n 'Manifest entry extends existing — STI child wins over parent.',\n },\n\n {\n scenario: 'manifest-sti-parent-skip',\n match: (i) =>\n i.origin === 'manifest' && i.existingExtendsNew && !i.newExtendsExisting,\n policy: 'skip',\n reason: () =>\n 'Existing entry is the STI child of the incoming manifest parent; keep the child.',\n },\n\n {\n // Uses `existingHasAnyPackage` not `existingIsPackageQualified`: the\n // pre-Release-C `allowCoexistingQualifiedRegistration` check only\n // required both packages to be present and differ, regardless of\n // whether they were scoped (`@scope/pkg`) or unscoped (`smrt-profiles`).\n // Narrowing to scoped would silently drop coexistence for unscoped\n // manifests. See PR #1140 review (willgriffin P2 at line 251).\n scenario: 'manifest-different-packages-qualified-coexist',\n match: (i) =>\n i.origin === 'manifest' &&\n !i.samePackage &&\n i.hasNewQualifiedKey &&\n i.existingHasAnyPackage,\n policy: 'coexist-qualified',\n reason: () =>\n 'Different packages share a simple name; both registrations live under their qualified keys (issue #951).',\n },\n\n {\n // Covers three related scenarios:\n // (a) `samePackage` — decorator + manifest from the same\n // package land on the same class; merge fields (issue #1000).\n // (b) `existingHasNoPackage` — source registration hasn't been\n // promoted to a qualified key yet and a manifest now provides\n // the package identity (issue #951:144-200). The merge runs\n // AND the caller aliases the existing entry under the new\n // qualified key.\n // (c) The same scenarios when the existing entry is a manifest\n // stub from an earlier unqualified/local manifest registration\n // — the pre-Release-C code merged whenever\n // `!existing.packageName || packageName === existing.packageName`\n // regardless of stub status. Release C preserves that: removing\n // the `!existingIsManifestStub` gate lets a later\n // package-qualified manifest upgrade a stub's fields + alias\n // under the qualified key. See PR #1140 review (willgriffin P1\n // at line 270).\n scenario: 'manifest-same-package-merge',\n match: (i) =>\n i.origin === 'manifest' &&\n (i.samePackage || (i.existingHasNoPackage && i.hasNewQualifiedKey)) &&\n i.hasManifestContent,\n policy: 'merge-manifest',\n reason: () =>\n 'Manifest arriving for an existing same-package or unqualified source registration; fold fields in and alias the qualified key if keys differ.',\n },\n\n {\n scenario: 'manifest-default-skip',\n match: (i) => i.origin === 'manifest',\n policy: 'skip',\n reason: () =>\n 'Manifest collision with no inheritance relationship; keep existing entry (pre-Release-C resolveManifestCollision default).',\n },\n\n // --- Decorator-origin rows --------------------------------------------\n\n {\n scenario: 'decorator-exact-match-same-package-external',\n match: (i) =>\n i.origin === 'decorator' &&\n i.matchKind === 'exact-key' &&\n i.existingIsPackageQualified &&\n i.samePackage &&\n !i.sameConstructor,\n policy: 'accept',\n reason: () =>\n 'External package manifest entry being replaced by its own decorator-registered class (issue #584).',\n },\n\n {\n // pnpm-dup allows unscoped package names (old code didn't gate on\n // scoped-only). `samePackage` already requires both sides to have a\n // packageName and match, so no extra existingHasAnyPackage check\n // is needed.\n scenario: 'decorator-case-insensitive-pnpm-duplicate',\n match: (i) =>\n i.origin === 'decorator' &&\n i.matchKind === 'case-insensitive' &&\n i.existingKeyIsQualified &&\n i.samePackage &&\n i.sameName &&\n !i.sameConstructor,\n policy: 'accept',\n reason: () =>\n 'pnpm store duplicated the same package; different physical constructors but semantically identical.',\n },\n\n {\n scenario: 'decorator-bundled-context-known-package',\n match: (i) =>\n i.origin === 'decorator' &&\n i.newInBundledContext &&\n i.existingIsPackageQualified,\n policy: 'accept',\n reason: () =>\n 'Bundled output duplicated a known package class across chunks; treat as re-registration.',\n },\n\n {\n scenario: 'decorator-same-source-file',\n match: (i) => i.origin === 'decorator' && i.sameSourceFile,\n policy: 'accept',\n reason: () =>\n 'Same source file — module re-evaluated (vitest test-isolation or HMR).',\n },\n\n {\n scenario: 'decorator-unknown-source-fallback',\n match: (i) => i.origin === 'decorator' && !i.bothSourceFilesKnown,\n policy: 'accept',\n reason: () =>\n 'Source file unavailable for comparison; allow re-registration rather than block legitimate updates.',\n },\n\n // --- Cross-origin STI fallbacks (used by decorator path; manifest\n // path has its own explicit rows above that come first) ------------\n\n {\n scenario: 'sti-child-wins',\n match: (i) => i.newExtendsExisting && !i.existingExtendsNew,\n policy: 'replace',\n reason: () => 'New class extends existing — STI child wins over parent.',\n },\n\n {\n scenario: 'sti-parent-skip',\n match: (i) => i.existingExtendsNew && !i.newExtendsExisting,\n policy: 'skip',\n reason: () => 'Existing entry extends new — STI child already registered.',\n },\n\n // --- Default: unresolvable decorator collision ------------------------\n\n {\n scenario: 'true-collision',\n match: () => true,\n policy: 'throw',\n reason: () =>\n 'Different constructors, different source files, no inheritance relationship. Unresolvable collision.',\n },\n];\n\n/**\n * Resolve a collision to a policy. See module docstring for the invocation\n * contract — callers MUST NOT invoke this for the no-candidate or\n * ambiguous-simple-name cases.\n */\nexport function decideCollisionPolicy(inputs: CollisionInputs): PolicyDecision {\n for (const row of ROWS) {\n if (row.match(inputs)) {\n return {\n policy: row.policy,\n scenario: row.scenario,\n reason: row.reason(inputs),\n };\n }\n }\n // Unreachable — `true-collision` is the final catch-all.\n throw new Error(\n `decideCollisionPolicy: no row matched (should be unreachable). Inputs: ${JSON.stringify(inputs)}`,\n );\n}\n\n/** Test-only: expose the row list so integration tests can scenario-id. */\nexport const __POLICY_ROWS_FOR_TEST: readonly Row[] = ROWS;\n"],"names":[],"mappings":"AAyMA,MAAM,OAAuB;AAAA;AAAA,EAG3B;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE;AAAA,IAChB,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,eACb,EAAE,0BACF,CAAC,EAAE;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA;AAAA,EAKJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE,WAAW,cAAc,EAAE;AAAA,IAC3C,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,cAAc,EAAE,sBAAsB,CAAC,EAAE;AAAA,IACxD,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,cAAc,EAAE,sBAAsB,CAAC,EAAE;AAAA,IACxD,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,cACb,CAAC,EAAE,eACH,EAAE,sBACF,EAAE;AAAA,IACJ,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAkBE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,eACZ,EAAE,eAAgB,EAAE,wBAAwB,EAAE,uBAC/C,EAAE;AAAA,IACJ,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE,WAAW;AAAA,IAC3B,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA;AAAA,EAKJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,eACb,EAAE,cAAc,eAChB,EAAE,8BACF,EAAE,eACF,CAAC,EAAE;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,eACb,EAAE,cAAc,sBAChB,EAAE,0BACF,EAAE,eACF,EAAE,YACF,CAAC,EAAE;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MACN,EAAE,WAAW,eACb,EAAE,uBACF,EAAE;AAAA,IACJ,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE,WAAW,eAAe,EAAE;AAAA,IAC5C,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA,EAGJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE,WAAW,eAAe,CAAC,EAAE;AAAA,IAC7C,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAAA;AAAA;AAAA,EAMJ;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAAE;AAAA,IACzC,QAAQ;AAAA,IACR,QAAQ,MAAM;AAAA,EAAA;AAAA,EAGhB;AAAA,IACE,UAAU;AAAA,IACV,OAAO,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAAE;AAAA,IACzC,QAAQ;AAAA,IACR,QAAQ,MAAM;AAAA,EAAA;AAAA;AAAA,EAKhB;AAAA,IACE,UAAU;AAAA,IACV,OAAO,MAAM;AAAA,IACb,QAAQ;AAAA,IACR,QAAQ,MACN;AAAA,EAAA;AAEN;AAOO,SAAS,sBAAsB,QAAyC;AAC7E,aAAW,OAAO,MAAM;AACtB,QAAI,IAAI,MAAM,MAAM,GAAG;AACrB,aAAO;AAAA,QACL,QAAQ,IAAI;AAAA,QACZ,UAAU,IAAI;AAAA,QACd,QAAQ,IAAI,OAAO,MAAM;AAAA,MAAA;AAAA,IAE7B;AAAA,EACF;AAEA,QAAM,IAAI;AAAA,IACR,0EAA0E,KAAK,UAAU,MAAM,CAAC;AAAA,EAAA;AAEpG;"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Registry diagnostic collector.
3
+ *
4
+ * ObjectRegistry's manifest-loading paths previously swallowed failure
5
+ * modes with `console.warn(...); return null`. That was fine for the
6
+ * average case but made #1132-style debugging hard: the only evidence of
7
+ * the problem was fields silently missing at save time.
8
+ *
9
+ * This module is the collection point for those failures. Callers
10
+ * `record()` a diagnostic when they would otherwise `console.warn`; apps
11
+ * and tests can call `ObjectRegistry.getDiagnostics()` to inspect what
12
+ * was missed.
13
+ *
14
+ * Release A shipped the collector as passive (off-by-default strict).
15
+ * Release C (#1134) flips strict mode to **on by default**: severity
16
+ * `'error'` diagnostics now throw at record time so misconfiguration
17
+ * surfaces at registration rather than at silent field-drop time. Opt
18
+ * out with `SMRT_STRICT_REGISTRY=false` if you have manifest-loading
19
+ * paths that must stay permissive (fix the underlying manifest issue
20
+ * instead when you can).
21
+ *
22
+ * @see https://github.com/happyvertical/smrt/issues/1132
23
+ * @see https://github.com/happyvertical/smrt/issues/1134
24
+ */
25
+ export type RegistryDiagnosticSeverity = 'warn' | 'error';
26
+ export interface RegistryDiagnostic {
27
+ severity: RegistryDiagnosticSeverity;
28
+ /** Stable machine-readable identifier, e.g., 'MANIFEST_LOAD_FAILED'. */
29
+ code: string;
30
+ /** Short human message. */
31
+ message: string;
32
+ /** Optional structured context (package name, path, etc.). */
33
+ context?: Record<string, unknown>;
34
+ /** Captured at record time. */
35
+ timestamp: number;
36
+ }
37
+ declare global {
38
+ var __smrtRegistryDiagnostics: RegistryDiagnostic[] | undefined;
39
+ }
40
+ /**
41
+ * Record a diagnostic from a registry load path.
42
+ *
43
+ * Always appends to the buffer. In strict mode (`SMRT_STRICT_REGISTRY=true`),
44
+ * severity `'error'` diagnostics also throw so the failure surfaces at the
45
+ * site of the drop instead of later during field access.
46
+ */
47
+ export declare function recordRegistryDiagnostic(severity: RegistryDiagnosticSeverity, code: string, message: string, context?: Record<string, unknown>): void;
48
+ /** Snapshot of diagnostics recorded so far. */
49
+ export declare function getRegistryDiagnostics(): readonly RegistryDiagnostic[];
50
+ /** Clear the diagnostic buffer — typically used in tests. */
51
+ export declare function clearRegistryDiagnostics(): void;
52
+ /**
53
+ * Pretty-print the diagnostic buffer to `console.warn` / `console.error`.
54
+ * Apps can call this at startup or on an error route to surface anything the
55
+ * registry swallowed. Does nothing if the buffer is empty.
56
+ */
57
+ export declare function flushRegistryDiagnostics(): void;
58
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/registry/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,0BAA0B,CAAC;IACrC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,yBAAyB,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;CACjE;AAoBD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,0BAA0B,EACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI,CAoBN;AAED,+CAA+C;AAC/C,wBAAgB,sBAAsB,IAAI,SAAS,kBAAkB,EAAE,CAEtE;AAED,6DAA6D;AAC7D,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAgB/C"}
@@ -0,0 +1,54 @@
1
+ import { createLogger } from "@happyvertical/logger";
2
+ const logger = createLogger({ level: "info" });
3
+ function getBuffer() {
4
+ if (!globalThis.__smrtRegistryDiagnostics) {
5
+ globalThis.__smrtRegistryDiagnostics = [];
6
+ }
7
+ return globalThis.__smrtRegistryDiagnostics;
8
+ }
9
+ function strictModeEnabled() {
10
+ return process.env.SMRT_STRICT_REGISTRY !== "false";
11
+ }
12
+ function recordRegistryDiagnostic(severity, code, message, context) {
13
+ const diagnostic = {
14
+ severity,
15
+ code,
16
+ message,
17
+ context,
18
+ timestamp: Date.now()
19
+ };
20
+ getBuffer().push(diagnostic);
21
+ if (severity === "error" && strictModeEnabled()) {
22
+ const suffix = context ? ` (${JSON.stringify(context)})` : "";
23
+ throw new Error(
24
+ `[smrt:${code}] ${message}${suffix} — set SMRT_STRICT_REGISTRY=false to record this diagnostic without throwing.`
25
+ );
26
+ }
27
+ }
28
+ function getRegistryDiagnostics() {
29
+ return [...getBuffer()];
30
+ }
31
+ function clearRegistryDiagnostics() {
32
+ getBuffer().length = 0;
33
+ }
34
+ function flushRegistryDiagnostics() {
35
+ const diagnostics = getBuffer();
36
+ if (diagnostics.length === 0) {
37
+ return;
38
+ }
39
+ for (const diag of diagnostics) {
40
+ const line = `[smrt:${diag.code}] ${diag.message}`;
41
+ if (diag.severity === "error") {
42
+ logger.error(line, diag.context);
43
+ } else {
44
+ logger.warn(line, diag.context);
45
+ }
46
+ }
47
+ }
48
+ export {
49
+ clearRegistryDiagnostics,
50
+ flushRegistryDiagnostics,
51
+ getRegistryDiagnostics,
52
+ recordRegistryDiagnostic
53
+ };
54
+ //# sourceMappingURL=diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.js","sources":["../../src/registry/diagnostics.ts"],"sourcesContent":["/**\n * Registry diagnostic collector.\n *\n * ObjectRegistry's manifest-loading paths previously swallowed failure\n * modes with `console.warn(...); return null`. That was fine for the\n * average case but made #1132-style debugging hard: the only evidence of\n * the problem was fields silently missing at save time.\n *\n * This module is the collection point for those failures. Callers\n * `record()` a diagnostic when they would otherwise `console.warn`; apps\n * and tests can call `ObjectRegistry.getDiagnostics()` to inspect what\n * was missed.\n *\n * Release A shipped the collector as passive (off-by-default strict).\n * Release C (#1134) flips strict mode to **on by default**: severity\n * `'error'` diagnostics now throw at record time so misconfiguration\n * surfaces at registration rather than at silent field-drop time. Opt\n * out with `SMRT_STRICT_REGISTRY=false` if you have manifest-loading\n * paths that must stay permissive (fix the underlying manifest issue\n * instead when you can).\n *\n * @see https://github.com/happyvertical/smrt/issues/1132\n * @see https://github.com/happyvertical/smrt/issues/1134\n */\n\nimport { createLogger } from '@happyvertical/logger';\n\nconst logger = createLogger({ level: 'info' });\n\nexport type RegistryDiagnosticSeverity = 'warn' | 'error';\n\nexport interface RegistryDiagnostic {\n severity: RegistryDiagnosticSeverity;\n /** Stable machine-readable identifier, e.g., 'MANIFEST_LOAD_FAILED'. */\n code: string;\n /** Short human message. */\n message: string;\n /** Optional structured context (package name, path, etc.). */\n context?: Record<string, unknown>;\n /** Captured at record time. */\n timestamp: number;\n}\n\ndeclare global {\n // eslint-disable-next-line no-var\n var __smrtRegistryDiagnostics: RegistryDiagnostic[] | undefined;\n}\n\nfunction getBuffer(): RegistryDiagnostic[] {\n if (!globalThis.__smrtRegistryDiagnostics) {\n globalThis.__smrtRegistryDiagnostics = [];\n }\n return globalThis.__smrtRegistryDiagnostics;\n}\n\n/**\n * Strict mode: ON by default (Release C, #1134).\n *\n * When true, severity `'error'` diagnostics throw at record time instead\n * of just appending to the buffer. Set `SMRT_STRICT_REGISTRY=false` to\n * restore the pre-Release-C permissive behavior.\n */\nfunction strictModeEnabled(): boolean {\n return process.env.SMRT_STRICT_REGISTRY !== 'false';\n}\n\n/**\n * Record a diagnostic from a registry load path.\n *\n * Always appends to the buffer. In strict mode (`SMRT_STRICT_REGISTRY=true`),\n * severity `'error'` diagnostics also throw so the failure surfaces at the\n * site of the drop instead of later during field access.\n */\nexport function recordRegistryDiagnostic(\n severity: RegistryDiagnosticSeverity,\n code: string,\n message: string,\n context?: Record<string, unknown>,\n): void {\n const diagnostic: RegistryDiagnostic = {\n severity,\n code,\n message,\n context,\n timestamp: Date.now(),\n };\n getBuffer().push(diagnostic);\n\n if (severity === 'error' && strictModeEnabled()) {\n const suffix = context ? ` (${JSON.stringify(context)})` : '';\n // The opt-out hint is load-bearing when this throw propagates out of a\n // `__smrt-register__.ts` side effect at module-import time — the\n // consumer may have no other recovery path visible in the stack.\n throw new Error(\n `[smrt:${code}] ${message}${suffix} — set SMRT_STRICT_REGISTRY=false ` +\n `to record this diagnostic without throwing.`,\n );\n }\n}\n\n/** Snapshot of diagnostics recorded so far. */\nexport function getRegistryDiagnostics(): readonly RegistryDiagnostic[] {\n return [...getBuffer()];\n}\n\n/** Clear the diagnostic buffer — typically used in tests. */\nexport function clearRegistryDiagnostics(): void {\n getBuffer().length = 0;\n}\n\n/**\n * Pretty-print the diagnostic buffer to `console.warn` / `console.error`.\n * Apps can call this at startup or on an error route to surface anything the\n * registry swallowed. Does nothing if the buffer is empty.\n */\nexport function flushRegistryDiagnostics(): void {\n const diagnostics = getBuffer();\n if (diagnostics.length === 0) {\n return;\n }\n\n for (const diag of diagnostics) {\n const line = `[smrt:${diag.code}] ${diag.message}`;\n // diag.context is already a structured object; pass it through directly\n // rather than nesting it under a redundant `context` key.\n if (diag.severity === 'error') {\n logger.error(line, diag.context);\n } else {\n logger.warn(line, diag.context);\n }\n }\n}\n"],"names":[],"mappings":";AA2BA,MAAM,SAAS,aAAa,EAAE,OAAO,QAAQ;AAqB7C,SAAS,YAAkC;AACzC,MAAI,CAAC,WAAW,2BAA2B;AACzC,eAAW,4BAA4B,CAAA;AAAA,EACzC;AACA,SAAO,WAAW;AACpB;AASA,SAAS,oBAA6B;AACpC,SAAO,QAAQ,IAAI,yBAAyB;AAC9C;AASO,SAAS,yBACd,UACA,MACA,SACA,SACM;AACN,QAAM,aAAiC;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,KAAK,IAAA;AAAA,EAAI;AAEtB,YAAA,EAAY,KAAK,UAAU;AAE3B,MAAI,aAAa,WAAW,qBAAqB;AAC/C,UAAM,SAAS,UAAU,KAAK,KAAK,UAAU,OAAO,CAAC,MAAM;AAI3D,UAAM,IAAI;AAAA,MACR,SAAS,IAAI,KAAK,OAAO,GAAG,MAAM;AAAA,IAAA;AAAA,EAGtC;AACF;AAGO,SAAS,yBAAwD;AACtE,SAAO,CAAC,GAAG,WAAW;AACxB;AAGO,SAAS,2BAAiC;AAC/C,YAAA,EAAY,SAAS;AACvB;AAOO,SAAS,2BAAiC;AAC/C,QAAM,cAAc,UAAA;AACpB,MAAI,YAAY,WAAW,GAAG;AAC5B;AAAA,EACF;AAEA,aAAW,QAAQ,aAAa;AAC9B,UAAM,OAAO,SAAS,KAAK,IAAI,KAAK,KAAK,OAAO;AAGhD,QAAI,KAAK,aAAa,SAAS;AAC7B,aAAO,MAAM,MAAM,KAAK,OAAO;AAAA,IACjC,OAAO;AACL,aAAO,KAAK,MAAM,KAAK,OAAO;AAAA,IAChC;AAAA,EACF;AACF;"}
@@ -0,0 +1,23 @@
1
+ import { ClassEmbeddingConfig, ProjectEmbeddingConfig, ResolvedEmbeddingConfig } from '../embeddings/types';
2
+ /**
3
+ * Get embedding configuration for a class.
4
+ */
5
+ export declare function getEmbeddingConfig(className: string): ClassEmbeddingConfig | undefined;
6
+ /**
7
+ * Check if a class has embeddings enabled.
8
+ */
9
+ export declare function hasEmbeddings(className: string): boolean;
10
+ /**
11
+ * Get all registered classes that have embeddings enabled.
12
+ */
13
+ export declare function getEmbeddingClasses(): string[];
14
+ /**
15
+ * Get project-level embedding configuration with defaults applied.
16
+ */
17
+ export declare function getProjectEmbeddingConfig(): ProjectEmbeddingConfig;
18
+ /**
19
+ * Resolve complete embedding configuration for a class.
20
+ * Merges project-level config with class-level overrides.
21
+ */
22
+ export declare function resolveEmbeddingConfig(className: string): ResolvedEmbeddingConfig | undefined;
23
+ //# sourceMappingURL=embedding-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedding-manager.d.ts","sourceRoot":"","sources":["../../src/registry/embedding-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAI7B;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,GAChB,oBAAoB,GAAG,SAAS,CAMlC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAGxD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAS9C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,sBAAsB,CAYlE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAChB,uBAAuB,GAAG,SAAS,CAmBrC"}
@@ -0,0 +1,62 @@
1
+ import { getSmrtModuleConfig } from "../config/global-config.js";
2
+ import { findClass } from "./name-resolver.js";
3
+ import { getClasses } from "./shared-state.js";
4
+ function getEmbeddingConfig(className) {
5
+ const registered = findClass(className);
6
+ if (!registered?.config?.embeddings) {
7
+ return void 0;
8
+ }
9
+ return registered.config.embeddings;
10
+ }
11
+ function hasEmbeddings(className) {
12
+ const config = getEmbeddingConfig(className);
13
+ return config !== void 0 && config.fields.length > 0;
14
+ }
15
+ function getEmbeddingClasses() {
16
+ const embeddingClasses = [];
17
+ for (const [_key, entry] of getClasses()) {
18
+ const simpleName = entry.name || _key;
19
+ if (hasEmbeddings(simpleName)) {
20
+ embeddingClasses.push(simpleName);
21
+ }
22
+ }
23
+ return embeddingClasses;
24
+ }
25
+ function getProjectEmbeddingConfig() {
26
+ const globalConfig = getSmrtModuleConfig("smrt", {});
27
+ const embeddingConfig = globalConfig?.embeddings;
28
+ return {
29
+ dimensions: embeddingConfig?.dimensions ?? 768,
30
+ provider: embeddingConfig?.provider ?? "local",
31
+ localModel: embeddingConfig?.localModel ?? "Xenova/bge-base-en-v1.5",
32
+ aiModel: embeddingConfig?.aiModel ?? "text-embedding-3-small",
33
+ fallbackToAI: embeddingConfig?.fallbackToAI ?? false,
34
+ storage: embeddingConfig?.storage ?? "json"
35
+ };
36
+ }
37
+ function resolveEmbeddingConfig(className) {
38
+ const classConfig = getEmbeddingConfig(className);
39
+ if (!classConfig) {
40
+ return void 0;
41
+ }
42
+ const projectConfig = getProjectEmbeddingConfig();
43
+ return {
44
+ fields: classConfig.fields,
45
+ combinedField: classConfig.combinedField,
46
+ dimensions: projectConfig.dimensions,
47
+ provider: classConfig.provider ?? projectConfig.provider,
48
+ localModel: projectConfig.localModel ?? "Xenova/bge-base-en-v1.5",
49
+ aiModel: projectConfig.aiModel ?? "text-embedding-3-small",
50
+ fallbackToAI: projectConfig.fallbackToAI ?? false,
51
+ autoGenerate: classConfig.autoGenerate ?? true,
52
+ regenerateOnChange: classConfig.regenerateOnChange ?? true
53
+ };
54
+ }
55
+ export {
56
+ getEmbeddingClasses,
57
+ getEmbeddingConfig,
58
+ getProjectEmbeddingConfig,
59
+ hasEmbeddings,
60
+ resolveEmbeddingConfig
61
+ };
62
+ //# sourceMappingURL=embedding-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedding-manager.js","sources":["../../src/registry/embedding-manager.ts"],"sourcesContent":["/**\n * Embedding configuration management for the SMRT ObjectRegistry.\n *\n * Handles class-level and project-level embedding config resolution.\n *\n * Extracted from registry.ts as part of issue #1006.\n * @see https://github.com/happyvertical/smrt/issues/1006\n */\n\nimport {\n getSmrtModuleConfig,\n type SmrtGlobalConfig,\n} from '../config/global-config.js';\nimport type {\n ClassEmbeddingConfig,\n ProjectEmbeddingConfig,\n ResolvedEmbeddingConfig,\n} from '../embeddings/types';\nimport { findClass } from './name-resolver';\nimport { getClasses } from './shared-state';\n\n/**\n * Get embedding configuration for a class.\n */\nexport function getEmbeddingConfig(\n className: string,\n): ClassEmbeddingConfig | undefined {\n const registered = findClass(className);\n if (!registered?.config?.embeddings) {\n return undefined;\n }\n return registered.config.embeddings as ClassEmbeddingConfig;\n}\n\n/**\n * Check if a class has embeddings enabled.\n */\nexport function hasEmbeddings(className: string): boolean {\n const config = getEmbeddingConfig(className);\n return config !== undefined && config.fields.length > 0;\n}\n\n/**\n * Get all registered classes that have embeddings enabled.\n */\nexport function getEmbeddingClasses(): string[] {\n const embeddingClasses: string[] = [];\n for (const [_key, entry] of getClasses()) {\n const simpleName = entry.name || _key;\n if (hasEmbeddings(simpleName)) {\n embeddingClasses.push(simpleName);\n }\n }\n return embeddingClasses;\n}\n\n/**\n * Get project-level embedding configuration with defaults applied.\n */\nexport function getProjectEmbeddingConfig(): ProjectEmbeddingConfig {\n const globalConfig = getSmrtModuleConfig<SmrtGlobalConfig>('smrt', {});\n const embeddingConfig = globalConfig?.embeddings;\n\n return {\n dimensions: embeddingConfig?.dimensions ?? 768,\n provider: embeddingConfig?.provider ?? 'local',\n localModel: embeddingConfig?.localModel ?? 'Xenova/bge-base-en-v1.5',\n aiModel: embeddingConfig?.aiModel ?? 'text-embedding-3-small',\n fallbackToAI: embeddingConfig?.fallbackToAI ?? false,\n storage: embeddingConfig?.storage ?? 'json',\n };\n}\n\n/**\n * Resolve complete embedding configuration for a class.\n * Merges project-level config with class-level overrides.\n */\nexport function resolveEmbeddingConfig(\n className: string,\n): ResolvedEmbeddingConfig | undefined {\n const classConfig = getEmbeddingConfig(className);\n if (!classConfig) {\n return undefined;\n }\n\n const projectConfig = getProjectEmbeddingConfig();\n\n return {\n fields: classConfig.fields,\n combinedField: classConfig.combinedField,\n dimensions: projectConfig.dimensions,\n provider: classConfig.provider ?? projectConfig.provider,\n localModel: projectConfig.localModel ?? 'Xenova/bge-base-en-v1.5',\n aiModel: projectConfig.aiModel ?? 'text-embedding-3-small',\n fallbackToAI: projectConfig.fallbackToAI ?? false,\n autoGenerate: classConfig.autoGenerate ?? true,\n regenerateOnChange: classConfig.regenerateOnChange ?? true,\n };\n}\n"],"names":[],"mappings":";;;AAwBO,SAAS,mBACd,WACkC;AAClC,QAAM,aAAa,UAAU,SAAS;AACtC,MAAI,CAAC,YAAY,QAAQ,YAAY;AACnC,WAAO;AAAA,EACT;AACA,SAAO,WAAW,OAAO;AAC3B;AAKO,SAAS,cAAc,WAA4B;AACxD,QAAM,SAAS,mBAAmB,SAAS;AAC3C,SAAO,WAAW,UAAa,OAAO,OAAO,SAAS;AACxD;AAKO,SAAS,sBAAgC;AAC9C,QAAM,mBAA6B,CAAA;AACnC,aAAW,CAAC,MAAM,KAAK,KAAK,cAAc;AACxC,UAAM,aAAa,MAAM,QAAQ;AACjC,QAAI,cAAc,UAAU,GAAG;AAC7B,uBAAiB,KAAK,UAAU;AAAA,IAClC;AAAA,EACF;AACA,SAAO;AACT;AAKO,SAAS,4BAAoD;AAClE,QAAM,eAAe,oBAAsC,QAAQ,EAAE;AACrE,QAAM,kBAAkB,cAAc;AAEtC,SAAO;AAAA,IACL,YAAY,iBAAiB,cAAc;AAAA,IAC3C,UAAU,iBAAiB,YAAY;AAAA,IACvC,YAAY,iBAAiB,cAAc;AAAA,IAC3C,SAAS,iBAAiB,WAAW;AAAA,IACrC,cAAc,iBAAiB,gBAAgB;AAAA,IAC/C,SAAS,iBAAiB,WAAW;AAAA,EAAA;AAEzC;AAMO,SAAS,uBACd,WACqC;AACrC,QAAM,cAAc,mBAAmB,SAAS;AAChD,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAEA,QAAM,gBAAgB,0BAAA;AAEtB,SAAO;AAAA,IACL,QAAQ,YAAY;AAAA,IACpB,eAAe,YAAY;AAAA,IAC3B,YAAY,cAAc;AAAA,IAC1B,UAAU,YAAY,YAAY,cAAc;AAAA,IAChD,YAAY,cAAc,cAAc;AAAA,IACxC,SAAS,cAAc,WAAW;AAAA,IAClC,cAAc,cAAc,gBAAgB;AAAA,IAC5C,cAAc,YAAY,gBAAgB;AAAA,IAC1C,oBAAoB,YAAY,sBAAsB;AAAA,EAAA;AAE1D;"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Registry module barrel export.
3
+ *
4
+ * Re-exports all sub-modules for convenient importing.
5
+ * @see https://github.com/happyvertical/smrt/issues/1006
6
+ */
7
+ export { getEmbeddingClasses, getEmbeddingConfig, getProjectEmbeddingConfig, hasEmbeddings, resolveEmbeddingConfig, } from './embedding-manager';
8
+ export { findClass, findClassesByName, findClassStrict, getAllClasses, getCanonicalClassName, getClass, getClassByConstructor, getClassByQualifiedName, getClassesByPackage, getClassesByVisibility, getClassInPackage, getClassNames, getPublicClasses, getQualifiedClassNames, hasClass, hasClassCaseInsensitive, qualifyExtendsName, resolveType, } from './name-resolver';
9
+ export { getDependencyGraph, getRelationshipMap } from './relationship-graph';
10
+ export { getClasses, getCollectionCache, getCollections, getCollectionTableNames, getConstructorIndex, getDbInstanceIds, getDiscoveryAttemptCache, getFieldDecorators, getInheritanceCache, getInheritanceConfig, getNextDbId, getSchemasInitialized, getSourceFileFromStack, getStiSiblingsLoaded, setNextDbId, VERBOSE_ENABLED, verboseLog, } from './shared-state';
11
+ export type { ApiConfig, RegisteredClass, RelationshipMetadata, RelationshipType, SmartObjectConfig, SmrtObjectConstructor, ValidatorFunction, } from './types';
12
+ export { compileValidators } from './validator';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,aAAa,EACb,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACR,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { SmrtObject } from '../object';
2
+ /**
3
+ * Build inheritance chain by walking prototype chain
4
+ *
5
+ * Walks from child → parent → ... → SmrtObject, building array from base to child.
6
+ * Stops at SmrtObject (the framework base class).
7
+ */
8
+ export declare function buildInheritanceChain(ctor: typeof SmrtObject): string[];
9
+ export declare function getInheritanceChain(className: string): string[];
10
+ export declare function getAllFields(className: string): Promise<Map<string, any>>;
11
+ export declare function mergeFieldConfigs(parentField: any, childField: any, fieldName: string): any;
12
+ export declare function getAllMethods(className: string): Promise<Map<string, any>>;
13
+ //# sourceMappingURL=inheritance-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inheritance-resolver.d.ts","sourceRoot":"","sources":["../../src/registry/inheritance-resolver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAY5C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,UAAU,GAAG,MAAM,EAAE,CAyBvE;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAgG/D;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAkG3B;AA4BD,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,GAAG,EAChB,UAAU,EAAE,GAAG,EACf,SAAS,EAAE,MAAM,GAChB,GAAG,CA6EL;AAED,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAiD3B"}