@everworker/oneringai 0.2.2 → 0.2.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 +63 -17
- package/dist/index.cjs +1022 -129
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +461 -4
- package/dist/index.d.ts +461 -4
- package/dist/index.js +946 -70
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
- [13. Streaming](#13-streaming)
|
|
28
28
|
- [14. OAuth for External APIs](#14-oauth-for-external-apis)
|
|
29
29
|
- [15. Developer Tools](#15-developer-tools)
|
|
30
|
-
- [16.
|
|
31
|
-
- [17.
|
|
30
|
+
- [16. Custom Tool Generation](#16-custom-tool-generation-new) — Agents create, test, and persist their own tools
|
|
31
|
+
- [17. Document Reader](#17-document-reader) — PDF, DOCX, XLSX, PPTX, CSV, HTML, images
|
|
32
|
+
- [18. External API Integration](#18-external-api-integration) — Scoped Registry, Vendor Templates, Tool Discovery
|
|
32
33
|
- [MCP Integration](#mcp-model-context-protocol-integration)
|
|
33
34
|
- [Documentation](#documentation)
|
|
34
35
|
- [Examples](#examples)
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
## HOSEA APP
|
|
59
60
|
We realize that library alone in these times is not enough to get you excited, so we built a FREE FOREVER desktop app on top of this library to showcase its power! It's as easy to start using as cloning this library's repo, and then `cd apps/hosea` and then `npm install` and then `npm run dev`. Or watch the video first:
|
|
60
61
|
|
|
61
|
-
](https://www.youtube.com/watch?v=_LzDiuOQD8Y)
|
|
62
|
+
[](https://www.youtube.com/watch?v=_LzDiuOQD8Y)
|
|
62
63
|
|
|
63
64
|
Or read the more detailed installation / setup instructions [here](https://github.com/Integrail/oneringai/blob/main/apps/hosea/README.md)
|
|
64
65
|
|
|
@@ -87,6 +88,7 @@ Better to see once and then dig in the code! :)
|
|
|
87
88
|
- 📝 **Persistent Instructions** - NEW: Agent-level custom instructions that persist across sessions on disk
|
|
88
89
|
- 🛠️ **Agentic Workflows** - Built-in tool calling and multi-turn conversations
|
|
89
90
|
- 🔧 **Developer Tools** - NEW: Filesystem and shell tools for coding assistants (read, write, edit, grep, glob, bash)
|
|
91
|
+
- 🧰 **Custom Tool Generation** - NEW: Let agents create, test, and persist their own reusable tools at runtime — complete meta-tool system with VM sandbox
|
|
90
92
|
- 🖥️ **Desktop Automation** - NEW: OS-level computer use — screenshot, mouse, keyboard, and window control for vision-driven agent loops
|
|
91
93
|
- 📄 **Document Reader** - NEW: Universal file-to-text converter — PDF, DOCX, XLSX, PPTX, CSV, HTML, images auto-converted to markdown
|
|
92
94
|
- 🔌 **MCP Integration** - NEW: Model Context Protocol client for seamless tool discovery from local and remote servers
|
|
@@ -320,7 +322,7 @@ const response = await agent.run([
|
|
|
320
322
|
Connector-based web search with multiple providers:
|
|
321
323
|
|
|
322
324
|
```typescript
|
|
323
|
-
import { Connector, SearchProvider,
|
|
325
|
+
import { Connector, SearchProvider, ConnectorTools, Services, Agent, tools } from '@everworker/oneringai';
|
|
324
326
|
|
|
325
327
|
// Create search connector
|
|
326
328
|
Connector.create({
|
|
@@ -338,11 +340,13 @@ const results = await search.search('latest AI developments 2026', {
|
|
|
338
340
|
language: 'en',
|
|
339
341
|
});
|
|
340
342
|
|
|
341
|
-
// Option 2: Use with Agent
|
|
343
|
+
// Option 2: Use with Agent via ConnectorTools
|
|
344
|
+
const searchTools = ConnectorTools.for('serper-main');
|
|
345
|
+
|
|
342
346
|
const agent = Agent.create({
|
|
343
347
|
connector: 'openai',
|
|
344
348
|
model: 'gpt-4',
|
|
345
|
-
tools: [
|
|
349
|
+
tools: [...searchTools, tools.webFetch],
|
|
346
350
|
});
|
|
347
351
|
|
|
348
352
|
await agent.run('Search for quantum computing news and summarize');
|
|
@@ -359,7 +363,7 @@ await agent.run('Search for quantum computing news and summarize');
|
|
|
359
363
|
Enterprise web scraping with automatic fallback and bot protection bypass:
|
|
360
364
|
|
|
361
365
|
```typescript
|
|
362
|
-
import { Connector, ScrapeProvider,
|
|
366
|
+
import { Connector, ScrapeProvider, ConnectorTools, Services, Agent, tools } from '@everworker/oneringai';
|
|
363
367
|
|
|
364
368
|
// Create ZenRows connector for bot-protected sites
|
|
365
369
|
Connector.create({
|
|
@@ -379,19 +383,24 @@ const result = await scraper.scrape('https://protected-site.com', {
|
|
|
379
383
|
},
|
|
380
384
|
});
|
|
381
385
|
|
|
382
|
-
// Option 2: Use
|
|
386
|
+
// Option 2: Use web_scrape tool with Agent via ConnectorTools
|
|
387
|
+
const scrapeTools = ConnectorTools.for('zenrows');
|
|
388
|
+
|
|
383
389
|
const agent = Agent.create({
|
|
384
390
|
connector: 'openai',
|
|
385
391
|
model: 'gpt-4',
|
|
386
|
-
tools: [
|
|
392
|
+
tools: [...scrapeTools, tools.webFetch],
|
|
387
393
|
});
|
|
388
394
|
|
|
389
|
-
//
|
|
395
|
+
// web_scrape auto-falls back: native → API
|
|
390
396
|
await agent.run('Scrape https://example.com and summarize');
|
|
391
397
|
```
|
|
392
398
|
|
|
393
399
|
**Supported Scrape Providers:**
|
|
394
400
|
- **ZenRows** - Enterprise scraping with JS rendering, residential proxies, anti-bot bypass
|
|
401
|
+
- **Jina Reader** - Clean content extraction with AI-powered readability
|
|
402
|
+
- **Firecrawl** - Web scraping with JavaScript rendering
|
|
403
|
+
- **ScrapingBee** - Headless browser scraping with proxy rotation
|
|
395
404
|
|
|
396
405
|
## Supported Providers
|
|
397
406
|
|
|
@@ -401,7 +410,7 @@ await agent.run('Scrape https://example.com and summarize');
|
|
|
401
410
|
| **Anthropic (Claude)** | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | 200K |
|
|
402
411
|
| **Google (Gemini)** | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | 1M |
|
|
403
412
|
| **Google Vertex AI** | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | 1M |
|
|
404
|
-
| **Grok (xAI)** | ✅ | ✅ | ❌ | ❌ |
|
|
413
|
+
| **Grok (xAI)** | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | 128K |
|
|
405
414
|
| **Groq** | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | 128K |
|
|
406
415
|
| **Together AI** | ✅ | Some | ❌ | ❌ | ❌ | ❌ | ✅ | 128K |
|
|
407
416
|
| **DeepSeek** | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | 64K |
|
|
@@ -643,7 +652,7 @@ await agent.run('Check weather for SF and remember the result');
|
|
|
643
652
|
Use `Agent` with search tools and `WorkingMemoryPluginNextGen` for research workflows:
|
|
644
653
|
|
|
645
654
|
```typescript
|
|
646
|
-
import { Agent,
|
|
655
|
+
import { Agent, ConnectorTools, Connector, Services, tools } from '@everworker/oneringai';
|
|
647
656
|
|
|
648
657
|
// Setup search connector
|
|
649
658
|
Connector.create({
|
|
@@ -654,10 +663,12 @@ Connector.create({
|
|
|
654
663
|
});
|
|
655
664
|
|
|
656
665
|
// Create agent with search and memory
|
|
666
|
+
const searchTools = ConnectorTools.for('serper-main');
|
|
667
|
+
|
|
657
668
|
const agent = Agent.create({
|
|
658
669
|
connector: 'openai',
|
|
659
670
|
model: 'gpt-4',
|
|
660
|
-
tools: [
|
|
671
|
+
tools: [...searchTools, tools.webFetch],
|
|
661
672
|
context: {
|
|
662
673
|
features: { workingMemory: true },
|
|
663
674
|
},
|
|
@@ -1024,7 +1035,42 @@ await agent.run('Run npm test and report any failures');
|
|
|
1024
1035
|
- Timeout protection (default 2 min)
|
|
1025
1036
|
- Output truncation for large outputs
|
|
1026
1037
|
|
|
1027
|
-
### 16.
|
|
1038
|
+
### 16. Custom Tool Generation (NEW)
|
|
1039
|
+
|
|
1040
|
+
Let agents **create their own tools** at runtime — draft, test, iterate, save, and reuse. The agent writes JavaScript code, validates it, tests it in the VM sandbox, and persists it for future use. All 6 meta-tools are auto-registered and visible in Hosea.
|
|
1041
|
+
|
|
1042
|
+
```typescript
|
|
1043
|
+
import { createCustomToolMetaTools, hydrateCustomTool } from '@everworker/oneringai';
|
|
1044
|
+
|
|
1045
|
+
// Give an agent the ability to create tools
|
|
1046
|
+
const agent = Agent.create({
|
|
1047
|
+
connector: 'openai',
|
|
1048
|
+
model: 'gpt-4',
|
|
1049
|
+
tools: [...createCustomToolMetaTools()],
|
|
1050
|
+
});
|
|
1051
|
+
|
|
1052
|
+
// The agent can now: draft → test → save tools autonomously
|
|
1053
|
+
await agent.run('Create a tool that fetches weather data from the OpenWeather API');
|
|
1054
|
+
|
|
1055
|
+
// Later: load and use a saved tool
|
|
1056
|
+
import { createFileCustomToolStorage } from '@everworker/oneringai';
|
|
1057
|
+
const storage = createFileCustomToolStorage();
|
|
1058
|
+
const definition = await storage.load('fetch_weather');
|
|
1059
|
+
const weatherTool = hydrateCustomTool(definition!);
|
|
1060
|
+
|
|
1061
|
+
// Register on any agent
|
|
1062
|
+
agent.tools.register(weatherTool, { source: 'custom', tags: ['weather', 'api'] });
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
**Meta-Tools:** `custom_tool_draft` (validate), `custom_tool_test` (execute in sandbox), `custom_tool_save` (persist), `custom_tool_list` (search), `custom_tool_load` (retrieve), `custom_tool_delete` (remove)
|
|
1066
|
+
|
|
1067
|
+
**Dynamic Descriptions:** Draft and test tools use `descriptionFactory` to show all available connectors and the full sandbox API — automatically updated when connectors are added or removed.
|
|
1068
|
+
|
|
1069
|
+
**Pluggable Storage:** Default `FileCustomToolStorage` saves to `~/.oneringai/custom-tools/`. Implement `ICustomToolStorage` for MongoDB, S3, or any backend.
|
|
1070
|
+
|
|
1071
|
+
> See the [User Guide](./USER_GUIDE.md#custom-tool-generation) for the complete workflow, sandbox API reference, and examples.
|
|
1072
|
+
|
|
1073
|
+
### 17. Desktop Automation Tools (NEW)
|
|
1028
1074
|
|
|
1029
1075
|
OS-level desktop automation for building "computer use" agents — screenshot the screen, send to a vision model, receive tool calls (click, type, etc.), execute them, repeat:
|
|
1030
1076
|
|
|
@@ -1060,7 +1106,7 @@ await agent.run('Open Safari and search for "weather forecast"');
|
|
|
1060
1106
|
- Screenshots use the `__images` convention for automatic multimodal handling across all providers (Anthropic, OpenAI, Google)
|
|
1061
1107
|
- Requires `@nut-tree-fork/nut-js` as an optional peer dependency: `npm install @nut-tree-fork/nut-js`
|
|
1062
1108
|
|
|
1063
|
-
###
|
|
1109
|
+
### 18. Document Reader
|
|
1064
1110
|
|
|
1065
1111
|
Universal file-to-LLM-content converter. Reads arbitrary document formats and produces clean markdown text with optional image extraction:
|
|
1066
1112
|
|
|
@@ -1125,7 +1171,7 @@ await agent.run([
|
|
|
1125
1171
|
|
|
1126
1172
|
See the [User Guide](./USER_GUIDE.md#document-reader) for complete API reference and configuration options.
|
|
1127
1173
|
|
|
1128
|
-
###
|
|
1174
|
+
### 19. External API Integration
|
|
1129
1175
|
|
|
1130
1176
|
Connect your AI agents to 35+ external services with enterprise-grade resilience:
|
|
1131
1177
|
|
|
@@ -1477,4 +1523,4 @@ MIT License - See [LICENSE](./LICENSE) file.
|
|
|
1477
1523
|
|
|
1478
1524
|
---
|
|
1479
1525
|
|
|
1480
|
-
**Version:** 0.2.1 | **Last Updated:** 2026-02-
|
|
1526
|
+
**Version:** 0.2.1 | **Last Updated:** 2026-02-17 | **[User Guide](./USER_GUIDE.md)** | **[API Reference](./API_REFERENCE.md)** | **[Changelog](./CHANGELOG.md)**
|