@everworker/oneringai 0.4.4 → 0.4.6

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.
@@ -881,10 +881,28 @@ declare class ToolCatalogRegistry {
881
881
  * Get the ConnectorTools module (lazy-loaded, cached).
882
882
  * Returns null if ConnectorTools is not available.
883
883
  * Uses false sentinel to prevent retrying after first failure.
884
+ *
885
+ * NOTE: The dynamic require() path fails in bundled environments (Meteor, Webpack).
886
+ * Call setConnectorToolsModule() at app startup to inject the module explicitly.
884
887
  */
885
888
  static getConnectorToolsModule(): {
886
889
  ConnectorTools: any;
887
890
  } | null;
891
+ /**
892
+ * Explicitly set the ConnectorTools module reference.
893
+ *
894
+ * Use this in bundled environments (Meteor, Webpack, etc.) where the lazy
895
+ * require('../../tools/connector/ConnectorTools.js') fails due to path resolution.
896
+ *
897
+ * @example
898
+ * ```typescript
899
+ * import { ToolCatalogRegistry, ConnectorTools } from '@everworker/oneringai';
900
+ * ToolCatalogRegistry.setConnectorToolsModule({ ConnectorTools });
901
+ * ```
902
+ */
903
+ static setConnectorToolsModule(mod: {
904
+ ConnectorTools: any;
905
+ }): void;
888
906
  /**
889
907
  * Register a tool category.
890
908
  * If the category already exists, updates its metadata.
@@ -2164,11 +2182,6 @@ declare class ExecutionContext {
2164
2182
  };
2165
2183
  }
2166
2184
 
2167
- /**
2168
- * Event types for agent execution
2169
- * These events are emitted asynchronously for notifications (UI updates, logging, etc.)
2170
- */
2171
-
2172
2185
  /**
2173
2186
  * Minimal config type for execution start events.
2174
2187
  * This captures the essential info without importing full AgentConfig.
@@ -2209,6 +2222,12 @@ interface ExecutionCancelledEvent {
2209
2222
  reason?: string;
2210
2223
  timestamp: Date;
2211
2224
  }
2225
+ interface ExecutionEmptyOutputEvent {
2226
+ executionId: string;
2227
+ timestamp: Date;
2228
+ duration: number;
2229
+ usage?: TokenUsage;
2230
+ }
2212
2231
  interface ExecutionMaxIterationsEvent {
2213
2232
  executionId: string;
2214
2233
  iteration: number;
@@ -2326,6 +2345,7 @@ interface AgenticLoopEvents {
2326
2345
  'tool:error': ToolErrorEvent;
2327
2346
  'tool:timeout': ToolTimeoutEvent;
2328
2347
  'hook:error': HookErrorEvent;
2348
+ 'execution:empty_output': ExecutionEmptyOutputEvent;
2329
2349
  'circuit:opened': CircuitOpenedEvent;
2330
2350
  'circuit:half-open': CircuitHalfOpenEvent;
2331
2351
  'circuit:closed': CircuitClosedEvent;
@@ -881,10 +881,28 @@ declare class ToolCatalogRegistry {
881
881
  * Get the ConnectorTools module (lazy-loaded, cached).
882
882
  * Returns null if ConnectorTools is not available.
883
883
  * Uses false sentinel to prevent retrying after first failure.
884
+ *
885
+ * NOTE: The dynamic require() path fails in bundled environments (Meteor, Webpack).
886
+ * Call setConnectorToolsModule() at app startup to inject the module explicitly.
884
887
  */
885
888
  static getConnectorToolsModule(): {
886
889
  ConnectorTools: any;
887
890
  } | null;
891
+ /**
892
+ * Explicitly set the ConnectorTools module reference.
893
+ *
894
+ * Use this in bundled environments (Meteor, Webpack, etc.) where the lazy
895
+ * require('../../tools/connector/ConnectorTools.js') fails due to path resolution.
896
+ *
897
+ * @example
898
+ * ```typescript
899
+ * import { ToolCatalogRegistry, ConnectorTools } from '@everworker/oneringai';
900
+ * ToolCatalogRegistry.setConnectorToolsModule({ ConnectorTools });
901
+ * ```
902
+ */
903
+ static setConnectorToolsModule(mod: {
904
+ ConnectorTools: any;
905
+ }): void;
888
906
  /**
889
907
  * Register a tool category.
890
908
  * If the category already exists, updates its metadata.
@@ -2164,11 +2182,6 @@ declare class ExecutionContext {
2164
2182
  };
2165
2183
  }
2166
2184
 
2167
- /**
2168
- * Event types for agent execution
2169
- * These events are emitted asynchronously for notifications (UI updates, logging, etc.)
2170
- */
2171
-
2172
2185
  /**
2173
2186
  * Minimal config type for execution start events.
2174
2187
  * This captures the essential info without importing full AgentConfig.
@@ -2209,6 +2222,12 @@ interface ExecutionCancelledEvent {
2209
2222
  reason?: string;
2210
2223
  timestamp: Date;
2211
2224
  }
2225
+ interface ExecutionEmptyOutputEvent {
2226
+ executionId: string;
2227
+ timestamp: Date;
2228
+ duration: number;
2229
+ usage?: TokenUsage;
2230
+ }
2212
2231
  interface ExecutionMaxIterationsEvent {
2213
2232
  executionId: string;
2214
2233
  iteration: number;
@@ -2326,6 +2345,7 @@ interface AgenticLoopEvents {
2326
2345
  'tool:error': ToolErrorEvent;
2327
2346
  'tool:timeout': ToolTimeoutEvent;
2328
2347
  'hook:error': HookErrorEvent;
2348
+ 'execution:empty_output': ExecutionEmptyOutputEvent;
2329
2349
  'circuit:opened': CircuitOpenedEvent;
2330
2350
  'circuit:half-open': CircuitHalfOpenEvent;
2331
2351
  'circuit:closed': CircuitClosedEvent;