@polka-codes/core 0.9.30 → 0.9.31

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.
@@ -24,7 +24,7 @@ declare abstract class AgentBase {
24
24
  get messages(): Readonly<ModelMessage[]>;
25
25
  setMessages(messages: Readonly<ModelMessage[]>): void;
26
26
  start(prompt: UserContent): Promise<ExitReason>;
27
- step(prompt: UserContent): Promise<AssistantMessageContent[]>;
27
+ step(message: (UserModelMessage | ToolModelMessage)[]): Promise<AssistantMessageContent[]>;
28
28
  handleStepResponse(response: AssistantMessageContent[]): Promise<{
29
29
  type: "reply";
30
30
  message: (UserModelMessage | ToolModelMessage)[];
package/dist/index.js CHANGED
@@ -1962,16 +1962,11 @@ ${instance.prompt}`;
1962
1962
  this.#callback({ kind: "StartTask" /* StartTask */, agent: this, systemPrompt: this.config.systemPrompt });
1963
1963
  return await this.#processLoop(prompt5);
1964
1964
  }
1965
- async step(prompt5) {
1965
+ async step(message) {
1966
1966
  if (this.#messages.length === 0) {
1967
1967
  this.#callback({ kind: "StartTask" /* StartTask */, agent: this, systemPrompt: this.config.systemPrompt });
1968
1968
  }
1969
- return await this.#request([
1970
- {
1971
- role: "user",
1972
- content: prompt5
1973
- }
1974
- ]);
1969
+ return await this.#request(message);
1975
1970
  }
1976
1971
  async handleStepResponse(response) {
1977
1972
  return this.#handleResponse(response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/core",
3
- "version": "0.9.30",
3
+ "version": "0.9.31",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",