@cldmv/slothlet 2.10.0 → 3.0.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 (188) hide show
  1. package/AGENT-USAGE.md +365 -294
  2. package/README.md +556 -233
  3. package/dist/lib/builders/api-assignment.mjs +605 -0
  4. package/dist/lib/builders/api_builder.mjs +1073 -0
  5. package/dist/lib/builders/builder.mjs +94 -0
  6. package/dist/lib/builders/modes-processor.mjs +1816 -0
  7. package/dist/lib/errors.mjs +227 -0
  8. package/dist/lib/factories/component-base.mjs +96 -0
  9. package/dist/lib/factories/context.mjs +38 -0
  10. package/dist/lib/handlers/api-cache-manager.mjs +216 -0
  11. package/dist/lib/handlers/api-manager.mjs +2364 -0
  12. package/dist/lib/handlers/context-async.mjs +184 -0
  13. package/dist/lib/handlers/context-live.mjs +184 -0
  14. package/dist/lib/handlers/hook-manager.mjs +789 -0
  15. package/dist/lib/handlers/lifecycle-token.mjs +44 -0
  16. package/dist/lib/handlers/lifecycle.mjs +131 -0
  17. package/dist/lib/handlers/materialize-manager.mjs +64 -0
  18. package/dist/lib/handlers/metadata.mjs +500 -0
  19. package/dist/lib/handlers/ownership.mjs +338 -0
  20. package/dist/lib/handlers/unified-wrapper.mjs +3031 -0
  21. package/dist/lib/helpers/class-instance-wrapper.mjs +125 -0
  22. package/dist/lib/helpers/config.mjs +343 -0
  23. package/dist/lib/helpers/eventemitter-context.mjs +365 -0
  24. package/dist/lib/helpers/hint-detector.mjs +63 -0
  25. package/dist/lib/helpers/modes-utils.mjs +53 -0
  26. package/dist/lib/helpers/resolve-from-caller.mjs +125 -85
  27. package/dist/lib/helpers/sanitize.mjs +247 -168
  28. package/dist/lib/helpers/utilities.mjs +46 -81
  29. package/dist/lib/i18n/languages/de-de.json +377 -0
  30. package/dist/lib/i18n/languages/en-gb.json +377 -0
  31. package/dist/lib/i18n/languages/en-us.json +377 -0
  32. package/dist/lib/i18n/languages/es-mx.json +377 -0
  33. package/dist/lib/i18n/languages/fr-fr.json +377 -0
  34. package/dist/lib/i18n/languages/hi-in.json +377 -0
  35. package/dist/lib/i18n/languages/ja-jp.json +377 -0
  36. package/dist/lib/i18n/languages/ko-kr.json +377 -0
  37. package/dist/lib/i18n/languages/pt-br.json +377 -0
  38. package/dist/lib/i18n/languages/ru-ru.json +377 -0
  39. package/dist/lib/i18n/languages/zh-cn.json +377 -0
  40. package/dist/lib/i18n/translations.mjs +140 -0
  41. package/dist/lib/modes/eager.mjs +75 -0
  42. package/dist/lib/modes/lazy.mjs +97 -0
  43. package/dist/lib/processors/flatten.mjs +453 -0
  44. package/dist/lib/processors/loader.mjs +355 -0
  45. package/dist/lib/processors/type-generator.mjs +291 -0
  46. package/dist/lib/processors/typescript.mjs +188 -0
  47. package/dist/lib/runtime/runtime-asynclocalstorage.mjs +80 -522
  48. package/dist/lib/runtime/runtime-livebindings.mjs +45 -390
  49. package/dist/lib/runtime/runtime.mjs +39 -159
  50. package/dist/slothlet.mjs +529 -700
  51. package/docs/API-RULES.md +497 -617
  52. package/index.cjs +4 -4
  53. package/index.mjs +82 -45
  54. package/package.json +139 -26
  55. package/types/dist/lib/builders/api-assignment.d.mts +97 -0
  56. package/types/dist/lib/builders/api-assignment.d.mts.map +1 -0
  57. package/types/dist/lib/builders/api_builder.d.mts +96 -0
  58. package/types/dist/lib/builders/api_builder.d.mts.map +1 -0
  59. package/types/dist/lib/builders/builder.d.mts +60 -0
  60. package/types/dist/lib/builders/builder.d.mts.map +1 -0
  61. package/types/dist/lib/builders/modes-processor.d.mts +32 -0
  62. package/types/dist/lib/builders/modes-processor.d.mts.map +1 -0
  63. package/types/dist/lib/errors.d.mts +118 -0
  64. package/types/dist/lib/errors.d.mts.map +1 -0
  65. package/types/dist/lib/factories/component-base.d.mts +182 -0
  66. package/types/dist/lib/factories/component-base.d.mts.map +1 -0
  67. package/types/dist/lib/factories/context.d.mts +26 -0
  68. package/types/dist/lib/factories/context.d.mts.map +1 -0
  69. package/types/dist/lib/handlers/api-cache-manager.d.mts +208 -0
  70. package/types/dist/lib/handlers/api-cache-manager.d.mts.map +1 -0
  71. package/types/dist/lib/handlers/api-manager.d.mts +392 -0
  72. package/types/dist/lib/handlers/api-manager.d.mts.map +1 -0
  73. package/types/dist/lib/handlers/context-async.d.mts +66 -0
  74. package/types/dist/lib/handlers/context-async.d.mts.map +1 -0
  75. package/types/dist/lib/handlers/context-live.d.mts +65 -0
  76. package/types/dist/lib/handlers/context-live.d.mts.map +1 -0
  77. package/types/dist/lib/handlers/hook-manager.d.mts +199 -0
  78. package/types/dist/lib/handlers/hook-manager.d.mts.map +1 -0
  79. package/types/dist/lib/handlers/lifecycle-token.d.mts +49 -0
  80. package/types/dist/lib/handlers/lifecycle-token.d.mts.map +1 -0
  81. package/types/dist/lib/handlers/lifecycle.d.mts +90 -0
  82. package/types/dist/lib/handlers/lifecycle.d.mts.map +1 -0
  83. package/types/dist/lib/handlers/materialize-manager.d.mts +75 -0
  84. package/types/dist/lib/handlers/materialize-manager.d.mts.map +1 -0
  85. package/types/dist/lib/handlers/metadata.d.mts +215 -0
  86. package/types/dist/lib/handlers/metadata.d.mts.map +1 -0
  87. package/types/dist/lib/handlers/ownership.d.mts +170 -0
  88. package/types/dist/lib/handlers/ownership.d.mts.map +1 -0
  89. package/types/dist/lib/handlers/unified-wrapper.d.mts +250 -0
  90. package/types/dist/lib/handlers/unified-wrapper.d.mts.map +1 -0
  91. package/types/dist/lib/helpers/class-instance-wrapper.d.mts +54 -0
  92. package/types/dist/lib/helpers/class-instance-wrapper.d.mts.map +1 -0
  93. package/types/dist/lib/helpers/config.d.mts +96 -0
  94. package/types/dist/lib/helpers/config.d.mts.map +1 -0
  95. package/types/dist/lib/helpers/eventemitter-context.d.mts +31 -0
  96. package/types/dist/lib/helpers/eventemitter-context.d.mts.map +1 -0
  97. package/types/dist/lib/helpers/hint-detector.d.mts +20 -0
  98. package/types/dist/lib/helpers/hint-detector.d.mts.map +1 -0
  99. package/types/dist/lib/helpers/modes-utils.d.mts +35 -0
  100. package/types/dist/lib/helpers/modes-utils.d.mts.map +1 -0
  101. package/types/dist/lib/helpers/resolve-from-caller.d.mts +29 -145
  102. package/types/dist/lib/helpers/resolve-from-caller.d.mts.map +1 -1
  103. package/types/dist/lib/helpers/sanitize.d.mts +95 -94
  104. package/types/dist/lib/helpers/sanitize.d.mts.map +1 -1
  105. package/types/dist/lib/helpers/utilities.d.mts +53 -116
  106. package/types/dist/lib/helpers/utilities.d.mts.map +1 -1
  107. package/types/dist/lib/i18n/translations.d.mts +39 -0
  108. package/types/dist/lib/i18n/translations.d.mts.map +1 -0
  109. package/types/dist/lib/modes/eager.d.mts +36 -0
  110. package/types/dist/lib/modes/eager.d.mts.map +1 -0
  111. package/types/dist/lib/modes/lazy.d.mts +49 -0
  112. package/types/dist/lib/modes/lazy.d.mts.map +1 -0
  113. package/types/dist/lib/processors/flatten.d.mts +114 -0
  114. package/types/dist/lib/processors/flatten.d.mts.map +1 -0
  115. package/types/dist/lib/processors/loader.d.mts +47 -0
  116. package/types/dist/lib/processors/loader.d.mts.map +1 -0
  117. package/types/dist/lib/processors/type-generator.d.mts +19 -0
  118. package/types/dist/lib/processors/type-generator.d.mts.map +1 -0
  119. package/types/dist/lib/processors/typescript.d.mts +55 -0
  120. package/types/dist/lib/processors/typescript.d.mts.map +1 -0
  121. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts +47 -42
  122. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts.map +1 -1
  123. package/types/dist/lib/runtime/runtime-livebindings.d.mts +34 -65
  124. package/types/dist/lib/runtime/runtime-livebindings.d.mts.map +1 -1
  125. package/types/dist/lib/runtime/runtime.d.mts +39 -9
  126. package/types/dist/lib/runtime/runtime.d.mts.map +1 -1
  127. package/types/dist/slothlet.d.mts +186 -105
  128. package/types/dist/slothlet.d.mts.map +1 -1
  129. package/types/index.d.mts +1 -3
  130. package/dist/lib/engine/README.md +0 -21
  131. package/dist/lib/engine/slothlet_child.mjs +0 -59
  132. package/dist/lib/engine/slothlet_engine.mjs +0 -372
  133. package/dist/lib/engine/slothlet_esm.mjs +0 -230
  134. package/dist/lib/engine/slothlet_helpers.mjs +0 -455
  135. package/dist/lib/engine/slothlet_worker.mjs +0 -149
  136. package/dist/lib/helpers/als-eventemitter.mjs +0 -256
  137. package/dist/lib/helpers/api_builder/add_api.mjs +0 -292
  138. package/dist/lib/helpers/api_builder/analysis.mjs +0 -532
  139. package/dist/lib/helpers/api_builder/construction.mjs +0 -457
  140. package/dist/lib/helpers/api_builder/decisions.mjs +0 -737
  141. package/dist/lib/helpers/api_builder/metadata.mjs +0 -248
  142. package/dist/lib/helpers/api_builder.mjs +0 -41
  143. package/dist/lib/helpers/auto-wrap.mjs +0 -62
  144. package/dist/lib/helpers/hooks.mjs +0 -389
  145. package/dist/lib/helpers/instance-manager.mjs +0 -111
  146. package/dist/lib/helpers/metadata-api.mjs +0 -201
  147. package/dist/lib/helpers/multidefault.mjs +0 -216
  148. package/dist/lib/modes/slothlet_eager.mjs +0 -126
  149. package/dist/lib/modes/slothlet_lazy.mjs +0 -513
  150. package/docs/API-RULES-CONDITIONS.md +0 -508
  151. package/types/dist/lib/engine/slothlet_child.d.mts +0 -2
  152. package/types/dist/lib/engine/slothlet_child.d.mts.map +0 -1
  153. package/types/dist/lib/engine/slothlet_engine.d.mts +0 -31
  154. package/types/dist/lib/engine/slothlet_engine.d.mts.map +0 -1
  155. package/types/dist/lib/engine/slothlet_esm.d.mts +0 -19
  156. package/types/dist/lib/engine/slothlet_esm.d.mts.map +0 -1
  157. package/types/dist/lib/engine/slothlet_helpers.d.mts +0 -25
  158. package/types/dist/lib/engine/slothlet_helpers.d.mts.map +0 -1
  159. package/types/dist/lib/engine/slothlet_worker.d.mts +0 -2
  160. package/types/dist/lib/engine/slothlet_worker.d.mts.map +0 -1
  161. package/types/dist/lib/helpers/als-eventemitter.d.mts +0 -56
  162. package/types/dist/lib/helpers/als-eventemitter.d.mts.map +0 -1
  163. package/types/dist/lib/helpers/api_builder/add_api.d.mts +0 -76
  164. package/types/dist/lib/helpers/api_builder/add_api.d.mts.map +0 -1
  165. package/types/dist/lib/helpers/api_builder/analysis.d.mts +0 -189
  166. package/types/dist/lib/helpers/api_builder/analysis.d.mts.map +0 -1
  167. package/types/dist/lib/helpers/api_builder/construction.d.mts +0 -107
  168. package/types/dist/lib/helpers/api_builder/construction.d.mts.map +0 -1
  169. package/types/dist/lib/helpers/api_builder/decisions.d.mts +0 -213
  170. package/types/dist/lib/helpers/api_builder/decisions.d.mts.map +0 -1
  171. package/types/dist/lib/helpers/api_builder/metadata.d.mts +0 -99
  172. package/types/dist/lib/helpers/api_builder/metadata.d.mts.map +0 -1
  173. package/types/dist/lib/helpers/api_builder.d.mts +0 -6
  174. package/types/dist/lib/helpers/api_builder.d.mts.map +0 -1
  175. package/types/dist/lib/helpers/auto-wrap.d.mts +0 -49
  176. package/types/dist/lib/helpers/auto-wrap.d.mts.map +0 -1
  177. package/types/dist/lib/helpers/hooks.d.mts +0 -342
  178. package/types/dist/lib/helpers/hooks.d.mts.map +0 -1
  179. package/types/dist/lib/helpers/instance-manager.d.mts +0 -41
  180. package/types/dist/lib/helpers/instance-manager.d.mts.map +0 -1
  181. package/types/dist/lib/helpers/metadata-api.d.mts +0 -132
  182. package/types/dist/lib/helpers/metadata-api.d.mts.map +0 -1
  183. package/types/dist/lib/helpers/multidefault.d.mts +0 -90
  184. package/types/dist/lib/helpers/multidefault.d.mts.map +0 -1
  185. package/types/dist/lib/modes/slothlet_eager.d.mts +0 -65
  186. package/types/dist/lib/modes/slothlet_eager.d.mts.map +0 -1
  187. package/types/dist/lib/modes/slothlet_lazy.d.mts +0 -31
  188. package/types/dist/lib/modes/slothlet_lazy.d.mts.map +0 -1
@@ -0,0 +1,377 @@
1
+ {
2
+ "translations": {
3
+ "INVALID_CONFIG": "Invalid configuration: {option} is {value}, expected {expected}. {hint}",
4
+ "INVALID_CONFIG_DIR_MISSING": "Configuration error: 'dir' option is required. Provide a directory path to load API from.",
5
+ "INVALID_CONFIG_DIR_INVALID": "Configuration error: 'dir' must be a non-empty string path. Received: {dir}",
6
+ "INVALID_CONFIG_MODE_INVALID": "Configuration error: 'mode' must be either 'eager' or 'lazy'. Received: {value}",
7
+ "INVALID_CONFIG_NOT_LOADED": "Cannot perform operation '{operation}' - instance not loaded. Call load() first.",
8
+ "INVALID_CONFIG_LAZY_MATERIALIZATION_FAILED": "Failed to materialize lazy proxy for '{apiPath}'. Check that the module loads correctly.",
9
+ "INVALID_CONFIG_NOT_A_FUNCTION": "Cannot call '{apiPath}' - not a function (got {actualType}). Check that the module exports a callable function.",
10
+ "INVALID_CONFIG_API_PATH_INVALID": "Invalid API path '{apiPath}': {reason}. API paths must be non-empty, properly formatted dot-notation strings that don't conflict with reserved names. Segment at index {index}: '{segment}'.",
11
+ "INVALID_CONFIG_FORCE_OVERWRITE_REQUIRES_MODULE_ID": "Configuration error: forceOverwrite/allowOverwrite requires a moduleID. Provide a unique moduleID when using overwrite options for API path '{apiPath}'.",
12
+ "INVALID_METADATA_TARGET": "Invalid metadata target: expected {expected}, received {target}. Metadata operations require a function or object reference.",
13
+ "METADATA_NO_MODULE_ID": "Cannot set user metadata: no moduleID found in system metadata. Ensure the target function/object was loaded through Slothlet.",
14
+ "METADATA_LIFECYCLE_BYPASS": "tagSystemMetadata() must be called through the lifecycle system. Use lifecycle.emit('impl:created') or lifecycle.emit('impl:changed') instead of a direct call.",
15
+ "INVALID_METADATA_KEY": "Invalid metadata key: expected {expected}, received {type} for key '{key}'. Metadata keys must be properly formatted.",
16
+ "WARNING_METADATA_MISMATCH": "Security warning: Metadata file path mismatch for '{apiPath}'. Stack trace shows '{stackFile}' but metadata shows '{metadataFile}'. This may indicate hot reload or tampering.",
17
+ "COLLISION_ERROR": "Collision error at '{key}' (context: {collisionContext}, mode: {collisionMode}). Set collision mode to 'merge', 'replace', 'warn', or 'skip' to handle collisions.",
18
+ "COLLISION_DEFAULT_EXPORT_ERROR": "Collision detected: property '{key}' already exists on default export at '{apiPath}'. Collision mode is 'error'.",
19
+ "INVALID_ARGUMENT": "Invalid argument '{argument}': expected {expected}, received {received}.",
20
+ "RUNTIME_NO_ACTIVE_CONTEXT": "No active context found. This operation requires being called from within a slothlet API function.",
21
+ "INVALID_CONFIG_MUTATIONS_DISABLED": "Cannot perform '{operation}' - mutation is disabled. Set allowMutation: true to enable API modification operations (add/remove/reload).",
22
+ "CACHE_MODULEID_MISMATCH": "Cache entry moduleID mismatch: expected '{cacheKey}', but entry has '{entryModuleID}'. This indicates an internal cache inconsistency.",
23
+ "CACHE_NOT_FOUND": "Cache entry not found for moduleID '{moduleID}' during '{operation}' operation. The module may not be loaded or the cache may have been cleared.",
24
+ "CACHE_MANAGER_NOT_AVAILABLE": "Cache manager is not available. Cannot perform '{operation}' operation. Ensure the cache manager is initialized.",
25
+ "MODULE_LOAD_FAILED": "Failed to load module '{modulePath}' (ID: {moduleID}): {error}",
26
+ "MODULE_NOT_FOUND": "Module not found: {modulePath}. {hint}",
27
+ "MODULE_IMPORT_FAILED": "Failed to import module '{modulePath}': {error}. Check that the file exists and has valid syntax.",
28
+ "CONTEXT_ALREADY_EXISTS": "Context for instance '{instanceID}' already exists. Cannot initialize twice.",
29
+ "CONTEXT_NOT_FOUND": "Context not found for instance '{instanceID}'. Instance may have been shut down. Available instances: {availableInstances}",
30
+ "CONTEXT_EXECUTION_FAILED": "Failed to execute in context for instance '{instanceID}': {error}",
31
+ "NO_ACTIVE_CONTEXT_LIVE": "No active context - no instance is currently active in live bindings mode.",
32
+ "NO_ACTIVE_CONTEXT_ASYNC": "No active context - function must be called within slothlet API context.",
33
+ "RUNTIME_NO_ACTIVE_CONTEXT_SELF": "No active context - cannot access 'self'. Ensure you're calling from within a Slothlet API function.",
34
+ "RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "No active context - 'context' can only be modified within slothlet API calls.",
35
+ "OWNERSHIP_INVALID_MODULE_ID": "Invalid ownership registration: moduleID '{moduleID}' is invalid.",
36
+ "OWNERSHIP_INVALID_API_PATH": "Invalid ownership registration: apiPath '{apiPath}' is invalid.",
37
+ "OWNERSHIP_CONFLICT": "Ownership conflict: Path '{apiPath}' is already owned by module '{existingModuleId}', cannot assign to '{newModuleId}'. Use forceOverwrite: true or removeApi first.",
38
+ "INVALID_DIRECTORY": "Invalid directory '{dir}': {error}. Ensure the directory exists and is accessible.",
39
+ "WARN_DIRECTORY_EMPTY": "Directory '{dir}' (resolved: '{resolvedPath}') is empty or contains no loadable modules (.mjs, .cjs, .js files). This is valid for add-api workflows but may indicate a misconfigured path.",
40
+ "INTERNAL_HOOK_STATE_CORRUPT": "[INTERNAL ERROR] HookManager state is corrupt: hook \"{hookId}\" ({type}/{subset}/{pattern}) — {detail}. This is a bug in Slothlet — please report it.",
41
+ "WARNING_RESERVED_PROPERTY_CONFLICT": "User API conflicts with reserved properties: {properties}",
42
+ "WARNING_LANGUAGE_LOAD_FAILED": "Failed to load language '{lang}', falling back to English.",
43
+ "WARNING_LANGUAGE_UNAVAILABLE": "Language '{lang}' is not available, using English.",
44
+ "WARNING_OWNERSHIP_CONFLICT": "Ownership conflict at '{apiPath}': already owned by '{existingModuleId}', cannot register '{newModuleId}'. Keeping existing.",
45
+ "WARNING_HOT_RELOAD_PATH_COLLISION": "Path collision at {apiPath} - keeping existing value (collision mode: warn).",
46
+ "WARNING_HOT_RELOAD_MERGE_PRIMITIVES": "Cannot merge primitive values at {apiPath} - keeping existing value. Use collision mode 'replace' to overwrite or ensure both values are objects.",
47
+ "WARNING_COLLISION_FILE_FOLDER_MERGE": "Collision detected at '{key}' - merging file and folder exports (collision mode: 'warn').",
48
+ "HINT_WARNING_COLLISION_FILE_FOLDER_MERGE": "A file and a folder share the same name at '{key}'. Their exports are being merged. Rename one to avoid ambiguity, or set collisionMode to 'replace' or 'error' if merging is not intended.",
49
+ "WARNING_COLLISION_DEFAULT_EXPORT_OVERWRITE": "Collision warning: property '{key}' already exists on default export function at {apiPath}. Named export will overwrite.",
50
+ "HINT_WARNING_COLLISION_DEFAULT_EXPORT_OVERWRITE": "The named export '{key}' at '{apiPath}' is overwriting an existing property on the default export function. Rename the export or use a different apiPath to avoid the collision.",
51
+ "WARNING_COLLISION_TRIGGER_MATERIALIZE_ERROR": "Early materialization failed for lazy folder at '{apiPath}'. The collision replacement may be incomplete.",
52
+ "HINT_WARNING_COLLISION_TRIGGER_MATERIALIZE_ERROR": "This is a non-critical background error during collision handling. The lazy folder at the given path failed to materialize. Check that the module at that path is valid and can be loaded.",
53
+ "WARNING_LIFECYCLE_HANDLER_ERROR": "Lifecycle event handler threw an error for event '{event}'. Other handlers for this event continued executing.",
54
+ "HINT_WARNING_LIFECYCLE_HANDLER_ERROR": "A lifecycle handler registered for the '{event}' event threw an error. Check your lifecycle.on('{event}', ...) handler for bugs. Other handlers in the same event are not affected.",
55
+ "WARNING_MULTIPLE_ROOT_CONTRIBUTORS": "Multiple root-level default function exports detected: {rootContributors}. Each has been namespaced by filename (e.g., api.{firstContributor}()). Consider using a single root-level default export or moving files to subdirectories.",
56
+ "V2_CONFIG_UNSUPPORTED": "Configuration option '{option}' from v2 is not supported in v3. {hint} Use '{replacement}' instead.",
57
+ "DEBUG_MODE_ROOT_CONTRIBUTOR": "[{mode}] Root contributor detected: {functionName}",
58
+ "DEBUG_MODE_ROOT_CONTRIBUTOR_APPLIED": "[{mode}] Root contributor pattern applied - function API with {properties} additional properties",
59
+ "DEBUG_MODE_PROCESSING_DIRECTORY": "[{mode}] Processing directory: {categoryName} (depth {currentDepth})",
60
+ "DEBUG_MODE_MODULE_DECISION": "[{mode}] Module {moduleName}: {reason}",
61
+ "DEBUG_MODE_FLATTENING": "[{mode}] Flattening {moduleName}: {flattenType}",
62
+ "DEBUG_MODE_ASSIGN_TO_API": "ASSIGN-TO-API",
63
+ "DEBUG_MODE_COLLISION_CHECK": "COLLISION-CHECK",
64
+ "DEBUG_MODE_COLLISION_DETECT": "COLLISION-DETECT",
65
+ "DEBUG_MODE_COLLISION_WRAPPER_DETECTION": "COLLISION: wrapper detection",
66
+ "DEBUG_MODE_COLLISION_LAZY_DETECTION": "COLLISION: lazy detection",
67
+ "DEBUG_MODE_COLLISION_SET_MODE_EXISTING_WRAPPER": "COLLISION: Setting collision mode on EXISTING wrapper",
68
+ "DEBUG_MODE_COLLISION_VERIFIED_EXISTING_WRAPPER_MODE": "COLLISION: Verified existing wrapper collision mode",
69
+ "DEBUG_MODE_COLLISION_SET_MODE_VALUE_WRAPPER": "COLLISION: Setting collision mode on VALUE wrapper",
70
+ "DEBUG_MODE_COLLISION_VERIFIED_VALUE_WRAPPER_MODE": "COLLISION: Verified value wrapper collision mode",
71
+ "DEBUG_MODE_COLLISION_REPLACE_MATERIALIZE": "COLLISION-REPLACE-MATERIALIZE: Triggering immediate materialization",
72
+ "DEBUG_MODE_COLLISION_REPLACE_NO_COPY": "COLLISION-REPLACE: Not copying file properties - replace mode will clear everything on materialization",
73
+ "DEBUG_MODE_COLLISION_REPLACE_BEFORE": "COLLISION-REPLACE: BEFORE assignment",
74
+ "DEBUG_MODE_COLLISION_ASSIGN_REPLACING_WITH_LAZY": "COLLISION-ASSIGN: Replacing existing with lazy folder",
75
+ "DEBUG_MODE_COLLISION_REPLACE_AFTER": "COLLISION-REPLACE: AFTER assignment",
76
+ "DEBUG_MODE_COLLISION_REPLACE_VERIFY": "COLLISION-REPLACE: Verification",
77
+ "DEBUG_MODE_COLLISION_COPY_CHILD_KEYS": "COLLISION-COPY: Copying existing child keys",
78
+ "DEBUG_MODE_COLLISION_COPY_INDIVIDUAL_KEY": "COLLISION-COPY: Copying individual key",
79
+ "DEBUG_MODE_COLLISION_TRIGGER_EARLY_MAT": "COLLISION-TRIGGER-MAT: Triggering early materialization (fire-and-forget)",
80
+ "DEBUG_MODE_MERGE_API_OBJECTS_ENTRY": "mergeApiObjects entry",
81
+ "DEBUG_MODE_MERGE_API_OBJECTS_SOURCE_KEYS": "mergeApiObjects sourceApi keys",
82
+ "DEBUG_MODE_MERGE_API_OBJECTS_EXIT_INVALID_SOURCE": "mergeApiObjects exit - sourceApi not object/function",
83
+ "DEBUG_MODE_MERGE_API_OBJECTS_PROCESSING_KEY": "mergeApiObjects processing key",
84
+ "DEBUG_MODE_MERGE_API_OBJECTS_RECURSING": "mergeApiObjects - both plain objects, recursing",
85
+ "DEBUG_MODE_MERGE_API_OBJECTS_CALLING_ASSIGN": "mergeApiObjects calling assignToApiPath",
86
+ "DEBUG_MODE_BUILD_FINAL_API_CALLED": "buildFinalAPI called",
87
+ "DEBUG_MODE_SLOTHLET_NAMESPACE_CREATED": "Slothlet namespace created",
88
+ "DEBUG_MODE_BUILT_INS_ATTACHED": "Built-ins attached",
89
+ "DEBUG_MODE_CATEGORY_REUSE_EXISTING_WRAPPER": "Category reuse - using existing wrapper",
90
+ "DEBUG_MODE_CATEGORY_WRAPPER_CREATED": "Category wrapper created",
91
+ "DEBUG_MODE_CATEGORY_WRAPPER_ASSIGNED": "Category wrapper assigned to API",
92
+ "DEBUG_MODE_CATEGORY_CREATED": "Category created",
93
+ "DEBUG_MODE_CATEGORY_TARGET_API_STATUS": "Category targetApi status",
94
+ "DEBUG_MODE_PROCESSING_FILE": "Processing file",
95
+ "DEBUG_MODE_PROCESSING_MODULE": "Processing module",
96
+ "DEBUG_MODE_FILE_PROCESSING": "File processing",
97
+ "DEBUG_MODE_SINGLE_FILE_FOLDER_DETECTED": "Single-file folder detected",
98
+ "DEBUG_MODE_SINGLE_FILE_FOLDER_WRAPPED": "Single-file folder set to wrapped property",
99
+ "DEBUG_MODE_FLATTEN_MULTI_EXPORT_FILE": "Flatten multi-export file",
100
+ "DEBUG_MODE_FLATTEN_MULTI_EXPORT_TARGET_STATUS": "Flatten multi-export targetApi status",
101
+ "DEBUG_MODE_FLATTEN_MULTI_EXPORT_ASSIGNING": "Flatten multi-export assigning key",
102
+ "DEBUG_MODE_FLATTEN_MULTI_EXPORT_ASSIGNED": "Flatten multi-export key assigned successfully",
103
+ "DEBUG_MODE_FLATTEN_MULTI_EXPORT_BLOCKED": "Flatten multi-export key blocked by safeAssign",
104
+ "DEBUG_MODE_FILE_WRAPPER_ASSIGNMENT": "File wrapper assignment",
105
+ "DEBUG_MODE_AFTER_ASSIGNMENT_STATUS": "After assignment status",
106
+ "DEBUG_MODE_SUBDIRECTORY_CHECK": "Subdirectory check",
107
+ "DEBUG_MODE_DIRECTORY_CHECK": "Directory check",
108
+ "DEBUG_MODE_DIRECTORY_CHECK_PASSED": "Directory check passed",
109
+ "DEBUG_MODE_SUBDIRECTORIES_FOUND": "Subdirectories found",
110
+ "DEBUG_MODE_SUBDIRECTORY_LOOP_START": "Subdirectory loop start",
111
+ "DEBUG_MODE_PROCESSING_SUBDIRECTORY": "Processing subdirectory",
112
+ "DEBUG_MODE_FOLDER_LEVEL_FLATTEN_CHECK": "Folder-level flatten check",
113
+ "DEBUG_MODE_FOLDER_LEVEL_FLATTEN_SKIP_RECURSION": "Folder-level flatten - skipping recursion",
114
+ "DEBUG_MODE_FILE_FOLDER_COLLISION_MERGED": "File-folder collision: merged file exports into folder impl",
115
+ "DEBUG_MODE_CREATING_LAZY_SUBDIRECTORY": "Creating lazy subdirectory",
116
+ "DEBUG_MODE_MATERIALIZE_FUNCTION_STARTING": "Materialize function starting",
117
+ "DEBUG_MODE_MATERIALIZE_FUNCTION_RETURNING_IMPL": "Materialize function returning impl",
118
+ "DEBUG_MODE_FOLDER_PATTERN_MATCH": "Folder pattern match",
119
+ "DEBUG_MODE_FOLDER_PATTERN_ATTACH_PROPERTY": "Folder pattern attach property",
120
+ "DEBUG_MODE_FOLDER_PATTERN_RETURN": "Folder pattern return",
121
+ "DEBUG_MODE_CACHE_ENTRY_STORED": "Cache entry stored",
122
+ "DEBUG_MODE_CACHE_ENTRY_DELETED": "Cache entry deleted",
123
+ "DEBUG_MODE_ALL_CACHES_CLEARED": "All caches cleared",
124
+ "DEBUG_MODE_REBUILDING_CACHE_FROM_DISK": "Rebuilding cache from disk",
125
+ "DEBUG_MODE_CACHE_REBUILT_SUCCESSFULLY": "Cache rebuilt successfully",
126
+ "DEBUG_MODE_SYNC_WRAPPER_ENTRY_EXISTING": "syncWrapper entry - existingProxy",
127
+ "DEBUG_MODE_SYNC_WRAPPER_ENTRY_NEXT": "syncWrapper entry - nextProxy",
128
+ "DEBUG_MODE_SYNC_WRAPPER_EXISTING": "syncWrapper existingWrapper",
129
+ "DEBUG_MODE_SYNC_WRAPPER_NEXT": "syncWrapper nextWrapper",
130
+ "DEBUG_MODE_SYNC_WRAPPER_BEFORE_MERGE": "syncWrapper before merge",
131
+ "DEBUG_MODE_SYNC_WRAPPER_NEXT_IMPL_KEYS": "syncWrapper next wrapper impl keys",
132
+ "DEBUG_MODE_SYNC_WRAPPER_NEXT_CHILDCACHE_KEYS": "syncWrapper next wrapper childCache keys",
133
+ "DEBUG_MODE_MUTATE_API_VALUE_CALLED": "mutateApiValue called",
134
+ "DEBUG_MODE_MUTATE_API_VALUE_WRAPPER_STATUS": "mutateApiValue wrapper status",
135
+ "DEBUG_MODE_MUTATE_API_VALUE_NEXT_VALUE": "mutateApiValue nextValue",
136
+ "DEBUG_MODE_MUTATE_API_VALUE_NEXT_VALUE_KEYS": "mutateApiValue nextValue keys",
137
+ "DEBUG_MODE_MUTATE_API_VALUE_SYNC_WRAPPERS": "mutateApiValue - both are wrappers, calling syncWrapper",
138
+ "DEBUG_MODE_MUTATE_API_VALUE_MERGE_INTO_WRAPPER": "mutateApiValue - merging properties into existing wrapper",
139
+ "DEBUG_MODE_MUTATE_API_VALUE_MERGE_KEYS": "mutateApiValue nextValue keys to merge",
140
+ "DEBUG_MODE_MUTATE_API_VALUE_SETIMPL_FALLBACK": "mutateApiValue - using ___setImpl fallback",
141
+ "DEBUG_MODE_SET_VALUE_AT_PATH": "setValueAtPath",
142
+ "DEBUG_MODE_SET_VALUE_AT_PATH_SKIP_COLLISION": "setValueAtPath - skipping collision",
143
+ "DEBUG_MODE_SET_VALUE_AT_PATH_REPLACE_MERGE": "setValueAtPath - replacing with merge (preserves wrapper)",
144
+ "DEBUG_MODE_SET_VALUE_AT_PATH_MERGE_PROPS": "setValueAtPath - merging properties",
145
+ "DEBUG_MODE_SET_VALUE_AT_PATH_ASSIGN": "setValueAtPath - no collision, assigning",
146
+ "DEBUG_MODE_ADD_API_COMPONENT_BUILD_RETURN": "addApiComponent buildAPI return structure",
147
+ "DEBUG_MODE_RULE_13_DEDUP_HOISTED_KEY": "Rule 13 C34: AddApi path deduplication - hoisted duplicate key",
148
+ "DEBUG_MODE_ADD_API_COMPONENT_MERGE_KEYS": "addApiComponent apiToMerge keys",
149
+ "DEBUG_MODE_AWAITING_PENDING_MATERIALIZATIONS": "Awaiting {count} pending materialization(s) before completing add",
150
+ "DEBUG_MODE_CACHE_DELETED_MODULE_REMOVED": "Cache deleted for removed module",
151
+ "DEBUG_MODE_RELOADING_MODULE_BY_ID": "Reloading module by ID",
152
+ "DEBUG_MODE_FRESH_API_KEYS_BEFORE_RESTORE": "Fresh API keys before restore",
153
+ "DEBUG_MODE_FRESH_API_KEYS_AFTER_RESTORE": "Fresh API keys after restore",
154
+ "DEBUG_MODE_MODULE_RELOAD_COMPLETE": "Module reload complete",
155
+ "DEBUG_MODE_RELOADING_BY_API_PATH": "Reloading by API path",
156
+ "DEBUG_MODE_NO_CACHES_ATTEMPTING_RESTORE": "No caches found for path, attempting base restore",
157
+ "DEBUG_MODE_API_PATH_RELOAD_COMPLETE": "API path reload complete",
158
+ "DEBUG_MODE_RESTORE_ROOT_KEY_INSPECT": "RESTORE-ROOT-KEY-INSPECT",
159
+ "DEBUG_MODE_ROOT_KEY_RESET_LAZY": "Root key reset to lazy via ___resetLazy",
160
+ "DEBUG_MODE_ROOT_KEY_UPDATED_SETIMPL": "Root key updated via ___setImpl",
161
+ "DEBUG_MODE_RESTORE_NESTED_PATH": "RESTORE: nested path",
162
+ "DEBUG_MODE_RESTORE_FORCING_REPLACE": "RESTORE: forcing replace mode",
163
+ "DEBUG_MODE_UPDATED_WRAPPER_IMPL": "Updated existing wrapper implementation",
164
+ "DEBUG_MODE_CREATED_NEW_WRAPPER_UNEXPECTED": "Created new wrapper (unexpected in reload)",
165
+ "DEBUG_MODE_LIFECYCLE_EVENT": "Event: {event}",
166
+ "DEBUG_MODE_WRAPPER_CONSTRUCTOR_IMPL_KEYS": "UnifiedWrapper constructor - impl keys",
167
+ "DEBUG_MODE_WRAPPER_CONSTRUCTOR_AFTER_ADOPT": "UnifiedWrapper constructor - after adopt",
168
+ "DEBUG_MODE_BACKGROUND_MATERIALIZE_ERROR": "Background materialization error",
169
+ "DEBUG_MODE_APPLY_IMPL_UPDATE_PATH": "APPLY-IMPL-UPDATE-PATH: updated filePath from null",
170
+ "DEBUG_MODE_SETIMPL_CALLED": "___setImpl called",
171
+ "DEBUG_MODE_RESETLAZY_CALLED": "___resetLazy called",
172
+ "DEBUG_MODE_RESETLAZY_COMPLETE": "___resetLazy complete - wrapper is now un-materialized",
173
+ "DEBUG_MODE_MATERIALIZE_AWAIT": "MATERIALIZE-AWAIT: awaiting existing materialization promise",
174
+ "DEBUG_MODE_MATERIALIZE_START": "_materialize start",
175
+ "DEBUG_MODE_MATERIALIZE_CALLING_FUNC": "_materialize calling materializeFunc",
176
+ "DEBUG_MODE_MATERIALIZE_COMPLETE": "_materialize complete",
177
+ "DEBUG_MODE_MATERIALIZE_ERROR": "_materialize error",
178
+ "DEBUG_MODE_ADOPT_START": "ADOPT-START",
179
+ "DEBUG_MODE_ADOPT": "ADOPT",
180
+ "DEBUG_MODE_ADOPT_REPLACE_CLEARING": "ADOPT: REPLACE MODE - Clearing existing properties",
181
+ "DEBUG_MODE_ADOPT_PROCESS": "ADOPT-PROCESS",
182
+ "DEBUG_MODE_ADOPT_CHECK": "ADOPT-CHECK",
183
+ "DEBUG_MODE_ADOPT_SKIP_COLLISION_MERGED": "ADOPT-SKIP: is collision-merged, keeping file version",
184
+ "DEBUG_MODE_ADOPT_SKIP_NON_CONFIGURABLE": "ADOPT-SKIP: property is non-configurable (inherited)",
185
+ "DEBUG_MODE_ADOPT_SKIP_SAME_WRAPPER": "ADOPT-SKIP: property already exists with same wrapper",
186
+ "DEBUG_MODE_ADOPT_ALLOW_NOT_COLLISION_MERGED": "ADOPT-ALLOW: is NOT collision-merged, allowing",
187
+ "DEBUG_MODE_ADOPT_REUSE_CHILD_WRAPPER": "ADOPT-REUSE: Reused existing child wrapper",
188
+ "DEBUG_MODE_ADOPT_WRAP": "ADOPT-WRAP",
189
+ "DEBUG_MODE_ADOPT_DEFINE": "ADOPT-DEFINE: defining on wrapper",
190
+ "DEBUG_MODE_ADOPT_DEFINED": "ADOPT-DEFINED: defined successfully on wrapper",
191
+ "DEBUG_MODE_WRAP_CHILD_PATH_CHECK": "WRAP-CHILD-PATH: checking for child file path",
192
+ "DEBUG_MODE_WRAP_CHILD_PATH_AVAILABLE": "WRAP-CHILD-PATH: __childFilePaths available",
193
+ "DEBUG_MODE_WRAP_CHILD_PATH_USING": "WRAP-CHILD-PATH: Using __childFilePaths",
194
+ "DEBUG_MODE_WRAP_CHILD_PATH_PRE_MAT": "WRAP-CHILD-PATH: Using __childFilePathsPreMaterialize",
195
+ "DEBUG_MODE_WRAP_CHILD_PATH_FALLBACK": "WRAP-CHILD-PATH: Using fallback parentMetadata?.filePath",
196
+ "DEBUG_MODE_WAITING_TYPE": "WAITING-TYPE",
197
+ "DEBUG_MODE_WAITING_TYPE_WALK_WRAPPER": "WAITING-TYPE-WALK: found in wrapper",
198
+ "DEBUG_MODE_WAITING_TYPE_WALK_IMPL": "WAITING-TYPE-WALK: found in _impl",
199
+ "DEBUG_MODE_WAITING_TYPE_WALK_DIRECT": "WAITING-TYPE-WALK: accessed directly",
200
+ "DEBUG_MODE_WAITING_TYPE_RESOLVED": "WAITING-TYPE-RESOLVED",
201
+ "DEBUG_MODE_WAITING_TYPE_INFLIGHT": "WAITING-TYPE-INFLIGHT: returning IN_FLIGHT",
202
+ "DEBUG_MODE_WAITING_GET_PREMATURE": "WAITING-GET-PREMATURE: found in wrapper before materialization",
203
+ "DEBUG_MODE_WAITING_GET_IMMEDIATE_MAT": "WAITING-GET-IMMEDIATE-MAT: triggering immediate materialization for collision-merged folder",
204
+ "DEBUG_MODE_WAITING_GET_IMMEDIATE_MAT_ERROR": "WAITING-GET-IMMEDIATE-MAT-ERROR: materialization failed",
205
+ "DEBUG_MODE_WAITING_GET_IMMEDIATE_MAT_SUCCESS": "WAITING-GET-IMMEDIATE-MAT-SUCCESS: now available in wrapper",
206
+ "DEBUG_MODE_WAITING_APPLY_ENTRY": "WAITING-APPLY-ENTRY",
207
+ "DEBUG_MODE_WAITING_APPLY_MATERIALIZE": "WAITING-APPLY-MATERIALIZE: Triggering materialization",
208
+ "DEBUG_MODE_WAITING_APPLY_MATERIALIZED": "WAITING-APPLY-MATERIALIZED: Materialization complete",
209
+ "DEBUG_MODE_WAITING_APPLY_START_WALK": "WAITING-APPLY-START-WALK: Starting propChain walk",
210
+ "DEBUG_MODE_WAITING_APPLY_WALK": "WAITING-APPLY-WALK",
211
+ "DEBUG_MODE_WAITING_APPLY": "WAITING-APPLY",
212
+ "DEBUG_MODE_GET_START": "GET-START",
213
+ "DEBUG_MODE_INSPECT_LAZY_UNMATERIALIZED": "util.inspect.custom: Lazy unmaterialized",
214
+ "DEBUG_MODE_GET_CACHED_REPLACE": "GET-CACHED-REPLACE",
215
+ "DEBUG_MODE_GET_CACHED": "GET-CACHED",
216
+ "DEBUG_MODE_GET_PROXYGET_ACCESSING": "GET-PROXYGET: Accessing",
217
+ "DEBUG_MODE_GET_PROXYGET_FOUND": "GET-PROXYGET: Found in wrapper",
218
+ "DEBUG_MODE_LAZY_GET_CREATE_WAITING_PROXY": "LAZY-GET: will create waiting proxy",
219
+ "DEBUG_MODE_BUILD_LAZY_API_CALLED": "buildLazyAPI called",
220
+ "DEBUG_MODE_COMPONENT_INITIALIZED": "Component initialized: {component} → this.{category}.{propertyName}",
221
+ "DEBUG_MODE_LAZY_WRAPPER_REGISTERED": "Lazy wrapper registered",
222
+ "DEBUG_MODE_LAZY_WRAPPER_MATERIALIZED": "Lazy wrapper materialized",
223
+ "DEBUG_MODE_ALL_LAZY_WRAPPERS_MATERIALIZED": "All lazy wrappers materialized",
224
+ "HINT_REFERENCE_REMOVED": "The 'reference' export has been removed from '@cldmv/slothlet/runtime'. Reference objects are now merged directly into the API. Access them via 'self.*' instead (e.g., 'self.myRefProperty').",
225
+ "HINT_MODULE_NOT_FOUND": "Ensure the module exists and the path is correct. Check for typos in the import statement.",
226
+ "HINT_SYNTAX_ERROR": "Check for syntax errors in the module file. Common issues: missing brackets, unclosed strings, or invalid JavaScript syntax.",
227
+ "HINT_CONTEXT_NOT_FOUND": "Ensure the slothlet instance is initialized and the context is created before accessing it. Check that you're using the correct instance ID.",
228
+ "HINT_CONTEXT_ALREADY_EXISTS": "This context already exists. Check if you're trying to initialize the same instance twice.",
229
+ "HINT_CONTEXT_EXECUTION_FAILED": "An error occurred while executing the function. Check the error details for more information.",
230
+ "HINT_NO_ACTIVE_CONTEXT": "No active context found. Ensure you're calling this function from within a slothlet context (async or live mode).",
231
+ "HINT_NO_ACTIVE_CONTEXT_ASYNC": "No active context found. Ensure you're calling this function from within a slothlet async context.",
232
+ "HINT_NO_ACTIVE_CONTEXT_LIVE": "No active context found. Ensure you're calling this function from within a slothlet live context.",
233
+ "HINT_OWNERSHIP_INVALID_MODULE_ID": "The module ID is invalid. Ensure the module was loaded properly and the ID is correct.",
234
+ "HINT_OWNERSHIP_INVALID_API_PATH": "The API path is invalid. Ensure the path format is correct.",
235
+ "HINT_OWNERSHIP_CONFLICT": "Path is already owned by another module. Options: (1) Use forceOverwrite: true in api.add() options, (2) Set collision config to 'merge' or 'replace', (3) Call api.slothlet.api.remove() first to clear the path.",
236
+ "HINT_INVALID_CONFIG": "Check the configuration value and ensure it matches the expected type and format.",
237
+ "HINT_INVALID_CONFIG_DIR_INVALID": "Ensure the directory path is a valid string and points to an existing directory.",
238
+ "HINT_INVALID_CONFIG_FORCE_OVERWRITE_REQUIRES_MODULE_ID": "When using forceOverwrite or allowOverwrite, you must provide a unique moduleID to track ownership of the overwritten path.",
239
+ "HINT_COLLISION_ERROR": "Collision mode is set to 'error' which prevents any overwrites. Use collision: 'merge' (combine properties), 'replace' (overwrite completely), 'warn' (warn but keep existing), or 'skip' (silently ignore) instead.",
240
+ "HINT_COLLISION_DEFAULT_EXPORT_ERROR": "A named export conflicts with a property already present on the default export object at this path. Change the collision mode to 'merge', 'replace', 'warn', or 'skip', or rename the conflicting property.",
241
+ "HINT_INVALID_ARGUMENT": "Path must be a dot-notation string (e.g., 'math.add').",
242
+ "HINT_RUNTIME_NO_ACTIVE_CONTEXT": "metadata.self() must be called from within a slothlet API function.",
243
+ "HINT_INVALID_CONFIG_MODE_INVALID": "Mode must be either 'eager' or 'lazy'.",
244
+ "HINT_INVALID_CONFIG_MODE_UNKNOWN": "Unknown mode specified. Use 'eager' or 'lazy'.",
245
+ "HINT_INVALID_CONFIG_DIR_MISSING": "The directory path is required but was not provided.",
246
+ "HINT_INVALID_CONFIG_API_PATH_INVALID": "Ensure the API path is a valid dot-notation string (e.g., 'plugins.tools') without empty segments or reserved names (slothlet, shutdown, destroy).",
247
+ "HINT_INVALID_CONFIG_MUTATIONS_DISABLED": "API mutation operations require allowMutation: true in the configuration. Use diagnostics: true to access these methods for testing without enabling actual mutations.",
248
+ "HINT_CACHE_MODULEID_MISMATCH": "This is an internal error indicating cache corruption. Please report this issue with steps to reproduce.",
249
+ "HINT_CACHE_NOT_FOUND": "Ensure the module has been loaded before attempting to reload or rebuild its cache. Check that the moduleID is correct.",
250
+ "HINT_CACHE_MANAGER_NOT_AVAILABLE": "The cache manager should be initialized automatically. If you see this error, it may indicate an internal initialization issue.",
251
+ "HINT_INVALID_METADATA_TARGET": "The target must be a function or object that was loaded through Slothlet. Pass the actual function/object reference, not a string or primitive value.",
252
+ "HINT_METADATA_NO_MODULE_ID": "Ensure the function/object was loaded through Slothlet's module system. Only Slothlet-managed functions have associated metadata.",
253
+ "HINT_METADATA_LIFECYCLE_BYPASS": "Never call tagSystemMetadata() directly. Trigger the 'impl:created' or 'impl:changed' lifecycle events instead, which will invoke tagSystemMetadata() through the proper channel.",
254
+ "HINT_INVALID_METADATA_KEY": "Metadata keys must be strings, string arrays, or objects with array values. Check the key format matches one of these types.",
255
+ "HINT_WARNING_METADATA_MISMATCH": "This warning indicates the function's execution location doesn't match its registered metadata path. This can occur during hot reload or if the function was tampered with. In most cases, this is expected during development with hot reload enabled.",
256
+ "HINT_WARNING_INIT_COMPONENT_SKIPPED": "Component files that fail to import will be skipped. This is normal for optional components. Check the error message for details if the component should have loaded.",
257
+ "HINT_WARNING_MULTIPLE_ROOT_CONTRIBUTORS": "Multiple files export default functions at the root level. Each has been namespaced (e.g., api.filename()). Consider consolidating into one root export or moving files to subdirectories for clearer organization.",
258
+ "HINT_WARNING_HOT_RELOAD_PATH_COLLISION": "A collision occurred during hot reload at the specified path. The existing value is being kept. To force replacement, use collision mode 'replace' instead of 'warn'.",
259
+ "HINT_WARNING_HOT_RELOAD_MERGE_PRIMITIVES": "Cannot merge primitive values (strings, numbers, booleans). To replace the value, use collision mode 'replace'. To keep the existing value, continue using 'warn' mode.",
260
+ "HINT_WARNING_OWNERSHIP_CONFLICT": "The path is already owned by another module. To force overwrite, use forceOverwrite: true in api.add() options, or call api.slothlet.api.remove() first to clear the path.",
261
+ "HINT_V2_CONFIG_UNSUPPORTED": "This configuration option from v2 is not supported in v3. Update your configuration to use the v3 equivalent for better control and clarity.",
262
+ "HINT_MODULE_LOAD_FAILED": "Check the module file for errors. Ensure it has valid JavaScript syntax and exports.",
263
+ "HINT_MODULE_IMPORT_FAILED": "Ensure the module file exists and can be imported. Check for syntax errors or missing dependencies.",
264
+ "HINT_MODULE_NO_EXPORTS": "The module must export at least one function or object.",
265
+ "HINT_INVALID_DIRECTORY": "Ensure the directory path is correct and the directory exists and is accessible.",
266
+ "HINT_WARN_DIRECTORY_EMPTY": "Check that the directory path is correct. Empty directories are valid for add-api workflows where modules will be added dynamically.",
267
+ "HINT_INVALID_CONFIG_LAZY_NOT_READY": "In lazy mode, access properties to trigger materialization before calling functions.",
268
+ "HINT_INTERNAL_INVALID_STATE": "An internal state error occurred. This is likely a bug - please report it with details.",
269
+ "HINT_INTERNAL_HOOK_STATE_CORRUPT": "HookManager internal state is inconsistent. This should never happen through normal usage — please file a bug report including how you called hook.on() and hook.remove().",
270
+ "HINT_INVALID_CONFIG_LAZY_ASYNC_REQUIRED": "Lazy mode requires async operations. Use eager mode or implement proper async patterns.",
271
+ "HINT_RUNTIME_NO_ACTIVE_CONTEXT_SELF": "Cannot access 'self' outside of a slothlet API function context.",
272
+ "HINT_RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "Cannot access 'context' outside of a slothlet API function. Context can only be modified within slothlet API calls.",
273
+ "HINT_INVALID_CONFIG_NOT_LOADED": "The instance must be loaded before performing this operation. Call load() first.",
274
+ "HINT_INVALID_CONFIG_RELOAD_NOT_IMPL": "Reload functionality is not yet implemented. This will be added in a future iteration.",
275
+ "HINT_WARNING_RESERVED_PROPERTY_CONFLICT": "The 'slothlet' property name is reserved for built-in API methods. Rename your API module or property to avoid conflicts with slothlet.shutdown(), slothlet.api.*, etc.",
276
+ "HINT_DEPRECATED_CONFIG_OPTION": "This configuration option is deprecated and will be removed in a future version. Update your configuration to use the recommended replacement.",
277
+ "HINT_ERROR_RUNTIME_IMPORT_FAILED": "The runtime module could not be loaded. This may occur if @cldmv/slothlet/runtime export is unavailable or there's a circular dependency. Some features requiring runtime access may be limited.",
278
+ "INVALID_HOOK_TYPE": "Invalid hook type \"{type}\". Must be one of: {validTypes}.",
279
+ "INVALID_HOOK_HANDLER": "Hook handler must be a function. Received type: {receivedType}.",
280
+ "DUPLICATE_HOOK_ID": "A hook with ID \"{id}\" already exists. Use a unique ID or omit the id option to auto-generate one.",
281
+ "INVALID_HOOK_SUBSET": "Invalid hook subset \"{subset}\". Must be \"before\", \"primary\", or \"after\". Valid subsets: {validSubsets}.",
282
+ "INVALID_TYPE_PATTERN": "Invalid type pattern \"{typePattern}\". {expected}",
283
+ "HINT_INVALID_HOOK_TYPE": "Use one of the valid hook types: before, after, always, or error.",
284
+ "HINT_INVALID_HOOK_HANDLER": "Provide a function as the hook handler, not a string or other type.",
285
+ "HINT_DUPLICATE_HOOK_ID": "Either use a different id value or remove the id option to let Slothlet auto-generate a unique ID.",
286
+ "HINT_INVALID_HOOK_SUBSET": "Subsets control execution order. Use 'before' for pre-processing, 'primary' (default) for main hooks, or 'after' for post-processing.",
287
+ "HINT_INVALID_TYPE_PATTERN": "Type patterns must be in the format 'type:pattern', such as 'before:math.*' or 'error:**'.",
288
+ "HOOK_BEFORE_RETURNED_PROMISE": "Before hook '{id}' for path '{path}' returned a Promise. Before hooks must be synchronous.",
289
+ "HINT_HOOK_BEFORE_RETURNED_PROMISE": "Before hooks execute synchronously before the API call. Remove async/await or Promise usage from this hook, or change it to an 'after' hook if async processing is needed.",
290
+ "HOOK_BRACE_EXPANSION_MAX_DEPTH": "Brace expansion in hook pattern exceeds the maximum nesting depth of {maxDepth}.",
291
+ "HINT_HOOK_BRACE_EXPANSION_MAX_DEPTH": "Simplify the hook path pattern to reduce brace nesting. Maximum allowed depth is {maxDepth} levels.",
292
+ "SCOPE_DISABLED": "Per-request context isolation is disabled. Set 'scope: {}' in your slothlet configuration to enable it.",
293
+ "HINT_SCOPE_DISABLED": "Add 'scope: {}' (or a scope config object) to your slothlet options to enable per-request context isolation via api.slothlet.run() and api.slothlet.scope().",
294
+ "SCOPE_INVALID_CONTEXT": "Context data must be a plain object. Received: {received}.",
295
+ "HINT_SCOPE_INVALID_CONTEXT": "Pass a plain object as the first argument to run(), e.g. api.slothlet.run({ userId: 1 }, callback).",
296
+ "SCOPE_INVALID_CALLBACK": "Callback must be a function. Received: {received}.",
297
+ "HINT_SCOPE_INVALID_CALLBACK": "Pass a function as the second argument to run(), e.g. api.slothlet.run(context, async () => { ... }).",
298
+ "SCOPE_INVALID_OPTIONS": "Options must be a plain object. Received: {received}.",
299
+ "HINT_SCOPE_INVALID_OPTIONS": "Pass a plain options object to scope(), e.g. api.slothlet.scope({ fn: myFunc, context: {} }).",
300
+ "SCOPE_INVALID_FN": "'fn' must be a function. Received: {received}.",
301
+ "HINT_SCOPE_INVALID_FN": "Set options.fn to the function you want to execute in the isolated context.",
302
+ "SCOPE_INVALID_CONTEXT_OBJECT": "'context' must be a plain object. Received: {received}.",
303
+ "HINT_SCOPE_INVALID_CONTEXT_OBJECT": "Set options.context to a plain object containing the per-request data to inject.",
304
+ "SCOPE_INVALID_MERGE_STRATEGY": "Invalid merge strategy '{merge}'. Must be 'shallow' or 'deep'.",
305
+ "HINT_SCOPE_INVALID_MERGE_STRATEGY": "Use merge: 'shallow' (default) for a top-level merge of the context object, or merge: 'deep' for a recursive deep merge.",
306
+ "SCOPE_INVALID_ISOLATION_MODE": "Invalid isolation mode '{isolationMode}'. Must be 'partial' or 'full'.",
307
+ "HINT_SCOPE_INVALID_ISOLATION_MODE": "Use isolation: 'partial' (default) to inherit the parent context and overlay new values, or isolation: 'full' to start with a completely fresh context.",
308
+ "CHAIN_ACCESS_UNDEFINED": "Cannot access '{prop}' on undefined while traversing '{apiPath}.{chainLabel}'.",
309
+ "HINT_CHAIN_ACCESS_UNDEFINED": "A property in the method chain resolved to undefined before reaching the target. Check that every intermediate property in the chain is a valid API path.",
310
+ "CHAIN_MATERIALIZE_FAILED": "Failed to materialize '{prop}' while traversing '{apiPath}.{chainLabel}'.",
311
+ "HINT_CHAIN_MATERIALIZE_FAILED": "The lazy API module at this path failed to load. Check that the module file exists and exports valid values.",
312
+ "CHAIN_NOT_CALLABLE": "'{apiPath}.{chainLabel}' is not callable or does not exist.",
313
+ "HINT_CHAIN_NOT_CALLABLE": "The chained property resolved to a non-function value. Ensure the API path refers to a function, or check that the module exports the expected function.",
314
+ "TYPESCRIPT_ESBUILD_NOT_INSTALLED": "TypeScript {mode} mode requires 'esbuild' to be installed.",
315
+ "HINT_TYPESCRIPT_ESBUILD_NOT_INSTALLED": "Install it with: npm install esbuild",
316
+ "TYPESCRIPT_TSC_NOT_INSTALLED": "TypeScript {mode} mode requires 'typescript' to be installed.",
317
+ "HINT_TYPESCRIPT_TSC_NOT_INSTALLED": "Install it with: npm install typescript",
318
+ "TYPESCRIPT_NOT_INSTALLED": "Type generation ({feature}) requires 'typescript' to be installed.",
319
+ "HINT_TYPESCRIPT_NOT_INSTALLED": "Install it with: npm install typescript",
320
+ "TS_STRICT_REQUIRES_OUTPUT": "TypeScript strict mode requires 'types.output' to be configured in your typescript config.",
321
+ "HINT_TS_STRICT_REQUIRES_OUTPUT": "Add 'types: { output: './types/api.d.ts', interfaceName: 'MyAPI' }' to your typescript configuration.",
322
+ "TS_STRICT_REQUIRES_INTERFACE_NAME": "TypeScript strict mode requires 'types.interfaceName' to be configured in your typescript config.",
323
+ "HINT_TS_STRICT_REQUIRES_INTERFACE_NAME": "Add 'interfaceName' to your 'types' config, e.g. types: { output: './types/api.d.ts', interfaceName: 'MyAPI' }.",
324
+ "TS_TYPE_GENERATION_FAILED": "Type generation failed: {error}",
325
+ "HINT_TS_TYPE_GENERATION_FAILED": "The child process that generates TypeScript declarations encountered an error. Check the error message for details and ensure the TypeScript source files are valid.",
326
+ "TS_TYPE_GENERATION_FORK_FAILED": "Failed to fork the type generation process: {error}",
327
+ "HINT_TS_TYPE_GENERATION_FORK_FAILED": "The type generation worker process could not be started. Ensure Node.js has permission to fork child processes and that the tools/build/generate-types-worker.mjs script exists.",
328
+ "TS_TYPE_GENERATION_PROCESS_EXITED": "Type generation process exited with code {code}: {output}",
329
+ "HINT_TS_TYPE_GENERATION_PROCESS_EXITED": "The type generation child process exited with a non-zero code. Check the output for compiler errors and verify the TypeScript sources are valid.",
330
+ "TS_TYPE_CHECK_ERRORS": "TypeScript type errors found in '{filePath}':\n{errors}",
331
+ "HINT_TS_TYPE_CHECK_ERRORS": "Fix the TypeScript type errors listed above in the source file, or set typescript.strict to false to skip type checking.",
332
+ "FLATTEN_REASON_MULTI_DEFAULT_WITH_DEFAULT": "Multi-default context with default export",
333
+ "FLATTEN_REASON_MULTI_DEFAULT_WITHOUT_DEFAULT": "Multi-default context without default export",
334
+ "FLATTEN_REASON_ADDAPI_METADATA_DEFAULT": "AddApi special file pattern with metadata default",
335
+ "FLATTEN_REASON_ADDAPI_SPECIAL_FILE": "AddApi special file pattern - always flatten",
336
+ "FLATTEN_REASON_ADDAPI_SPECIAL_FILE_PARENT": "AddApi special file pattern with metadata default - flatten named exports to parent",
337
+ "FLATTEN_REASON_SELF_REFERENTIAL": "Self-referential export detected",
338
+ "FLATTEN_REASON_SINGLE_EXPORT_MATCHES_FILENAME": "Single named export matches filename",
339
+ "FLATTEN_REASON_FILENAME_MATCHES_CATEGORY": "Filename matches category name",
340
+ "FLATTEN_REASON_PRESERVING_FUNCTION_NAME": "Preserving function name over filename",
341
+ "FLATTEN_REASON_DEFAULT_PRESERVE_NAMESPACE": "Default behavior - preserve namespace",
342
+ "FLATTEN_REASON_NO_CONDITIONS_MET": "No flattening conditions met",
343
+ "FLATTEN_REASON_FUNCTION_FOLDER_MATCH": "Function name matches folder name",
344
+ "FLATTEN_REASON_DEFAULT_OBJECT_EXPORT_FLATTEN": "Default object export matches folder name",
345
+ "FLATTEN_REASON_BASENAME_MATCHES_CATEGORY": "File basename matches category name",
346
+ "FLATTEN_REASON_GENERIC_FILENAME_SINGLE_EXPORT": "Generic filename with single export",
347
+ "FLATTEN_REASON_DEFAULT_FUNCTION_EXPORT": "Default function export",
348
+ "FLATTEN_REASON_SINGLE_EXPORT_MATCHES_MODULE": "Single named export matches module name (final check)",
349
+ "INVALID_CONFIG_PATH_TYPE": "Path must be a directory or a supported file type (.mjs, .cjs, .js). Got: {path}",
350
+ "HINT_INVALID_CONFIG_PATH_TYPE": "Ensure the path points to a directory or a JavaScript module file with a .mjs, .cjs, or .js extension.",
351
+ "INVALID_CONFIG_FILE_TYPE": "File must have a .mjs, .cjs, or .js extension. Got: {extension} for {path}",
352
+ "HINT_INVALID_CONFIG_FILE_TYPE": "Rename the file to use a supported extension (.mjs for ES modules, .cjs for CommonJS, .js for either).",
353
+ "API_PATH_REASON_ARRAY_ELEMENTS": "array elements must be strings",
354
+ "API_PATH_REASON_ARRAY_EMPTY_SEGMENTS": "array contains empty string segments",
355
+ "API_PATH_REASON_RESERVED_NAME": "conflicts with reserved names (slothlet, shutdown, destroy)",
356
+ "API_PATH_REASON_INVALID_TYPE": "must be a string, array of strings, empty string (root), or null/undefined (root)",
357
+ "API_PATH_REASON_EMPTY_SEGMENTS": "contains empty path segments",
358
+ "API_PATH_REASON_COLLISION_ERROR": "path already exists and collision mode is 'error'",
359
+ "API_PATH_REASON_NOT_TRAVERSABLE": "path segment does not exist or is not traversable",
360
+ "API_PATH_REASON_REQUIRED": "apiPath is required for removeApi operation",
361
+ "INVALID_API_PATH": "Invalid API path: '{apiPath}' does not exist in the loaded API.",
362
+ "HINT_INVALID_API_PATH": "Ensure the API path exists before using it. Use a dot-separated path (e.g. 'math.add') that refers to a currently loaded module.",
363
+ "HOOKS_NOT_INITIALIZED": "Cannot access hook functionality: the hook manager is not initialized.",
364
+ "HINT_HOOKS_NOT_INITIALIZED": "Hook support requires 'hooks: true' in your slothlet configuration.",
365
+ "METADATA_NOT_AVAILABLE": "Cannot access metadata functionality: the metadata handler is not initialized. Available handlers: {handlersKeys}. This is an internal bug - please report it.",
366
+ "HINT_METADATA_NOT_AVAILABLE": "Metadata support is built-in. If the metadata handler is missing, this indicates an internal slothlet initialization error.",
367
+ "NO_CONTEXT_MANAGER": "No context manager is configured for this slothlet instance.",
368
+ "HINT_NO_CONTEXT_MANAGER": "Context operations require a context manager. Initialize slothlet with 'contextManager: new AsyncContextManager()' or 'contextManager: new LiveContextManager()' in your configuration.",
369
+ "UNSUPPORTED_CONTEXT_MANAGER": "Unsupported context manager: '{manager}'. Only AsyncContextManager and LiveContextManager are supported.",
370
+ "HINT_UNSUPPORTED_CONTEXT_MANAGER": "Use AsyncContextManager for async/ALS-based context isolation or LiveContextManager for synchronous live-binding context."
371
+ },
372
+ "metadata": {
373
+ "code": "en-us",
374
+ "name": "English (US)",
375
+ "nativeName": "English (US)"
376
+ }
377
+ }