pentesting 0.8.25 → 0.8.26

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 +11 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5089,9 +5089,19 @@ ${this.currentSpec.systemPrompt}`;
5089
5089
  tools: this.tools,
5090
5090
  messages
5091
5091
  });
5092
+ let pendingText = "";
5092
5093
  stream.on("text", (text) => {
5093
5094
  streamBuffer += text;
5094
- this.emit(AGENT_EVENT.THOUGHT, { type: "thinking", content: text });
5095
+ pendingText += text;
5096
+ if (pendingText.length >= 50 || /[.!?。\n]$/.test(pendingText)) {
5097
+ this.emit(AGENT_EVENT.THOUGHT, { type: "thinking", content: pendingText.trim() });
5098
+ pendingText = "";
5099
+ }
5100
+ });
5101
+ stream.on("end", () => {
5102
+ if (pendingText.trim()) {
5103
+ this.emit(AGENT_EVENT.THOUGHT, { type: "thinking", content: pendingText.trim() });
5104
+ }
5095
5105
  });
5096
5106
  stream.on("contentBlock", (block) => {
5097
5107
  if (block.type === "tool_use") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.8.25",
3
+ "version": "0.8.26",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",