@eko-ai/eko 3.0.8 → 3.0.9
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 +64 -1
- package/dist/agent/base.d.ts.map +1 -1
- package/dist/index.cjs.js +31 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +31 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/mcp/http.d.ts.map +1 -1
- package/dist/mcp/sse.d.ts.map +1 -1
- package/dist/types/tools.types.d.ts +1 -0
- package/dist/types/tools.types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,22 @@
|
|
|
15
15
|
|
|
16
16
|
Eko (pronounced like 'echo') is a production-ready JavaScript framework that enables developers to create reliable agents, **from simple commands to complex workflows**. It provides a unified interface for running agents in both **computer and browser environments**.
|
|
17
17
|
|
|
18
|
+
## News
|
|
19
|
+
|
|
20
|
+
- **2025-09:** Eko 3.0 introduces dependency-aware parallel agent execution.
|
|
21
|
+
- **2025-09:** New pause, resume, and interrupt controls with `task_snapshot` workflow recovery.
|
|
22
|
+
- **2025-09:** Monorepo tooling migrated to pnpm for consistent workspace management.
|
|
23
|
+
|
|
24
|
+
## Upgrading to Eko 3.0
|
|
25
|
+
|
|
26
|
+
Follow these steps when moving an existing Eko 2.x project to 3.0:
|
|
27
|
+
|
|
28
|
+
1. Update dependencies with `pnpm up @eko-ai/eko @eko-ai/eko-nodejs @eko-ai/eko-web @eko-ai/eko-extension`.
|
|
29
|
+
2. Regenerate saved workflows or exported plans so they use the v3 schema and dependency graph format.
|
|
30
|
+
3. Clean and reinstall using pnpm (`rm -rf node_modules && pnpm install`), then rebuild any browser or desktop bundles.
|
|
31
|
+
4. Re-run automated demos and update documentation to reflect the new pause/interrupt APIs and parallel agent behavior.
|
|
32
|
+
|
|
33
|
+
|
|
18
34
|
## Framework Comparison
|
|
19
35
|
|
|
20
36
|
| Feature | Eko | Langchain | Browser-use | Dify.ai | Coze |
|
|
@@ -83,6 +99,41 @@ let result = await eko.run("Search for the latest news about Musk, summarize and
|
|
|
83
99
|
$ pnpm install @eko-ai/eko
|
|
84
100
|
```
|
|
85
101
|
|
|
102
|
+
## Example Projects
|
|
103
|
+
|
|
104
|
+
The repository ships with three workspace examples under the `example/` folder. After running the
|
|
105
|
+
core install (`pnpm install`) you can launch any of them with the commands below. Each example
|
|
106
|
+
consumes the local 3.0 packages, so rebuilding the main workspace automatically refreshes them.
|
|
107
|
+
|
|
108
|
+
### Browser Extension (`example/extension`)
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pnpm --filter @eko-ai/eko-extension build
|
|
112
|
+
pnpm --filter @eko-ai/eko-extension-example run build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Load the generated `example/extension/dist` directory via `chrome://extensions` → Developer Mode →
|
|
116
|
+
Load unpacked. Configure your API key in the extension options before running the automation task.
|
|
117
|
+
|
|
118
|
+
### Node.js Automation (`example/nodejs`)
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pnpm --filter @eko-ai/eko-nodejs-example run build
|
|
122
|
+
pnpm --filter @eko-ai/eko-nodejs-example run playwright # first time only, installs browsers
|
|
123
|
+
OPENAI_API_KEY=... ANTHROPIC_API_KEY=... pnpm --filter @eko-ai/eko-nodejs-example run start
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The Node.js demo drives Playwright through Eko; provide at least one model API key before running it.
|
|
127
|
+
|
|
128
|
+
### Web Login Demo (`example/web`)
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm --filter @eko-ai/eko-web-example run start
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
This starts a React dev server on the default port with a simple login flow that you can automate
|
|
135
|
+
with the browser or web agents.
|
|
136
|
+
|
|
86
137
|
## Use Cases
|
|
87
138
|
|
|
88
139
|
- Browser automation and web scraping
|
|
@@ -116,7 +167,19 @@ Eko can be used in multiple environments:
|
|
|
116
167
|
|
|
117
168
|
[](https://star-history.com/#FellouAI/eko&Date)
|
|
118
169
|
|
|
170
|
+
|
|
171
|
+
## Community Spotlight
|
|
172
|
+
|
|
173
|
+
- **Career Co-Pilot**: https://github.com/wangwangbobo/career_skill_learnig.git
|
|
174
|
+
- **Slides Agent by Eko**: https://github.com/MICAHFANG/slides-agent-by-eko
|
|
175
|
+
- **Universal Sidebar Assistant**: https://github.com/San12341/eko-broser-extension.git
|
|
176
|
+
- **48 Hour Browser Challenge**: https://github.com/MoonIRL/eko
|
|
177
|
+
- **Orbit X Smart Terminal**: https://github.com/Skywang16/OrbitX/tree/main
|
|
178
|
+
- **EkoMeet Recommender**: https://github.com/JasonRobertDestiny/EkoMeet
|
|
179
|
+
- **Vision-Eko Plugin**: https://github.com/dcpwilliam/vision-eko/tree/main/serviceNowPlugin
|
|
180
|
+
- **IC Cafe Platform**: https://cnb.cool/giggle_giraffe/ic-info-wxapp
|
|
181
|
+
- **AI Monitoring Assistant**: https://github.com/yuhoudecheqiancao/eko-ai-monitoring
|
|
182
|
+
|
|
119
183
|
## License
|
|
120
184
|
|
|
121
185
|
Eko is released under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
122
|
-
|
package/dist/agent/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/agent/base.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AACtD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAOxD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,UAAU,EAEV,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACf,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAY1B,MAAM,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AClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,CAAC;IAMF,SAAS,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY;cAoBzD,cAAc,CAC5B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,IAAI,EAAE,GACZ,OAAO,CAAC,IAAI,CAAC;cAKA,aAAa,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAgB9D,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAUlD,OAAO,CAAC,IAAI,EAAE,IAAI;cAIT,YAAY,CAC1B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,cAAc,EAC1C,MAAM,CAAC,EAAE,MAAM;IAOV,oBAAoB,CACzB,SAAS,CAAC,EAAE,2BAA2B,EAAE,GACxC,OAAO;IAIV,IAAI,IAAI,IAAI,MAAM,EAAE,GAAG,SAAS,CAE/B;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,KAAK,IAAI,IAAI,EAAE,CAElB;IAED,IAAI,eAAe,uBAElB;IAED,IAAI,SAAS,2BAEZ;IAED,IAAI,YAAY,IAAI,YAAY,GAAG,SAAS,CAE3C;CACF"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -34261,7 +34261,10 @@ class SimpleSseMcpClient {
|
|
|
34261
34261
|
version: "1.0.0",
|
|
34262
34262
|
},
|
|
34263
34263
|
});
|
|
34264
|
-
|
|
34264
|
+
try {
|
|
34265
|
+
await this.request("notifications/initialized", {});
|
|
34266
|
+
}
|
|
34267
|
+
catch (ignored) { }
|
|
34265
34268
|
}
|
|
34266
34269
|
ping() {
|
|
34267
34270
|
this.request("ping", {});
|
|
@@ -34279,7 +34282,7 @@ class SimpleSseMcpClient {
|
|
|
34279
34282
|
return message.result;
|
|
34280
34283
|
}
|
|
34281
34284
|
async request(method, params, signal) {
|
|
34282
|
-
const id = uuidv4();
|
|
34285
|
+
const id = method.startsWith("notifications/") ? undefined : uuidv4();
|
|
34283
34286
|
try {
|
|
34284
34287
|
const callback = new Promise((resolve, reject) => {
|
|
34285
34288
|
if (signal) {
|
|
@@ -34289,7 +34292,7 @@ class SimpleSseMcpClient {
|
|
|
34289
34292
|
reject(error);
|
|
34290
34293
|
});
|
|
34291
34294
|
}
|
|
34292
|
-
this.requestMap.set(id, resolve);
|
|
34295
|
+
id && this.requestMap.set(id, resolve);
|
|
34293
34296
|
});
|
|
34294
34297
|
Log.debug(`MCP Client, ${method}`, id, params);
|
|
34295
34298
|
const response = await fetch(this.msgUrl, {
|
|
@@ -34336,7 +34339,7 @@ class SimpleSseMcpClient {
|
|
|
34336
34339
|
}
|
|
34337
34340
|
}
|
|
34338
34341
|
finally {
|
|
34339
|
-
this.requestMap.delete(id);
|
|
34342
|
+
id && this.requestMap.delete(id);
|
|
34340
34343
|
}
|
|
34341
34344
|
}
|
|
34342
34345
|
isConnected() {
|
|
@@ -34346,6 +34349,13 @@ class SimpleSseMcpClient {
|
|
|
34346
34349
|
return false;
|
|
34347
34350
|
}
|
|
34348
34351
|
async close() {
|
|
34352
|
+
try {
|
|
34353
|
+
await this.request("notifications/cancelled", {
|
|
34354
|
+
requestId: uuidv4(),
|
|
34355
|
+
reason: "User requested cancellation",
|
|
34356
|
+
});
|
|
34357
|
+
}
|
|
34358
|
+
catch (ignored) { }
|
|
34349
34359
|
this.pingTimer && clearInterval(this.pingTimer);
|
|
34350
34360
|
this.reconnectTimer && clearTimeout(this.reconnectTimer);
|
|
34351
34361
|
this.sseHandler && this.sseHandler.close && this.sseHandler.close();
|
|
@@ -34458,6 +34468,12 @@ class SimpleHttpMcpClient {
|
|
|
34458
34468
|
version: "1.0.0",
|
|
34459
34469
|
},
|
|
34460
34470
|
}, signal);
|
|
34471
|
+
if (this.mcpSessionId) {
|
|
34472
|
+
try {
|
|
34473
|
+
await this.request("notifications/initialized", {});
|
|
34474
|
+
}
|
|
34475
|
+
catch (ignored) { }
|
|
34476
|
+
}
|
|
34461
34477
|
this.connected = true;
|
|
34462
34478
|
}
|
|
34463
34479
|
async listTools(param, signal) {
|
|
@@ -34478,16 +34494,19 @@ class SimpleHttpMcpClient {
|
|
|
34478
34494
|
async close() {
|
|
34479
34495
|
this.connected = false;
|
|
34480
34496
|
if (this.mcpSessionId) {
|
|
34481
|
-
|
|
34482
|
-
|
|
34483
|
-
|
|
34484
|
-
|
|
34497
|
+
try {
|
|
34498
|
+
await this.request("notifications/cancelled", {
|
|
34499
|
+
requestId: uuidv4(),
|
|
34500
|
+
reason: "User requested cancellation",
|
|
34501
|
+
});
|
|
34502
|
+
}
|
|
34503
|
+
catch (ignored) { }
|
|
34485
34504
|
this.mcpSessionId = null;
|
|
34486
34505
|
}
|
|
34487
34506
|
}
|
|
34488
34507
|
async request(method, params, signal) {
|
|
34489
34508
|
try {
|
|
34490
|
-
const id = uuidv4();
|
|
34509
|
+
const id = method.startsWith("notifications/") ? undefined : uuidv4();
|
|
34491
34510
|
const extHeaders = {};
|
|
34492
34511
|
if (this.mcpSessionId && method !== "initialize") {
|
|
34493
34512
|
extHeaders["Mcp-Session-Id"] = this.mcpSessionId;
|
|
@@ -35631,7 +35650,9 @@ class Agent {
|
|
|
35631
35650
|
return results.map((s) => s.text).join("\n\n");
|
|
35632
35651
|
}
|
|
35633
35652
|
const toolCalls = results.filter((s) => s.type == "tool-call");
|
|
35634
|
-
if (toolCalls.length > 1 &&
|
|
35653
|
+
if (toolCalls.length > 1 &&
|
|
35654
|
+
this.canParallelToolCalls(toolCalls) &&
|
|
35655
|
+
toolCalls.every((s) => agentTools.find((t) => t.name == s.toolName)?.supportParallelCalls)) {
|
|
35635
35656
|
const results = await Promise.all(toolCalls.map((toolCall) => this.callToolCall(agentContext, agentTools, toolCall, user_messages)));
|
|
35636
35657
|
for (let i = 0; i < results.length; i++) {
|
|
35637
35658
|
toolResults.push(results[i]);
|