pwn 0.5.780 → 0.5.781

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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/documentation/AI-Integration.md +4 -4
  4. data/documentation/AWS.md +10 -9
  5. data/documentation/Agent-Tool-Registry.md +20 -17
  6. data/documentation/Blockchain.md +3 -2
  7. data/documentation/Bounty.md +8 -6
  8. data/documentation/BurpSuite.md +6 -10
  9. data/documentation/CLI-Drivers.md +7 -4
  10. data/documentation/Capability-Broker-Sandbox.md +1 -1
  11. data/documentation/Configuration.md +23 -15
  12. data/documentation/Contributing.md +3 -3
  13. data/documentation/Cron.md +3 -2
  14. data/documentation/Diagrams.md +9 -3
  15. data/documentation/Drivers.md +12 -6
  16. data/documentation/Extrospection.md +25 -5
  17. data/documentation/FFI.md +15 -25
  18. data/documentation/Fuzzing.md +13 -13
  19. data/documentation/General-PWN-Usage.md +7 -4
  20. data/documentation/Harness-Evaluation.md +90 -3
  21. data/documentation/Home.md +6 -5
  22. data/documentation/How-PWN-Works.md +9 -10
  23. data/documentation/Installation.md +12 -11
  24. data/documentation/Metasploit.md +13 -19
  25. data/documentation/Mistakes.md +2 -2
  26. data/documentation/NmapIt.md +6 -3
  27. data/documentation/Operability.md +99 -0
  28. data/documentation/Persistence.md +3 -2
  29. data/documentation/Plugin-Degradation.md +4 -2
  30. data/documentation/Plugins.md +4 -11
  31. data/documentation/Policy-Benchmark.md +4 -0
  32. data/documentation/Reinforcement-Learning.md +19 -3
  33. data/documentation/Reporting.md +6 -5
  34. data/documentation/SAST.md +15 -10
  35. data/documentation/SDR-Decoder-Coverage.md +10 -4
  36. data/documentation/SDR.md +28 -40
  37. data/documentation/Session-Workflow.md +25 -12
  38. data/documentation/Sessions.md +7 -0
  39. data/documentation/Skills-Memory-Learning.md +11 -4
  40. data/documentation/Swarm.md +6 -0
  41. data/documentation/Transparent-Browser.md +1 -1
  42. data/documentation/Troubleshooting.md +6 -3
  43. data/documentation/What-is-PWN.md +4 -4
  44. data/documentation/Why-PWN.md +1 -1
  45. data/documentation/diagrams/agent-tool-registry.svg +219 -180
  46. data/documentation/diagrams/ai-integration-tool-calling.svg +35 -34
  47. data/documentation/diagrams/code-scanning-sast.svg +78 -78
  48. data/documentation/diagrams/cron-scheduling.svg +165 -145
  49. data/documentation/diagrams/dot/_THEME.md +6 -4
  50. data/documentation/diagrams/dot/agent-tool-registry.dot +6 -2
  51. data/documentation/diagrams/dot/ai-integration-tool-calling.dot +1 -1
  52. data/documentation/diagrams/dot/code-scanning-sast.dot +8 -8
  53. data/documentation/diagrams/dot/cron-scheduling.dot +2 -0
  54. data/documentation/diagrams/dot/driver-framework.dot +1 -1
  55. data/documentation/diagrams/dot/extrospection-world-awareness.dot +2 -2
  56. data/documentation/diagrams/dot/fuzzing-workflow.dot +3 -3
  57. data/documentation/diagrams/dot/history-to-drivers.dot +1 -1
  58. data/documentation/diagrams/dot/memory-skills-detailed.dot +3 -3
  59. data/documentation/diagrams/dot/mistakes-negative-feedback.dot +2 -2
  60. data/documentation/diagrams/dot/overall-pwn-architecture.dot +33 -121
  61. data/documentation/diagrams/dot/persistence-filesystem.dot +2 -2
  62. data/documentation/diagrams/dot/plugin-ecosystem.dot +2 -2
  63. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +31 -167
  64. data/documentation/diagrams/dot/pwn-repl-prototyping.dot +1 -1
  65. data/documentation/diagrams/dot/reinforcement-learning.dot +15 -7
  66. data/documentation/diagrams/dot/reporting-pipeline.dot +5 -3
  67. data/documentation/diagrams/dot/reverse-engineering-flow.dot +3 -3
  68. data/documentation/diagrams/dot/sdr-radio-flow.dot +5 -5
  69. data/documentation/diagrams/dot/sessions-cron-automation.dot +1 -1
  70. data/documentation/diagrams/dot/swarm-multi-agent.dot +3 -3
  71. data/documentation/diagrams/dot/task-summarizer.dot +2 -2
  72. data/documentation/diagrams/dot/web-application-testing.dot +4 -3
  73. data/documentation/diagrams/dot/zero-day-research-flow.dot +4 -3
  74. data/documentation/diagrams/driver-framework.svg +1 -1
  75. data/documentation/diagrams/extrospection-world-awareness.svg +178 -178
  76. data/documentation/diagrams/fuzzing-workflow.svg +58 -58
  77. data/documentation/diagrams/history-to-drivers.svg +42 -42
  78. data/documentation/diagrams/memory-skills-detailed.svg +210 -210
  79. data/documentation/diagrams/mistakes-negative-feedback.svg +116 -116
  80. data/documentation/diagrams/overall-pwn-architecture.svg +248 -404
  81. data/documentation/diagrams/persistence-filesystem.svg +143 -143
  82. data/documentation/diagrams/plugin-ecosystem.svg +100 -100
  83. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +233 -752
  84. data/documentation/diagrams/pwn-repl-prototyping.svg +27 -27
  85. data/documentation/diagrams/reinforcement-learning.svg +295 -221
  86. data/documentation/diagrams/reporting-pipeline.svg +94 -80
  87. data/documentation/diagrams/reverse-engineering-flow.svg +31 -31
  88. data/documentation/diagrams/sdr-radio-flow.svg +157 -155
  89. data/documentation/diagrams/sessions-cron-automation.svg +13 -13
  90. data/documentation/diagrams/swarm-multi-agent.svg +86 -86
  91. data/documentation/diagrams/task-summarizer.svg +57 -57
  92. data/documentation/diagrams/web-application-testing.svg +81 -75
  93. data/documentation/diagrams/zero-day-research-flow.svg +101 -92
  94. data/documentation/pwn-REPL.md +5 -3
  95. data/documentation/pwn-ai-Agent.md +18 -14
  96. data/documentation/pwn_silent_help_learn_demo.gif +0 -0
  97. data/etc/default_skills/pwn/ai/agent/learning/SKILL.md +1 -0
  98. data/lib/pwn/ai/agent/learning.rb +46 -1
  99. data/lib/pwn/ai/agent/policy_evaluation.rb +5 -1
  100. data/lib/pwn/ai/agent/reward.rb +9 -0
  101. data/lib/pwn/version.rb +1 -1
  102. data/spec/fixtures/harness/completion_regressions.json +10 -0
  103. data/spec/fixtures/harness/completion_regressions.json.sha256 +1 -0
  104. data/spec/integration/harness_evaluation_spec.rb +13 -0
  105. data/spec/lib/pwn/ai/agent/learning_spec.rb +22 -0
  106. data/spec/lib/pwn/ai/agent/policy_evaluation_spec.rb +6 -1
  107. data/spec/lib/pwn/ai/agent/reward_spec.rb +21 -0
  108. data/spec/support/harness/evaluate.rb +1 -1
  109. data/third_party/pwn_rdoc.jsonl +2 -1
  110. metadata +8 -5
@@ -16,12 +16,14 @@ SVGs feel like a single coherent product.
16
16
  | Edge default | slate-400 | `#94a3b8` |
17
17
  | Edge highlight | sky-400 | `#38bdf8` |
18
18
 
19
- Layout rules (to avoid criss-crossed edges):
19
+ Layout guidelines (reduce crossings without inventing dependencies):
20
20
  1. `rankdir=TB` (or `LR` for pipelines), `newrank=true`, `splines=spline`.
21
- 2. Group every layer with `{rank=same; ...}` - edges go layer→layer only.
22
- 3. Side/back edges use `constraint=false` + `style=dashed` and are kept to ≤3 per diagram.
21
+ 2. Group related layers when helpful. Actual feedback and cross-layer calls must
22
+ remain explicit; do not add false edges solely to align nodes.
23
+ 3. Side/back edges may use `constraint=false` + `style=dashed`. Label whether
24
+ an edge is automatic, optional, or an operator-composed handoff.
23
25
  4. One `subgraph cluster_*` per logical layer with a translucent fill.
24
26
  5. Node order inside a rank matches edge destinations in the next rank
25
- (Graphviz then draws parallel non-crossing edges).
27
+ (Graphviz may still produce crossings; inspect the rendered SVG).
26
28
 
27
29
  Rebuild everything: `./build.sh` (from `documentation/diagrams/`).
@@ -1,6 +1,6 @@
1
1
  digraph "PWN_Agent_Tool_Registry" {
2
2
  graph [
3
- label=<<B>PWN::AI::Agent::Registry - Toolsets exposed to the LLM</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">13 toolsets · 87 callable tools · lib/pwn/ai/agent/tools/*</FONT>>,
3
+ label=<<B>PWN::AI::Agent::Registry - Toolsets exposed to the LLM</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">16 toolsets · 150 callable tools · lib/pwn/ai/agent/tools/*</FONT>>,
4
4
  labelloc=t, fontsize=20, fontname="Helvetica",
5
5
  rankdir=LR, splines=spline, nodesep=0.35, ranksep=1.4,
6
6
  bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
@@ -27,13 +27,16 @@ digraph "PWN_Agent_Tool_Registry" {
27
27
  reward [label="reward", fillcolor="#6ee7b7"];
28
28
  curric [label="curriculum", fillcolor="#6ee7b7"];
29
29
  policy [label="policy", fillcolor="#6ee7b7"];
30
+ http [label="http\nproxy lifecycle / replay", fillcolor="#6ee7b7"];
31
+ mcp [label="mcp\nbackend broker", fillcolor="#6ee7b7"];
32
+ manifest [label="manifest\nYAML declarations", fillcolor="#6ee7b7"];
30
33
  }
31
34
 
32
35
  subgraph cluster_tools {
33
36
  label="Tools (LLM-callable)"; fontcolor="#fde68a"; style=rounded;
34
37
  color="#a16207"; bgcolor="#422006"; penwidth=2;
35
38
  node [fillcolor="#fcd34d", fontsize=9];
36
- t_shell [label="shell\n(ToolGuard)"];
39
+ t_shell [label="shell · job_run/status/tail/result/kill\n(runtime permissions + ToolGuard)"];
37
40
  t_eval [label="pwn_eval\n(ToolGuard)"];
38
41
  t_mem [label="memory_remember\nrecall · forget · clear\nlean"];
39
42
  t_skill [label="skills_recall · skill_list\nview · create · add_reference\ndelete · migrate_legacy"];
@@ -52,6 +55,7 @@ digraph "PWN_Agent_Tool_Registry" {
52
55
  Registry -> skills; Registry -> sessions; Registry -> learning;
53
56
  Registry -> metrics; Registry -> extro; Registry -> cron; Registry -> swarm;
54
57
  Registry -> reward; Registry -> curric; Registry -> policy;
58
+ Registry -> http; Registry -> mcp; Registry -> manifest;
55
59
 
56
60
  terminal -> t_shell [color="#f59e0b"];
57
61
  pwn -> t_eval [color="#f59e0b"];
@@ -27,7 +27,7 @@ digraph "PWN_AI_Integration" {
27
27
  subgraph cluster_api {
28
28
  label="Provider APIs"; fontcolor="#fecaca"; style="rounded,dashed";
29
29
  color="#b91c1c"; bgcolor="#450a0a";
30
- A1 [label="api.openai.com", fillcolor="#fda4af"];
30
+ A1 [label="api.openai.com (API key)\nchatgpt.com/backend-api/codex (OAuth)", fillcolor="#fda4af"];
31
31
  A2 [label="api.anthropic.com", fillcolor="#fda4af"];
32
32
  A3 [label="api.x.ai\nauth.x.ai", fillcolor="#fda4af"];
33
33
  A4 [label="generativelanguage\n.googleapis.com", fillcolor="#fda4af"];
@@ -1,6 +1,6 @@
1
1
  digraph "PWN_SAST" {
2
2
  graph [
3
- label=<<B>PWN::SAST - Static Application Security Testing</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">48 rules · multi-language · bin/pwn_sast · Reports::SAST</FONT>>,
3
+ label=<<B>PWN::SAST - Static Application Security Testing</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">48 modules · multi-language · bin/pwn_sast · Reports::SAST</FONT>>,
4
4
  labelloc=t, fontsize=20, fontname="Helvetica",
5
5
  rankdir=LR, splines=spline, nodesep=0.4, ranksep=1.2,
6
6
  bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
@@ -15,11 +15,11 @@ digraph "PWN_SAST" {
15
15
  subgraph cluster_engine {
16
16
  label="SAST Engine"; fontcolor="#a7f3d0"; style=rounded;
17
17
  color="#047857"; bgcolor="#022c22";
18
- Factory [label="SAST::Factory\nrule loader", fillcolor="#6ee7b7"];
19
- TCE [label="TestCaseEngine\ngenerate probes", fillcolor="#6ee7b7"];
18
+ Factory [label="pwn_sast\nrule orchestration", fillcolor="#6ee7b7"];
19
+ TCE [label="TestCaseEngine\nexecute filters", fillcolor="#6ee7b7"];
20
20
  }
21
21
  subgraph cluster_rules {
22
- label="Rule Families (48)"; fontcolor="#fde68a"; style=rounded;
22
+ label="Selected rule families"; fontcolor="#fde68a"; style=rounded;
23
23
  color="#a16207"; bgcolor="#422006";
24
24
  Cmd [label="cmd_execution_*\njava · py · ruby · go · scala", fillcolor="#fcd34d"];
25
25
  Web [label="csrf · redirect · redos\ninner/outer_html · location_hash", fillcolor="#fcd34d"];
@@ -39,11 +39,11 @@ digraph "PWN_SAST" {
39
39
  Factory -> Cmd [color="#f59e0b"];
40
40
  Factory -> Web [color="#f59e0b"];
41
41
  Factory -> Cryp [color="#f59e0b"];
42
- TCE -> Data [color="#f59e0b"];
43
- TCE -> Mem [color="#f59e0b"];
42
+ Factory -> Data [color="#f59e0b"];
43
+ Factory -> Mem [color="#f59e0b"];
44
44
  Cmd -> Report [color="#a78bfa"];
45
45
  Web -> Report [color="#a78bfa"];
46
46
  Cryp -> Report [color="#a78bfa"];
47
- Data -> DD [color="#a78bfa"];
48
- Mem -> DD [color="#a78bfa"];
47
+ Data -> Report [color="#a78bfa"];
48
+ Mem -> Report [color="#a78bfa"];
49
49
  }
@@ -39,6 +39,8 @@ digraph "PWN_Cron" {
39
39
  }
40
40
  {rank=same; Practice; Offline; Train; MemGC; Lean}
41
41
 
42
+ Cleanup [label="session_cleanup\n45 3 * * * ON\nleases / pins / backup before delete", fillcolor="#c4b5fd"];
43
+ Ruby -> Cleanup; Cleanup -> Log;
42
44
  Log [label="~/.pwn/cron/log/<id>.log\nlast_run · last_status", shape=cylinder, fillcolor="#fcd34d"];
43
45
 
44
46
  Create -> Jobs [label="write", color="#38bdf8"];
@@ -1,6 +1,6 @@
1
1
  digraph "PWN_Driver" {
2
2
  graph [
3
- label=<<B>Driver Anatomy - bin/pwn_*</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">54 executables (pwn + 53 pwn_*) · thin CLI over PWN::Plugins</FONT>>,
3
+ label=<<B>Driver Anatomy - bin/pwn_*</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">56 executables (pwn / pwn-ai / pwn-capd + 53 pwn_*) · thin CLI over PWN::Plugins</FONT>>,
4
4
  labelloc=t, fontsize=20, fontname="Helvetica",
5
5
  rankdir=LR, splines=spline, nodesep=0.5, ranksep=1.3,
6
6
  bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
@@ -43,7 +43,7 @@ digraph "PWN_Extrospection" {
43
43
  Obs [label="extro_observe\nrecon · vuln · intel · target\nnetwork · env · rf · web\nosint · serial · telecomm\npacket · vision · voice", fillcolor="#fcd34d"];
44
44
  Intel [label="extro_intel\nCVE / exploit lookup", fillcolor="#fcd34d"];
45
45
  Watch [label="extro_watch\nrender → DOM SHA-256\nscreenshot · TLS fp", fillcolor="#fcd34d"];
46
- Verify[label="extro_verify\n:cve · :version · :doc · :generic\n→ :confirmed | :refuted | :unknown", fillcolor="#fcd34d", penwidth=2];
46
+ Verify[label="extro_verify\n:cve · :version · :doc · :generic\nheuristic: confirmed | refuted | unknown", fillcolor="#fcd34d", penwidth=2];
47
47
  RFTune[label="extro_rf_tune 📡\ntune GQRX · demod · strength\nRDS PI/PS/RadioText → now_playing", fillcolor="#fcd34d", penwidth=2];
48
48
  OsintT[label="extro_osint 🕵️\npublic APIs aggregate\nphone · FCC · patent · person", fillcolor="#fcd34d", penwidth=2];
49
49
  SerT [label="extro_serial 🔌\nopen · payload · drain\nPWN::Plugins::Serial", fillcolor="#fcd34d", penwidth=2];
@@ -51,7 +51,7 @@ digraph "PWN_Extrospection" {
51
51
  PktT [label="extro_packet 📦\ncapture · summarise pcap\ntshark/PacketFu", fillcolor="#fcd34d", penwidth=2];
52
52
  VisT [label="extro_vision 👁\nOCR · barcode/QR", fillcolor="#fcd34d", penwidth=2];
53
53
  VoxT [label="extro_voice 🔊\nTTS · STT · inventory", fillcolor="#fcd34d", penwidth=2];
54
- Corr [label="extro_correlate\njoin with Learning\n+ Mistakes + Memory", fillcolor="#fcd34d", penwidth=2];
54
+ Corr [label="extro_correlate\ncandidate correlations\nLearning + Mistakes + Memory", fillcolor="#fcd34d", penwidth=2];
55
55
  }
56
56
  {rank=same; Snap; Drift; Obs; Intel; Watch; Verify; RFTune; OsintT; SerT; TelT; PktT; VisT; VoxT; Corr}
57
57
 
@@ -15,7 +15,7 @@ digraph "PWN_Fuzz" {
15
15
  subgraph cluster_gen {
16
16
  label="Generate"; fontcolor="#a7f3d0"; style=rounded;
17
17
  color="#047857"; bgcolor="#022c22";
18
- Fuzz [label="Plugins::Fuzz\nmutate · generate", fillcolor="#6ee7b7"];
18
+ Fuzz [label="Plugins::Fuzz\nhttp · file_format · socket", fillcolor="#6ee7b7"];
19
19
  Char [label="Plugins::Char\nencodings", fillcolor="#6ee7b7"];
20
20
  }
21
21
  subgraph cluster_deliver {
@@ -31,7 +31,7 @@ digraph "PWN_Fuzz" {
31
31
  PS [label="Plugins::PS\nprocess health", fillcolor="#fda4af"];
32
32
  Log [label="Plugins::Log\ncrash detect", fillcolor="#fda4af"];
33
33
  }
34
- Report [label="Reports::Fuzz\ncrash triage", fillcolor="#7dd3fc"];
34
+ Report [label="Reports::Fuzz\nrender results_hash", fillcolor="#7dd3fc"];
35
35
 
36
36
  Seed -> Fuzz [color="#38bdf8"];
37
37
  Seed -> Char [color="#38bdf8"];
@@ -43,5 +43,5 @@ digraph "PWN_Fuzz" {
43
43
  NetApp -> Log [color="#fb7185"];
44
44
  PS -> Report [color="#38bdf8"];
45
45
  Log -> Report [color="#38bdf8"];
46
- Log -> Fuzz [label="minimise + reseed", style=dashed, color="#fbbf24", constraint=false];
46
+ Log -> Fuzz [label="operator triage + reseed", style=dashed, color="#fbbf24", constraint=false];
47
47
  }
@@ -11,7 +11,7 @@ digraph "PWN_HistToDriver" {
11
11
  fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
12
 
13
13
  Explore [label="🐚 Explore in REPL\ncall PWN::Plugins::*", fillcolor="#7dd3fc"];
14
- Hist [label="~/.pwn_history\nPry `history` cmd", shape=cylinder, fillcolor="#fcd34d"];
14
+ Hist [label="~/.pwn/pwn_history\nPry `history` cmd", shape=cylinder, fillcolor="#fcd34d"];
15
15
  Extract [label="copy working lines", fillcolor="#6ee7b7"];
16
16
 
17
17
  subgraph cluster_out {
@@ -16,11 +16,11 @@ digraph "PWN_MemorySkills" {
16
16
  Rem [label="memory_remember · lean\nkey · value · category", fillcolor="#6ee7b7"];
17
17
  Skc [label="skill_create\nskill_add_reference", fillcolor="#6ee7b7"];
18
18
  Note [label="learning_note_outcome\nlearning_reflect", fillcolor="#6ee7b7"];
19
- Dist [label="learning_distill_skill\n(session → skill)", fillcolor="#6ee7b7"];
19
+ Dist [label="learning_distill_skill\n(explicit reviewed distillation)", fillcolor="#6ee7b7"];
20
20
  Mrec [label="mistakes_record\nmistakes_resolve", fillcolor="#6ee7b7"];
21
21
  Xft [label="Learning.export_finetune\n(sessions → dataset)", fillcolor="#6ee7b7"];
22
22
  Rdpo [label="Reward.record_preference\nexport_dpo", fillcolor="#6ee7b7"];
23
- PolW [label="Policy.begin / observe / finish\n(Q + REINFORCE)", fillcolor="#6ee7b7"];
23
+ PolW [label="Policy.begin_episode / observe_step / finish\neligible attributed credit only", fillcolor="#6ee7b7"];
24
24
  }
25
25
  {rank=same; Rem; Skc; Note; Dist; Mrec; Xft; Rdpo; PolW}
26
26
 
@@ -79,7 +79,7 @@ digraph "PWN_MemorySkills" {
79
79
  Rem -> Fidx [label="incremental\nre-embed", style=dashed, color="#fbbf24"];
80
80
  Xft -> Fftn [color="#f59e0b"];
81
81
  Xft -> Fses [dir=back, style=dashed, color="#fbbf24", label="mine"];
82
- Xft -> Flrn [dir=back, style=dashed, color="#fbbf24", label="success:true"];
82
+ Xft -> Flrn [dir=back, style=dashed, color="#fbbf24", label="eligible verified outcomes"];
83
83
 
84
84
  Fidx -> Midx [color="#a78bfa"];
85
85
  Fmem -> Midx [style=dashed, color="#a78bfa"];
@@ -15,7 +15,7 @@ digraph "PWN_Mistakes_Negative_Feedback" {
15
15
  label="Five ingest paths"; fontcolor="#fecaca"; style="rounded,dashed";
16
16
  color="#b91c1c"; bgcolor="#450a0a";
17
17
  ToolFail [label=":tool\nDispatch → success:false", fillcolor="#fda4af"];
18
- LoopFail [label=":loop\niteration budget exhausted", fillcolor="#fda4af"];
18
+ LoopFail [label=":loop\nlegacy budget scar (not emitted)", fillcolor="#fda4af"];
19
19
  UserCorr [label=":user_correction\n\"no that's wrong\" / \"still broken\"", fillcolor="#fda4af"];
20
20
  ModelRec [label=":model\nmistakes_record(tool, error)", fillcolor="#fda4af"];
21
21
  Verify [label=":model (proactive)\nextro_verify → :refuted\n(browser-caught assumption)", fillcolor="#fda4af", penwidth=2];
@@ -40,7 +40,7 @@ digraph "PWN_Mistakes_Negative_Feedback" {
40
40
  label="Reactions inside Loop.run"; fontcolor="#ddd6fe"; style=rounded;
41
41
  color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
42
42
  Guard [label="guard_repeated_failure\nmax(turn, PERSISTENT count) ≥ 3\n→ trips on 1st recurrence\nin a new session", fillcolor="#c4b5fd"];
43
- Hint [label="correction_hint\nappend to failed result:\n\"seen N×, sig=..., KNOWN FIX: ...\"\n→ self-correct NEXT iter", fillcolor="#c4b5fd"];
43
+ Hint [label="correction_hint\nappend to failed result:\n\"seen N×, sig=..., KNOWN FIX: ...\"\n→ correction guidance next iter", fillcolor="#c4b5fd"];
44
44
  Regr [label="[REGRESSED]\nresolved sig recurs\n→ reopen + tag", fillcolor="#c4b5fd"];
45
45
  }
46
46
  {rank=same; Guard; Hint; Regr}
@@ -1,122 +1,34 @@
1
- digraph "PWN_Overall_Architecture" {
2
- graph [
3
- label=<<B>PWN - Offensive Security Automation Framework</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Overall Architecture · lib/pwn/*</FONT>>,
4
- labelloc=t, fontsize=22, fontname="Helvetica",
5
- rankdir=TB, splines=spline, nodesep=0.55, ranksep=1.15,
6
- bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, compound=true, newrank=true
7
- ];
8
- node [fontname="Helvetica", fontsize=11, style="filled,rounded",
9
- shape=box, penwidth=1.4, color="#334155", fontcolor="#0f172a"];
10
- edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
- fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
-
13
- /* ───────── L0 · ACTORS ───────── */
14
- subgraph cluster_actors {
15
- label="Actors"; fontcolor="#94a3b8"; style="rounded,dashed";
16
- color="#334155"; bgcolor="#1e293b";
17
- User [label="👤 Researcher\nRed Team · Bug Hunter", fillcolor="#7dd3fc"];
18
- CI [label="⚙️ CI / CD\nHeadless pipelines", fillcolor="#7dd3fc"];
19
- LLM [label="🤖 LLM Providers\nOpenAI · Anthropic · Grok\nGemini · Ollama · Open WebUI", fillcolor="#c4b5fd"];
20
- Target [label="🎯 Attack Surface\nHosts · Web · Cloud\nRadio · Hardware", fillcolor="#fda4af"];
21
- }
22
- {rank=same; User; CI; LLM; Target}
23
-
24
- /* ───────── L1 · ENTRY POINTS ───────── */
25
- subgraph cluster_entry {
26
- label="Entry Points (bin/)"; fontcolor="#7dd3fc";
27
- style=rounded; color="#0369a1"; bgcolor="#0c4a6e"; penwidth=2;
28
- REPL [label="🐚 pwn REPL\nPry + PWN:: preload", fillcolor="#7dd3fc"];
29
- PwnAI [label="✨ pwn-ai\nAgent TUI · pwn --ai", fillcolor="#7dd3fc"];
30
- CLI [label="📜 bin/pwn_*\n54 executables", fillcolor="#7dd3fc"];
31
- Cronb [label="⏱ PWN::Cron\nJobs + background worker", fillcolor="#7dd3fc"];
32
- }
33
- {rank=same; REPL; PwnAI; CLI; Cronb}
34
-
35
- /* ───────── L2 · AI AGENT CORE ───────── */
36
- subgraph cluster_agent {
37
- label="PWN::AI::Agent"; fontcolor="#ddd6fe";
38
- style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
39
- Loop [label="Loop\nTaskSummarizer briefs\nplan → dispatch → observe\nmax_iters 777 (scars do not shrink)\nlast-iter tools only if done", fillcolor="#c4b5fd"];
40
- Registry [label="Registry\n13 toolsets · 87 tools\ntool_router (CORE+topK)", fillcolor="#c4b5fd"];
41
- Swarm [label="Swarm\npersonas · debate · bus", fillcolor="#c4b5fd"];
42
- Prompt [label="PromptBuilder\nengine-budgeted blocks\nMEMORY · SKILLS · POLICY\nMemoryIndex → relevance-ranked",fillcolor="#c4b5fd"];
43
- }
44
- {rank=same; Loop; Registry; Swarm; Prompt}
45
-
46
- /* ───────── L3 · CAPABILITY NAMESPACES ───────── */
47
- subgraph cluster_caps {
48
- label="Capability Namespaces (lib/pwn/*)"; fontcolor="#a7f3d0";
49
- style=rounded; color="#047857"; bgcolor="#022c22"; penwidth=2;
50
- Plugins [label="Plugins\n67 modules", fillcolor="#6ee7b7"];
51
- SAST [label="SAST\n48 rules", fillcolor="#6ee7b7"];
52
- WWW [label="WWW\n22 site drivers", fillcolor="#6ee7b7"];
53
- AWS [label="AWS\n90 services", fillcolor="#6ee7b7"];
54
- SDR [label="SDR\nGQRX · Flipper · RFID\nDecoder::* (20+Base/DSP)", fillcolor="#6ee7b7"];
55
- Chain [label="Blockchain\nBTC · ETH", fillcolor="#6ee7b7"];
56
- Bounty [label="Bounty\nlifecycle replay", fillcolor="#6ee7b7"];
57
- Reports [label="Reports\nHTML · JSON", fillcolor="#6ee7b7"];
58
- }
59
- {rank=same; Plugins; SAST; WWW; AWS; SDR; Chain; Bounty; Reports}
60
-
61
- /* ───────── L4 · PERSISTENCE (~/.pwn) ───────── */
62
- subgraph cluster_persist {
63
- label="Persistence ~/.pwn/"; fontcolor="#fde68a";
64
- style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
65
- Memory [label="memory.json", shape=cylinder, fillcolor="#fcd34d"];
66
- MemIdx [label="memory.idx\n(embed index)", shape=cylinder, fillcolor="#fcd34d"];
67
- Skills [label="skills/<n>/SKILL.md", shape=cylinder, fillcolor="#fcd34d"];
68
- Learn [label="learning.jsonl", shape=cylinder, fillcolor="#fcd34d"];
69
- Metrics [label="metrics.json", shape=cylinder, fillcolor="#fcd34d"];
70
- MistF [label="mistakes.json", shape=cylinder, fillcolor="#fcd34d"];
71
- Extro [label="extrospection.json\nrf · web · observations", shape=cylinder, fillcolor="#fcd34d"];
72
- Sessions [label="sessions/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
73
- SwarmB [label="swarm/*/bus.jsonl", shape=cylinder, fillcolor="#fcd34d"];
74
- CronF [label="cron/jobs.yml", shape=cylinder, fillcolor="#fcd34d"];
75
- Finetune [label="finetune/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
76
- Prefs [label="preferences.jsonl", shape=cylinder, fillcolor="#fcd34d"];
77
- PolicyF [label="policy.json\npolicy_traj.jsonl", shape=cylinder, fillcolor="#fcd34d"];
78
- }
79
- {rank=same; Memory; MemIdx; Skills; Learn; Metrics; MistF; Extro; Sessions; SwarmB; CronF; Finetune; Prefs; PolicyF}
80
-
81
- /* ── L0 → L1 ── */
82
- User -> REPL [color="#38bdf8"];
83
- User -> PwnAI [color="#38bdf8"];
84
- CI -> CLI [color="#38bdf8"];
85
- CI -> Cronb [label="crontab", color="#38bdf8"];
86
-
87
- /* ── L1 → L2 ── */
88
- REPL -> Loop [color="#a78bfa"];
89
- PwnAI -> Loop [label="natural language", color="#a78bfa", penwidth=2];
90
- PwnAI -> Registry [color="#a78bfa"];
91
- CLI -> Swarm [style=invis];
92
- Cronb -> Prompt [style=invis];
93
-
94
- /* ── L2 → L3 ── */
95
- Loop -> Plugins [label="pwn_eval", color="#34d399", penwidth=2];
96
- Loop -> SAST [color="#34d399"];
97
- Registry -> WWW [color="#34d399"];
98
- Registry -> AWS [color="#34d399"];
99
- Swarm -> SDR [color="#34d399"];
100
- Swarm -> Chain [color="#34d399"];
101
- Prompt -> Bounty [style=invis];
102
- Prompt -> Reports [style=invis];
103
- CLI -> Plugins [color="#34d399", constraint=false];
104
-
105
- /* ── L3 → L4 ── */
106
- Plugins -> Memory [color="#f59e0b"];
107
- SAST -> Skills [color="#f59e0b"];
108
- WWW -> Learn [color="#f59e0b"];
109
- AWS -> Metrics [color="#f59e0b"];
110
- SDR -> MistF [style=invis];
111
- SDR -> Extro [color="#f59e0b"];
112
- Chain -> Sessions [color="#f59e0b"];
113
- Bounty -> SwarmB [color="#f59e0b"];
114
- Reports -> CronF [color="#f59e0b"];
115
- Reports -> Prefs [style=invis];
116
-
117
- /* ── side flows (few, non-constraining) ── */
118
- Loop -> LLM [label="tool-use API", color="#c4b5fd", constraint=false, penwidth=2];
119
- Plugins -> Target [label="attack", color="#fb7185", constraint=false, penwidth=2];
120
- Prompt -> Memory [label="inject", dir=back, color="#fbbf24", constraint=false, style=dashed];
121
- Reports -> User [label="findings", color="#38bdf8", constraint=false, penwidth=2];
1
+ digraph PWN_Architecture {
2
+ graph [label="PWN - runtime ownership and evidence flow", labelloc=t, fontsize=22,
3
+ fontname="Helvetica", rankdir=TB, bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6];
4
+ node [fontname="Helvetica", fontsize=11, shape=box, style="rounded,filled", fillcolor="#c4b5fd", color="#334155"];
5
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8", fontcolor="#cbd5e1"];
6
+ Operator [label="Operator / CI", fillcolor="#7dd3fc"];
7
+ Entry [label="pwn / pwn-ai CLI and curses\n56 executables total", fillcolor="#7dd3fc"];
8
+ Mesh [label="pwn-mesh\nprimary radio or MQTT + optional secondary MQTT\n@ai / private channel / whitelist gate", fillcolor="#7dd3fc"];
9
+ Runtime [label="RequestRuntime + Loop\noriginal objective / additive steering\ncheckpoint / permissions / uncertain effects"];
10
+ Prompt [label="PromptBuilder\nmemory / skills / lessons / mistakes / policy\nHOST: DetectOS summary + PreflightChecker"];
11
+ Registry [label="Registry: 16 toolsets / 150 tools\nnormal Loop: core-only + relevant MCP"];
12
+ Provider [label="Configured provider adapter\nrequest-local routing and retry ownership", fillcolor="#fda4af"];
13
+ Dispatch [label="Dispatch / ToolGuard / confirmation / sandbox"];
14
+ Capabilities [label="107 plugin modules / 48 SAST modules\n90 AWS wrappers / 22 WWW drivers\nSDR / blockchain / reports / FFI", fillcolor="#6ee7b7"];
15
+ Target [label="Authorized target / external service / hardware\nrequires separate live validation", fillcolor="#fda4af"];
16
+ Evidence [label="Host observations / exact-target artifacts\nSessions / request checkpoints", shape=cylinder, fillcolor="#fcd34d"];
17
+ Verify [label="Finalization arbiter + Verification\ncurrent bytes / authored checks / complete coverage"];
18
+ Outcome [label="Verified / failed / unknown or incomplete\nnot model prose alone", fillcolor="#7dd3fc"];
19
+ Learn [label="Reward / Learning / Mistakes / Metrics\nclaim and verified-completion fields\nPolicy positive credit needs attribution"];
20
+ Stores [label="Default ~/.pwn stores\nplus explicit artifact/worktree paths", shape=cylinder, fillcolor="#fcd34d"];
21
+ Swarm [label="Swarm nested Loop / Solve\nparent rechecks child artifact receipts"];
22
+ Cron [label="Cron scheduler\nhygiene on / curriculum opt-in"];
23
+ Operator -> Entry; Operator -> Mesh;
24
+ Entry -> Runtime; Mesh -> Runtime [label="eligible received @ai only"];
25
+ Runtime -> Prompt; Runtime -> Registry; Prompt -> Provider; Registry -> Provider;
26
+ Provider -> Dispatch [label="tool calls"]; Dispatch -> Capabilities;
27
+ Capabilities -> Target; Dispatch -> Evidence; Evidence -> Runtime [label="observations"];
28
+ Runtime -> Verify; Evidence -> Verify; Verify -> Outcome;
29
+ Outcome -> Learn; Learn -> Stores; Stores -> Prompt [style=dashed];
30
+ Dispatch -> Swarm; Swarm -> Runtime [label="child turn", style=dashed];
31
+ Cron -> Runtime [label="prompt jobs"]; Cron -> Learn [label="explicit maintenance"];
32
+ Outcome -> Entry [label="release result", style=dashed];
33
+ Outcome -> Mesh [label="origin-bound reply; submission != RF delivery", style=dashed];
122
34
  }
@@ -1,6 +1,6 @@
1
1
  digraph "PWN_Persistence" {
2
2
  graph [
3
- label=<<B>~/.pwn/ - Everything PWN Persists Across Sessions</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">verified / auto-repaired by PWN::Migrate · pwn setup --migrate --fix</FONT>>,
3
+ label=<<B>~/.pwn/ - Default User-State Map</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">registered state checked / repaired by PWN::Migrate · pwn setup --migrate --fix</FONT>>,
4
4
  labelloc=t, fontsize=20, fontname="Helvetica",
5
5
  rankdir=LR, splines=spline, nodesep=0.3, ranksep=1.4,
6
6
  bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
@@ -32,7 +32,7 @@ digraph "PWN_Persistence" {
32
32
  cur [label="curriculum/ + curriculum_kpi.jsonl\nself-play · A/B eval · KPI trend"];
33
33
  ftn [label="finetune/*.jsonl\nShareGPT / OpenAI SFT + DPO"];
34
34
  bkp [label="backup/<ts>/ · quarantine/\nMigrate autofix snapshots"];
35
- hist [label="~/.pwn_history\nREPL history"];
35
+ hist [label="~/.pwn/pwn_history\nREPL history"];
36
36
 
37
37
  Root->cfg; Root->schm; Root->mem; Root->midx; Root->skl; Root->lrn;
38
38
  Root->prf; Root->mis; Root->met; Root->pol; Root->rws; Root->ext; Root->eart;
@@ -1,6 +1,6 @@
1
1
  digraph "PWN_Plugins" {
2
2
  graph [
3
- label=<<B>PWN::Plugins - 67 Modules by Category</B>>,
3
+ label=<<B>PWN::Plugins - Selected categories from 107 plugin modules</B>>,
4
4
  labelloc=t, fontsize=20, fontname="Helvetica",
5
5
  rankdir=LR, splines=spline, nodesep=0.25, ranksep=1.5,
6
6
  bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
@@ -34,7 +34,7 @@ digraph "PWN_Plugins" {
34
34
  d [label="DAO::LDAP/Mongo/PG/SQLite\nJSONPathify · PDFParse · OCR"];
35
35
  a [label="OAuth2 · BasicAuth\nAuthenticationHelper · Vault"];
36
36
  h [label="Serial · BusPirate\nMSR206 · Android · BareSIP"];
37
- c [label="Jenkins · Git · vSphere\nDefectDojo · BlackDuck"];
37
+ c [label="Jenkins · Git · Vsphere\nDefectDojo · BlackDuck"];
38
38
  m [label="MailAgent · SlackClient\nIRC · RabbitMQ · TwitterAPI · Voice"];
39
39
  u [label="FileFu · ThreadPool · Log\nChar · XXD · DetectOS\nScannableCodes · CreditCard\nSSN · EIN · VIN · Pony · PS\nTTYSpinner"];
40
40