@strayl/agent 0.1.18 → 0.1.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.
package/dist/agent.js CHANGED
@@ -13563,9 +13563,6 @@ async function runAgent(config) {
13563
13563
  const maxIterations = config.maxIterations ?? 200;
13564
13564
  let consecutiveLLMErrors = 0;
13565
13565
  const MAX_CONSECUTIVE_LLM_ERRORS = 5;
13566
- let consecutiveTextOnly = 0;
13567
- const MAX_CONSECUTIVE_TEXT_ONLY = 3;
13568
- let totalToolCallsExecuted = 0;
13569
13566
  if (config.restoreCheckpoint) {
13570
13567
  const cp = config.restoreCheckpoint;
13571
13568
  context.restoreMessages(cp.messages);
@@ -13752,21 +13749,8 @@ ${IMPLEMENTATION_MODE_PROMPT2}`);
13752
13749
  });
13753
13750
  }
13754
13751
  if (completedToolCalls.length === 0) {
13755
- if (totalToolCallsExecuted === 0) {
13756
- break;
13757
- }
13758
- consecutiveTextOnly++;
13759
- const completionPattern = /\b(task\s+(is\s+)?complete|all\s+done|finished|ready\s+to\s+(use|go|test)|work\s+is\s+done|that'?s\s+it|nothing\s+(else|more)\s+to\s+do|i'?m\s+done)\b/i;
13760
- const isExplicitlyDone = completionPattern.test(assistantText);
13761
- if (isExplicitlyDone || consecutiveTextOnly >= MAX_CONSECUTIVE_TEXT_ONLY) {
13762
- break;
13763
- }
13764
- context.addUser("[System: You responded with text but did not use any tools. If the task is complete, say so explicitly. Otherwise, continue working \u2014 use your tools to make progress on the user's request.]");
13765
- emitter.emit({ type: "text-delta", text: "" });
13766
- continue;
13752
+ break;
13767
13753
  }
13768
- consecutiveTextOnly = 0;
13769
- totalToolCallsExecuted += completedToolCalls.length;
13770
13754
  for (const tc of completedToolCalls) {
13771
13755
  if (stdin.isCancelled()) {
13772
13756
  context.addToolResult(tc.id, tc.function.name, JSON.stringify({ error: "Cancelled by user." }));
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "name": "@strayl/agent",
3
- "version": "0.1.18",
4
- "type": "module",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "main": "dist/index.js",
9
- "files": [
10
- "dist",
11
- "skills"
12
- ],
13
- "scripts": {
14
- "build": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/agent.js --external:fsevents",
15
- "dev": "tsx watch src/index.ts"
16
- },
17
- "dependencies": {
18
- "openai": "^5.8.0",
19
- "zod": "^3.25.67"
20
- },
21
- "devDependencies": {
22
- "esbuild": "^0.25.5",
23
- "tsx": "^4.19.4",
24
- "typescript": "^5.8.3",
25
- "@types/node": "^22.15.31"
26
- }
27
- }
1
+ {
2
+ "name": "@strayl/agent",
3
+ "version": "0.1.20",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "main": "dist/index.js",
9
+ "files": [
10
+ "dist",
11
+ "skills"
12
+ ],
13
+ "scripts": {
14
+ "build": "esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/agent.js --external:fsevents",
15
+ "dev": "tsx watch src/index.ts"
16
+ },
17
+ "dependencies": {
18
+ "openai": "^5.8.0",
19
+ "zod": "^3.25.67"
20
+ },
21
+ "devDependencies": {
22
+ "esbuild": "^0.25.5",
23
+ "tsx": "^4.19.4",
24
+ "typescript": "^5.8.3",
25
+ "@types/node": "^22.15.31"
26
+ }
27
+ }