@everworker/oneringai 0.4.4 → 0.4.5
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 +10 -7
- package/dist/capabilities/agents/index.d.cts +1 -1
- package/dist/capabilities/agents/index.d.ts +1 -1
- package/dist/{index-Dyl6pHfq.d.ts → index-C6ApwIzB.d.ts} +18 -0
- package/dist/{index-DmYrHH7d.d.cts → index-CsQOVhqe.d.cts} +18 -0
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Showcasing another amazing "built with oneringai": ["no saas" agentic business t
|
|
|
92
92
|
- 🔌 **Tool Execution Plugins** - NEW: Pluggable pipeline for logging, analytics, UI updates, custom behavior
|
|
93
93
|
- 💾 **Session Persistence** - Save and resume conversations with full state restoration
|
|
94
94
|
- 👤 **Multi-User Support** - Set `userId` once, flows automatically to all tool executions and session metadata
|
|
95
|
-
- 🔒 **
|
|
95
|
+
- 🔒 **Auth Identities** - Restrict agents to specific connectors (and accounts), composable with access policies
|
|
96
96
|
- 🤖 **Universal Agent** - ⚠️ *Deprecated* - Use `Agent` with plugins instead
|
|
97
97
|
- 🤖 **Task Agents** - ⚠️ *Deprecated* - Use `Agent` with `WorkingMemoryPluginNextGen`
|
|
98
98
|
- 🔬 **Research Agent** - ⚠️ *Deprecated* - Use `Agent` with search tools
|
|
@@ -120,7 +120,7 @@ Showcasing another amazing "built with oneringai": ["no saas" agentic business t
|
|
|
120
120
|
- 🔄 **Streaming** - Real-time responses with event streams
|
|
121
121
|
- 📝 **TypeScript** - Full type safety and IntelliSense support
|
|
122
122
|
|
|
123
|
-
> **v0.2.0 — Multi-User Support:** Set `userId` once on an agent and it automatically flows to all tool executions, OAuth token retrieval, session metadata, and connector scoping. Combine with `
|
|
123
|
+
> **v0.2.0 — Multi-User Support:** Set `userId` once on an agent and it automatically flows to all tool executions, OAuth token retrieval, session metadata, and connector scoping. Combine with `identities` and access policies for complete multi-tenant isolation. See [Multi-User Support](#multi-user-support-userid) and [Auth Identities](#auth-identities-identities) in the User Guide.
|
|
124
124
|
|
|
125
125
|
## Quick Start
|
|
126
126
|
|
|
@@ -454,7 +454,10 @@ const agent = Agent.create({
|
|
|
454
454
|
connector: 'openai',
|
|
455
455
|
model: 'gpt-4',
|
|
456
456
|
userId: 'user-123', // Flows to all tool executions automatically
|
|
457
|
-
|
|
457
|
+
identities: [ // Only these connectors visible to tools
|
|
458
|
+
{ connector: 'github' },
|
|
459
|
+
{ connector: 'slack' },
|
|
460
|
+
],
|
|
458
461
|
tools: [weatherTool, emailTool],
|
|
459
462
|
context: {
|
|
460
463
|
features: {
|
|
@@ -685,7 +688,7 @@ const agent = Agent.create({
|
|
|
685
688
|
},
|
|
686
689
|
});
|
|
687
690
|
|
|
688
|
-
// Agent now has memory_store, memory_retrieve, memory_delete,
|
|
691
|
+
// Agent now has memory_store, memory_retrieve, memory_delete, memory_query tools
|
|
689
692
|
await agent.run('Check weather for SF and remember the result');
|
|
690
693
|
```
|
|
691
694
|
|
|
@@ -793,7 +796,7 @@ const agent = Agent.create({
|
|
|
793
796
|
**Available Features:**
|
|
794
797
|
| Feature | Default | Plugin | Associated Tools |
|
|
795
798
|
|---------|---------|--------|------------------|
|
|
796
|
-
| `workingMemory` | `true` | WorkingMemoryPluginNextGen | `memory_store/retrieve/delete/
|
|
799
|
+
| `workingMemory` | `true` | WorkingMemoryPluginNextGen | `memory_store/retrieve/delete/query/cleanup_raw` |
|
|
797
800
|
| `inContextMemory` | `false` | InContextMemoryPluginNextGen | `context_set/delete/list` |
|
|
798
801
|
| `persistentInstructions` | `false` | PersistentInstructionsPluginNextGen | `instructions_set/remove/list/clear` |
|
|
799
802
|
| `userInfo` | `false` | UserInfoPluginNextGen | `user_info_set/get/remove/clear`, `todo_add/update/remove` |
|
|
@@ -971,7 +974,7 @@ for await (const event of agent.streamDirect('Tell me a story')) {
|
|
|
971
974
|
|
|
972
975
|
**Comparison:**
|
|
973
976
|
|
|
974
|
-
| Aspect | `run()`
|
|
977
|
+
| Aspect | `run()` | `runDirect()` |
|
|
975
978
|
|--------|-------------------|---------------|
|
|
976
979
|
| History tracking | ✅ | ❌ |
|
|
977
980
|
| Memory/Cache | ✅ | ❌ |
|
|
@@ -1662,8 +1665,8 @@ const agent = Agent.create({
|
|
|
1662
1665
|
model: 'gpt-4',
|
|
1663
1666
|
context: {
|
|
1664
1667
|
features: { toolCatalog: true },
|
|
1668
|
+
toolCategories: ['filesystem', 'knowledge'], // optional scope
|
|
1665
1669
|
},
|
|
1666
|
-
toolCategories: ['filesystem', 'knowledge'], // optional scope
|
|
1667
1670
|
});
|
|
1668
1671
|
|
|
1669
1672
|
// Agent gets 3 metatools: tool_catalog_search, tool_catalog_load, tool_catalog_unload
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a3 as AfterToolContext, a4 as AgentEventName, w as AgentEvents, a5 as AgenticLoopEventName, a6 as AgenticLoopEvents, a7 as ApprovalResult, a8 as ApproveToolContext, z as AuditEntry, a9 as BeforeToolContext, be as ExecutionCompleteEvent, al as ExecutionConfig, E as ExecutionContext, y as ExecutionMetrics, bf as ExecutionStartEvent, v as HistoryMode, am as Hook, H as HookConfig, an as HookManager, D as HookName, bg as LLMRequestEvent, bh as LLMResponseEvent, aw as ModifyingHook, bi as ToolCompleteEvent, aU as ToolModification, bj as ToolStartEvent } from '../../index-
|
|
1
|
+
export { a3 as AfterToolContext, a4 as AgentEventName, w as AgentEvents, a5 as AgenticLoopEventName, a6 as AgenticLoopEvents, a7 as ApprovalResult, a8 as ApproveToolContext, z as AuditEntry, a9 as BeforeToolContext, be as ExecutionCompleteEvent, al as ExecutionConfig, E as ExecutionContext, y as ExecutionMetrics, bf as ExecutionStartEvent, v as HistoryMode, am as Hook, H as HookConfig, an as HookManager, D as HookName, bg as LLMRequestEvent, bh as LLMResponseEvent, aw as ModifyingHook, bi as ToolCompleteEvent, aU as ToolModification, bj as ToolStartEvent } from '../../index-CsQOVhqe.cjs';
|
|
2
2
|
import '../../IProvider-B8sqUzJG.cjs';
|
|
3
3
|
import '../../Vendor-DYh_bzwo.cjs';
|
|
4
4
|
import 'eventemitter3';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a3 as AfterToolContext, a4 as AgentEventName, w as AgentEvents, a5 as AgenticLoopEventName, a6 as AgenticLoopEvents, a7 as ApprovalResult, a8 as ApproveToolContext, z as AuditEntry, a9 as BeforeToolContext, be as ExecutionCompleteEvent, al as ExecutionConfig, E as ExecutionContext, y as ExecutionMetrics, bf as ExecutionStartEvent, v as HistoryMode, am as Hook, H as HookConfig, an as HookManager, D as HookName, bg as LLMRequestEvent, bh as LLMResponseEvent, aw as ModifyingHook, bi as ToolCompleteEvent, aU as ToolModification, bj as ToolStartEvent } from '../../index-
|
|
1
|
+
export { a3 as AfterToolContext, a4 as AgentEventName, w as AgentEvents, a5 as AgenticLoopEventName, a6 as AgenticLoopEvents, a7 as ApprovalResult, a8 as ApproveToolContext, z as AuditEntry, a9 as BeforeToolContext, be as ExecutionCompleteEvent, al as ExecutionConfig, E as ExecutionContext, y as ExecutionMetrics, bf as ExecutionStartEvent, v as HistoryMode, am as Hook, H as HookConfig, an as HookManager, D as HookName, bg as LLMRequestEvent, bh as LLMResponseEvent, aw as ModifyingHook, bi as ToolCompleteEvent, aU as ToolModification, bj as ToolStartEvent } from '../../index-C6ApwIzB.js';
|
|
2
2
|
import '../../IProvider-CxDUGl6n.js';
|
|
3
3
|
import '../../Vendor-DYh_bzwo.js';
|
|
4
4
|
import 'eventemitter3';
|
|
@@ -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.
|
|
@@ -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.
|
package/dist/index.cjs
CHANGED
|
@@ -10331,6 +10331,9 @@ var ToolCatalogRegistry = class {
|
|
|
10331
10331
|
* Get the ConnectorTools module (lazy-loaded, cached).
|
|
10332
10332
|
* Returns null if ConnectorTools is not available.
|
|
10333
10333
|
* Uses false sentinel to prevent retrying after first failure.
|
|
10334
|
+
*
|
|
10335
|
+
* NOTE: The dynamic require() path fails in bundled environments (Meteor, Webpack).
|
|
10336
|
+
* Call setConnectorToolsModule() at app startup to inject the module explicitly.
|
|
10334
10337
|
*/
|
|
10335
10338
|
static getConnectorToolsModule() {
|
|
10336
10339
|
if (this._connectorToolsModule === null) {
|
|
@@ -10342,6 +10345,21 @@ var ToolCatalogRegistry = class {
|
|
|
10342
10345
|
}
|
|
10343
10346
|
return this._connectorToolsModule || null;
|
|
10344
10347
|
}
|
|
10348
|
+
/**
|
|
10349
|
+
* Explicitly set the ConnectorTools module reference.
|
|
10350
|
+
*
|
|
10351
|
+
* Use this in bundled environments (Meteor, Webpack, etc.) where the lazy
|
|
10352
|
+
* require('../../tools/connector/ConnectorTools.js') fails due to path resolution.
|
|
10353
|
+
*
|
|
10354
|
+
* @example
|
|
10355
|
+
* ```typescript
|
|
10356
|
+
* import { ToolCatalogRegistry, ConnectorTools } from '@everworker/oneringai';
|
|
10357
|
+
* ToolCatalogRegistry.setConnectorToolsModule({ ConnectorTools });
|
|
10358
|
+
* ```
|
|
10359
|
+
*/
|
|
10360
|
+
static setConnectorToolsModule(mod) {
|
|
10361
|
+
this._connectorToolsModule = mod;
|
|
10362
|
+
}
|
|
10345
10363
|
// ========================================================================
|
|
10346
10364
|
// Registration
|
|
10347
10365
|
// ========================================================================
|