@open1s/ezbos 1.1.1 → 1.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { describe, it } from 'node:test';
|
|
2
|
+
import { BrainOS } from '../index.js';
|
|
3
|
+
describe('AgentBuilder.stop()', () => {
|
|
4
|
+
it('should call stop on inner agent without error', async () => {
|
|
5
|
+
const brain = new BrainOS();
|
|
6
|
+
await brain.start();
|
|
7
|
+
const builder = brain.agent('test-stop');
|
|
8
|
+
const agent = await builder.start();
|
|
9
|
+
builder.stop();
|
|
10
|
+
await agent.close();
|
|
11
|
+
await brain.stop();
|
|
12
|
+
});
|
|
13
|
+
it('should handle stop when no inner agent', async () => {
|
|
14
|
+
const brain = new BrainOS();
|
|
15
|
+
await brain.start();
|
|
16
|
+
const builder = brain.agent('test-stop-empty');
|
|
17
|
+
builder.stop();
|
|
18
|
+
builder.stop();
|
|
19
|
+
await brain.stop();
|
|
20
|
+
});
|
|
21
|
+
it('should stop after start and allow close', async () => {
|
|
22
|
+
const brain = new BrainOS();
|
|
23
|
+
await brain.start();
|
|
24
|
+
const builder = brain.agent('test-stop-stream');
|
|
25
|
+
const agent = await builder.start();
|
|
26
|
+
builder.stop();
|
|
27
|
+
await agent.close();
|
|
28
|
+
await brain.stop();
|
|
29
|
+
});
|
|
30
|
+
});
|
package/dist/agent.d.ts
CHANGED
package/dist/agent.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open1s/ezbos",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Simple BrainOS - Easy wrapper for @open1s/jsbos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@open1s/jsbos": "^2.2.
|
|
41
|
+
"@open1s/jsbos": "^2.2.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.29.0",
|