@cldmv/slothlet 3.9.2 → 3.10.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.
- package/README.md +16 -16
- package/REFERENCE.md +19 -19
- package/dist/lib/builders/api_builder.mjs +1 -1
- package/dist/lib/builders/builder.mjs +1 -1
- package/dist/lib/builders/modes-processor.mjs +1 -1
- package/dist/lib/handlers/api-cache-manager.mjs +1 -1
- package/dist/lib/handlers/api-manager.mjs +1 -1
- package/dist/lib/handlers/hook-manager.mjs +1 -1
- package/dist/lib/handlers/permission-manager.mjs +1 -1
- package/dist/lib/helpers/config.mjs +1 -1
- package/dist/lib/helpers/generate-manifest.mjs +1 -1
- package/dist/lib/helpers/module-discovery.mjs +1 -1
- package/dist/lib/helpers/module-manifest-validator.mjs +1 -1
- package/dist/lib/i18n/languages/de-de.json +90 -64
- package/dist/lib/i18n/languages/en-gb.json +90 -64
- package/dist/lib/i18n/languages/en-us.json +90 -64
- package/dist/lib/i18n/languages/es-es.json +90 -64
- package/dist/lib/i18n/languages/es-mx.json +90 -64
- package/dist/lib/i18n/languages/fr-fr.json +90 -64
- package/dist/lib/i18n/languages/hi-in.json +90 -64
- package/dist/lib/i18n/languages/ja-jp.json +90 -64
- package/dist/lib/i18n/languages/ko-kr.json +90 -64
- package/dist/lib/i18n/languages/pt-br.json +90 -64
- package/dist/lib/i18n/languages/ru-ru.json +92 -66
- package/dist/lib/i18n/languages/zh-cn.json +90 -64
- package/dist/lib/modes/eager.mjs +1 -1
- package/dist/lib/modes/lazy.mjs +1 -1
- package/package.json +7 -4
- package/types/dist/lib/builders/api_builder.d.mts.map +1 -1
- package/types/dist/lib/builders/builder.d.mts.map +1 -1
- package/types/dist/lib/builders/modes-processor.d.mts.map +1 -1
- package/types/dist/lib/handlers/api-cache-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/api-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/hook-manager.d.mts +4 -0
- package/types/dist/lib/handlers/hook-manager.d.mts.map +1 -1
- package/types/dist/lib/handlers/permission-manager.d.mts +2 -0
- package/types/dist/lib/handlers/permission-manager.d.mts.map +1 -1
- package/types/dist/lib/helpers/config.d.mts +3 -0
- package/types/dist/lib/helpers/config.d.mts.map +1 -1
- package/types/dist/lib/helpers/generate-manifest.d.mts +1 -0
- package/types/dist/lib/helpers/generate-manifest.d.mts.map +1 -1
- package/types/dist/lib/helpers/module-discovery.d.mts.map +1 -1
- package/types/dist/lib/helpers/module-manifest-validator.d.mts.map +1 -1
- package/types/dist/lib/modes/eager.d.mts +2 -1
- package/types/dist/lib/modes/eager.d.mts.map +1 -1
- package/types/dist/lib/modes/lazy.d.mts +2 -1
- package/types/dist/lib/modes/lazy.d.mts.map +1 -1
|
@@ -1,54 +1,110 @@
|
|
|
1
1
|
{
|
|
2
2
|
"translations": {
|
|
3
3
|
"INVALID_CONFIG": "Invalid configuration: {option} is {value}, expected {expected}. {hint}",
|
|
4
|
+
"HINT_INVALID_CONFIG": "Check the configuration value and ensure it matches the expected type and format.",
|
|
5
|
+
"INVALID_CONFIG_SYNTHETIC_EXPORTS_SHAPE": "Configuration error: inline exports must be a plain export-map object (a default and/or named exports), received {received}.",
|
|
6
|
+
"HINT_INVALID_CONFIG_SYNTHETIC_EXPORTS_SHAPE": "Pass exports as a plain object, e.g. { default: fn } or { name: fn } — or a { exports: { default?, ...named } } wrapper, or a bare function.",
|
|
7
|
+
"INVALID_CONFIG_SYNTHETIC_INPUT": "Configuration error: inline content must be a plain export-map object, an exports-wrapper object, or a bare function, received {received}.",
|
|
8
|
+
"HINT_INVALID_CONFIG_SYNTHETIC_INPUT": "Pass inline exports as a plain object or a bare function; a filesystem mount needs a string path.",
|
|
9
|
+
"INVALID_CONFIG_SYNTHETIC_NAME": "Configuration error: syntheticName must be a non-empty string, received {received}.",
|
|
10
|
+
"HINT_INVALID_CONFIG_SYNTHETIC_NAME": "Provide a string key name for the synthetic build, e.g. \"synthetic\".",
|
|
11
|
+
"INVALID_CONFIG_PRELOADED_STRUCTURE": "Configuration error: preloadedStructure must be a plain object with files and directories arrays, received {received}.",
|
|
12
|
+
"HINT_INVALID_CONFIG_PRELOADED_STRUCTURE": "preloadedStructure is built internally; pass an object with files and directories arrays, or omit it to scan a directory.",
|
|
4
13
|
"INVALID_CONFIG_DIR_MISSING": "Configuration error: 'dir' option is required. Provide a directory path to load API from.",
|
|
14
|
+
"HINT_INVALID_CONFIG_DIR_MISSING": "The directory path is required but was not provided.",
|
|
5
15
|
"INVALID_CONFIG_DIR_INVALID": "Configuration error: 'dir' must be a non-empty string path. Received: {dir}",
|
|
16
|
+
"HINT_INVALID_CONFIG_DIR_INVALID": "Ensure the directory path is a valid string and points to an existing directory.",
|
|
6
17
|
"INVALID_CONFIG_BROWSER_REQUIRES_MANIFEST": "Configuration error: 'manifest' is required when env is 'browser'. Provide a pre-generated manifest object with 'files' and 'directories' arrays.",
|
|
7
18
|
"INVALID_CONFIG_BROWSER_MANIFEST_INVALID": "Configuration error: 'manifest' must be a plain object with 'files' and 'directories' arrays. Received: {received}",
|
|
8
19
|
"INVALID_CONFIG_BROWSER_RESOLVE_SPECIFIER_INVALID": "Configuration error: 'resolveModuleSpecifier' must be a function when env is 'browser'. Received: {received}",
|
|
9
20
|
"INVALID_CONFIG_MODE_INVALID": "Configuration error: 'mode' must be either 'eager' or 'lazy'. Received: {value}",
|
|
21
|
+
"HINT_INVALID_CONFIG_MODE_INVALID": "Mode must be either 'eager' or 'lazy'.",
|
|
10
22
|
"INVALID_CONFIG_NOT_LOADED": "Cannot perform operation '{operation}' - instance not loaded. Call load() first.",
|
|
23
|
+
"HINT_INVALID_CONFIG_NOT_LOADED": "The instance must be loaded before performing this operation. Call load() first.",
|
|
11
24
|
"INVALID_CONFIG_LAZY_MATERIALIZATION_FAILED": "Failed to materialize lazy proxy for '{apiPath}'. Check that the module loads correctly.",
|
|
12
25
|
"INVALID_CONFIG_NOT_A_FUNCTION": "Cannot call '{apiPath}' - not a function (got {actualType}). Check that the module exports a callable function.",
|
|
13
26
|
"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}'.",
|
|
27
|
+
"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).",
|
|
14
28
|
"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}'.",
|
|
29
|
+
"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.",
|
|
15
30
|
"INVALID_METADATA_TARGET": "Invalid metadata target: expected {expected}, received {target}. Metadata operations require a function or object reference.",
|
|
31
|
+
"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.",
|
|
16
32
|
"METADATA_NO_MODULE_ID": "Cannot set user metadata: no moduleID found in system metadata. Ensure the target function/object was loaded through Slothlet.",
|
|
33
|
+
"HINT_METADATA_NO_MODULE_ID": "Ensure the function/object was loaded through Slothlet's module system. Only Slothlet-managed functions have associated metadata.",
|
|
17
34
|
"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.",
|
|
35
|
+
"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.",
|
|
18
36
|
"INVALID_METADATA_KEY": "Invalid metadata key: expected {expected}, received {type} for key '{key}'. Metadata keys must be properly formatted.",
|
|
37
|
+
"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.",
|
|
19
38
|
"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.",
|
|
39
|
+
"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.",
|
|
20
40
|
"COLLISION_ERROR": "Collision error at '{key}' (context: {collisionContext}, mode: {collisionMode}). Set collision mode to 'merge', 'replace', 'warn', or 'skip' to handle collisions.",
|
|
41
|
+
"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.",
|
|
21
42
|
"COLLISION_DEFAULT_EXPORT_ERROR": "Collision detected: property '{key}' already exists on default export at '{apiPath}'. Collision mode is 'error'.",
|
|
43
|
+
"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.",
|
|
22
44
|
"INVALID_ARGUMENT": "Invalid argument '{argument}': expected {expected}, received {received}.",
|
|
45
|
+
"HINT_INVALID_ARGUMENT": "Path must be a dot-notation string (e.g., 'math.add').",
|
|
23
46
|
"RUNTIME_NO_ACTIVE_CONTEXT": "No active context found. This operation requires being called from within a slothlet API function.",
|
|
47
|
+
"HINT_RUNTIME_NO_ACTIVE_CONTEXT": "metadata.self() must be called from within a slothlet API function.",
|
|
24
48
|
"INVALID_CONFIG_MUTATIONS_DISABLED": "Cannot perform '{operation}' - mutation is disabled. Set allowMutation: true to enable API modification operations (add/remove/reload).",
|
|
49
|
+
"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.",
|
|
25
50
|
"CACHE_MODULEID_MISMATCH": "Cache entry moduleID mismatch: expected '{cacheKey}', but entry has '{entryModuleID}'. This indicates an internal cache inconsistency.",
|
|
51
|
+
"HINT_CACHE_MODULEID_MISMATCH": "This is an internal error indicating cache corruption. Please report this issue with steps to reproduce.",
|
|
26
52
|
"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.",
|
|
53
|
+
"HINT_CACHE_NOT_FOUND": "Ensure the module has been loaded before attempting to reload or rebuild its cache. Check that the moduleID is correct.",
|
|
27
54
|
"CACHE_MANAGER_NOT_AVAILABLE": "Cache manager is not available. Cannot perform '{operation}' operation. Ensure the cache manager is initialized.",
|
|
55
|
+
"HINT_CACHE_MANAGER_NOT_AVAILABLE": "The cache manager should be initialized automatically. If you see this error, it may indicate an internal initialization issue.",
|
|
28
56
|
"MODULE_LOAD_FAILED": "Failed to load module '{modulePath}' (ID: {moduleID}): {error}",
|
|
57
|
+
"HINT_MODULE_LOAD_FAILED": "Check the module file for errors. Ensure it has valid JavaScript syntax and exports.",
|
|
29
58
|
"MODULE_NOT_FOUND": "Module not found: {modulePath}. {hint}",
|
|
59
|
+
"HINT_MODULE_NOT_FOUND": "Ensure the module exists and the path is correct. Check for typos in the import statement.",
|
|
30
60
|
"MODULE_IMPORT_FAILED": "Failed to import module '{modulePath}': {error}. Check that the file exists and has valid syntax.",
|
|
61
|
+
"HINT_MODULE_IMPORT_FAILED": "Ensure the module file exists and can be imported. Check for syntax errors or missing dependencies.",
|
|
31
62
|
"CONTEXT_ALREADY_EXISTS": "Context for instance '{instanceID}' already exists. Cannot initialize twice.",
|
|
63
|
+
"HINT_CONTEXT_ALREADY_EXISTS": "This context already exists. Check if you're trying to initialize the same instance twice.",
|
|
32
64
|
"CONTEXT_NOT_FOUND": "Context not found for instance '{instanceID}'. Instance may have been shut down. Available instances: {availableInstances}",
|
|
65
|
+
"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.",
|
|
33
66
|
"CONTEXT_EXECUTION_FAILED": "Failed to execute in context for instance '{instanceID}': {error}",
|
|
67
|
+
"HINT_CONTEXT_EXECUTION_FAILED": "An error occurred while executing the function. Check the error details for more information.",
|
|
34
68
|
"NO_ACTIVE_CONTEXT_LIVE": "No active context - no instance is currently active in live bindings mode.",
|
|
69
|
+
"HINT_NO_ACTIVE_CONTEXT_LIVE": "No active context found. Ensure you're calling this function from within a slothlet live context.",
|
|
35
70
|
"NO_ACTIVE_CONTEXT_ASYNC": "No active context - function must be called within slothlet API context.",
|
|
71
|
+
"HINT_NO_ACTIVE_CONTEXT_ASYNC": "No active context found. Ensure you're calling this function from within a slothlet async context.",
|
|
36
72
|
"RUNTIME_NO_ACTIVE_CONTEXT_SELF": "No active context - cannot access 'self'. Ensure you're calling from within a Slothlet API function.",
|
|
73
|
+
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_SELF": "Cannot access 'self' outside of a slothlet API function context.",
|
|
37
74
|
"RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "No active context - 'context' can only be modified within slothlet API calls.",
|
|
75
|
+
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "Cannot access 'context' outside of a slothlet API function. Context can only be modified within slothlet API calls.",
|
|
38
76
|
"OWNERSHIP_INVALID_MODULE_ID": "Invalid ownership registration: moduleID '{moduleID}' is invalid.",
|
|
77
|
+
"HINT_OWNERSHIP_INVALID_MODULE_ID": "The module ID is invalid. Ensure the module was loaded properly and the ID is correct.",
|
|
39
78
|
"OWNERSHIP_INVALID_API_PATH": "Invalid ownership registration: apiPath '{apiPath}' is invalid.",
|
|
79
|
+
"HINT_OWNERSHIP_INVALID_API_PATH": "The API path is invalid. Ensure the path format is correct.",
|
|
40
80
|
"OWNERSHIP_CONFLICT": "Ownership conflict: Path '{apiPath}' is already owned by module '{existingModuleId}', cannot assign to '{newModuleId}'. Use forceOverwrite: true or removeApi first.",
|
|
81
|
+
"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.",
|
|
41
82
|
"LOOSE_SET_NOT_OWNED": "Module {callerApiPath} is not permitted to write to {apiPath}. A module may write only under its own apiPath; use api.slothlet.api.add() to register at a different path.",
|
|
83
|
+
"HINT_LOOSE_SET_NOT_OWNED": "A module owning apiPath \"P\" may write only under \"P.*\". To register code at a different namespace, call api.slothlet.api.add() instead.",
|
|
42
84
|
"LOOSE_SET_RESERVED_KEY": "Cannot assign to reserved key segment '{segment}' in apiPath '{apiPath}'. Names like __proto__, prototype, and constructor are blocked to prevent prototype pollution of the API tree.",
|
|
85
|
+
"HINT_LOOSE_SET_RESERVED_KEY": "The segments __proto__, prototype, and constructor cannot be used as apiPath names because writing to them would mutate the JavaScript prototype chain. Choose a different name.",
|
|
43
86
|
"INVALID_DIRECTORY": "Invalid directory '{dir}': {error}. Ensure the directory exists and is accessible.",
|
|
87
|
+
"HINT_INVALID_DIRECTORY": "Ensure the directory path is correct and the directory exists and is accessible.",
|
|
44
88
|
"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.",
|
|
89
|
+
"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.",
|
|
90
|
+
"WARN_SYNTHETIC_ROOT_EMPTY": "Synthetic add at api path '{apiPath}' contributed no leaves; nothing was mounted.",
|
|
91
|
+
"HINT_WARN_SYNTHETIC_ROOT_EMPTY": "Provide at least one export — a named function default or named exports — so the synthetic add has something to mount.",
|
|
92
|
+
"WARN_SYNTHETIC_ROOT_UNNAMED": "Synthetic add at the API root has an anonymous default export; it cannot be keyed onto the root and was skipped.",
|
|
93
|
+
"HINT_WARN_SYNTHETIC_ROOT_UNNAMED": "Name the default function (its name becomes the root key), provide named exports, or mount the leaf at a named apiPath.",
|
|
94
|
+
"WARN_SYNTHETIC_ROOT_COLLISION": "Synthetic add at the API root re-keys its default to '{name}', but a named export already uses '{name}'; the named export takes precedence.",
|
|
95
|
+
"HINT_WARN_SYNTHETIC_ROOT_COLLISION": "Rename the default function or the conflicting named export so each lands on a distinct root key.",
|
|
45
96
|
"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.",
|
|
97
|
+
"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().",
|
|
46
98
|
"WARNING_RESERVED_PROPERTY_CONFLICT": "User API conflicts with reserved properties: {properties}",
|
|
99
|
+
"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.",
|
|
47
100
|
"WARNING_LANGUAGE_LOAD_FAILED": "Failed to load language '{lang}', falling back to English.",
|
|
48
101
|
"WARNING_LANGUAGE_UNAVAILABLE": "Language '{lang}' is not available, using English.",
|
|
49
102
|
"WARNING_OWNERSHIP_CONFLICT": "Ownership conflict at '{apiPath}': already owned by '{existingModuleId}', cannot register '{newModuleId}'. Keeping existing.",
|
|
103
|
+
"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.",
|
|
50
104
|
"WARNING_HOT_RELOAD_PATH_COLLISION": "Path collision at {apiPath} - keeping existing value (collision mode: warn).",
|
|
105
|
+
"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'.",
|
|
51
106
|
"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.",
|
|
107
|
+
"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.",
|
|
52
108
|
"WARNING_COLLISION_FILE_FOLDER_MERGE": "Collision detected at '{key}' - merging file and folder exports (collision mode: 'warn').",
|
|
53
109
|
"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.",
|
|
54
110
|
"WARNING_COLLISION_DEFAULT_EXPORT_OVERWRITE": "Collision warning: property '{key}' already exists on default export function at {apiPath}. Named export will overwrite.",
|
|
@@ -58,8 +114,11 @@
|
|
|
58
114
|
"WARNING_LIFECYCLE_HANDLER_ERROR": "Lifecycle event handler threw an error for event '{event}'. Other handlers for this event continued executing.",
|
|
59
115
|
"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.",
|
|
60
116
|
"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.",
|
|
117
|
+
"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.",
|
|
61
118
|
"V3_CONFIG_DEPRECATED": "Configuration option '{option}' is deprecated and will be removed in v4. Use '{replacement}' instead.",
|
|
119
|
+
"HINT_V3_CONFIG_DEPRECATED": "This configuration option has been renamed for clarity. Update your code to use the new option name to ensure forward compatibility with v4.",
|
|
62
120
|
"V2_CONFIG_UNSUPPORTED": "Configuration option '{option}' from v2 is not supported in v3. {hint} Use '{replacement}' instead.",
|
|
121
|
+
"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.",
|
|
63
122
|
"WARN_SUPPRESS_FIX_ACTIVE": "Rule fix '{rule}' is suppressed via 'suppressFixes'. See {url} for details. This is a temporary override and will be removed in v4. The corrected '{rule}' behaviour will be enforced permanently.",
|
|
64
123
|
"HINT_WARN_SUPPRESS_FIX_ACTIVE": "Remove '{rule}' from 'suppressFixes' and update your API directory structure to accommodate the corrected behaviour before upgrading to v4.",
|
|
65
124
|
"DEBUG_MODE_ROOT_CONTRIBUTOR": "[{mode}] Root contributor detected: {functionName}",
|
|
@@ -230,72 +289,15 @@
|
|
|
230
289
|
"DEBUG_MODE_LAZY_WRAPPER_MATERIALIZED": "Lazy wrapper materialized",
|
|
231
290
|
"DEBUG_MODE_ALL_LAZY_WRAPPERS_MATERIALIZED": "All lazy wrappers materialized",
|
|
232
291
|
"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').",
|
|
233
|
-
"HINT_MODULE_NOT_FOUND": "Ensure the module exists and the path is correct. Check for typos in the import statement.",
|
|
234
292
|
"HINT_SYNTAX_ERROR": "Check for syntax errors in the module file. Common issues: missing brackets, unclosed strings, or invalid JavaScript syntax.",
|
|
235
|
-
"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.",
|
|
236
|
-
"HINT_CONTEXT_ALREADY_EXISTS": "This context already exists. Check if you're trying to initialize the same instance twice.",
|
|
237
|
-
"HINT_CONTEXT_EXECUTION_FAILED": "An error occurred while executing the function. Check the error details for more information.",
|
|
238
|
-
"HINT_NO_ACTIVE_CONTEXT": "No active context found. Ensure you're calling this function from within a slothlet context (async or live mode).",
|
|
239
|
-
"HINT_NO_ACTIVE_CONTEXT_ASYNC": "No active context found. Ensure you're calling this function from within a slothlet async context.",
|
|
240
|
-
"HINT_NO_ACTIVE_CONTEXT_LIVE": "No active context found. Ensure you're calling this function from within a slothlet live context.",
|
|
241
|
-
"HINT_OWNERSHIP_INVALID_MODULE_ID": "The module ID is invalid. Ensure the module was loaded properly and the ID is correct.",
|
|
242
|
-
"HINT_OWNERSHIP_INVALID_API_PATH": "The API path is invalid. Ensure the path format is correct.",
|
|
243
|
-
"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.",
|
|
244
|
-
"HINT_INVALID_CONFIG": "Check the configuration value and ensure it matches the expected type and format.",
|
|
245
|
-
"HINT_INVALID_CONFIG_DIR_INVALID": "Ensure the directory path is a valid string and points to an existing directory.",
|
|
246
|
-
"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.",
|
|
247
|
-
"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.",
|
|
248
|
-
"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.",
|
|
249
|
-
"HINT_INVALID_ARGUMENT": "Path must be a dot-notation string (e.g., 'math.add').",
|
|
250
|
-
"HINT_RUNTIME_NO_ACTIVE_CONTEXT": "metadata.self() must be called from within a slothlet API function.",
|
|
251
|
-
"HINT_INVALID_CONFIG_MODE_INVALID": "Mode must be either 'eager' or 'lazy'.",
|
|
252
|
-
"HINT_INVALID_CONFIG_MODE_UNKNOWN": "Unknown mode specified. Use 'eager' or 'lazy'.",
|
|
253
|
-
"HINT_INVALID_CONFIG_DIR_MISSING": "The directory path is required but was not provided.",
|
|
254
|
-
"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).",
|
|
255
|
-
"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.",
|
|
256
|
-
"HINT_CACHE_MODULEID_MISMATCH": "This is an internal error indicating cache corruption. Please report this issue with steps to reproduce.",
|
|
257
|
-
"HINT_CACHE_NOT_FOUND": "Ensure the module has been loaded before attempting to reload or rebuild its cache. Check that the moduleID is correct.",
|
|
258
|
-
"HINT_CACHE_MANAGER_NOT_AVAILABLE": "The cache manager should be initialized automatically. If you see this error, it may indicate an internal initialization issue.",
|
|
259
|
-
"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.",
|
|
260
|
-
"HINT_METADATA_NO_MODULE_ID": "Ensure the function/object was loaded through Slothlet's module system. Only Slothlet-managed functions have associated metadata.",
|
|
261
|
-
"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.",
|
|
262
|
-
"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.",
|
|
263
|
-
"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.",
|
|
264
|
-
"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.",
|
|
265
|
-
"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.",
|
|
266
|
-
"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'.",
|
|
267
|
-
"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.",
|
|
268
|
-
"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.",
|
|
269
|
-
"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.",
|
|
270
|
-
"HINT_V3_CONFIG_DEPRECATED": "This configuration option has been renamed for clarity. Update your code to use the new option name to ensure forward compatibility with v4.",
|
|
271
|
-
"HINT_MODULE_LOAD_FAILED": "Check the module file for errors. Ensure it has valid JavaScript syntax and exports.",
|
|
272
|
-
"HINT_MODULE_IMPORT_FAILED": "Ensure the module file exists and can be imported. Check for syntax errors or missing dependencies.",
|
|
273
|
-
"HINT_MODULE_NO_EXPORTS": "The module must export at least one function or object.",
|
|
274
|
-
"HINT_INVALID_DIRECTORY": "Ensure the directory path is correct and the directory exists and is accessible.",
|
|
275
|
-
"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.",
|
|
276
|
-
"HINT_INVALID_CONFIG_LAZY_NOT_READY": "In lazy mode, access properties to trigger materialization before calling functions.",
|
|
277
|
-
"HINT_INTERNAL_INVALID_STATE": "An internal state error occurred. This is likely a bug - please report it with details.",
|
|
278
|
-
"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().",
|
|
279
|
-
"HINT_INVALID_CONFIG_LAZY_ASYNC_REQUIRED": "Lazy mode requires async operations. Use eager mode or implement proper async patterns.",
|
|
280
|
-
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_SELF": "Cannot access 'self' outside of a slothlet API function context.",
|
|
281
|
-
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "Cannot access 'context' outside of a slothlet API function. Context can only be modified within slothlet API calls.",
|
|
282
|
-
"HINT_LOOSE_SET_NOT_OWNED": "A module owning apiPath \"P\" may write only under \"P.*\". To register code at a different namespace, call api.slothlet.api.add() instead.",
|
|
283
|
-
"HINT_LOOSE_SET_RESERVED_KEY": "The segments __proto__, prototype, and constructor cannot be used as apiPath names because writing to them would mutate the JavaScript prototype chain. Choose a different name.",
|
|
284
|
-
"HINT_INVALID_CONFIG_NOT_LOADED": "The instance must be loaded before performing this operation. Call load() first.",
|
|
285
|
-
"HINT_INVALID_CONFIG_RELOAD_NOT_IMPL": "Reload functionality is not yet implemented. This will be added in a future iteration.",
|
|
286
|
-
"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.",
|
|
287
|
-
"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.",
|
|
288
|
-
"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.",
|
|
289
|
-
"INVALID_HOOK_TYPE": "Invalid hook type \"{type}\". Must be one of: {validTypes}.",
|
|
290
293
|
"INVALID_HOOK_HANDLER": "Hook handler must be a function. Received type: {receivedType}.",
|
|
291
|
-
"DUPLICATE_HOOK_ID": "A hook with ID \"{id}\" already exists. Use a unique ID or omit the id option to auto-generate one.",
|
|
292
|
-
"INVALID_HOOK_SUBSET": "Invalid hook subset \"{subset}\". Must be \"before\", \"primary\", or \"after\". Valid subsets: {validSubsets}.",
|
|
293
|
-
"INVALID_TYPE_PATTERN": "Invalid type pattern \"{typePattern}\". {expected}",
|
|
294
|
-
"HINT_INVALID_HOOK_TYPE": "Use one of the valid hook types: before, after, always, or error.",
|
|
295
294
|
"HINT_INVALID_HOOK_HANDLER": "Provide a function as the hook handler, not a string or other type.",
|
|
295
|
+
"DUPLICATE_HOOK_ID": "A hook with ID \"{id}\" already exists. Use a unique ID or omit the id option to auto-generate one.",
|
|
296
296
|
"HINT_DUPLICATE_HOOK_ID": "Either use a different id value or remove the id option to let Slothlet auto-generate a unique ID.",
|
|
297
|
+
"INVALID_HOOK_SUBSET": "Invalid hook subset \"{subset}\". Must be \"before\", \"primary\", or \"after\". Valid subsets: {validSubsets}.",
|
|
297
298
|
"HINT_INVALID_HOOK_SUBSET": "Subsets control execution order. Use 'before' for pre-processing, 'primary' (default) for main hooks, or 'after' for post-processing.",
|
|
298
|
-
"
|
|
299
|
+
"INVALID_TYPE_PATTERN": "Invalid type pattern \"{typePattern}\". {expected}",
|
|
300
|
+
"HINT_INVALID_TYPE_PATTERN": "Hook patterns use the form 'pattern:type', such as 'math.*:before' or '**:error'. The legacy 'type:pattern' form still works but is deprecated.",
|
|
299
301
|
"HOOK_BEFORE_RETURNED_PROMISE": "Before hook '{id}' for path '{path}' returned a Promise. Before hooks must be synchronous.",
|
|
300
302
|
"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.",
|
|
301
303
|
"HOOK_BRACE_EXPANSION_MAX_DEPTH": "Brace expansion in hook pattern exceeds the maximum nesting depth of {maxDepth}.",
|
|
@@ -383,11 +385,11 @@
|
|
|
383
385
|
"INVALID_CONFIG_VERSION_DISPATCHER": "config.versionDispatcher must be a string (metadata key) or a function, received {received}",
|
|
384
386
|
"INVALID_CONFIG_VERSION_TAG": "versionConfig.version must be a non-empty string, received {received}",
|
|
385
387
|
"VERSION_NOT_FOUND": "Version '{version}' is not registered at path '{apiPath}'",
|
|
388
|
+
"HINT_VERSION_NOT_FOUND": "Call api.slothlet.versioning.list('{apiPath}') to see which version tags are currently registered at that path.",
|
|
386
389
|
"VERSION_NO_DEFAULT": "No default version configured for path '{apiPath}' and no version could be resolved from caller metadata",
|
|
387
390
|
"VERSION_DISPATCH_NOT_CALLABLE": "The versioned dispatcher at '{apiPath}' is a namespace, not a callable function",
|
|
388
391
|
"VERSION_REGISTER_DUPLICATE": "Version '{version}' is already registered at path '{apiPath}'. Use collisionMode 'replace' to overwrite",
|
|
389
392
|
"HINT_VERSION_REGISTER_DUPLICATE": "Call api.slothlet.versioning.unregister('{apiPath}', '{version}') first, or register with a different version tag.",
|
|
390
|
-
"HINT_VERSION_NOT_FOUND": "Call api.slothlet.versioning.list('{apiPath}') to see which version tags are currently registered at that path.",
|
|
391
393
|
"VERSION_DISCRIMINATOR_INVALID_RETURN": "versionDispatcher function returned '{returned}' which is not a registered version tag for path '{apiPath}'",
|
|
392
394
|
"DEBUG_VERSION_RESOLVED": "Version resolved: {version} for path {apiPath} (caller: {callerModule})",
|
|
393
395
|
"DEBUG_VERSION_DEFAULT_USED": "No discriminator match for path {apiPath}; using default version {version}",
|
|
@@ -417,7 +419,27 @@
|
|
|
417
419
|
"HINT_MODULE_MANIFEST_NOT_FOUND": "Plugin modules must ship a 'slothlet.module.json' at the package root (or the file/key specified via the `manifest` override). Check that the file exists in the package and that the override locator is correct.",
|
|
418
420
|
"MODULE_MANIFEST_INVALID": "Module manifest is invalid for package '{packageName}' at '{manifestPath}': {reason}.",
|
|
419
421
|
"HINT_MODULE_MANIFEST_INVALID": "Open the manifest and ensure it is valid JSON and matches the slothlet module schema (see schemas/slothlet.module.schema.json). Required fields: schemaVersion, mountPath, apiDir.",
|
|
420
|
-
"
|
|
422
|
+
"MODULE_MANIFEST_REASON_NOT_OBJECT": "manifest must be a JSON object",
|
|
423
|
+
"MODULE_MANIFEST_REASON_MISSING_FIELD": "missing required field '{field}'",
|
|
424
|
+
"MODULE_MANIFEST_REASON_FIELD_TYPE": "field '{field}' must be {expected}",
|
|
425
|
+
"EXPECTED_NON_EMPTY_STRING": "a non-empty string",
|
|
426
|
+
"EXPECTED_STRING": "a string",
|
|
427
|
+
"EXPECTED_FINITE_NUMBER": "a finite number",
|
|
428
|
+
"EXPECTED_PLAIN_OBJECT": "a plain object",
|
|
429
|
+
"EXPECTED_ARRAY_OF_RULE_OBJECTS": "an array of rule objects",
|
|
430
|
+
"MODULE_MANIFEST_REASON_MOUNTPATH_SHAPE": "field 'mountPath' must be a non-empty string or non-empty array of non-empty strings",
|
|
431
|
+
"MODULE_MANIFEST_REASON_MOUNTPATH_ENTRIES": "field 'mountPath' array entries must all be non-empty strings",
|
|
432
|
+
"MODULE_MANIFEST_REASON_DEPENDENCY_TYPE": "dependency '{dependency}' must be a string version range",
|
|
433
|
+
"MODULE_MANIFEST_REASON_PERMISSION_RULE": "permissions[{index}] must be a rule object",
|
|
434
|
+
"MODULE_MANIFEST_REASON_PERMISSION_CALLER": "permissions[{index}].caller must be a non-empty string",
|
|
435
|
+
"MODULE_MANIFEST_REASON_PERMISSION_TARGET": "permissions[{index}].target must be a non-empty string",
|
|
436
|
+
"MODULE_MANIFEST_REASON_PERMISSION_EFFECT": "permissions[{index}].effect must be \"allow\" or \"deny\"",
|
|
437
|
+
"MODULE_MANIFEST_REASON_JSON_PARSE": "JSON parse error: {error}",
|
|
438
|
+
"GENERATE_MANIFEST_DIR_INVALID": "generateManifest: dir must be a non-empty string, received {received}",
|
|
439
|
+
"GENERATE_MANIFEST_DIR_UNREADABLE": "generateManifest: cannot read directory \"{dir}\": {reason}",
|
|
440
|
+
"GENERATE_MANIFEST_NOT_DIRECTORY": "generateManifest: \"{dir}\" is not a directory",
|
|
441
|
+
"GENERATE_BROWSER_ASSETS_SLOTHLET_BASE_INVALID": "generateBrowserAssets: options.slothletBase must be a string (where @cldmv/slothlet is served in the browser), received {received}",
|
|
442
|
+
"MODULE_MANIFEST_UNKNOWN_FIELD": "Module manifest for package '{packageName}' at '{manifestPath}' contains unrecognised top-level field '{field}'. Unknown fields are rejected; use the dedicated 'metadata' block for developer-defined extras.",
|
|
421
443
|
"HINT_MODULE_MANIFEST_UNKNOWN_FIELD": "If '{field}' is a typo, fix it. If it is intentional developer metadata, move it inside the 'metadata' object.",
|
|
422
444
|
"MODULE_MANIFEST_NAME_MISMATCH": "Module manifest for package '{packageName}' declares name '{manifestName}' which does not match package.json name '{packageName}'.",
|
|
423
445
|
"HINT_MODULE_MANIFEST_NAME_MISMATCH": "The 'name' field in slothlet.module.json is optional but must match package.json when present. Either remove the manifest 'name' field or align it with package.json.",
|
|
@@ -434,7 +456,11 @@
|
|
|
434
456
|
"MODULE_DUPLICATE_NAME_VERSION_MISMATCH": "Module package '{packageName}' version '{version}' was found at multiple distinct real paths: {paths}.",
|
|
435
457
|
"HINT_MODULE_DUPLICATE_NAME_VERSION_MISMATCH": "This is almost certainly a misconfiguration — the same package at the same version installed in two unrelated locations. Investigate which install is intended and remove the other.",
|
|
436
458
|
"MODULE_MOUNT_COLLISION": "Module package '{packageName}' cannot mount at '{mountPath}': path is already occupied by module '{existingModuleID}' and collisionMode is '{collisionMode}'.",
|
|
437
|
-
"HINT_MODULE_MOUNT_COLLISION": "Either change the manifest's mountPath, pass `collisionMode: \"merge\"` to `addModule()` / `addModules()` to allow coexistence, or call `removeModule()` on the existing module first."
|
|
459
|
+
"HINT_MODULE_MOUNT_COLLISION": "Either change the manifest's mountPath, pass `collisionMode: \"merge\"` to `addModule()` / `addModules()` to allow coexistence, or call `removeModule()` on the existing module first.",
|
|
460
|
+
"HOOK_TYPEPATTERN_PREFIX_DEPRECATED": "Hook registration form '{given}' is deprecated and will be removed in v4. Use the path-first form '{suggested}' instead (e.g. 'math.*:before').",
|
|
461
|
+
"HINT_HOOK_TYPEPATTERN_PREFIX_DEPRECATED": "Move the hook type to the end as a suffix: rewrite a type-first selector like 'before:math.add' as the path-first form 'math.add:before'.",
|
|
462
|
+
"HOOK_UNPINNED_IGNORED": "lockCaller:false was ignored for hook '{pattern}'; hooks are pinned to their registering module. Set hook.pin:false (init) or call api.slothlet.hook.pin.disable() to permit unpinned hooks.",
|
|
463
|
+
"HINT_HOOK_UNPINNED_IGNORED": "Module-registered hooks are always pinned to their owner for security. To allow unpinned hooks, set hook.pin:false in the slothlet config, or call api.slothlet.hook.pin.disable() at runtime."
|
|
438
464
|
},
|
|
439
465
|
"metadata": {
|
|
440
466
|
"code": "en-gb",
|
|
@@ -1,54 +1,110 @@
|
|
|
1
1
|
{
|
|
2
2
|
"translations": {
|
|
3
3
|
"INVALID_CONFIG": "Invalid configuration: {option} is {value}, expected {expected}. {hint}",
|
|
4
|
+
"HINT_INVALID_CONFIG": "Check the configuration value and ensure it matches the expected type and format.",
|
|
5
|
+
"INVALID_CONFIG_SYNTHETIC_EXPORTS_SHAPE": "Configuration error: inline exports must be a plain export-map object (a default and/or named exports), received {received}.",
|
|
6
|
+
"HINT_INVALID_CONFIG_SYNTHETIC_EXPORTS_SHAPE": "Pass exports as a plain object, e.g. { default: fn } or { name: fn } — or a { exports: { default?, ...named } } wrapper, or a bare function.",
|
|
7
|
+
"INVALID_CONFIG_SYNTHETIC_INPUT": "Configuration error: inline content must be a plain export-map object, an exports-wrapper object, or a bare function, received {received}.",
|
|
8
|
+
"HINT_INVALID_CONFIG_SYNTHETIC_INPUT": "Pass inline exports as a plain object or a bare function; a filesystem mount needs a string path.",
|
|
9
|
+
"INVALID_CONFIG_SYNTHETIC_NAME": "Configuration error: syntheticName must be a non-empty string, received {received}.",
|
|
10
|
+
"HINT_INVALID_CONFIG_SYNTHETIC_NAME": "Provide a string key name for the synthetic build, e.g. \"synthetic\".",
|
|
11
|
+
"INVALID_CONFIG_PRELOADED_STRUCTURE": "Configuration error: preloadedStructure must be a plain object with files and directories arrays, received {received}.",
|
|
12
|
+
"HINT_INVALID_CONFIG_PRELOADED_STRUCTURE": "preloadedStructure is built internally; pass an object with files and directories arrays, or omit it to scan a directory.",
|
|
4
13
|
"INVALID_CONFIG_DIR_MISSING": "Configuration error: 'dir' option is required. Provide a directory path to load API from.",
|
|
14
|
+
"HINT_INVALID_CONFIG_DIR_MISSING": "The directory path is required but was not provided.",
|
|
5
15
|
"INVALID_CONFIG_DIR_INVALID": "Configuration error: 'dir' must be a non-empty string path. Received: {dir}",
|
|
16
|
+
"HINT_INVALID_CONFIG_DIR_INVALID": "Ensure the directory path is a valid string and points to an existing directory.",
|
|
6
17
|
"INVALID_CONFIG_BROWSER_REQUIRES_MANIFEST": "Configuration error: 'manifest' is required when env is 'browser'. Provide a pre-generated manifest object with 'files' and 'directories' arrays.",
|
|
7
18
|
"INVALID_CONFIG_BROWSER_MANIFEST_INVALID": "Configuration error: 'manifest' must be a plain object with 'files' and 'directories' arrays. Received: {received}",
|
|
8
19
|
"INVALID_CONFIG_BROWSER_RESOLVE_SPECIFIER_INVALID": "Configuration error: 'resolveModuleSpecifier' must be a function when env is 'browser'. Received: {received}",
|
|
9
20
|
"INVALID_CONFIG_MODE_INVALID": "Configuration error: 'mode' must be either 'eager' or 'lazy'. Received: {value}",
|
|
21
|
+
"HINT_INVALID_CONFIG_MODE_INVALID": "Mode must be either 'eager' or 'lazy'.",
|
|
10
22
|
"INVALID_CONFIG_NOT_LOADED": "Cannot perform operation '{operation}' - instance not loaded. Call load() first.",
|
|
23
|
+
"HINT_INVALID_CONFIG_NOT_LOADED": "The instance must be loaded before performing this operation. Call load() first.",
|
|
11
24
|
"INVALID_CONFIG_LAZY_MATERIALIZATION_FAILED": "Failed to materialize lazy proxy for '{apiPath}'. Check that the module loads correctly.",
|
|
12
25
|
"INVALID_CONFIG_NOT_A_FUNCTION": "Cannot call '{apiPath}' - not a function (got {actualType}). Check that the module exports a callable function.",
|
|
13
26
|
"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}'.",
|
|
27
|
+
"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).",
|
|
14
28
|
"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}'.",
|
|
29
|
+
"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.",
|
|
15
30
|
"INVALID_METADATA_TARGET": "Invalid metadata target: expected {expected}, received {target}. Metadata operations require a function or object reference.",
|
|
31
|
+
"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.",
|
|
16
32
|
"METADATA_NO_MODULE_ID": "Cannot set user metadata: no moduleID found in system metadata. Ensure the target function/object was loaded through Slothlet.",
|
|
33
|
+
"HINT_METADATA_NO_MODULE_ID": "Ensure the function/object was loaded through Slothlet's module system. Only Slothlet-managed functions have associated metadata.",
|
|
17
34
|
"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.",
|
|
35
|
+
"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.",
|
|
18
36
|
"INVALID_METADATA_KEY": "Invalid metadata key: expected {expected}, received {type} for key '{key}'. Metadata keys must be properly formatted.",
|
|
37
|
+
"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.",
|
|
19
38
|
"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.",
|
|
39
|
+
"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.",
|
|
20
40
|
"COLLISION_ERROR": "Collision error at '{key}' (context: {collisionContext}, mode: {collisionMode}). Set collision mode to 'merge', 'replace', 'warn', or 'skip' to handle collisions.",
|
|
41
|
+
"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.",
|
|
21
42
|
"COLLISION_DEFAULT_EXPORT_ERROR": "Collision detected: property '{key}' already exists on default export at '{apiPath}'. Collision mode is 'error'.",
|
|
43
|
+
"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.",
|
|
22
44
|
"INVALID_ARGUMENT": "Invalid argument '{argument}': expected {expected}, received {received}.",
|
|
45
|
+
"HINT_INVALID_ARGUMENT": "Path must be a dot-notation string (e.g., 'math.add').",
|
|
23
46
|
"RUNTIME_NO_ACTIVE_CONTEXT": "No active context found. This operation requires being called from within a slothlet API function.",
|
|
47
|
+
"HINT_RUNTIME_NO_ACTIVE_CONTEXT": "metadata.self() must be called from within a slothlet API function.",
|
|
24
48
|
"INVALID_CONFIG_MUTATIONS_DISABLED": "Cannot perform '{operation}' - mutation is disabled. Set allowMutation: true to enable API modification operations (add/remove/reload).",
|
|
49
|
+
"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.",
|
|
25
50
|
"CACHE_MODULEID_MISMATCH": "Cache entry moduleID mismatch: expected '{cacheKey}', but entry has '{entryModuleID}'. This indicates an internal cache inconsistency.",
|
|
51
|
+
"HINT_CACHE_MODULEID_MISMATCH": "This is an internal error indicating cache corruption. Please report this issue with steps to reproduce.",
|
|
26
52
|
"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.",
|
|
53
|
+
"HINT_CACHE_NOT_FOUND": "Ensure the module has been loaded before attempting to reload or rebuild its cache. Check that the moduleID is correct.",
|
|
27
54
|
"CACHE_MANAGER_NOT_AVAILABLE": "Cache manager is not available. Cannot perform '{operation}' operation. Ensure the cache manager is initialized.",
|
|
55
|
+
"HINT_CACHE_MANAGER_NOT_AVAILABLE": "The cache manager should be initialized automatically. If you see this error, it may indicate an internal initialization issue.",
|
|
28
56
|
"MODULE_LOAD_FAILED": "Failed to load module '{modulePath}' (ID: {moduleID}): {error}",
|
|
57
|
+
"HINT_MODULE_LOAD_FAILED": "Check the module file for errors. Ensure it has valid JavaScript syntax and exports.",
|
|
29
58
|
"MODULE_NOT_FOUND": "Module not found: {modulePath}. {hint}",
|
|
59
|
+
"HINT_MODULE_NOT_FOUND": "Ensure the module exists and the path is correct. Check for typos in the import statement.",
|
|
30
60
|
"MODULE_IMPORT_FAILED": "Failed to import module '{modulePath}': {error}. Check that the file exists and has valid syntax.",
|
|
61
|
+
"HINT_MODULE_IMPORT_FAILED": "Ensure the module file exists and can be imported. Check for syntax errors or missing dependencies.",
|
|
31
62
|
"CONTEXT_ALREADY_EXISTS": "Context for instance '{instanceID}' already exists. Cannot initialize twice.",
|
|
63
|
+
"HINT_CONTEXT_ALREADY_EXISTS": "This context already exists. Check if you're trying to initialize the same instance twice.",
|
|
32
64
|
"CONTEXT_NOT_FOUND": "Context not found for instance '{instanceID}'. Instance may have been shut down. Available instances: {availableInstances}",
|
|
65
|
+
"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.",
|
|
33
66
|
"CONTEXT_EXECUTION_FAILED": "Failed to execute in context for instance '{instanceID}': {error}",
|
|
67
|
+
"HINT_CONTEXT_EXECUTION_FAILED": "An error occurred while executing the function. Check the error details for more information.",
|
|
34
68
|
"NO_ACTIVE_CONTEXT_LIVE": "No active context - no instance is currently active in live bindings mode.",
|
|
69
|
+
"HINT_NO_ACTIVE_CONTEXT_LIVE": "No active context found. Ensure you're calling this function from within a slothlet live context.",
|
|
35
70
|
"NO_ACTIVE_CONTEXT_ASYNC": "No active context - function must be called within slothlet API context.",
|
|
71
|
+
"HINT_NO_ACTIVE_CONTEXT_ASYNC": "No active context found. Ensure you're calling this function from within a slothlet async context.",
|
|
36
72
|
"RUNTIME_NO_ACTIVE_CONTEXT_SELF": "No active context - cannot access 'self'. Ensure you're calling from within a Slothlet API function.",
|
|
73
|
+
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_SELF": "Cannot access 'self' outside of a slothlet API function context.",
|
|
37
74
|
"RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "No active context - 'context' can only be modified within slothlet API calls.",
|
|
75
|
+
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "Cannot access 'context' outside of a slothlet API function. Context can only be modified within slothlet API calls.",
|
|
38
76
|
"OWNERSHIP_INVALID_MODULE_ID": "Invalid ownership registration: moduleID '{moduleID}' is invalid.",
|
|
77
|
+
"HINT_OWNERSHIP_INVALID_MODULE_ID": "The module ID is invalid. Ensure the module was loaded properly and the ID is correct.",
|
|
39
78
|
"OWNERSHIP_INVALID_API_PATH": "Invalid ownership registration: apiPath '{apiPath}' is invalid.",
|
|
79
|
+
"HINT_OWNERSHIP_INVALID_API_PATH": "The API path is invalid. Ensure the path format is correct.",
|
|
40
80
|
"OWNERSHIP_CONFLICT": "Ownership conflict: Path '{apiPath}' is already owned by module '{existingModuleId}', cannot assign to '{newModuleId}'. Use forceOverwrite: true or removeApi first.",
|
|
81
|
+
"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.",
|
|
41
82
|
"LOOSE_SET_NOT_OWNED": "Module {callerApiPath} is not allowed to write to {apiPath}. A module may only write under its own apiPath; use api.slothlet.api.add() to register at a different path.",
|
|
83
|
+
"HINT_LOOSE_SET_NOT_OWNED": "A module owning apiPath \"P\" may write only under \"P.*\". To register code at a different namespace, call api.slothlet.api.add() instead.",
|
|
42
84
|
"LOOSE_SET_RESERVED_KEY": "Cannot assign to reserved key segment '{segment}' in apiPath '{apiPath}'. Names like __proto__, prototype, and constructor are blocked to prevent prototype pollution of the API tree.",
|
|
85
|
+
"HINT_LOOSE_SET_RESERVED_KEY": "The segments __proto__, prototype, and constructor cannot be used as apiPath names because writing to them would mutate the JavaScript prototype chain. Choose a different name.",
|
|
43
86
|
"INVALID_DIRECTORY": "Invalid directory '{dir}': {error}. Ensure the directory exists and is accessible.",
|
|
87
|
+
"HINT_INVALID_DIRECTORY": "Ensure the directory path is correct and the directory exists and is accessible.",
|
|
44
88
|
"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.",
|
|
89
|
+
"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.",
|
|
90
|
+
"WARN_SYNTHETIC_ROOT_EMPTY": "Synthetic add at api path '{apiPath}' contributed no leaves; nothing was mounted.",
|
|
91
|
+
"HINT_WARN_SYNTHETIC_ROOT_EMPTY": "Provide at least one export — a named function default or named exports — so the synthetic add has something to mount.",
|
|
92
|
+
"WARN_SYNTHETIC_ROOT_UNNAMED": "Synthetic add at the API root has an anonymous default export; it cannot be keyed onto the root and was skipped.",
|
|
93
|
+
"HINT_WARN_SYNTHETIC_ROOT_UNNAMED": "Name the default function (its name becomes the root key), provide named exports, or mount the leaf at a named apiPath.",
|
|
94
|
+
"WARN_SYNTHETIC_ROOT_COLLISION": "Synthetic add at the API root re-keys its default to '{name}', but a named export already uses '{name}'; the named export takes precedence.",
|
|
95
|
+
"HINT_WARN_SYNTHETIC_ROOT_COLLISION": "Rename the default function or the conflicting named export so each lands on a distinct root key.",
|
|
45
96
|
"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.",
|
|
97
|
+
"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().",
|
|
46
98
|
"WARNING_RESERVED_PROPERTY_CONFLICT": "User API conflicts with reserved properties: {properties}",
|
|
99
|
+
"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.",
|
|
47
100
|
"WARNING_LANGUAGE_LOAD_FAILED": "Failed to load language '{lang}', falling back to English.",
|
|
48
101
|
"WARNING_LANGUAGE_UNAVAILABLE": "Language '{lang}' is not available, using English.",
|
|
49
102
|
"WARNING_OWNERSHIP_CONFLICT": "Ownership conflict at '{apiPath}': already owned by '{existingModuleId}', cannot register '{newModuleId}'. Keeping existing.",
|
|
103
|
+
"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.",
|
|
50
104
|
"WARNING_HOT_RELOAD_PATH_COLLISION": "Path collision at {apiPath} - keeping existing value (collision mode: warn).",
|
|
105
|
+
"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'.",
|
|
51
106
|
"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.",
|
|
107
|
+
"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.",
|
|
52
108
|
"WARNING_COLLISION_FILE_FOLDER_MERGE": "Collision detected at '{key}' - merging file and folder exports (collision mode: 'warn').",
|
|
53
109
|
"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.",
|
|
54
110
|
"WARNING_COLLISION_DEFAULT_EXPORT_OVERWRITE": "Collision warning: property '{key}' already exists on default export function at {apiPath}. Named export will overwrite.",
|
|
@@ -58,8 +114,11 @@
|
|
|
58
114
|
"WARNING_LIFECYCLE_HANDLER_ERROR": "Lifecycle event handler threw an error for event '{event}'. Other handlers for this event continued executing.",
|
|
59
115
|
"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.",
|
|
60
116
|
"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.",
|
|
117
|
+
"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.",
|
|
61
118
|
"V3_CONFIG_DEPRECATED": "Configuration option '{option}' is deprecated and will be removed in v4. Use '{replacement}' instead.",
|
|
119
|
+
"HINT_V3_CONFIG_DEPRECATED": "This configuration option has been renamed for clarity. Update your code to use the new option name to ensure forward compatibility with v4.",
|
|
62
120
|
"V2_CONFIG_UNSUPPORTED": "Configuration option '{option}' from v2 is not supported in v3. {hint} Use '{replacement}' instead.",
|
|
121
|
+
"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.",
|
|
63
122
|
"WARN_SUPPRESS_FIX_ACTIVE": "Rule fix '{rule}' is suppressed via 'suppressFixes'. See {url} for details. This is a temporary override and will be removed in v4. The corrected '{rule}' behavior will be enforced permanently.",
|
|
64
123
|
"HINT_WARN_SUPPRESS_FIX_ACTIVE": "Remove '{rule}' from 'suppressFixes' and update your API directory structure to accommodate the corrected behavior before upgrading to v4.",
|
|
65
124
|
"DEBUG_MODE_ROOT_CONTRIBUTOR": "[{mode}] Root contributor detected: {functionName}",
|
|
@@ -230,72 +289,15 @@
|
|
|
230
289
|
"DEBUG_MODE_LAZY_WRAPPER_MATERIALIZED": "Lazy wrapper materialized",
|
|
231
290
|
"DEBUG_MODE_ALL_LAZY_WRAPPERS_MATERIALIZED": "All lazy wrappers materialized",
|
|
232
291
|
"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').",
|
|
233
|
-
"HINT_MODULE_NOT_FOUND": "Ensure the module exists and the path is correct. Check for typos in the import statement.",
|
|
234
292
|
"HINT_SYNTAX_ERROR": "Check for syntax errors in the module file. Common issues: missing brackets, unclosed strings, or invalid JavaScript syntax.",
|
|
235
|
-
"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.",
|
|
236
|
-
"HINT_CONTEXT_ALREADY_EXISTS": "This context already exists. Check if you're trying to initialize the same instance twice.",
|
|
237
|
-
"HINT_CONTEXT_EXECUTION_FAILED": "An error occurred while executing the function. Check the error details for more information.",
|
|
238
|
-
"HINT_NO_ACTIVE_CONTEXT": "No active context found. Ensure you're calling this function from within a slothlet context (async or live mode).",
|
|
239
|
-
"HINT_NO_ACTIVE_CONTEXT_ASYNC": "No active context found. Ensure you're calling this function from within a slothlet async context.",
|
|
240
|
-
"HINT_NO_ACTIVE_CONTEXT_LIVE": "No active context found. Ensure you're calling this function from within a slothlet live context.",
|
|
241
|
-
"HINT_OWNERSHIP_INVALID_MODULE_ID": "The module ID is invalid. Ensure the module was loaded properly and the ID is correct.",
|
|
242
|
-
"HINT_OWNERSHIP_INVALID_API_PATH": "The API path is invalid. Ensure the path format is correct.",
|
|
243
|
-
"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.",
|
|
244
|
-
"HINT_INVALID_CONFIG": "Check the configuration value and ensure it matches the expected type and format.",
|
|
245
|
-
"HINT_INVALID_CONFIG_DIR_INVALID": "Ensure the directory path is a valid string and points to an existing directory.",
|
|
246
|
-
"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.",
|
|
247
|
-
"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.",
|
|
248
|
-
"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.",
|
|
249
|
-
"HINT_INVALID_ARGUMENT": "Path must be a dot-notation string (e.g., 'math.add').",
|
|
250
|
-
"HINT_RUNTIME_NO_ACTIVE_CONTEXT": "metadata.self() must be called from within a slothlet API function.",
|
|
251
|
-
"HINT_INVALID_CONFIG_MODE_INVALID": "Mode must be either 'eager' or 'lazy'.",
|
|
252
|
-
"HINT_INVALID_CONFIG_MODE_UNKNOWN": "Unknown mode specified. Use 'eager' or 'lazy'.",
|
|
253
|
-
"HINT_INVALID_CONFIG_DIR_MISSING": "The directory path is required but was not provided.",
|
|
254
|
-
"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).",
|
|
255
|
-
"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.",
|
|
256
|
-
"HINT_CACHE_MODULEID_MISMATCH": "This is an internal error indicating cache corruption. Please report this issue with steps to reproduce.",
|
|
257
|
-
"HINT_CACHE_NOT_FOUND": "Ensure the module has been loaded before attempting to reload or rebuild its cache. Check that the moduleID is correct.",
|
|
258
|
-
"HINT_CACHE_MANAGER_NOT_AVAILABLE": "The cache manager should be initialized automatically. If you see this error, it may indicate an internal initialization issue.",
|
|
259
|
-
"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.",
|
|
260
|
-
"HINT_METADATA_NO_MODULE_ID": "Ensure the function/object was loaded through Slothlet's module system. Only Slothlet-managed functions have associated metadata.",
|
|
261
|
-
"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.",
|
|
262
|
-
"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.",
|
|
263
|
-
"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.",
|
|
264
|
-
"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.",
|
|
265
|
-
"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.",
|
|
266
|
-
"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'.",
|
|
267
|
-
"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.",
|
|
268
|
-
"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.",
|
|
269
|
-
"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.",
|
|
270
|
-
"HINT_V3_CONFIG_DEPRECATED": "This configuration option has been renamed for clarity. Update your code to use the new option name to ensure forward compatibility with v4.",
|
|
271
|
-
"HINT_MODULE_LOAD_FAILED": "Check the module file for errors. Ensure it has valid JavaScript syntax and exports.",
|
|
272
|
-
"HINT_MODULE_IMPORT_FAILED": "Ensure the module file exists and can be imported. Check for syntax errors or missing dependencies.",
|
|
273
|
-
"HINT_MODULE_NO_EXPORTS": "The module must export at least one function or object.",
|
|
274
|
-
"HINT_INVALID_DIRECTORY": "Ensure the directory path is correct and the directory exists and is accessible.",
|
|
275
|
-
"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.",
|
|
276
|
-
"HINT_INVALID_CONFIG_LAZY_NOT_READY": "In lazy mode, access properties to trigger materialization before calling functions.",
|
|
277
|
-
"HINT_INTERNAL_INVALID_STATE": "An internal state error occurred. This is likely a bug - please report it with details.",
|
|
278
|
-
"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().",
|
|
279
|
-
"HINT_INVALID_CONFIG_LAZY_ASYNC_REQUIRED": "Lazy mode requires async operations. Use eager mode or implement proper async patterns.",
|
|
280
|
-
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_SELF": "Cannot access 'self' outside of a slothlet API function context.",
|
|
281
|
-
"HINT_RUNTIME_NO_ACTIVE_CONTEXT_CONTEXT": "Cannot access 'context' outside of a slothlet API function. Context can only be modified within slothlet API calls.",
|
|
282
|
-
"HINT_LOOSE_SET_NOT_OWNED": "A module owning apiPath \"P\" may write only under \"P.*\". To register code at a different namespace, call api.slothlet.api.add() instead.",
|
|
283
|
-
"HINT_LOOSE_SET_RESERVED_KEY": "The segments __proto__, prototype, and constructor cannot be used as apiPath names because writing to them would mutate the JavaScript prototype chain. Choose a different name.",
|
|
284
|
-
"HINT_INVALID_CONFIG_NOT_LOADED": "The instance must be loaded before performing this operation. Call load() first.",
|
|
285
|
-
"HINT_INVALID_CONFIG_RELOAD_NOT_IMPL": "Reload functionality is not yet implemented. This will be added in a future iteration.",
|
|
286
|
-
"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.",
|
|
287
|
-
"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.",
|
|
288
|
-
"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.",
|
|
289
|
-
"INVALID_HOOK_TYPE": "Invalid hook type \"{type}\". Must be one of: {validTypes}.",
|
|
290
293
|
"INVALID_HOOK_HANDLER": "Hook handler must be a function. Received type: {receivedType}.",
|
|
291
|
-
"DUPLICATE_HOOK_ID": "A hook with ID \"{id}\" already exists. Use a unique ID or omit the id option to auto-generate one.",
|
|
292
|
-
"INVALID_HOOK_SUBSET": "Invalid hook subset \"{subset}\". Must be \"before\", \"primary\", or \"after\". Valid subsets: {validSubsets}.",
|
|
293
|
-
"INVALID_TYPE_PATTERN": "Invalid type pattern \"{typePattern}\". {expected}",
|
|
294
|
-
"HINT_INVALID_HOOK_TYPE": "Use one of the valid hook types: before, after, always, or error.",
|
|
295
294
|
"HINT_INVALID_HOOK_HANDLER": "Provide a function as the hook handler, not a string or other type.",
|
|
295
|
+
"DUPLICATE_HOOK_ID": "A hook with ID \"{id}\" already exists. Use a unique ID or omit the id option to auto-generate one.",
|
|
296
296
|
"HINT_DUPLICATE_HOOK_ID": "Either use a different id value or remove the id option to let Slothlet auto-generate a unique ID.",
|
|
297
|
+
"INVALID_HOOK_SUBSET": "Invalid hook subset \"{subset}\". Must be \"before\", \"primary\", or \"after\". Valid subsets: {validSubsets}.",
|
|
297
298
|
"HINT_INVALID_HOOK_SUBSET": "Subsets control execution order. Use 'before' for pre-processing, 'primary' (default) for main hooks, or 'after' for post-processing.",
|
|
298
|
-
"
|
|
299
|
+
"INVALID_TYPE_PATTERN": "Invalid type pattern \"{typePattern}\". {expected}",
|
|
300
|
+
"HINT_INVALID_TYPE_PATTERN": "Hook patterns use the form 'pattern:type', such as 'math.*:before' or '**:error'. The legacy 'type:pattern' form still works but is deprecated.",
|
|
299
301
|
"HOOK_BEFORE_RETURNED_PROMISE": "Before hook '{id}' for path '{path}' returned a Promise. Before hooks must be synchronous.",
|
|
300
302
|
"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.",
|
|
301
303
|
"HOOK_BRACE_EXPANSION_MAX_DEPTH": "Brace expansion in hook pattern exceeds the maximum nesting depth of {maxDepth}.",
|
|
@@ -383,11 +385,11 @@
|
|
|
383
385
|
"INVALID_CONFIG_VERSION_DISPATCHER": "config.versionDispatcher must be a string (metadata key) or a function, received {received}",
|
|
384
386
|
"INVALID_CONFIG_VERSION_TAG": "versionConfig.version must be a non-empty string, received {received}",
|
|
385
387
|
"VERSION_NOT_FOUND": "Version '{version}' is not registered at path '{apiPath}'",
|
|
388
|
+
"HINT_VERSION_NOT_FOUND": "Call api.slothlet.versioning.list('{apiPath}') to see which version tags are currently registered at that path.",
|
|
386
389
|
"VERSION_NO_DEFAULT": "No default version configured for path '{apiPath}' and no version could be resolved from caller metadata",
|
|
387
390
|
"VERSION_DISPATCH_NOT_CALLABLE": "The versioned dispatcher at '{apiPath}' is a namespace, not a callable function",
|
|
388
391
|
"VERSION_REGISTER_DUPLICATE": "Version '{version}' is already registered at path '{apiPath}'. Use collisionMode 'replace' to overwrite",
|
|
389
392
|
"HINT_VERSION_REGISTER_DUPLICATE": "Call api.slothlet.versioning.unregister('{apiPath}', '{version}') first, or register with a different version tag.",
|
|
390
|
-
"HINT_VERSION_NOT_FOUND": "Call api.slothlet.versioning.list('{apiPath}') to see which version tags are currently registered at that path.",
|
|
391
393
|
"VERSION_DISCRIMINATOR_INVALID_RETURN": "versionDispatcher function returned '{returned}' which is not a registered version tag for path '{apiPath}'",
|
|
392
394
|
"DEBUG_VERSION_RESOLVED": "Version resolved: {version} for path {apiPath} (caller: {callerModule})",
|
|
393
395
|
"DEBUG_VERSION_DEFAULT_USED": "No discriminator match for path {apiPath}; using default version {version}",
|
|
@@ -417,7 +419,27 @@
|
|
|
417
419
|
"HINT_MODULE_MANIFEST_NOT_FOUND": "Plugin modules must ship a 'slothlet.module.json' at the package root (or the file/key specified via the `manifest` override). Check that the file exists in the package and that the override locator is correct.",
|
|
418
420
|
"MODULE_MANIFEST_INVALID": "Module manifest is invalid for package '{packageName}' at '{manifestPath}': {reason}.",
|
|
419
421
|
"HINT_MODULE_MANIFEST_INVALID": "Open the manifest and ensure it is valid JSON and matches the slothlet module schema (see schemas/slothlet.module.schema.json). Required fields: schemaVersion, mountPath, apiDir.",
|
|
420
|
-
"
|
|
422
|
+
"MODULE_MANIFEST_REASON_NOT_OBJECT": "manifest must be a JSON object",
|
|
423
|
+
"MODULE_MANIFEST_REASON_MISSING_FIELD": "missing required field '{field}'",
|
|
424
|
+
"MODULE_MANIFEST_REASON_FIELD_TYPE": "field '{field}' must be {expected}",
|
|
425
|
+
"EXPECTED_NON_EMPTY_STRING": "a non-empty string",
|
|
426
|
+
"EXPECTED_STRING": "a string",
|
|
427
|
+
"EXPECTED_FINITE_NUMBER": "a finite number",
|
|
428
|
+
"EXPECTED_PLAIN_OBJECT": "a plain object",
|
|
429
|
+
"EXPECTED_ARRAY_OF_RULE_OBJECTS": "an array of rule objects",
|
|
430
|
+
"MODULE_MANIFEST_REASON_MOUNTPATH_SHAPE": "field 'mountPath' must be a non-empty string or non-empty array of non-empty strings",
|
|
431
|
+
"MODULE_MANIFEST_REASON_MOUNTPATH_ENTRIES": "field 'mountPath' array entries must all be non-empty strings",
|
|
432
|
+
"MODULE_MANIFEST_REASON_DEPENDENCY_TYPE": "dependency '{dependency}' must be a string version range",
|
|
433
|
+
"MODULE_MANIFEST_REASON_PERMISSION_RULE": "permissions[{index}] must be a rule object",
|
|
434
|
+
"MODULE_MANIFEST_REASON_PERMISSION_CALLER": "permissions[{index}].caller must be a non-empty string",
|
|
435
|
+
"MODULE_MANIFEST_REASON_PERMISSION_TARGET": "permissions[{index}].target must be a non-empty string",
|
|
436
|
+
"MODULE_MANIFEST_REASON_PERMISSION_EFFECT": "permissions[{index}].effect must be \"allow\" or \"deny\"",
|
|
437
|
+
"MODULE_MANIFEST_REASON_JSON_PARSE": "JSON parse error: {error}",
|
|
438
|
+
"GENERATE_MANIFEST_DIR_INVALID": "generateManifest: dir must be a non-empty string, received {received}",
|
|
439
|
+
"GENERATE_MANIFEST_DIR_UNREADABLE": "generateManifest: cannot read directory \"{dir}\": {reason}",
|
|
440
|
+
"GENERATE_MANIFEST_NOT_DIRECTORY": "generateManifest: \"{dir}\" is not a directory",
|
|
441
|
+
"GENERATE_BROWSER_ASSETS_SLOTHLET_BASE_INVALID": "generateBrowserAssets: options.slothletBase must be a string (where @cldmv/slothlet is served in the browser), received {received}",
|
|
442
|
+
"MODULE_MANIFEST_UNKNOWN_FIELD": "Module manifest for package '{packageName}' at '{manifestPath}' contains unrecognized top-level field '{field}'. Unknown fields are rejected; use the dedicated 'metadata' block for developer-defined extras.",
|
|
421
443
|
"HINT_MODULE_MANIFEST_UNKNOWN_FIELD": "If '{field}' is a typo, fix it. If it is intentional developer metadata, move it inside the 'metadata' object.",
|
|
422
444
|
"MODULE_MANIFEST_NAME_MISMATCH": "Module manifest for package '{packageName}' declares name '{manifestName}' which does not match package.json name '{packageName}'.",
|
|
423
445
|
"HINT_MODULE_MANIFEST_NAME_MISMATCH": "The 'name' field in slothlet.module.json is optional but must match package.json when present. Either remove the manifest 'name' field or align it with package.json.",
|
|
@@ -434,7 +456,11 @@
|
|
|
434
456
|
"MODULE_DUPLICATE_NAME_VERSION_MISMATCH": "Module package '{packageName}' version '{version}' was found at multiple distinct real paths: {paths}.",
|
|
435
457
|
"HINT_MODULE_DUPLICATE_NAME_VERSION_MISMATCH": "This is almost certainly a misconfiguration — the same package at the same version installed in two unrelated locations. Investigate which install is intended and remove the other.",
|
|
436
458
|
"MODULE_MOUNT_COLLISION": "Module package '{packageName}' cannot mount at '{mountPath}': path is already occupied by module '{existingModuleID}' and collisionMode is '{collisionMode}'.",
|
|
437
|
-
"HINT_MODULE_MOUNT_COLLISION": "Either change the manifest's mountPath, pass `collisionMode: \"merge\"` to `addModule()` / `addModules()` to allow coexistence, or call `removeModule()` on the existing module first."
|
|
459
|
+
"HINT_MODULE_MOUNT_COLLISION": "Either change the manifest's mountPath, pass `collisionMode: \"merge\"` to `addModule()` / `addModules()` to allow coexistence, or call `removeModule()` on the existing module first.",
|
|
460
|
+
"HOOK_TYPEPATTERN_PREFIX_DEPRECATED": "Hook registration form '{given}' is deprecated and will be removed in v4. Use the path-first form '{suggested}' instead (e.g. 'math.*:before').",
|
|
461
|
+
"HINT_HOOK_TYPEPATTERN_PREFIX_DEPRECATED": "Move the hook type to the end as a suffix: rewrite a type-first selector like 'before:math.add' as the path-first form 'math.add:before'.",
|
|
462
|
+
"HOOK_UNPINNED_IGNORED": "lockCaller:false was ignored for hook '{pattern}'; hooks are pinned to their registering module. Set hook.pin:false (init) or call api.slothlet.hook.pin.disable() to permit unpinned hooks.",
|
|
463
|
+
"HINT_HOOK_UNPINNED_IGNORED": "Module-registered hooks are always pinned to their owner for security. To allow unpinned hooks, set hook.pin:false in the slothlet config, or call api.slothlet.hook.pin.disable() at runtime."
|
|
438
464
|
},
|
|
439
465
|
"metadata": {
|
|
440
466
|
"code": "en-us",
|