@happyvertical/smrt-core 0.46.0 → 0.47.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 (72) hide show
  1. package/AGENTS.md +38 -0
  2. package/dist/decorators/compatibility.d.ts +46 -0
  3. package/dist/decorators/compatibility.d.ts.map +1 -1
  4. package/dist/decorators/compatibility.js +48 -5
  5. package/dist/decorators/compatibility.js.map +1 -1
  6. package/dist/decorators/index.d.ts +119 -1
  7. package/dist/decorators/index.d.ts.map +1 -1
  8. package/dist/decorators/index.js +52 -8
  9. package/dist/decorators/index.js.map +1 -1
  10. package/dist/generators/custom-action.d.ts +379 -2
  11. package/dist/generators/custom-action.d.ts.map +1 -1
  12. package/dist/generators/custom-action.js +694 -17
  13. package/dist/generators/custom-action.js.map +1 -1
  14. package/dist/generators/index.d.ts +1 -1
  15. package/dist/generators/index.d.ts.map +1 -1
  16. package/dist/generators/index.js +2 -2
  17. package/dist/generators/preflight-route.d.ts +12 -10
  18. package/dist/generators/preflight-route.d.ts.map +1 -1
  19. package/dist/generators/preflight-route.js +46 -14
  20. package/dist/generators/preflight-route.js.map +1 -1
  21. package/dist/generators/rest.d.ts +44 -0
  22. package/dist/generators/rest.d.ts.map +1 -1
  23. package/dist/generators/rest.js +84 -9
  24. package/dist/generators/rest.js.map +1 -1
  25. package/dist/generators.js +2 -2
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +4 -4
  29. package/dist/knowledge.d.ts.map +1 -1
  30. package/dist/knowledge.js +59 -15
  31. package/dist/knowledge.js.map +1 -1
  32. package/dist/manifest/static-manifest.d.ts.map +1 -1
  33. package/dist/manifest/static-manifest.js +125 -53
  34. package/dist/manifest/static-manifest.js.map +1 -1
  35. package/dist/manifest/store.js +1 -1
  36. package/dist/manifest/store.js.map +1 -1
  37. package/dist/manifest.json +184 -53
  38. package/dist/postgres-permissions.d.ts +6 -1
  39. package/dist/postgres-permissions.d.ts.map +1 -1
  40. package/dist/postgres-permissions.js +78 -7
  41. package/dist/postgres-permissions.js.map +1 -1
  42. package/dist/registry/index.d.ts +1 -1
  43. package/dist/registry/index.d.ts.map +1 -1
  44. package/dist/registry/shared-state.d.ts +19 -0
  45. package/dist/registry/shared-state.d.ts.map +1 -1
  46. package/dist/registry/shared-state.js +16 -1
  47. package/dist/registry/shared-state.js.map +1 -1
  48. package/dist/registry.d.ts +136 -1
  49. package/dist/registry.d.ts.map +1 -1
  50. package/dist/registry.js +231 -1
  51. package/dist/registry.js.map +1 -1
  52. package/dist/scanner/manifest-generator.d.ts.map +1 -1
  53. package/dist/scanner/manifest-generator.js +18 -16
  54. package/dist/scanner/manifest-generator.js.map +1 -1
  55. package/dist/scanner/types.d.ts +59 -6
  56. package/dist/scanner/types.d.ts.map +1 -1
  57. package/dist/scanner/types.js.map +1 -1
  58. package/dist/smrt-knowledge.json +33 -32
  59. package/dist/vite-plugin/api-client-entries.d.ts.map +1 -1
  60. package/dist/vite-plugin/api-client-entries.js +10 -8
  61. package/dist/vite-plugin/api-client-entries.js.map +1 -1
  62. package/dist/vite-plugin/index.d.ts.map +1 -1
  63. package/dist/vite-plugin/index.js +1 -1
  64. package/dist/vite-plugin/index.js.map +1 -1
  65. package/dist/vite-plugin/sveltekit-generator.d.ts +28 -2
  66. package/dist/vite-plugin/sveltekit-generator.d.ts.map +1 -1
  67. package/dist/vite-plugin/sveltekit-generator.js +121 -51
  68. package/dist/vite-plugin/sveltekit-generator.js.map +1 -1
  69. package/dist/vite-plugin/web-collections.d.ts.map +1 -1
  70. package/dist/vite-plugin/web-collections.js +1 -1
  71. package/dist/vite-plugin/web-collections.js.map +1 -1
  72. package/package.json +10 -5
@@ -102,6 +102,21 @@ function getFieldDecorators() {
102
102
  if (!globalThis.__smrtRegistryFieldDecorators) globalThis.__smrtRegistryFieldDecorators = /* @__PURE__ */ new Map();
103
103
  return globalThis.__smrtRegistryFieldDecorators;
104
104
  }
105
+ /**
106
+ * `@method()` decorator metadata,
107
+ * `constructor -> methodName -> { options, isStatic }`.
108
+ *
109
+ * Stored on `globalThis` for the same reason as {@link getFieldDecorators}:
110
+ * registration must survive HMR and multiple module instances. Keyed by the
111
+ * CONSTRUCTOR rather than the class name, unlike the field store, because two
112
+ * packages may declare the same simple name and the kernel forbids inferring
113
+ * ownership from one; a `WeakMap` also lets a discarded class's metadata be
114
+ * collected (#2686).
115
+ */
116
+ function getMethodDecorators() {
117
+ if (!globalThis.__smrtRegistryMethodDecorators) globalThis.__smrtRegistryMethodDecorators = /* @__PURE__ */ new WeakMap();
118
+ return globalThis.__smrtRegistryMethodDecorators;
119
+ }
105
120
  function getStiSiblingsLoaded() {
106
121
  if (!globalThis.__smrtRegistryStiSiblingsLoaded) globalThis.__smrtRegistryStiSiblingsLoaded = /* @__PURE__ */ new Set();
107
122
  return globalThis.__smrtRegistryStiSiblingsLoaded;
@@ -122,6 +137,6 @@ function getDiscoveryAttemptCache() {
122
137
  return globalThis.__smrtRegistryDiscoveryAttemptCache;
123
138
  }
124
139
  //#endregion
125
- export { VERBOSE_ENABLED, getClasses, getCollectionCache, getCollectionTableNames, getCollections, getConstructorIndex, getDbInstanceIds, getDiscoveryAttemptCache, getFieldDecorators, getInheritanceCache, getInheritanceConfig, getNextDbId, getSourceFileFromStack, getStiSiblingsLoaded, setNextDbId, verboseLog };
140
+ export { VERBOSE_ENABLED, getClasses, getCollectionCache, getCollectionTableNames, getCollections, getConstructorIndex, getDbInstanceIds, getDiscoveryAttemptCache, getFieldDecorators, getInheritanceCache, getInheritanceConfig, getMethodDecorators, getNextDbId, getSourceFileFromStack, getStiSiblingsLoaded, setNextDbId, verboseLog };
126
141
 
127
142
  //# sourceMappingURL=shared-state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-state.js","names":[],"sources":["../../src/registry/shared-state.ts"],"sourcesContent":["/**\n * Shared state accessors for the SMRT ObjectRegistry.\n *\n * All registry sub-modules share state via globalThis to ensure\n * cross-module consistency in monorepo environments.\n *\n * Extracted from registry.ts as part of issue #1006.\n * @see https://github.com/happyvertical/smrt/issues/1006\n * @see https://github.com/happyvertical/smrt/issues/543\n */\n\nimport { createLogger } from '@happyvertical/logger';\nimport type { SmrtCollection } from '../collection';\nimport {\n getSmrtModuleConfig,\n type SmrtGlobalConfig,\n} from '../config/global-config.js';\nimport { LRUCache } from '../utils/lru-cache';\nimport { isDecoratorRuntimeFramePath } from '../utils/stack-frames';\nimport type { RegisteredClass, SmrtObjectConstructor } from './types';\n\n// Re-export the globalThis augmentation so it's visible everywhere\ndeclare global {\n // eslint-disable-next-line no-var\n var __smrtRegistryClasses: Map<string, RegisteredClass> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryCollections: Map<string, typeof SmrtCollection> | undefined;\n // eslint-disable-next-line no-var\n // Heterogeneous cache: stores collections of many different item types keyed\n // by class name. `SmrtCollection` is invariant in its item type (it has\n // `create(options: SmrtCreateInput<ModelType>)`), so this cannot be narrowed\n // to `SmrtCollection<SmrtObject>` — the type argument stays `any` (read sites\n // cast back to the concrete collection type).\n var __smrtRegistryCollectionCache: // biome-ignore lint/suspicious/noExplicitAny: heterogeneous cache keyed by class name; `SmrtCollection` is invariant in `ModelType` so the type arg cannot narrow to `SmrtObject` (read sites cast back). S4 #1579.\n LRUCache<string, SmrtCollection<any>> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryDbInstanceIds: WeakMap<object, number> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryNextDbId: number | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryInheritanceChainCache:\n | LRUCache<string, string[]>\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryFieldDecorators:\n | Map<string, Map<string, Record<string, unknown>>>\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryStiSiblingsLoaded: Set<string> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryCollectionTableNames: Map<string, string> | undefined;\n // Release B (#1133) removed __smrtRegistryClassNameMap — case-insensitive\n // lookups now iterate the `classes` Map directly. The globalThis slot is\n // left undeclared so any leftover code that reaches for it gets a clean\n // TS error instead of silently stale data.\n // eslint-disable-next-line no-var\n var __smrtRegistrySchemasInitialized: WeakSet<object> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryConstructorIndex:\n | WeakMap<SmrtObjectConstructor, string>\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryDiscoveryAttemptCache: Map<string, boolean> | undefined;\n}\n\n/**\n * Cached verbose flag evaluated once at module load time.\n * Checks SMRT_VERBOSE=true or DEBUG containing 'smrt'.\n * Avoids repeated env var parsing on every log statement.\n * @see https://github.com/happyvertical/smrt/issues/782\n */\nexport const VERBOSE_ENABLED =\n process.env.SMRT_VERBOSE === 'true' ||\n (process.env.DEBUG?.includes('smrt') ?? false);\n\n// verboseLog() is gated by VERBOSE_ENABLED, so the level must allow debug when\n// it's set (a fixed 'info' would filter the trace out and break SMRT_VERBOSE).\nconst logger = createLogger({ level: VERBOSE_ENABLED ? 'debug' : 'info' });\n\n/**\n * Log a message only when verbose mode is enabled.\n * Used throughout registry modules to reduce noise during normal operation.\n * @param args - Arguments to pass to console.log\n */\nexport function verboseLog(...args: unknown[]): void {\n if (VERBOSE_ENABLED) {\n const [message, ...rest] = args;\n logger.debug(\n typeof message === 'string' ? message : String(message),\n rest.length > 0 ? { args: rest } : undefined,\n );\n }\n}\n\n/**\n * Get inheritance config synchronously.\n * Uses the config package's sync accessor which returns already-loaded config.\n */\nexport function getInheritanceConfig() {\n const config = getSmrtModuleConfig<SmrtGlobalConfig>('smrt', {});\n return {\n cacheSize: config.inheritance?.cacheSize ?? 200,\n onMissingAncestor:\n config.inheritance?.onMissingAncestor ?? ('warn' as 'warn' | 'error'),\n };\n}\n\n/**\n * Extract the source file path from the call stack.\n *\n * Used to identify where a class was defined for collision detection.\n * This allows the same class to be re-registered when modules are re-evaluated\n * (e.g., during vitest test file collection with isolation enabled).\n *\n * Frames from decorator-lowering runtime helpers (`@oxc-project/runtime` under\n * Vite 8, `tslib`/`@swc/helpers`/`@babel/runtime` elsewhere) are skipped too, so\n * the lowered `@smrt()` application resolves to the consumer module that declares\n * the class rather than the helper frame the compiler inserted (#1785).\n *\n * @param stackOverride - Optional stack string to parse instead of a fresh\n * `Error().stack`. Used by tests to simulate a lowered call pattern.\n * @returns The file path where the @smrt() decorator was called, or undefined\n */\nexport function getSourceFileFromStack(\n stackOverride?: string,\n): string | undefined {\n const stack = stackOverride ?? new Error().stack ?? '';\n const stackLines = stack.split('\\n');\n\n // Look for the first file path that's NOT from smrt-core internal files\n // Stack trace format: \" at FunctionName (file:///path/to/file.ts:line:col)\"\n // or \" at file:///path/to/file.ts:line:col\"\n for (const line of stackLines) {\n // Match file paths in stack trace (include all JS/TS file extensions)\n const fileMatch = line.match(\n /(?:file:\\/\\/)?([^)\\s]+\\.(?:js|ts|mjs|mts|jsx|tsx|cjs|cts))(?::\\d+:\\d+)?/,\n );\n if (fileMatch) {\n const rawPath = fileMatch[1];\n // Normalize the path:\n // - remove any leading file:// or file:/// prefix\n // - convert Windows backslashes to POSIX-style forward slashes\n const normalizedPath = rawPath\n .replace(/^file:\\/+/, '')\n .replace(/\\\\/g, '/');\n const lowerPath = normalizedPath.toLowerCase();\n\n // Skip smrt-core internal files using specific path patterns\n // to avoid false positives with user files containing \"registry\" in name\n if (\n // Installed package form: node_modules/@happyvertical/smrt-core/...\n lowerPath.includes('/node_modules/@happyvertical/smrt-core/') ||\n // Monorepo/workspace form: packages/core/src/...\n (lowerPath.includes('/packages/core/src/') &&\n !lowerPath.includes('__tests__')) ||\n // Specific manifest loader internals\n lowerPath.includes('/manifest/manifest-loader') ||\n // Decorator-lowering runtime helper (oxc/tslib/swc/babel) — the frame\n // the compiler inserts between @smrt() and the declaring module (#1785)\n isDecoratorRuntimeFramePath(normalizedPath)\n ) {\n continue;\n }\n return normalizedPath;\n }\n }\n return undefined;\n}\n\n// ── Shared state accessor functions ──────────────────────────────────────\n\nexport function getClasses(): Map<string, RegisteredClass> {\n if (!globalThis.__smrtRegistryClasses) {\n globalThis.__smrtRegistryClasses = new Map<string, RegisteredClass>();\n }\n return globalThis.__smrtRegistryClasses;\n}\n\nexport function getCollections(): Map<string, typeof SmrtCollection> {\n if (!globalThis.__smrtRegistryCollections) {\n globalThis.__smrtRegistryCollections = new Map<\n string,\n typeof SmrtCollection\n >();\n }\n return globalThis.__smrtRegistryCollections;\n}\n\nexport function getCollectionTableNames(): Map<string, string> {\n if (!globalThis.__smrtRegistryCollectionTableNames) {\n globalThis.__smrtRegistryCollectionTableNames = new Map<string, string>();\n }\n return globalThis.__smrtRegistryCollectionTableNames;\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: heterogeneous cache; `SmrtCollection` is invariant in `ModelType` so the type arg cannot narrow to `SmrtObject` (read sites cast back). S4 #1579.\nexport function getCollectionCache(): LRUCache<string, SmrtCollection<any>> {\n if (!globalThis.__smrtRegistryCollectionCache) {\n globalThis.__smrtRegistryCollectionCache = new LRUCache<\n string,\n // biome-ignore lint/suspicious/noExplicitAny: same heterogeneous-cache invariance as the return type above. S4 #1579.\n SmrtCollection<any>\n >(100);\n }\n return globalThis.__smrtRegistryCollectionCache;\n}\n\nexport function getDbInstanceIds(): WeakMap<object, number> {\n if (!globalThis.__smrtRegistryDbInstanceIds) {\n globalThis.__smrtRegistryDbInstanceIds = new WeakMap<object, number>();\n }\n return globalThis.__smrtRegistryDbInstanceIds;\n}\n\nexport function getNextDbId(): number {\n if (globalThis.__smrtRegistryNextDbId === undefined) {\n globalThis.__smrtRegistryNextDbId = 1;\n }\n return globalThis.__smrtRegistryNextDbId;\n}\n\nexport function setNextDbId(value: number): void {\n globalThis.__smrtRegistryNextDbId = value;\n}\n\nexport function getFieldDecorators(): Map<\n string,\n Map<string, Record<string, unknown>>\n> {\n if (!globalThis.__smrtRegistryFieldDecorators) {\n globalThis.__smrtRegistryFieldDecorators = new Map<\n string,\n Map<string, Record<string, unknown>>\n >();\n }\n return globalThis.__smrtRegistryFieldDecorators;\n}\n\nexport function getStiSiblingsLoaded(): Set<string> {\n if (!globalThis.__smrtRegistryStiSiblingsLoaded) {\n globalThis.__smrtRegistryStiSiblingsLoaded = new Set<string>();\n }\n return globalThis.__smrtRegistryStiSiblingsLoaded;\n}\n\n// getClassNameMap removed in Release B (#1133). The eagerly-maintained\n// lowercase-simple-name → qualified-key[] index was replaced by on-demand\n// iteration over the `classes` Map in name-resolver.ts. Any remaining\n// consumer should switch to `findClassesByName`, `getCanonicalClassName`,\n// or `findClass`.\n\nexport function getSchemasInitialized(): WeakSet<object> {\n if (!globalThis.__smrtRegistrySchemasInitialized) {\n globalThis.__smrtRegistrySchemasInitialized = new WeakSet<object>();\n }\n return globalThis.__smrtRegistrySchemasInitialized;\n}\n\nexport function getConstructorIndex(): WeakMap<SmrtObjectConstructor, string> {\n if (!globalThis.__smrtRegistryConstructorIndex) {\n globalThis.__smrtRegistryConstructorIndex = new WeakMap<\n SmrtObjectConstructor,\n string\n >();\n }\n return globalThis.__smrtRegistryConstructorIndex;\n}\n\nexport function getInheritanceCache(): LRUCache<string, string[]> {\n if (!globalThis.__smrtRegistryInheritanceChainCache) {\n const config = getInheritanceConfig();\n globalThis.__smrtRegistryInheritanceChainCache = new LRUCache<\n string,\n string[]\n >(config.cacheSize);\n }\n return globalThis.__smrtRegistryInheritanceChainCache;\n}\n\nexport function getDiscoveryAttemptCache(): Map<string, boolean> {\n if (!globalThis.__smrtRegistryDiscoveryAttemptCache) {\n globalThis.__smrtRegistryDiscoveryAttemptCache = new Map<string, boolean>();\n }\n return globalThis.__smrtRegistryDiscoveryAttemptCache;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuEA,IAAa,kBACX,QAAQ,IAAI,iBAAiB,WAC5B,QAAQ,IAAI,OAAO,SAAS,MAAM,KAAK;AAI1C,IAAM,SAAS,aAAa,EAAE,OAAO,kBAAkB,UAAU,OAAO,CAAC;;;;;;AAOzE,SAAgB,WAAW,G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AW,gCAAgC,IAAI,SAI7C,GAAG;CAEP,OAAO,WAAW;AACpB;AAEA,SAAgB,mBAA4C;CAC1D,IAAI,CAAC,WAAW,6BACd,WAAW,8CAA8B,IAAI,QAAwB;CAEvE,OAAO,WAAW;AACpB;AAEA,SAAgB,cAAsB;CACpC,IAAI,WAAW,2BAA2B,KAAA,GACxC,WAAW,yBAAyB;CAEtC,OAAO,WAAW;AACpB;AAEA,SAAgB,YAAY,OAAqB;CAC/C,WAAW,yBAAyB;AACtC;AAEA,SAAgB,qBAGd;CACA,IAAI,CAAC,WAAW,+BACd,WAAW,gDAAgC,IAAI,IAG7C;CAEJ,OAAO,WAAW;AACpB;AAEA,SAAgB,uBAAoC;CAClD,IAAI,CAAC,WAAW,iCACd,WAAW,kDAAkC,IAAI,IAAY;CAE/D,OAAO,WAAW;AACpB;AAeA,SAAgB,sBAA8D;CAC5E,IAAI,CAAC,WAAW,gCACd,WAAW,iDAAiC,IAAI,QAG9C;CAEJ,OAAO,WAAW;AACpB;AAEA,SAAgB,sBAAkD;CAChE,IAAI,CAAC,WAAW,qCAAqC;EACnD,MAAM,SAAS,qBAAqB;EACpC,WAAW,sCAAsC,IAAI,SAGnD,OAAO,SAAS;CACpB;CACA,OAAO,WAAW;AACpB;AAEA,SAAgB,2BAAiD;CAC/D,IAAI,CAAC,WAAW,qCACd,WAAW,sDAAsC,IAAI,IAAqB;CAE5E,OAAO,WAAW;AACpB"}
1
+ {"version":3,"file":"shared-state.js","names":[],"sources":["../../src/registry/shared-state.ts"],"sourcesContent":["/**\n * Shared state accessors for the SMRT ObjectRegistry.\n *\n * All registry sub-modules share state via globalThis to ensure\n * cross-module consistency in monorepo environments.\n *\n * Extracted from registry.ts as part of issue #1006.\n * @see https://github.com/happyvertical/smrt/issues/1006\n * @see https://github.com/happyvertical/smrt/issues/543\n */\n\nimport { createLogger } from '@happyvertical/logger';\nimport type { SmrtCollection } from '../collection';\nimport {\n getSmrtModuleConfig,\n type SmrtGlobalConfig,\n} from '../config/global-config.js';\nimport { LRUCache } from '../utils/lru-cache';\nimport { isDecoratorRuntimeFramePath } from '../utils/stack-frames';\nimport type { RegisteredClass, SmrtObjectConstructor } from './types';\n\n// Re-export the globalThis augmentation so it's visible everywhere\ndeclare global {\n // eslint-disable-next-line no-var\n var __smrtRegistryClasses: Map<string, RegisteredClass> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryCollections: Map<string, typeof SmrtCollection> | undefined;\n // eslint-disable-next-line no-var\n // Heterogeneous cache: stores collections of many different item types keyed\n // by class name. `SmrtCollection` is invariant in its item type (it has\n // `create(options: SmrtCreateInput<ModelType>)`), so this cannot be narrowed\n // to `SmrtCollection<SmrtObject>` — the type argument stays `any` (read sites\n // cast back to the concrete collection type).\n var __smrtRegistryCollectionCache: // biome-ignore lint/suspicious/noExplicitAny: heterogeneous cache keyed by class name; `SmrtCollection` is invariant in `ModelType` so the type arg cannot narrow to `SmrtObject` (read sites cast back). S4 #1579.\n LRUCache<string, SmrtCollection<any>> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryDbInstanceIds: WeakMap<object, number> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryNextDbId: number | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryInheritanceChainCache:\n | LRUCache<string, string[]>\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryFieldDecorators:\n | Map<string, Map<string, Record<string, unknown>>>\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryMethodDecorators:\n | WeakMap<\n Function,\n Map<string, { options: Record<string, unknown>; isStatic: boolean }>\n >\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryStiSiblingsLoaded: Set<string> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryCollectionTableNames: Map<string, string> | undefined;\n // Release B (#1133) removed __smrtRegistryClassNameMap — case-insensitive\n // lookups now iterate the `classes` Map directly. The globalThis slot is\n // left undeclared so any leftover code that reaches for it gets a clean\n // TS error instead of silently stale data.\n // eslint-disable-next-line no-var\n var __smrtRegistrySchemasInitialized: WeakSet<object> | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryConstructorIndex:\n | WeakMap<SmrtObjectConstructor, string>\n | undefined;\n // eslint-disable-next-line no-var\n var __smrtRegistryDiscoveryAttemptCache: Map<string, boolean> | undefined;\n}\n\n/**\n * Cached verbose flag evaluated once at module load time.\n * Checks SMRT_VERBOSE=true or DEBUG containing 'smrt'.\n * Avoids repeated env var parsing on every log statement.\n * @see https://github.com/happyvertical/smrt/issues/782\n */\nexport const VERBOSE_ENABLED =\n process.env.SMRT_VERBOSE === 'true' ||\n (process.env.DEBUG?.includes('smrt') ?? false);\n\n// verboseLog() is gated by VERBOSE_ENABLED, so the level must allow debug when\n// it's set (a fixed 'info' would filter the trace out and break SMRT_VERBOSE).\nconst logger = createLogger({ level: VERBOSE_ENABLED ? 'debug' : 'info' });\n\n/**\n * Log a message only when verbose mode is enabled.\n * Used throughout registry modules to reduce noise during normal operation.\n * @param args - Arguments to pass to console.log\n */\nexport function verboseLog(...args: unknown[]): void {\n if (VERBOSE_ENABLED) {\n const [message, ...rest] = args;\n logger.debug(\n typeof message === 'string' ? message : String(message),\n rest.length > 0 ? { args: rest } : undefined,\n );\n }\n}\n\n/**\n * Get inheritance config synchronously.\n * Uses the config package's sync accessor which returns already-loaded config.\n */\nexport function getInheritanceConfig() {\n const config = getSmrtModuleConfig<SmrtGlobalConfig>('smrt', {});\n return {\n cacheSize: config.inheritance?.cacheSize ?? 200,\n onMissingAncestor:\n config.inheritance?.onMissingAncestor ?? ('warn' as 'warn' | 'error'),\n };\n}\n\n/**\n * Extract the source file path from the call stack.\n *\n * Used to identify where a class was defined for collision detection.\n * This allows the same class to be re-registered when modules are re-evaluated\n * (e.g., during vitest test file collection with isolation enabled).\n *\n * Frames from decorator-lowering runtime helpers (`@oxc-project/runtime` under\n * Vite 8, `tslib`/`@swc/helpers`/`@babel/runtime` elsewhere) are skipped too, so\n * the lowered `@smrt()` application resolves to the consumer module that declares\n * the class rather than the helper frame the compiler inserted (#1785).\n *\n * @param stackOverride - Optional stack string to parse instead of a fresh\n * `Error().stack`. Used by tests to simulate a lowered call pattern.\n * @returns The file path where the @smrt() decorator was called, or undefined\n */\nexport function getSourceFileFromStack(\n stackOverride?: string,\n): string | undefined {\n const stack = stackOverride ?? new Error().stack ?? '';\n const stackLines = stack.split('\\n');\n\n // Look for the first file path that's NOT from smrt-core internal files\n // Stack trace format: \" at FunctionName (file:///path/to/file.ts:line:col)\"\n // or \" at file:///path/to/file.ts:line:col\"\n for (const line of stackLines) {\n // Match file paths in stack trace (include all JS/TS file extensions)\n const fileMatch = line.match(\n /(?:file:\\/\\/)?([^)\\s]+\\.(?:js|ts|mjs|mts|jsx|tsx|cjs|cts))(?::\\d+:\\d+)?/,\n );\n if (fileMatch) {\n const rawPath = fileMatch[1];\n // Normalize the path:\n // - remove any leading file:// or file:/// prefix\n // - convert Windows backslashes to POSIX-style forward slashes\n const normalizedPath = rawPath\n .replace(/^file:\\/+/, '')\n .replace(/\\\\/g, '/');\n const lowerPath = normalizedPath.toLowerCase();\n\n // Skip smrt-core internal files using specific path patterns\n // to avoid false positives with user files containing \"registry\" in name\n if (\n // Installed package form: node_modules/@happyvertical/smrt-core/...\n lowerPath.includes('/node_modules/@happyvertical/smrt-core/') ||\n // Monorepo/workspace form: packages/core/src/...\n (lowerPath.includes('/packages/core/src/') &&\n !lowerPath.includes('__tests__')) ||\n // Specific manifest loader internals\n lowerPath.includes('/manifest/manifest-loader') ||\n // Decorator-lowering runtime helper (oxc/tslib/swc/babel) — the frame\n // the compiler inserts between @smrt() and the declaring module (#1785)\n isDecoratorRuntimeFramePath(normalizedPath)\n ) {\n continue;\n }\n return normalizedPath;\n }\n }\n return undefined;\n}\n\n// ── Shared state accessor functions ──────────────────────────────────────\n\nexport function getClasses(): Map<string, RegisteredClass> {\n if (!globalThis.__smrtRegistryClasses) {\n globalThis.__smrtRegistryClasses = new Map<string, RegisteredClass>();\n }\n return globalThis.__smrtRegistryClasses;\n}\n\nexport function getCollections(): Map<string, typeof SmrtCollection> {\n if (!globalThis.__smrtRegistryCollections) {\n globalThis.__smrtRegistryCollections = new Map<\n string,\n typeof SmrtCollection\n >();\n }\n return globalThis.__smrtRegistryCollections;\n}\n\nexport function getCollectionTableNames(): Map<string, string> {\n if (!globalThis.__smrtRegistryCollectionTableNames) {\n globalThis.__smrtRegistryCollectionTableNames = new Map<string, string>();\n }\n return globalThis.__smrtRegistryCollectionTableNames;\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: heterogeneous cache; `SmrtCollection` is invariant in `ModelType` so the type arg cannot narrow to `SmrtObject` (read sites cast back). S4 #1579.\nexport function getCollectionCache(): LRUCache<string, SmrtCollection<any>> {\n if (!globalThis.__smrtRegistryCollectionCache) {\n globalThis.__smrtRegistryCollectionCache = new LRUCache<\n string,\n // biome-ignore lint/suspicious/noExplicitAny: same heterogeneous-cache invariance as the return type above. S4 #1579.\n SmrtCollection<any>\n >(100);\n }\n return globalThis.__smrtRegistryCollectionCache;\n}\n\nexport function getDbInstanceIds(): WeakMap<object, number> {\n if (!globalThis.__smrtRegistryDbInstanceIds) {\n globalThis.__smrtRegistryDbInstanceIds = new WeakMap<object, number>();\n }\n return globalThis.__smrtRegistryDbInstanceIds;\n}\n\nexport function getNextDbId(): number {\n if (globalThis.__smrtRegistryNextDbId === undefined) {\n globalThis.__smrtRegistryNextDbId = 1;\n }\n return globalThis.__smrtRegistryNextDbId;\n}\n\nexport function setNextDbId(value: number): void {\n globalThis.__smrtRegistryNextDbId = value;\n}\n\nexport function getFieldDecorators(): Map<\n string,\n Map<string, Record<string, unknown>>\n> {\n if (!globalThis.__smrtRegistryFieldDecorators) {\n globalThis.__smrtRegistryFieldDecorators = new Map<\n string,\n Map<string, Record<string, unknown>>\n >();\n }\n return globalThis.__smrtRegistryFieldDecorators;\n}\n\n/**\n * `@method()` decorator metadata,\n * `constructor -> methodName -> { options, isStatic }`.\n *\n * Stored on `globalThis` for the same reason as {@link getFieldDecorators}:\n * registration must survive HMR and multiple module instances. Keyed by the\n * CONSTRUCTOR rather than the class name, unlike the field store, because two\n * packages may declare the same simple name and the kernel forbids inferring\n * ownership from one; a `WeakMap` also lets a discarded class's metadata be\n * collected (#2686).\n */\nexport function getMethodDecorators(): WeakMap<\n Function,\n Map<string, { options: Record<string, unknown>; isStatic: boolean }>\n> {\n if (!globalThis.__smrtRegistryMethodDecorators) {\n globalThis.__smrtRegistryMethodDecorators = new WeakMap<\n Function,\n Map<string, { options: Record<string, unknown>; isStatic: boolean }>\n >();\n }\n return globalThis.__smrtRegistryMethodDecorators;\n}\n\nexport function getStiSiblingsLoaded(): Set<string> {\n if (!globalThis.__smrtRegistryStiSiblingsLoaded) {\n globalThis.__smrtRegistryStiSiblingsLoaded = new Set<string>();\n }\n return globalThis.__smrtRegistryStiSiblingsLoaded;\n}\n\n// getClassNameMap removed in Release B (#1133). The eagerly-maintained\n// lowercase-simple-name → qualified-key[] index was replaced by on-demand\n// iteration over the `classes` Map in name-resolver.ts. Any remaining\n// consumer should switch to `findClassesByName`, `getCanonicalClassName`,\n// or `findClass`.\n\nexport function getSchemasInitialized(): WeakSet<object> {\n if (!globalThis.__smrtRegistrySchemasInitialized) {\n globalThis.__smrtRegistrySchemasInitialized = new WeakSet<object>();\n }\n return globalThis.__smrtRegistrySchemasInitialized;\n}\n\nexport function getConstructorIndex(): WeakMap<SmrtObjectConstructor, string> {\n if (!globalThis.__smrtRegistryConstructorIndex) {\n globalThis.__smrtRegistryConstructorIndex = new WeakMap<\n SmrtObjectConstructor,\n string\n >();\n }\n return globalThis.__smrtRegistryConstructorIndex;\n}\n\nexport function getInheritanceCache(): LRUCache<string, string[]> {\n if (!globalThis.__smrtRegistryInheritanceChainCache) {\n const config = getInheritanceConfig();\n globalThis.__smrtRegistryInheritanceChainCache = new LRUCache<\n string,\n string[]\n >(config.cacheSize);\n }\n return globalThis.__smrtRegistryInheritanceChainCache;\n}\n\nexport function getDiscoveryAttemptCache(): Map<string, boolean> {\n if (!globalThis.__smrtRegistryDiscoveryAttemptCache) {\n globalThis.__smrtRegistryDiscoveryAttemptCache = new Map<string, boolean>();\n }\n return globalThis.__smrtRegistryDiscoveryAttemptCache;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8EA,IAAa,kBACX,QAAQ,IAAI,iBAAiB,WAC5B,QAAQ,IAAI,OAAO,SAAS,MAAM,KAAK;AAI1C,IAAM,SAAS,aAAa,EAAE,OAAO,kBAAkB,UAAU,OAAO,CAAC;;;;;;AAOzE,SAAgB,WAAW,GAAG,MAAuB;CACnD,IAAI,iBAAiB;EACnB,MAAM,CAAC,SAAS,GAAG,QAAQ;EAC3B,OAAO,MACL,OAAO,YAAY,WAAW,UAAU,OAAO,OAAO,GACtD,KAAK,SAAS,IAAI,EAAE,MAAM,KAAK,IAAI,KAAA,CACrC;CACF;AACF;;;;;AAMA,SAAgB,uBAAuB;CACrC,MAAM,SAAS,oBAAsC,QAAQ,CAAC,CAAC;CAC/D,OAAO;EACL,WAAW,OAAO,aAAa,aAAa;EAC5C,mBACE,OAAO,aAAa,qBAAsB;CAC9C;AACF;;;;;;;;;;;;;;;;;AAkBA,SAAgB,uBACd,eACoB;CAEpB,MAAM,cADQ,kCAAiB,IAAI,MAAM,EAAA,CAAE,SAAS,GAAA,CAC3B,MAAM,IAAI;CAKnC,KAAK,MAAM,QAAQ,YAAY;EAE7B,MAAM,YAAY,KAAK,MACrB,yEACF;EACA,IAAI,WAAW;GAKb,MAAM,iBAJU,UAAU,EAIH,CACpB,QAAQ,aAAa,EAAE,CAAC,CACxB,QAAQ,OAAO,GAAG;GACrB,MAAM,YAAY,eAAe,YAAY;GAI7C,IAEE,UAAU,SAAS,yCAAyC,KAE3D,UAAU,SAAS,qBAAqB,KACvC,CAAC,UAAU,SAAS,WAAW,KAEjC,UAAU,SAAS,2BAA2B,KAG9C,4BAA4B,cAAc,GAE1C;GAEF,OAAO;EACT;CACF;AAE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,SAAS;CACpB;CACA,OAAO,WAAW;AACpB;AAEA,SAAgB,2BAAiD;CAC/D,IAAI,CAAC,WAAW,qCACd,WAAW,sDAAsC,IAAI,IAAqB;CAE5E,OAAO,WAAW;AACpB"}
@@ -1,6 +1,6 @@
1
1
  import { SmrtCollection, SmrtCollectionOptions } from './collection';
2
2
  import { CollectionCacheConfig } from './collection-cache';
3
- import { FieldOptions } from './decorators/index.js';
3
+ import { FieldOptions, MethodOptions } from './decorators/index.js';
4
4
  import { ClassEmbeddingConfig, ProjectEmbeddingConfig, ResolvedEmbeddingConfig } from './embeddings/types';
5
5
  import { ValidationError } from './errors';
6
6
  import { SmrtObject } from './object';
@@ -33,6 +33,15 @@ interface FieldDecoratorOptions extends FieldOptions {
33
33
  __tenancy?: unknown;
34
34
  __report?: unknown;
35
35
  }
36
+ /**
37
+ * Decorator-supplied method metadata bag, from `@method()` (#2686).
38
+ *
39
+ * `MethodOptions` is the authoring type; this is the registry-input alias, kept
40
+ * separate for the same reason {@link FieldDecoratorOptions} is: the registry
41
+ * stores and forwards the bag without interpreting it, and a future method
42
+ * decorator can add members here without widening the public authoring type.
43
+ */
44
+ type MethodDecoratorOptions = MethodOptions;
36
45
  /**
37
46
  * Constructor shape for a registered collection class.
38
47
  *
@@ -135,6 +144,17 @@ export declare class ObjectRegistry {
135
144
  * Used by @field(), @foreignKey(), @oneToMany(), @manyToMany() decorators
136
145
  */
137
146
  private static get fieldDecorators();
147
+ /**
148
+ * Storage for `@method()` decorator metadata (#2686).
149
+ * Maps className → Map<methodName, MethodOptions>.
150
+ *
151
+ * The manifest is the primary carrier of this metadata for BUILD-time
152
+ * consumers (the scanner reads `@method()` into
153
+ * `MethodDefinition.decoratorConfig`); this store serves the runtime paths
154
+ * that have a live class but cannot reach a manifest entry for the method --
155
+ * see `resolveRuntimeMethodDecoratorConfig` for the two such cases.
156
+ */
157
+ private static get methodDecorators();
138
158
  /**
139
159
  * Track collections that have been processed for STI siblings
140
160
  * Prevents infinite recursion when loading siblings
@@ -211,6 +231,121 @@ export declare class ObjectRegistry {
211
231
  * ```
212
232
  */
213
233
  static getFieldDecorators(className: string): Map<string, FieldDecoratorOptions>;
234
+ /**
235
+ * Register `@method()` decorator metadata, keyed by the decorated class's
236
+ * CONSTRUCTOR.
237
+ *
238
+ * Constructor identity, not simple name: two packages may legitimately
239
+ * declare a class with the same simple name (`Account` exists in both
240
+ * `smrt-ledgers` and `smrt-messages`), and the kernel forbids inferring
241
+ * ownership from simple names. A name-keyed store would let one package's
242
+ * `@method({ expose: false })` withhold the other's identically-named
243
+ * action -- silent, non-local, and invisible in the 404 it produces.
244
+ *
245
+ * Merges with any existing options for the same method, so repeated
246
+ * decoration (or HMR re-evaluation) accumulates rather than replacing --
247
+ * matching {@link registerFieldDecorator}.
248
+ */
249
+ static registerMethodDecorator(ctor: Function, methodName: string, options: MethodDecoratorOptions, isStatic?: boolean): void;
250
+ /** `@method()` options for one method, or `undefined` when undecorated. */
251
+ static getMethodDecorator(ctor: Function | undefined, methodName: string): MethodDecoratorOptions | undefined;
252
+ /**
253
+ * The stored `@method()` record, including the RECEIVER the decorator saw.
254
+ *
255
+ * `isStatic` cannot be recovered later in an unscanned runtime — there is no
256
+ * manifest to read it from — and it is what tells the standalone REST
257
+ * transport whether it can host the action at all (#2686).
258
+ */
259
+ private static getMethodDecoratorEntry;
260
+ /** All `@method()` options declared on a class, keyed by method name. */
261
+ static getMethodDecorators(ctor: Function | undefined): Map<string, MethodDecoratorOptions>;
262
+ /**
263
+ * Constructors whose `@method()` decorators can govern `objectName`'s runtime
264
+ * REST surface: the model itself and its registered collection class, which
265
+ * is where a collection-hosted custom action's decorator actually lands.
266
+ *
267
+ * Resolved through the registry's own qualified-name-safe lookups, so a
268
+ * simple name never decides ownership.
269
+ */
270
+ private static methodDecoratorSources;
271
+ /**
272
+ * The `@method()` config a RUNTIME transport must honor for
273
+ * `objectName.methodName`.
274
+ *
275
+ * The manifest is the primary carrier, but it is not always reachable from
276
+ * here. Two cases need the live store:
277
+ *
278
+ * - `startRestServer([Product], { db })` is a supported posture with NO
279
+ * manifest at all: `getMethods()` is empty while the decorators did run, so
280
+ * reading only the manifest drops `@method({ expose: false })` while a
281
+ * legacy `api.routes` entry alone still routes the withheld action.
282
+ * - A COLLECTION-hosted action's manifest entry lives under the collection
283
+ * class, which the item-keyed `getMethods(objectName)` map never contains,
284
+ * even in a fully scanned project.
285
+ *
286
+ * Absent exposure metadata defaults OPEN in this framework, so either drop is
287
+ * a widening (#2686).
288
+ */
289
+ static resolveRuntimeMethodDecoratorConfig(objectName: string, methodName: string): Record<string, unknown> | undefined;
290
+ /**
291
+ * Whether the standalone REST transport can HOST `objectName.methodName`.
292
+ *
293
+ * That transport serves only collection-scoped custom actions: an instance
294
+ * method on the collection class, or a static on the item class. An instance
295
+ * method on the MODEL is item-scoped and has no receiver there, and the
296
+ * browser-plane preflight prediction has to agree with dispatch about that,
297
+ * or it reports a runnable step for an action that answers 404 (#2686).
298
+ *
299
+ * Resolution mirrors {@link resolveRuntimeMethodDecoratorConfig}: the item
300
+ * class's manifest entry first, then the live decorator store, which records
301
+ * the receiver the decorator saw precisely because an unscanned runtime has
302
+ * no manifest to recover it from.
303
+ */
304
+ static isCollectionHostedMethod(objectName: string, methodName: string): boolean;
305
+ /**
306
+ * The method view a RUNTIME transport should read for one action, and whether
307
+ * this transport can host it.
308
+ *
309
+ * Three sources, in order, because no single one covers every posture:
310
+ *
311
+ * 1. The ITEM class's manifest entry — a static there is collection-hosted,
312
+ * an instance method is item-scoped.
313
+ * 2. The registered COLLECTION class's manifest entry, which is where a
314
+ * collection-hosted action's parameters actually live. Without this the
315
+ * runtime transport sees no parameter metadata for them and silently
316
+ * degrades every one to the legacy options-bag contract.
317
+ * 3. The live `@method()` store, for an unscanned project with no manifest at
318
+ * all. It records the receiver the decorator saw, which is the only place
319
+ * that fact survives there.
320
+ *
321
+ * `collectionHosted` defaults to true when nothing is known: that is the
322
+ * legacy `api.routes`-only shape this transport has always attempted, and
323
+ * predicting a denial dispatch may not issue would be its own false answer.
324
+ */
325
+ static resolveRuntimeMethod(objectName: string, methodName: string): {
326
+ method?: MethodDefinition;
327
+ collectionHosted: boolean;
328
+ };
329
+ /** Registered collection class names for `objectName`, qualified-name safe. */
330
+ private static collectionClassNames;
331
+ /** `@method()` config from the live store alone, ignoring the manifest. */
332
+ private static resolveDeclaredMethodConfig;
333
+ /**
334
+ * Every method name carrying a `@method()` declaration for `objectName`,
335
+ * from the manifest and the live decorator store together. Runtime
336
+ * transports enumerate this so a decorator-declared route survives in an
337
+ * unscanned project.
338
+ */
339
+ static listDecoratedMethodNames(objectName: string): string[];
340
+ /**
341
+ * The manifest-derived method map for the class registered under EXACTLY
342
+ * `source`, or `undefined` when no manifest described it.
343
+ *
344
+ * Matched on constructor identity, never on name: `Account` exists in both
345
+ * `smrt-ledgers` and `smrt-messages`, and one package's manifest must not
346
+ * decide what the other's live decorators may expose.
347
+ */
348
+ private static manifestMethodsForConstructor;
214
349
  /**
215
350
  * Check if a class has any field decorators registered
216
351
  *
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,EACL,cAAc,EAEd,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAUhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,OAAO,EAIL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAC;AA8DhC,OAA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SchemaColumns, discoverCachedManifestSync, getNodeBuiltins
8
8
  import { getDefaultCompositeSource } from "./manifest/sources/composite.js";
9
9
  import { ExplicitPathsManifestSource } from "./manifest/sources/explicit-paths.js";
10
10
  import { LRUCache } from "./utils/lru-cache.js";
11
- import { getClasses, getCollectionCache, getCollectionTableNames, getCollections, getDbInstanceIds, getDiscoveryAttemptCache, getFieldDecorators, getInheritanceCache, getNextDbId, getStiSiblingsLoaded, setNextDbId, verboseLog } from "./registry/shared-state.js";
11
+ import { getClasses, getCollectionCache, getCollectionTableNames, getCollections, getDbInstanceIds, getDiscoveryAttemptCache, getFieldDecorators, getInheritanceCache, getMethodDecorators, getNextDbId, getStiSiblingsLoaded, setNextDbId, verboseLog } from "./registry/shared-state.js";
12
12
  import { findClass, findClassesByName, getAllClasses, getCanonicalClassName, getClass, getClassByConstructor, getClassByQualifiedName, getClassInPackage, getClassNames, getClassesByPackage, getClassesByVisibility, getPublicClasses, getQualifiedClassNames, hasClass, hasClassCaseInsensitive, resolveType } from "./registry/name-resolver.js";
13
13
  import { getAllFields, getAllMethods, getInheritanceChain, mergeFieldConfigs } from "./registry/inheritance-resolver.js";
14
14
  import { resolveCollectionCacheConfig } from "./registry/cache-config.js";
@@ -200,6 +200,19 @@ var ObjectRegistry = class ObjectRegistry {
200
200
  return getFieldDecorators();
201
201
  }
202
202
  /**
203
+ * Storage for `@method()` decorator metadata (#2686).
204
+ * Maps className → Map<methodName, MethodOptions>.
205
+ *
206
+ * The manifest is the primary carrier of this metadata for BUILD-time
207
+ * consumers (the scanner reads `@method()` into
208
+ * `MethodDefinition.decoratorConfig`); this store serves the runtime paths
209
+ * that have a live class but cannot reach a manifest entry for the method --
210
+ * see `resolveRuntimeMethodDecoratorConfig` for the two such cases.
211
+ */
212
+ static get methodDecorators() {
213
+ return getMethodDecorators();
214
+ }
215
+ /**
203
216
  * Track collections that have been processed for STI siblings
204
217
  * Prevents infinite recursion when loading siblings
205
218
  */
@@ -300,6 +313,222 @@ var ObjectRegistry = class ObjectRegistry {
300
313
  return ObjectRegistry.fieldDecorators.get(className) || /* @__PURE__ */ new Map();
301
314
  }
302
315
  /**
316
+ * Register `@method()` decorator metadata, keyed by the decorated class's
317
+ * CONSTRUCTOR.
318
+ *
319
+ * Constructor identity, not simple name: two packages may legitimately
320
+ * declare a class with the same simple name (`Account` exists in both
321
+ * `smrt-ledgers` and `smrt-messages`), and the kernel forbids inferring
322
+ * ownership from simple names. A name-keyed store would let one package's
323
+ * `@method({ expose: false })` withhold the other's identically-named
324
+ * action -- silent, non-local, and invisible in the 404 it produces.
325
+ *
326
+ * Merges with any existing options for the same method, so repeated
327
+ * decoration (or HMR re-evaluation) accumulates rather than replacing --
328
+ * matching {@link registerFieldDecorator}.
329
+ */
330
+ static registerMethodDecorator(ctor, methodName, options, isStatic = false) {
331
+ let classDecorators = ObjectRegistry.methodDecorators.get(ctor);
332
+ if (!classDecorators) {
333
+ classDecorators = /* @__PURE__ */ new Map();
334
+ ObjectRegistry.methodDecorators.set(ctor, classDecorators);
335
+ }
336
+ const existing = classDecorators.get(methodName);
337
+ classDecorators.set(methodName, {
338
+ options: existing ? {
339
+ ...existing.options,
340
+ ...options
341
+ } : options,
342
+ isStatic
343
+ });
344
+ }
345
+ /** `@method()` options for one method, or `undefined` when undecorated. */
346
+ static getMethodDecorator(ctor, methodName) {
347
+ return ObjectRegistry.getMethodDecoratorEntry(ctor, methodName)?.options;
348
+ }
349
+ /**
350
+ * The stored `@method()` record, including the RECEIVER the decorator saw.
351
+ *
352
+ * `isStatic` cannot be recovered later in an unscanned runtime — there is no
353
+ * manifest to read it from — and it is what tells the standalone REST
354
+ * transport whether it can host the action at all (#2686).
355
+ */
356
+ static getMethodDecoratorEntry(ctor, methodName) {
357
+ return ctor ? ObjectRegistry.methodDecorators.get(ctor)?.get(methodName) : void 0;
358
+ }
359
+ /** All `@method()` options declared on a class, keyed by method name. */
360
+ static getMethodDecorators(ctor) {
361
+ const stored = ctor ? ObjectRegistry.methodDecorators.get(ctor) : void 0;
362
+ return new Map([...stored ?? []].map(([name, record]) => [name, record.options]));
363
+ }
364
+ /**
365
+ * Constructors whose `@method()` decorators can govern `objectName`'s runtime
366
+ * REST surface: the model itself and its registered collection class, which
367
+ * is where a collection-hosted custom action's decorator actually lands.
368
+ *
369
+ * Resolved through the registry's own qualified-name-safe lookups, so a
370
+ * simple name never decides ownership.
371
+ */
372
+ static methodDecoratorSources(objectName) {
373
+ const sources = [];
374
+ const registered = ObjectRegistry.getClass(objectName);
375
+ if (registered?.constructor) sources.push(registered.constructor);
376
+ const canonical = ObjectRegistry.getCanonicalClassName(objectName) ?? objectName;
377
+ for (const key of /* @__PURE__ */ new Set([
378
+ objectName,
379
+ canonical,
380
+ registered?.name
381
+ ])) {
382
+ const collectionConstructor = key ? ObjectRegistry.collections.get(key) : void 0;
383
+ if (collectionConstructor && !sources.includes(collectionConstructor)) sources.push(collectionConstructor);
384
+ }
385
+ return sources;
386
+ }
387
+ /**
388
+ * The `@method()` config a RUNTIME transport must honor for
389
+ * `objectName.methodName`.
390
+ *
391
+ * The manifest is the primary carrier, but it is not always reachable from
392
+ * here. Two cases need the live store:
393
+ *
394
+ * - `startRestServer([Product], { db })` is a supported posture with NO
395
+ * manifest at all: `getMethods()` is empty while the decorators did run, so
396
+ * reading only the manifest drops `@method({ expose: false })` while a
397
+ * legacy `api.routes` entry alone still routes the withheld action.
398
+ * - A COLLECTION-hosted action's manifest entry lives under the collection
399
+ * class, which the item-keyed `getMethods(objectName)` map never contains,
400
+ * even in a fully scanned project.
401
+ *
402
+ * Absent exposure metadata defaults OPEN in this framework, so either drop is
403
+ * a widening (#2686).
404
+ */
405
+ static resolveRuntimeMethodDecoratorConfig(objectName, methodName) {
406
+ return ObjectRegistry.resolveRuntimeMethod(objectName, methodName).method?.decoratorConfig;
407
+ }
408
+ /**
409
+ * Whether the standalone REST transport can HOST `objectName.methodName`.
410
+ *
411
+ * That transport serves only collection-scoped custom actions: an instance
412
+ * method on the collection class, or a static on the item class. An instance
413
+ * method on the MODEL is item-scoped and has no receiver there, and the
414
+ * browser-plane preflight prediction has to agree with dispatch about that,
415
+ * or it reports a runnable step for an action that answers 404 (#2686).
416
+ *
417
+ * Resolution mirrors {@link resolveRuntimeMethodDecoratorConfig}: the item
418
+ * class's manifest entry first, then the live decorator store, which records
419
+ * the receiver the decorator saw precisely because an unscanned runtime has
420
+ * no manifest to recover it from.
421
+ */
422
+ static isCollectionHostedMethod(objectName, methodName) {
423
+ return ObjectRegistry.resolveRuntimeMethod(objectName, methodName).collectionHosted;
424
+ }
425
+ /**
426
+ * The method view a RUNTIME transport should read for one action, and whether
427
+ * this transport can host it.
428
+ *
429
+ * Three sources, in order, because no single one covers every posture:
430
+ *
431
+ * 1. The ITEM class's manifest entry — a static there is collection-hosted,
432
+ * an instance method is item-scoped.
433
+ * 2. The registered COLLECTION class's manifest entry, which is where a
434
+ * collection-hosted action's parameters actually live. Without this the
435
+ * runtime transport sees no parameter metadata for them and silently
436
+ * degrades every one to the legacy options-bag contract.
437
+ * 3. The live `@method()` store, for an unscanned project with no manifest at
438
+ * all. It records the receiver the decorator saw, which is the only place
439
+ * that fact survives there.
440
+ *
441
+ * `collectionHosted` defaults to true when nothing is known: that is the
442
+ * legacy `api.routes`-only shape this transport has always attempted, and
443
+ * predicting a denial dispatch may not issue would be its own false answer.
444
+ */
445
+ static resolveRuntimeMethod(objectName, methodName) {
446
+ const withConfig = (method, collectionHosted) => {
447
+ if (method.decoratorConfig) return {
448
+ method,
449
+ collectionHosted
450
+ };
451
+ const declared = ObjectRegistry.resolveDeclaredMethodConfig(objectName, methodName);
452
+ return {
453
+ method: declared ? {
454
+ ...method,
455
+ decoratorConfig: declared
456
+ } : method,
457
+ collectionHosted
458
+ };
459
+ };
460
+ const fromItem = ObjectRegistry.getMethods(objectName)?.get(methodName);
461
+ if (fromItem) return withConfig(fromItem, fromItem.isStatic === true);
462
+ for (const collectionName of ObjectRegistry.collectionClassNames(objectName)) {
463
+ const fromCollection = ObjectRegistry.getMethods(collectionName)?.get(methodName);
464
+ if (fromCollection) return withConfig(fromCollection, true);
465
+ }
466
+ const itemConstructor = ObjectRegistry.getClass(objectName)?.constructor;
467
+ for (const source of ObjectRegistry.methodDecoratorSources(objectName)) {
468
+ const record = ObjectRegistry.getMethodDecoratorEntry(source, methodName);
469
+ if (!record) continue;
470
+ return {
471
+ method: { decoratorConfig: record.options },
472
+ collectionHosted: source === itemConstructor ? record.isStatic : true
473
+ };
474
+ }
475
+ return { collectionHosted: true };
476
+ }
477
+ /** Registered collection class names for `objectName`, qualified-name safe. */
478
+ static collectionClassNames(objectName) {
479
+ const names = [];
480
+ const canonical = ObjectRegistry.getCanonicalClassName(objectName) ?? objectName;
481
+ const registered = ObjectRegistry.getClass(objectName);
482
+ for (const key of /* @__PURE__ */ new Set([
483
+ objectName,
484
+ canonical,
485
+ registered?.name
486
+ ])) {
487
+ const collectionConstructor = key ? ObjectRegistry.collections.get(key) : void 0;
488
+ if (collectionConstructor?.name) names.push(collectionConstructor.name);
489
+ }
490
+ return names;
491
+ }
492
+ /** `@method()` config from the live store alone, ignoring the manifest. */
493
+ static resolveDeclaredMethodConfig(objectName, methodName) {
494
+ for (const source of ObjectRegistry.methodDecoratorSources(objectName)) {
495
+ const declared = ObjectRegistry.getMethodDecorator(source, methodName);
496
+ if (declared) return declared;
497
+ }
498
+ }
499
+ /**
500
+ * Every method name carrying a `@method()` declaration for `objectName`,
501
+ * from the manifest and the live decorator store together. Runtime
502
+ * transports enumerate this so a decorator-declared route survives in an
503
+ * unscanned project.
504
+ */
505
+ static listDecoratedMethodNames(objectName) {
506
+ const names = /* @__PURE__ */ new Set();
507
+ for (const [name, method] of ObjectRegistry.getMethods(objectName) ?? []) if (method.decoratorConfig) names.add(name);
508
+ for (const source of ObjectRegistry.methodDecoratorSources(objectName)) {
509
+ const manifestMethods = ObjectRegistry.manifestMethodsForConstructor(source);
510
+ for (const name of ObjectRegistry.getMethodDecorators(source).keys()) {
511
+ if (manifestMethods && !manifestMethods.has(name)) continue;
512
+ names.add(name);
513
+ }
514
+ }
515
+ return [...names];
516
+ }
517
+ /**
518
+ * The manifest-derived method map for the class registered under EXACTLY
519
+ * `source`, or `undefined` when no manifest described it.
520
+ *
521
+ * Matched on constructor identity, never on name: `Account` exists in both
522
+ * `smrt-ledgers` and `smrt-messages`, and one package's manifest must not
523
+ * decide what the other's live decorators may expose.
524
+ */
525
+ static manifestMethodsForConstructor(source) {
526
+ for (const registered of getClasses().values()) {
527
+ if (registered.constructor !== source) continue;
528
+ return registered.methods.size > 0 ? registered.methods : void 0;
529
+ }
530
+ }
531
+ /**
303
532
  * Check if a class has any field decorators registered
304
533
  *
305
534
  * @param className - Name of the class
@@ -344,6 +573,7 @@ var ObjectRegistry = class ObjectRegistry {
344
573
  * ```
345
574
  */
346
575
  static registerCollection(objectName, collectionConstructor) {
576
+ applyPendingDecoratorRegistrations(collectionConstructor);
347
577
  registerCollection(objectName, collectionConstructor);
348
578
  }
349
579
  static registerFromManifest(name, objectDef, packageName) {