@everworker/oneringai 0.4.2 → 0.4.3
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 +30 -8
- package/dist/{IProvider-CNJqZItJ.d.cts → IProvider-B8sqUzJG.d.cts} +36 -6
- package/dist/{IProvider-B6hqVVq8.d.ts → IProvider-CxDUGl6n.d.ts} +36 -6
- package/dist/{ImageModel-B64HX3lN.d.cts → ImageModel-Ds5_6sf7.d.cts} +1 -1
- package/dist/{ImageModel-DU-y_WOb.d.ts → ImageModel-OWbA277F.d.ts} +1 -1
- package/dist/capabilities/agents/index.d.cts +2 -2
- package/dist/capabilities/agents/index.d.ts +2 -2
- package/dist/capabilities/images/index.cjs +251 -106
- package/dist/capabilities/images/index.cjs.map +1 -1
- package/dist/capabilities/images/index.d.cts +2 -2
- package/dist/capabilities/images/index.d.ts +2 -2
- package/dist/capabilities/images/index.js +251 -106
- package/dist/capabilities/images/index.js.map +1 -1
- package/dist/{index-9VOnAX17.d.ts → index-CEjKTeSb.d.cts} +857 -2
- package/dist/{index-BMjyFNJQ.d.cts → index-CzGnmqOs.d.ts} +857 -2
- package/dist/index.cjs +1303 -432
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +234 -904
- package/dist/index.d.ts +234 -904
- package/dist/index.js +1286 -417
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +9 -0
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.js +9 -0
- package/dist/shared/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1290,13 +1290,35 @@ console.log(execution.status); // 'completed' | 'failed'
|
|
|
1290
1290
|
```
|
|
1291
1291
|
|
|
1292
1292
|
**Key Features:**
|
|
1293
|
-
-
|
|
1294
|
-
-
|
|
1295
|
-
-
|
|
1296
|
-
-
|
|
1297
|
-
-
|
|
1298
|
-
-
|
|
1299
|
-
-
|
|
1293
|
+
- **Task Dependencies** - DAG-based ordering via `dependsOn`
|
|
1294
|
+
- **Memory Bridging** - In-context memory (`context_set`) + working memory (`memory_store`) persist across tasks while conversation is cleared
|
|
1295
|
+
- **LLM Validation** - Self-reflection against completion criteria with configurable score thresholds
|
|
1296
|
+
- **Retry Logic** - Configurable `maxAttempts` per task with automatic retry on validation failure
|
|
1297
|
+
- **Smart Error Classification** - Permanent errors (auth, config, model-not-found) skip retry; transient errors retry normally
|
|
1298
|
+
- **Control Flow** - `map`, `fold`, and `until` flows with optional per-iteration timeout (`iterationTimeoutMs`)
|
|
1299
|
+
- **Progress Tracking** - Real-time callbacks and progress percentage
|
|
1300
|
+
- **Failure Modes** - `fail-fast` (default) or `continue` for independent tasks
|
|
1301
|
+
- **Custom Prompts** - Override system, task, or validation prompts
|
|
1302
|
+
- **`ROUTINE_KEYS` export** - Well-known ICM/WM key constants for custom integrations
|
|
1303
|
+
|
|
1304
|
+
**Control Flow with Timeout:**
|
|
1305
|
+
|
|
1306
|
+
```typescript
|
|
1307
|
+
const routine = createRoutineDefinition({
|
|
1308
|
+
name: 'Process Batch',
|
|
1309
|
+
tasks: [{
|
|
1310
|
+
name: 'Process Each',
|
|
1311
|
+
description: 'Process each item',
|
|
1312
|
+
controlFlow: {
|
|
1313
|
+
type: 'map',
|
|
1314
|
+
sourceKey: '__items',
|
|
1315
|
+
resultKey: '__results',
|
|
1316
|
+
iterationTimeoutMs: 60000, // 1 min per item
|
|
1317
|
+
tasks: [{ name: 'Process', description: 'Handle the current item' }],
|
|
1318
|
+
},
|
|
1319
|
+
}],
|
|
1320
|
+
});
|
|
1321
|
+
```
|
|
1300
1322
|
|
|
1301
1323
|
**Routine Persistence:** Save and load routine definitions with `FileRoutineDefinitionStorage` (or implement `IRoutineDefinitionStorage` for custom backends). Per-user isolation via optional `userId`. Integrated into `StorageRegistry` as `routineDefinitions`.
|
|
1302
1324
|
|
|
@@ -1708,4 +1730,4 @@ MIT License - See [LICENSE](./LICENSE) file.
|
|
|
1708
1730
|
|
|
1709
1731
|
---
|
|
1710
1732
|
|
|
1711
|
-
**Version:** 0.4.
|
|
1733
|
+
**Version:** 0.4.3 | **Last Updated:** 2026-02-25 | **[User Guide](./USER_GUIDE.md)** | **[API Reference](./API_REFERENCE.md)** | **[Changelog](./CHANGELOG.md)**
|
|
@@ -204,6 +204,13 @@ interface ITokenStorage {
|
|
|
204
204
|
* @returns True if token exists
|
|
205
205
|
*/
|
|
206
206
|
hasToken(key: string): Promise<boolean>;
|
|
207
|
+
/**
|
|
208
|
+
* List all storage keys (for account enumeration).
|
|
209
|
+
* Optional — implementations that support it enable multi-account listing.
|
|
210
|
+
*
|
|
211
|
+
* @returns Array of all stored token keys
|
|
212
|
+
*/
|
|
213
|
+
listKeys?(): Promise<string[]>;
|
|
207
214
|
}
|
|
208
215
|
|
|
209
216
|
/**
|
|
@@ -406,22 +413,43 @@ declare class Connector {
|
|
|
406
413
|
/**
|
|
407
414
|
* Get the current access token (for OAuth, JWT, or API key)
|
|
408
415
|
* Handles automatic refresh if needed
|
|
416
|
+
*
|
|
417
|
+
* @param userId - Optional user identifier for multi-user support
|
|
418
|
+
* @param accountId - Optional account alias for multi-account support (e.g., 'work', 'personal')
|
|
409
419
|
*/
|
|
410
|
-
getToken(userId?: string): Promise<string>;
|
|
420
|
+
getToken(userId?: string, accountId?: string): Promise<string>;
|
|
411
421
|
/**
|
|
412
422
|
* Start OAuth authorization flow
|
|
413
423
|
* Returns the URL to redirect the user to
|
|
424
|
+
*
|
|
425
|
+
* @param userId - Optional user identifier for multi-user support
|
|
426
|
+
* @param accountId - Optional account alias for multi-account support (e.g., 'work', 'personal')
|
|
414
427
|
*/
|
|
415
|
-
startAuth(userId?: string): Promise<string>;
|
|
428
|
+
startAuth(userId?: string, accountId?: string): Promise<string>;
|
|
416
429
|
/**
|
|
417
430
|
* Handle OAuth callback
|
|
418
431
|
* Call this after user is redirected back from OAuth provider
|
|
432
|
+
*
|
|
433
|
+
* @param callbackUrl - Full callback URL with code and state parameters
|
|
434
|
+
* @param userId - Optional user identifier (can be extracted from state if embedded)
|
|
435
|
+
* @param accountId - Optional account alias (can be extracted from state if embedded)
|
|
419
436
|
*/
|
|
420
|
-
handleCallback(callbackUrl: string, userId?: string): Promise<void>;
|
|
437
|
+
handleCallback(callbackUrl: string, userId?: string, accountId?: string): Promise<void>;
|
|
421
438
|
/**
|
|
422
439
|
* Check if the connector has a valid token
|
|
440
|
+
*
|
|
441
|
+
* @param userId - Optional user identifier for multi-user support
|
|
442
|
+
* @param accountId - Optional account alias for multi-account support
|
|
443
|
+
*/
|
|
444
|
+
hasValidToken(userId?: string, accountId?: string): Promise<boolean>;
|
|
445
|
+
/**
|
|
446
|
+
* List account aliases for a user on this connector.
|
|
447
|
+
* Only applicable for OAuth connectors with multi-account support.
|
|
448
|
+
*
|
|
449
|
+
* @param userId - Optional user identifier
|
|
450
|
+
* @returns Array of account aliases (e.g., ['work', 'personal'])
|
|
423
451
|
*/
|
|
424
|
-
|
|
452
|
+
listAccounts(userId?: string): Promise<string[]>;
|
|
425
453
|
/**
|
|
426
454
|
* Get vendor-specific options from config
|
|
427
455
|
*/
|
|
@@ -457,9 +485,10 @@ declare class Connector {
|
|
|
457
485
|
* @param endpoint - API endpoint (relative to baseURL) or full URL
|
|
458
486
|
* @param options - Fetch options with connector-specific settings
|
|
459
487
|
* @param userId - Optional user ID for multi-user OAuth
|
|
488
|
+
* @param accountId - Optional account alias for multi-account OAuth
|
|
460
489
|
* @returns Fetch Response
|
|
461
490
|
*/
|
|
462
|
-
fetch(endpoint: string, options?: ConnectorFetchOptions, userId?: string): Promise<Response>;
|
|
491
|
+
fetch(endpoint: string, options?: ConnectorFetchOptions, userId?: string, accountId?: string): Promise<Response>;
|
|
463
492
|
/**
|
|
464
493
|
* Make an authenticated fetch request and parse JSON response
|
|
465
494
|
* Throws on non-OK responses
|
|
@@ -467,9 +496,10 @@ declare class Connector {
|
|
|
467
496
|
* @param endpoint - API endpoint (relative to baseURL) or full URL
|
|
468
497
|
* @param options - Fetch options with connector-specific settings
|
|
469
498
|
* @param userId - Optional user ID for multi-user OAuth
|
|
499
|
+
* @param accountId - Optional account alias for multi-account OAuth
|
|
470
500
|
* @returns Parsed JSON response
|
|
471
501
|
*/
|
|
472
|
-
fetchJSON<T = unknown>(endpoint: string, options?: ConnectorFetchOptions, userId?: string): Promise<T>;
|
|
502
|
+
fetchJSON<T = unknown>(endpoint: string, options?: ConnectorFetchOptions, userId?: string, accountId?: string): Promise<T>;
|
|
473
503
|
private sleep;
|
|
474
504
|
private logRequest;
|
|
475
505
|
private logResponse;
|
|
@@ -204,6 +204,13 @@ interface ITokenStorage {
|
|
|
204
204
|
* @returns True if token exists
|
|
205
205
|
*/
|
|
206
206
|
hasToken(key: string): Promise<boolean>;
|
|
207
|
+
/**
|
|
208
|
+
* List all storage keys (for account enumeration).
|
|
209
|
+
* Optional — implementations that support it enable multi-account listing.
|
|
210
|
+
*
|
|
211
|
+
* @returns Array of all stored token keys
|
|
212
|
+
*/
|
|
213
|
+
listKeys?(): Promise<string[]>;
|
|
207
214
|
}
|
|
208
215
|
|
|
209
216
|
/**
|
|
@@ -406,22 +413,43 @@ declare class Connector {
|
|
|
406
413
|
/**
|
|
407
414
|
* Get the current access token (for OAuth, JWT, or API key)
|
|
408
415
|
* Handles automatic refresh if needed
|
|
416
|
+
*
|
|
417
|
+
* @param userId - Optional user identifier for multi-user support
|
|
418
|
+
* @param accountId - Optional account alias for multi-account support (e.g., 'work', 'personal')
|
|
409
419
|
*/
|
|
410
|
-
getToken(userId?: string): Promise<string>;
|
|
420
|
+
getToken(userId?: string, accountId?: string): Promise<string>;
|
|
411
421
|
/**
|
|
412
422
|
* Start OAuth authorization flow
|
|
413
423
|
* Returns the URL to redirect the user to
|
|
424
|
+
*
|
|
425
|
+
* @param userId - Optional user identifier for multi-user support
|
|
426
|
+
* @param accountId - Optional account alias for multi-account support (e.g., 'work', 'personal')
|
|
414
427
|
*/
|
|
415
|
-
startAuth(userId?: string): Promise<string>;
|
|
428
|
+
startAuth(userId?: string, accountId?: string): Promise<string>;
|
|
416
429
|
/**
|
|
417
430
|
* Handle OAuth callback
|
|
418
431
|
* Call this after user is redirected back from OAuth provider
|
|
432
|
+
*
|
|
433
|
+
* @param callbackUrl - Full callback URL with code and state parameters
|
|
434
|
+
* @param userId - Optional user identifier (can be extracted from state if embedded)
|
|
435
|
+
* @param accountId - Optional account alias (can be extracted from state if embedded)
|
|
419
436
|
*/
|
|
420
|
-
handleCallback(callbackUrl: string, userId?: string): Promise<void>;
|
|
437
|
+
handleCallback(callbackUrl: string, userId?: string, accountId?: string): Promise<void>;
|
|
421
438
|
/**
|
|
422
439
|
* Check if the connector has a valid token
|
|
440
|
+
*
|
|
441
|
+
* @param userId - Optional user identifier for multi-user support
|
|
442
|
+
* @param accountId - Optional account alias for multi-account support
|
|
443
|
+
*/
|
|
444
|
+
hasValidToken(userId?: string, accountId?: string): Promise<boolean>;
|
|
445
|
+
/**
|
|
446
|
+
* List account aliases for a user on this connector.
|
|
447
|
+
* Only applicable for OAuth connectors with multi-account support.
|
|
448
|
+
*
|
|
449
|
+
* @param userId - Optional user identifier
|
|
450
|
+
* @returns Array of account aliases (e.g., ['work', 'personal'])
|
|
423
451
|
*/
|
|
424
|
-
|
|
452
|
+
listAccounts(userId?: string): Promise<string[]>;
|
|
425
453
|
/**
|
|
426
454
|
* Get vendor-specific options from config
|
|
427
455
|
*/
|
|
@@ -457,9 +485,10 @@ declare class Connector {
|
|
|
457
485
|
* @param endpoint - API endpoint (relative to baseURL) or full URL
|
|
458
486
|
* @param options - Fetch options with connector-specific settings
|
|
459
487
|
* @param userId - Optional user ID for multi-user OAuth
|
|
488
|
+
* @param accountId - Optional account alias for multi-account OAuth
|
|
460
489
|
* @returns Fetch Response
|
|
461
490
|
*/
|
|
462
|
-
fetch(endpoint: string, options?: ConnectorFetchOptions, userId?: string): Promise<Response>;
|
|
491
|
+
fetch(endpoint: string, options?: ConnectorFetchOptions, userId?: string, accountId?: string): Promise<Response>;
|
|
463
492
|
/**
|
|
464
493
|
* Make an authenticated fetch request and parse JSON response
|
|
465
494
|
* Throws on non-OK responses
|
|
@@ -467,9 +496,10 @@ declare class Connector {
|
|
|
467
496
|
* @param endpoint - API endpoint (relative to baseURL) or full URL
|
|
468
497
|
* @param options - Fetch options with connector-specific settings
|
|
469
498
|
* @param userId - Optional user ID for multi-user OAuth
|
|
499
|
+
* @param accountId - Optional account alias for multi-account OAuth
|
|
470
500
|
* @returns Parsed JSON response
|
|
471
501
|
*/
|
|
472
|
-
fetchJSON<T = unknown>(endpoint: string, options?: ConnectorFetchOptions, userId?: string): Promise<T>;
|
|
502
|
+
fetchJSON<T = unknown>(endpoint: string, options?: ConnectorFetchOptions, userId?: string, accountId?: string): Promise<T>;
|
|
473
503
|
private sleep;
|
|
474
504
|
private logRequest;
|
|
475
505
|
private logResponse;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../../IProvider-
|
|
1
|
+
export { a2 as AfterToolContext, a3 as AgentEventName, w as AgentEvents, a4 as AgenticLoopEventName, a5 as AgenticLoopEvents, a6 as ApprovalResult, a7 as ApproveToolContext, z as AuditEntry, a8 as BeforeToolContext, b8 as ExecutionCompleteEvent, ah as ExecutionConfig, E as ExecutionContext, y as ExecutionMetrics, b9 as ExecutionStartEvent, v as HistoryMode, ai as Hook, H as HookConfig, aj as HookManager, D as HookName, ba as LLMRequestEvent, bb as LLMResponseEvent, as as ModifyingHook, bc as ToolCompleteEvent, aO as ToolModification, bd as ToolStartEvent } from '../../index-CEjKTeSb.cjs';
|
|
2
|
+
import '../../IProvider-B8sqUzJG.cjs';
|
|
3
3
|
import '../../Vendor-DYh_bzwo.cjs';
|
|
4
4
|
import 'eventemitter3';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../../IProvider-
|
|
1
|
+
export { a2 as AfterToolContext, a3 as AgentEventName, w as AgentEvents, a4 as AgenticLoopEventName, a5 as AgenticLoopEvents, a6 as ApprovalResult, a7 as ApproveToolContext, z as AuditEntry, a8 as BeforeToolContext, b8 as ExecutionCompleteEvent, ah as ExecutionConfig, E as ExecutionContext, y as ExecutionMetrics, b9 as ExecutionStartEvent, v as HistoryMode, ai as Hook, H as HookConfig, aj as HookManager, D as HookName, ba as LLMRequestEvent, bb as LLMResponseEvent, as as ModifyingHook, bc as ToolCompleteEvent, aO as ToolModification, bd as ToolStartEvent } from '../../index-CzGnmqOs.js';
|
|
2
|
+
import '../../IProvider-CxDUGl6n.js';
|
|
3
3
|
import '../../Vendor-DYh_bzwo.js';
|
|
4
4
|
import 'eventemitter3';
|