@polka-codes/core 0.7.21 → 0.7.22

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.
@@ -9,6 +9,7 @@ declare abstract class AgentBase {
9
9
  protected readonly handlers: Record<string, FullToolInfo>;
10
10
  constructor(name: string, ai: AiServiceBase, config: AgentBaseConfig, messages?: MessageParam[]);
11
11
  get messages(): Readonly<MessageParam[]>;
12
+ setMessages(messages: MessageParam[]): void;
12
13
  start(prompt: string): Promise<ExitReason>;
13
14
  step(promp: string, messages?: MessageParam[]): Promise<AssistantMessageContent[]>;
14
15
  handleStepResponse(response: AssistantMessageContent[], messages?: MessageParam[]): Promise<{
package/dist/index.js CHANGED
@@ -2231,6 +2231,9 @@ ${agents}`;
2231
2231
  get messages() {
2232
2232
  return this.#messages;
2233
2233
  }
2234
+ setMessages(messages) {
2235
+ this.#messages = messages;
2236
+ }
2234
2237
  async #callback(event) {
2235
2238
  await this.config.callback?.(event);
2236
2239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/core",
3
- "version": "0.7.21",
3
+ "version": "0.7.22",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",