pentesting 0.8.32 → 0.8.33

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 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5092,20 +5092,14 @@ ${this.currentSpec.systemPrompt}`;
5092
5092
  // Enable extended thinking for GLM/Claude models
5093
5093
  thinking: { type: "enabled", budget_tokens: 16e3 }
5094
5094
  });
5095
- stream.on("rawEvent", (event) => {
5096
- if (event.type === "content_block_delta" && event.delta?.type === "thinking_delta") {
5097
- const thinkingText = event.delta.thinking;
5098
- if (thinkingText) {
5099
- thinkingBuffer += thinkingText;
5100
- this.emit(AGENT_EVENT.THOUGHT, {
5101
- type: "reasoning",
5102
- content: thinkingText
5103
- });
5104
- }
5105
- }
5106
- });
5107
5095
  stream.on("contentBlock", (block) => {
5108
- if (block.type === "tool_use") {
5096
+ if (block.type === "thinking" && block.thinking) {
5097
+ thinkingBuffer += block.thinking;
5098
+ this.emit(AGENT_EVENT.THOUGHT, {
5099
+ type: "reasoning",
5100
+ content: block.thinking
5101
+ });
5102
+ } else if (block.type === "tool_use") {
5109
5103
  this.emit(AGENT_EVENT.THOUGHT, {
5110
5104
  type: "action",
5111
5105
  content: `Calling: ${block.name}`
@@ -7133,8 +7127,9 @@ var App = ({ autoApprove = false, target }) => {
7133
7127
  setCurrentStatus(thought.content.slice(0, 60));
7134
7128
  const label = THOUGHT_LABELS[thought.type] || "[?]";
7135
7129
  if (thought.type === "reasoning") {
7136
- addMessage(MESSAGE_TYPE.SYSTEM, `${label} ${thought.content}`);
7130
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u2503 \u{1F4AD} ${thought.content.slice(0, 300)}`);
7137
7131
  } else if (thought.type === "thinking") {
7132
+ addMessage(MESSAGE_TYPE.SYSTEM, ` \u2503 ${thought.content.slice(0, 150)}`);
7138
7133
  } else {
7139
7134
  addMessage(MESSAGE_TYPE.SYSTEM, `${label} ${thought.content.slice(0, 200)}`);
7140
7135
  }
@@ -7144,13 +7139,13 @@ var App = ({ autoApprove = false, target }) => {
7144
7139
  const args = Object.entries(data.input).slice(0, 2).map(([k, v]) => `${k}=${typeof v === "string" ? v.slice(0, 30) : "..."}`).join(" ");
7145
7140
  const cmdPreview = data.name === "bash" && data.input.command ? String(data.input.command).slice(0, 50).replace(/\n/g, " ") : data.name;
7146
7141
  setCurrentStatus(`Executing: ${cmdPreview}`);
7147
- addMessage(MESSAGE_TYPE.TOOL, `${data.name} ${args}`);
7142
+ addMessage(MESSAGE_TYPE.TOOL, ` \u23BF ${data.name} ${args}`);
7148
7143
  wireLoggerRef.current?.toolCall(data.id, data.name, data.input);
7149
7144
  });
7150
7145
  agent.on(AGENT_EVENT.TOOL_RESULT, (data) => {
7151
7146
  const icon = data.result.success ? "\u2713" : "\u2717";
7152
7147
  const preview = data.result.output?.slice(0, 100).replace(/\n/g, " ") || "";
7153
- addMessage(MESSAGE_TYPE.RESULT, `${icon} ${preview}`);
7148
+ addMessage(MESSAGE_TYPE.RESULT, ` ${icon} ${icon} ${preview}`);
7154
7149
  setCurrentStatus("Processing results...");
7155
7150
  wireLoggerRef.current?.toolResult(data.id, data.result, !data.result.success);
7156
7151
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.8.32",
3
+ "version": "0.8.33",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",