@everworker/oneringai 0.1.4 → 0.2.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 -4
- package/dist/{ImageModel-qNJHPh4q.d.ts → IProvider-DcYJ3YE-.d.ts} +15 -328
- package/dist/{ImageModel-DSY7SNsq.d.cts → IProvider-c4QCbPjn.d.cts} +15 -328
- package/dist/ImageModel-BJ2mVPGV.d.ts +337 -0
- package/dist/ImageModel-BWN6VVS6.d.cts +337 -0
- package/dist/capabilities/agents/index.d.cts +3 -2
- package/dist/capabilities/agents/index.d.ts +3 -2
- package/dist/capabilities/images/index.cjs +8 -1
- 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 +8 -1
- package/dist/capabilities/images/index.js.map +1 -1
- package/dist/{index-CEp1H4fV.d.ts → index-B5UaeEvK.d.ts} +9 -6
- package/dist/{index-NOV01LWF.d.cts → index-MJ14lkui.d.cts} +9 -6
- package/dist/index.cjs +610 -768
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -85
- package/dist/index.d.ts +156 -85
- package/dist/index.js +610 -768
- package/dist/index.js.map +1 -1
- package/package.json +1 -4
- package/dist/IProvider-BP49c93d.d.cts +0 -22
- package/dist/IProvider-BP49c93d.d.ts +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IProvider } from './IProvider-
|
|
1
|
+
import { I as IConnectorRegistry, c as IProvider } from './IProvider-DcYJ3YE-.js';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -268,8 +268,10 @@ interface ToolContext {
|
|
|
268
268
|
agentId?: string;
|
|
269
269
|
/** Task ID (if running in TaskAgent) */
|
|
270
270
|
taskId?: string;
|
|
271
|
-
/** User ID —
|
|
271
|
+
/** User ID — auto-populated from Agent config (userId). Also settable manually via agent.tools.setToolContext(). */
|
|
272
272
|
userId?: string;
|
|
273
|
+
/** Connector registry scoped to this agent's allowed connectors and userId */
|
|
274
|
+
connectorRegistry?: IConnectorRegistry;
|
|
273
275
|
/** Working memory access (if agent has memory feature enabled) */
|
|
274
276
|
memory?: WorkingMemoryAccess;
|
|
275
277
|
/** Abort signal for cancellation */
|
|
@@ -419,16 +421,17 @@ interface ToolFunction<TArgs = any, TResult = any> {
|
|
|
419
421
|
* The returned string replaces definition.function.description when sending to LLM.
|
|
420
422
|
* The static description in definition.function.description serves as a fallback.
|
|
421
423
|
*
|
|
424
|
+
* @param context - Current ToolContext (includes userId, agentId, etc.)
|
|
422
425
|
* @returns The current tool description
|
|
423
426
|
*
|
|
424
427
|
* @example
|
|
425
|
-
* // Tool with dynamic connector list:
|
|
426
|
-
* descriptionFactory: () => {
|
|
427
|
-
* const connectors =
|
|
428
|
+
* // Tool with dynamic connector list scoped to current user:
|
|
429
|
+
* descriptionFactory: (context) => {
|
|
430
|
+
* const connectors = getConnectorsForUser(context?.userId);
|
|
428
431
|
* return `Execute API calls. Available connectors: ${connectors.map(c => c.name).join(', ')}`;
|
|
429
432
|
* }
|
|
430
433
|
*/
|
|
431
|
-
descriptionFactory?: () => string;
|
|
434
|
+
descriptionFactory?: (context?: ToolContext) => string;
|
|
432
435
|
/**
|
|
433
436
|
* Returns a human-readable description of a tool call.
|
|
434
437
|
* Used for logging, UI display, and debugging.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IProvider } from './IProvider-
|
|
1
|
+
import { I as IConnectorRegistry, c as IProvider } from './IProvider-c4QCbPjn.cjs';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -268,8 +268,10 @@ interface ToolContext {
|
|
|
268
268
|
agentId?: string;
|
|
269
269
|
/** Task ID (if running in TaskAgent) */
|
|
270
270
|
taskId?: string;
|
|
271
|
-
/** User ID —
|
|
271
|
+
/** User ID — auto-populated from Agent config (userId). Also settable manually via agent.tools.setToolContext(). */
|
|
272
272
|
userId?: string;
|
|
273
|
+
/** Connector registry scoped to this agent's allowed connectors and userId */
|
|
274
|
+
connectorRegistry?: IConnectorRegistry;
|
|
273
275
|
/** Working memory access (if agent has memory feature enabled) */
|
|
274
276
|
memory?: WorkingMemoryAccess;
|
|
275
277
|
/** Abort signal for cancellation */
|
|
@@ -419,16 +421,17 @@ interface ToolFunction<TArgs = any, TResult = any> {
|
|
|
419
421
|
* The returned string replaces definition.function.description when sending to LLM.
|
|
420
422
|
* The static description in definition.function.description serves as a fallback.
|
|
421
423
|
*
|
|
424
|
+
* @param context - Current ToolContext (includes userId, agentId, etc.)
|
|
422
425
|
* @returns The current tool description
|
|
423
426
|
*
|
|
424
427
|
* @example
|
|
425
|
-
* // Tool with dynamic connector list:
|
|
426
|
-
* descriptionFactory: () => {
|
|
427
|
-
* const connectors =
|
|
428
|
+
* // Tool with dynamic connector list scoped to current user:
|
|
429
|
+
* descriptionFactory: (context) => {
|
|
430
|
+
* const connectors = getConnectorsForUser(context?.userId);
|
|
428
431
|
* return `Execute API calls. Available connectors: ${connectors.map(c => c.name).join(', ')}`;
|
|
429
432
|
* }
|
|
430
433
|
*/
|
|
431
|
-
descriptionFactory?: () => string;
|
|
434
|
+
descriptionFactory?: (context?: ToolContext) => string;
|
|
432
435
|
/**
|
|
433
436
|
* Returns a human-readable description of a tool call.
|
|
434
437
|
* Used for logging, UI display, and debugging.
|