botinabox 2.1.0 → 2.1.1

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/dist/index.d.ts CHANGED
@@ -399,7 +399,7 @@ declare function loadConfig(opts?: {
399
399
  overrides?: Partial<BotConfig>;
400
400
  env?: Record<string, string | undefined>;
401
401
  }): ConfigLoadResult;
402
- /** Get the loaded config singleton. Call loadConfig() first. */
402
+ /** Get the loaded config singleton. Auto-initializes with defaults if not loaded. */
403
403
  declare function getConfig(): BotConfig;
404
404
  /** Initialize the config singleton. Returns errors if any. */
405
405
  declare function initConfig(opts?: Parameters<typeof loadConfig>[0]): ConfigLoadError[];
package/dist/index.js CHANGED
@@ -290,7 +290,9 @@ function loadConfig(opts) {
290
290
  }
291
291
  var _config = null;
292
292
  function getConfig() {
293
- if (!_config) throw new Error("Config not loaded \u2014 call loadConfig() first");
293
+ if (!_config) {
294
+ initConfig({});
295
+ }
294
296
  return _config;
295
297
  }
296
298
  function initConfig(opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botinabox",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Bot in a Box — framework for building multi-agent bots",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",