@iinm/plain-agent
Advanced tools
+1
-1
| { | ||
| "name": "@iinm/plain-agent", | ||
| "version": "1.14.1", | ||
| "version": "1.14.2", | ||
| "description": "A lightweight terminal-based coding agent focused on safety and low token cost", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+1
-1
| # Plain Agent | ||
| [](https://github.com/iinm/plain-agent/actions/workflows/github-code-scanning/codeql) | ||
| [](https://socket.dev/npm/package/@iinm/plain-agent) | ||
| [](https://socket.dev/npm/package/@iinm/plain-agent) | ||
| [](https://packagephobia.com/result?p=@iinm/plain-agent) | ||
@@ -6,0 +6,0 @@ |
+26
-0
@@ -112,2 +112,3 @@ /** | ||
| let turnsAfterCompactPrompt = -1; | ||
| let turnsSinceSubagentReminder = 0; | ||
| while (true) { | ||
@@ -266,2 +267,5 @@ // Check if auto-approve was paused by Ctrl-C during tool execution | ||
| // Subagent reminder: every 5 turns, remind the model of its subagent role | ||
| let autoCompactFired = false; | ||
| // Auto-compact: insert prompt if context exceeds soft limit | ||
@@ -291,2 +295,3 @@ if (contextSoftLimit && inputTokensKeys && providerTokenUsage) { | ||
| turnsAfterCompactPrompt = 0; | ||
| autoCompactFired = true; | ||
| console.error( | ||
@@ -301,2 +306,23 @@ styleText( | ||
| } | ||
| if (!subagentManager.isSubagentActive()) { | ||
| turnsSinceSubagentReminder = 0; | ||
| } else if (!autoCompactFired) { | ||
| turnsSinceSubagentReminder += 1; | ||
| // Inject reminder every 5 turns (fires when counter reaches 5, 10, 15, ...) | ||
| if (turnsSinceSubagentReminder % 5 === 0) { | ||
| const activeSubagent = subagentManager.getActiveSubagent(); | ||
| stateManager.appendMessages([ | ||
| { | ||
| role: "user", | ||
| content: [ | ||
| { | ||
| type: "text", | ||
| text: `System: You are subagent "${activeSubagent?.name}". Call "switch_to_main_agent" when your goal is done.`, | ||
| }, | ||
| ], | ||
| }, | ||
| ]); | ||
| } | ||
| } | ||
| } | ||
@@ -303,0 +329,0 @@ } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
580277
0.16%16327
0.15%