@open1s/ezbos 1.3.0 → 1.3.1

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/dist/agent.d.ts CHANGED
@@ -56,16 +56,16 @@ export declare class AgentBuilder {
56
56
  }): this;
57
57
  start(): Promise<Agent>;
58
58
  private rebuildAgentWithPrompt;
59
- ask(prompt: string): Promise<string>;
60
- runSimple(prompt: string): Promise<string>;
61
- react(task: string): Promise<string>;
59
+ ask(prompt: string | Array<JsContent>): Promise<string>;
60
+ runSimple(prompt: string | Array<JsContent>): Promise<string>;
61
+ react(task: string | Array<JsContent>): Promise<string>;
62
62
  stop(): Promise<void>;
63
63
  }
64
64
  export declare class Agent {
65
65
  private _inner;
66
66
  constructor(_inner: jsbos.Agent);
67
67
  private _resolveContent;
68
- run(task: string): Promise<string>;
68
+ run(task: string | Array<JsContent>): Promise<string>;
69
69
  ask(prompt: string | Array<JsContent>): Promise<string>;
70
70
  runSimple(prompt: string | Array<JsContent>): Promise<string>;
71
71
  react(task: string | Array<JsContent>): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open1s/ezbos",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Simple BrainOS - Easy wrapper for @open1s/jsbos",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/agent.ts CHANGED
@@ -290,17 +290,17 @@ export class AgentBuilder {
290
290
  return newAgent;
291
291
  }
292
292
 
293
- async ask(prompt: string): Promise<string> {
293
+ async ask(prompt: string | Array<JsContent>): Promise<string> {
294
294
  if (!this._inner) await this.start();
295
295
  return this._inner!.react(prompt);
296
296
  }
297
297
 
298
- async runSimple(prompt: string): Promise<string> {
298
+ async runSimple(prompt: string | Array<JsContent>): Promise<string> {
299
299
  if (!this._inner) await this.start();
300
300
  return this._inner!.runSimple(prompt);
301
301
  }
302
302
 
303
- async react(task: string): Promise<string> {
303
+ async react(task: string | Array<JsContent>): Promise<string> {
304
304
  if (!this._inner) await this.start();
305
305
  return this._inner!.react(task);
306
306
  }
@@ -344,7 +344,7 @@ export class Agent {
344
344
  return [{ type: 'text', text: String(input) }];
345
345
  }
346
346
 
347
- async run(task: string): Promise<string> {
347
+ async run(task: string | Array<JsContent>): Promise<string> {
348
348
  return this._inner.runSimple(this._resolveContent(task) as any);
349
349
  }
350
350