@polka-codes/runner 0.8.19 → 0.8.20

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -32748,7 +32748,7 @@ var {
32748
32748
  Help
32749
32749
  } = import__.default;
32750
32750
  // package.json
32751
- var version = "0.8.19";
32751
+ var version = "0.8.20";
32752
32752
 
32753
32753
  // src/runner.ts
32754
32754
  import { execSync } from "node:child_process";
@@ -42175,7 +42175,7 @@ var getArray = (args, name, defaultValue) => {
42175
42175
  };
42176
42176
  // ../core/src/tools/utils/replaceInFile.ts
42177
42177
  var replaceInFile = async (fileContent, diff) => {
42178
- const blockPattern = /<<<<<+ SEARCH\s*\r?\n([\s\S]*?)\r?\n=======[ \t]*\r?\n([\s\S]*?)\r?\n?>>>>>+ REPLACE/g;
42178
+ const blockPattern = /<<<<<+ SEARCH>?\s*\r?\n([\s\S]*?)\r?\n=======[ \t]*\r?\n([\s\S]*?)\r?\n?>>>>>+ REPLACE/g;
42179
42179
  const blocks = [];
42180
42180
  for (let match = blockPattern.exec(diff);match !== null; match = blockPattern.exec(diff)) {
42181
42181
  blocks.push({ search: match[1], replace: match[2] });
@@ -43814,18 +43814,14 @@ ${tools.map((tool) => {
43814
43814
  }).join("")}
43815
43815
  # Tool Use Guidelines
43816
43816
 
43817
- 1. **Outline Your Thought Process**
43818
- - Before using a tool, wrap your reasoning inside \`<thinking>\` tags. Be concise—just enough to clarify your plan and the rationale behind selecting a specific tool.
43819
- 2. **Wait for Feedback**
43817
+ 1. **Wait for Feedback**
43820
43818
  - After using a tool, wait for the user's response indicating success/failure or any output logs. Do not assume the result of a tool without explicit confirmation.
43821
- 3. **Error Handling**
43819
+ 2. **Error Handling**
43822
43820
  - If a tool fails or produces an unexpected result, analyze the error, decide on an alternative approach or tool, and proceed carefully.
43823
- 4. **Avoid Repetition**
43821
+ 3. **Avoid Repetition**
43824
43822
  - Do not quote or repeat previous commands or prompts verbatim. Move the conversation forward by focusing on the latest required action.
43825
- 5. **No Unnecessary Re-invocations**
43826
- - Only invoke the same tool again if a genuine need arises (e.g., different parameters or updated context).
43827
- 6. **Tool Call Limit**
43828
- - Do not make more than 5 tool calls in a single message.`;
43823
+ 4. **Tool Call Limit**
43824
+ - It is **STRIGHTLY FORBIDDEN** to make more than 5 tool calls in a single message.`;
43829
43825
  };
43830
43826
  var agentsPrompt = (agents, name) => `
43831
43827
  ====
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/runner",
3
- "version": "0.8.19",
3
+ "version": "0.8.20",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",