pentesting 0.1.2 → 0.1.4

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 +31 -36
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1306,7 +1306,6 @@ async function loadAllAgents(agentsDir) {
1306
1306
  try {
1307
1307
  await fs2.access(dir);
1308
1308
  } catch {
1309
- console.warn(`Agents directory not found: ${dir}`);
1310
1309
  return [];
1311
1310
  }
1312
1311
  const files = await fs2.readdir(dir);
@@ -1316,8 +1315,7 @@ async function loadAllAgents(agentsDir) {
1316
1315
  try {
1317
1316
  const agent = await loadAgent(path2.join(dir, file));
1318
1317
  agents.push(agent);
1319
- } catch (error) {
1320
- console.warn(`Failed to load agent ${file}:`, error);
1318
+ } catch {
1321
1319
  }
1322
1320
  }
1323
1321
  }
@@ -1357,8 +1355,7 @@ var HookExecutor = class extends EventEmitter {
1357
1355
  this.hooksConfig = JSON.parse(configContent);
1358
1356
  this.initialized = true;
1359
1357
  this.emit("initialized", { hooks: Object.keys(this.hooksConfig?.hooks || {}) });
1360
- } catch (error) {
1361
- console.warn("Hook system not initialized:", error);
1358
+ } catch {
1362
1359
  this.hooksConfig = { hooks: {} };
1363
1360
  this.initialized = true;
1364
1361
  }
@@ -1541,8 +1538,7 @@ var CommandRegistry = class {
1541
1538
  }
1542
1539
  }
1543
1540
  this.initialized = true;
1544
- } catch (error) {
1545
- console.warn("Command registry not initialized:", error);
1541
+ } catch {
1546
1542
  this.initialized = true;
1547
1543
  }
1548
1544
  }
@@ -1931,8 +1927,7 @@ var AutonomousHackingAgent = class extends EventEmitter3 {
1931
1927
  this.emit("hooks_loaded");
1932
1928
  await this.commandRegistry.initialize();
1933
1929
  this.emit("commands_loaded");
1934
- } catch (error) {
1935
- console.warn("Plugin systems not fully loaded:", error);
1930
+ } catch {
1936
1931
  }
1937
1932
  }
1938
1933
  // Add MCP server at runtime
@@ -2852,13 +2847,13 @@ var App = ({
2852
2847
  }, [agent, appState, addLog, maxIterations]);
2853
2848
  const getThoughtStyle = (type) => {
2854
2849
  const styles = {
2855
- observation: { prefix: "[observe]", color: THEME.hacker.cyan },
2856
- hypothesis: { prefix: "[hypothesis]", color: THEME.hacker.yellow },
2857
- plan: { prefix: "[plan]", color: THEME.hacker.purple },
2858
- action: { prefix: "[action]", color: THEME.hacker.green },
2850
+ observation: { prefix: "[observe]", color: THEME.text.accent },
2851
+ hypothesis: { prefix: "[hypothesis]", color: THEME.status.warning },
2852
+ plan: { prefix: "[plan]", color: THEME.status.running },
2853
+ action: { prefix: "[action]", color: THEME.status.success },
2859
2854
  result: { prefix: "[result]", color: THEME.text.primary },
2860
- reflection: { prefix: "[reflect]", color: THEME.hacker.orange },
2861
- stuck: { prefix: "[stuck]", color: THEME.hacker.red },
2855
+ reflection: { prefix: "[reflect]", color: THEME.semantic.high },
2856
+ stuck: { prefix: "[stuck]", color: THEME.status.error },
2862
2857
  breakthrough: { prefix: "[breakthrough]", color: "#00ff00" }
2863
2858
  };
2864
2859
  return styles[type] || { prefix: "[info]", color: THEME.text.muted };
@@ -2879,20 +2874,20 @@ var App = ({
2879
2874
  };
2880
2875
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", padding: 1, children: [
2881
2876
  /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
2882
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.green, children: ASCII_BANNER }),
2877
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.success, children: ASCII_BANNER }),
2883
2878
  /* @__PURE__ */ jsxs(Box, { marginTop: 1, justifyContent: "space-between", children: [
2884
- /* @__PURE__ */ jsxs(Text, { color: THEME.hacker.red, children: [
2879
+ /* @__PURE__ */ jsxs(Text, { color: THEME.status.error, children: [
2885
2880
  ICONS.target,
2886
2881
  " Target: ",
2887
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.cyan, bold: true, children: appState.target || "Not set" })
2882
+ /* @__PURE__ */ jsx(Text, { color: THEME.text.accent, bold: true, children: appState.target || "Not set" })
2888
2883
  ] }),
2889
2884
  /* @__PURE__ */ jsxs(Text, { color: THEME.text.muted, children: [
2890
2885
  "Status: ",
2891
- /* @__PURE__ */ jsx(Text, { color: appState.status === "running" ? THEME.hacker.green : THEME.hacker.yellow, children: appState.status.toUpperCase() })
2886
+ /* @__PURE__ */ jsx(Text, { color: appState.status === "running" ? THEME.status.success : THEME.status.warning, children: appState.status.toUpperCase() })
2892
2887
  ] }),
2893
2888
  /* @__PURE__ */ jsxs(Text, { color: THEME.text.muted, children: [
2894
2889
  "Iteration: ",
2895
- /* @__PURE__ */ jsxs(Text, { color: THEME.hacker.cyan, children: [
2890
+ /* @__PURE__ */ jsxs(Text, { color: THEME.text.accent, children: [
2896
2891
  appState.iteration,
2897
2892
  "/",
2898
2893
  appState.maxIterations
@@ -2900,25 +2895,25 @@ var App = ({
2900
2895
  ] })
2901
2896
  ] })
2902
2897
  ] }),
2903
- /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.hacker.purple, paddingX: 1, children: [
2898
+ /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.status.running, paddingX: 1, children: [
2904
2899
  /* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Services: " }),
2905
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.green, children: appState.services }),
2900
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.success, children: appState.services }),
2906
2901
  /* @__PURE__ */ jsx(Text, { children: " | " }),
2907
2902
  /* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Creds: " }),
2908
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.yellow, children: appState.credentials }),
2903
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.warning, children: appState.credentials }),
2909
2904
  /* @__PURE__ */ jsx(Text, { children: " | " }),
2910
2905
  /* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Pwned: " }),
2911
2906
  /* @__PURE__ */ jsx(Text, { color: appState.compromised.length > 0 ? THEME.status.success : THEME.text.muted, children: appState.compromised.length > 0 ? appState.compromised.join(", ") : "0" }),
2912
2907
  /* @__PURE__ */ jsx(Text, { children: " | " }),
2913
2908
  /* @__PURE__ */ jsx(Text, { color: THEME.text.muted, children: "Findings: " }),
2914
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.orange, children: appState.findings })
2909
+ /* @__PURE__ */ jsx(Text, { color: THEME.semantic.high, children: appState.findings })
2915
2910
  ] }),
2916
- /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.hacker.cyan, paddingX: 1, marginTop: 1, children: [
2917
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.cyan, bold: true, children: "[phases] " }),
2911
+ /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: THEME.text.accent, paddingX: 1, marginTop: 1, children: [
2912
+ /* @__PURE__ */ jsx(Text, { color: THEME.text.accent, bold: true, children: "[phases] " }),
2918
2913
  phases.map((phase) => /* @__PURE__ */ jsx(Box, { marginRight: 1, children: /* @__PURE__ */ jsxs(
2919
2914
  Text,
2920
2915
  {
2921
- color: phase.id === appState.currentPhase ? THEME.hacker.yellow : phase.status === "completed" ? THEME.status.success : THEME.text.muted,
2916
+ color: phase.id === appState.currentPhase ? THEME.status.warning : phase.status === "completed" ? THEME.status.success : THEME.text.muted,
2922
2917
  bold: phase.id === appState.currentPhase,
2923
2918
  children: [
2924
2919
  getPhaseIcon(phase.status),
@@ -2937,16 +2932,16 @@ var App = ({
2937
2932
  {
2938
2933
  flexDirection: "column",
2939
2934
  borderStyle: "single",
2940
- borderColor: THEME.hacker.purple,
2935
+ borderColor: THEME.status.running,
2941
2936
  paddingX: 1,
2942
2937
  height: 10,
2943
2938
  marginTop: 1,
2944
2939
  children: [
2945
2940
  /* @__PURE__ */ jsxs(Box, { children: [
2946
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.purple, bold: true, children: "[agent thoughts]" }),
2941
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.running, bold: true, children: "[agent thoughts]" }),
2947
2942
  isThinking && /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
2948
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.yellow, children: /* @__PURE__ */ jsx(Spinner, { type: "dots" }) }),
2949
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.yellow, children: " Thinking..." })
2943
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.warning, children: /* @__PURE__ */ jsx(Spinner, { type: "dots" }) }),
2944
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.warning, children: " Thinking..." })
2950
2945
  ] })
2951
2946
  ] }),
2952
2947
  /* @__PURE__ */ jsx(Static, { items: thoughts.slice(-6), children: (thought) => {
@@ -2974,19 +2969,19 @@ var App = ({
2974
2969
  {
2975
2970
  flexDirection: "column",
2976
2971
  borderStyle: "single",
2977
- borderColor: THEME.hacker.green,
2972
+ borderColor: THEME.status.success,
2978
2973
  paddingX: 1,
2979
2974
  height: 12,
2980
2975
  marginTop: 1,
2981
2976
  children: [
2982
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.green, bold: true, children: "[activity log]" }),
2977
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.success, bold: true, children: "[activity log]" }),
2983
2978
  /* @__PURE__ */ jsx(Static, { items: logs.slice(-10), children: (log) => /* @__PURE__ */ jsxs(Box, { children: [
2984
2979
  /* @__PURE__ */ jsxs(Text, { color: THEME.text.muted, dimColor: true, children: [
2985
2980
  "[",
2986
2981
  log.timestamp.toLocaleTimeString(),
2987
2982
  "]"
2988
2983
  ] }),
2989
- /* @__PURE__ */ jsxs(Text, { color: log.type === "success" ? THEME.status.success : log.type === "error" ? THEME.status.error : log.type === "warning" ? THEME.status.warning : log.type === "finding" ? THEME.hacker.orange : log.type === "tool" ? THEME.hacker.cyan : THEME.text.primary, children: [
2984
+ /* @__PURE__ */ jsxs(Text, { color: log.type === "success" ? THEME.status.success : log.type === "error" ? THEME.status.error : log.type === "warning" ? THEME.status.warning : log.type === "finding" ? THEME.semantic.high : log.type === "tool" ? THEME.text.accent : THEME.text.primary, children: [
2990
2985
  " ",
2991
2986
  log.message
2992
2987
  ] })
@@ -2995,13 +2990,13 @@ var App = ({
2995
2990
  }
2996
2991
  ),
2997
2992
  /* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
2998
- /* @__PURE__ */ jsxs(Text, { color: THEME.hacker.green, bold: true, children: [
2993
+ /* @__PURE__ */ jsxs(Text, { color: THEME.status.success, bold: true, children: [
2999
2994
  "pentesting ",
3000
2995
  ">",
3001
2996
  " "
3002
2997
  ] }),
3003
2998
  /* @__PURE__ */ jsx(Text, { color: THEME.text.primary, children: input }),
3004
- /* @__PURE__ */ jsx(Text, { color: THEME.hacker.green, children: "_" })
2999
+ /* @__PURE__ */ jsx(Text, { color: THEME.status.success, children: "_" })
3005
3000
  ] }),
3006
3001
  /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: THEME.text.muted, dimColor: true, children: "[T] Toggle thoughts | [P] Pause | [R] Resume | Type command or hint" }) })
3007
3002
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",