pwn 0.5.668 → 0.5.669
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.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +15 -0
- data/README.md +4 -4
- data/documentation/AI-Integration.md +5 -3
- data/documentation/Agent-Tool-Registry.md +18 -14
- data/documentation/Configuration.md +2 -0
- data/documentation/Contributing.md +13 -0
- data/documentation/Diagrams.md +1 -1
- data/documentation/Home.md +4 -4
- data/documentation/How-PWN-Works.md +6 -6
- data/documentation/Persistence.md +17 -0
- data/documentation/Reinforcement-Learning.md +39 -39
- data/documentation/SDR.md +1 -1
- data/documentation/Sessions.md +1 -0
- data/documentation/Skills-Memory-Learning.md +2 -0
- data/documentation/What-is-PWN.md +3 -3
- data/documentation/diagrams/agent-tool-registry.svg +43 -43
- data/documentation/diagrams/ai-integration-tool-calling.svg +112 -85
- data/documentation/diagrams/dot/agent-tool-registry.dot +4 -4
- data/documentation/diagrams/dot/ai-integration-tool-calling.dot +7 -3
- data/documentation/diagrams/dot/memory-skills-detailed.dot +2 -2
- data/documentation/diagrams/dot/overall-pwn-architecture.dot +6 -4
- data/documentation/diagrams/dot/persistence-filesystem.dot +1 -1
- data/documentation/diagrams/dot/sdr-radio-flow.dot +1 -1
- data/documentation/diagrams/memory-skills-detailed.svg +182 -182
- data/documentation/diagrams/overall-pwn-architecture.svg +154 -146
- data/documentation/diagrams/persistence-filesystem.svg +6 -6
- data/documentation/diagrams/sdr-radio-flow.svg +1 -1
- data/documentation/pwn-ai-Agent.md +29 -13
- data/lib/pwn/ai/agent/loop.rb +189 -1
- data/lib/pwn/ai/agent/prompt_builder.rb +24 -5
- data/lib/pwn/ai/agent/task_summarizer.rb +40 -3
- data/lib/pwn/ai/agent/tools/shell.rb +32 -0
- data/lib/pwn/memory_index.rb +17 -2
- data/lib/pwn/plugins/repl.rb +36 -7
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/ai/agent/loop_spec.rb +31 -0
- data/spec/lib/pwn/ai/agent/task_summarizer_spec.rb +10 -0
- data/spec/lib/pwn/ai/agent/tools/shell_spec.rb +21 -0
- data/spec/lib/pwn/plugins/repl_pwn_vault_spec.rb +134 -0
- data/third_party/pwn_rdoc.jsonl +5 -0
- metadata +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
digraph "PWN_AI_Integration" {
|
|
2
2
|
graph [
|
|
3
|
-
label=<<B>PWN::AI - Multi-Provider LLM Integration</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">one Agent Loop ·
|
|
3
|
+
label=<<B>PWN::AI - Multi-Provider LLM Integration</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">one Agent Loop · six interchangeable engines</FONT>>,
|
|
4
4
|
labelloc=t, fontsize=20, fontname="Helvetica",
|
|
5
5
|
rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.3,
|
|
6
6
|
bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
|
|
@@ -20,8 +20,9 @@ digraph "PWN_AI_Integration" {
|
|
|
20
20
|
Grok [label="Grok\nOAuth device flow", fillcolor="#c4b5fd"];
|
|
21
21
|
Gemini [label="Gemini", fillcolor="#c4b5fd"];
|
|
22
22
|
Ollama [label="Ollama (local)\n/api/chat num_ctx · keep_alive\n/api/embed → MemoryIndex", fillcolor="#c4b5fd"];
|
|
23
|
+
OpenWebUI [label="Open WebUI\ngateway JWT\n/api/v1/chat + /ollama", fillcolor="#c4b5fd"];
|
|
23
24
|
}
|
|
24
|
-
{rank=same; OpenAI; Anthropic; Grok; Gemini; Ollama}
|
|
25
|
+
{rank=same; OpenAI; Anthropic; Grok; Gemini; Ollama; OpenWebUI}
|
|
25
26
|
|
|
26
27
|
subgraph cluster_api {
|
|
27
28
|
label="Provider APIs"; fontcolor="#fecaca"; style="rounded,dashed";
|
|
@@ -31,8 +32,9 @@ digraph "PWN_AI_Integration" {
|
|
|
31
32
|
A3 [label="api.x.ai\nauth.x.ai", fillcolor="#fda4af"];
|
|
32
33
|
A4 [label="generativelanguage\n.googleapis.com", fillcolor="#fda4af"];
|
|
33
34
|
A5 [label="localhost:11434", fillcolor="#fda4af"];
|
|
35
|
+
A6 [label="Open WebUI host\n/api/v1 + /ollama", fillcolor="#fda4af"];
|
|
34
36
|
}
|
|
35
|
-
{rank=same; A1; A2; A3; A4; A5}
|
|
37
|
+
{rank=same; A1; A2; A3; A4; A5; A6}
|
|
36
38
|
|
|
37
39
|
Cfg [label="PWN::Config\n~/.pwn/pwn.yaml\nactive · key · oauth\nprompt_budget · reflect_engine\nplan_first · tool_router · escalation", shape=cylinder, fillcolor="#fcd34d"];
|
|
38
40
|
|
|
@@ -41,11 +43,13 @@ digraph "PWN_AI_Integration" {
|
|
|
41
43
|
Loop -> Grok [color="#a78bfa"];
|
|
42
44
|
Loop -> Gemini [color="#a78bfa"];
|
|
43
45
|
Loop -> Ollama [color="#a78bfa"];
|
|
46
|
+
Loop -> OpenWebUI [color="#a78bfa"];
|
|
44
47
|
OpenAI -> A1 [color="#fb7185"];
|
|
45
48
|
Anthropic -> A2 [color="#fb7185"];
|
|
46
49
|
Grok -> A3 [color="#fb7185"];
|
|
47
50
|
Gemini -> A4 [color="#fb7185"];
|
|
48
51
|
Ollama -> A5 [color="#fb7185"];
|
|
52
|
+
OpenWebUI -> A6 [color="#fb7185"];
|
|
49
53
|
Cfg -> Loop [label="active engine", style=dashed, color="#fbbf24", constraint=false];
|
|
50
54
|
Loop -> Anthropic [label="reflect_engine\n(teacher-student)", style=dashed, color="#fbbf24", constraint=false];
|
|
51
55
|
}
|
|
@@ -13,7 +13,7 @@ digraph "PWN_MemorySkills" {
|
|
|
13
13
|
subgraph cluster_write {
|
|
14
14
|
label="Write-Side Tools"; fontcolor="#a7f3d0"; style=rounded;
|
|
15
15
|
color="#047857"; bgcolor="#022c22";
|
|
16
|
-
Rem [label="memory_remember\nkey · value · category", fillcolor="#6ee7b7"];
|
|
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
19
|
Dist [label="learning_distill_skill\n(session → skill)", fillcolor="#6ee7b7"];
|
|
@@ -30,7 +30,7 @@ digraph "PWN_MemorySkills" {
|
|
|
30
30
|
Fidx [label="memory.idx\nembedding index\n(sha → vec)", shape=cylinder, fillcolor="#fcd34d"];
|
|
31
31
|
Fskl [label="skills/<n>/SKILL.md\nYAML front-matter refs", shape=cylinder, fillcolor="#fcd34d"];
|
|
32
32
|
Flrn [label="learning.jsonl\noutcome log", shape=cylinder, fillcolor="#fcd34d"];
|
|
33
|
-
Fses [label="sessions/*.jsonl\ntranscripts",
|
|
33
|
+
Fses [label="sessions/*.jsonl\ntranscripts (+ lean)", shape=cylinder, fillcolor="#fcd34d"];
|
|
34
34
|
Fmis [label="mistakes.json\nsig → count · fix · regressed", shape=cylinder, fillcolor="#fcd34d"];
|
|
35
35
|
Fext [label="extrospection.json\nsnapshot · rf · web · obs", shape=cylinder, fillcolor="#fcd34d"];
|
|
36
36
|
Fftn [label="finetune/*.jsonl\nShareGPT / OpenAI / DPO", shape=cylinder, fillcolor="#fcd34d"];
|
|
@@ -16,7 +16,7 @@ digraph "PWN_Overall_Architecture" {
|
|
|
16
16
|
color="#334155"; bgcolor="#1e293b";
|
|
17
17
|
User [label="👤 Researcher\nRed Team · Bug Hunter", fillcolor="#7dd3fc"];
|
|
18
18
|
CI [label="⚙️ CI / CD\nHeadless pipelines", fillcolor="#7dd3fc"];
|
|
19
|
-
LLM [label="🤖 LLM Providers\nOpenAI · Anthropic\
|
|
19
|
+
LLM [label="🤖 LLM Providers\nOpenAI · Anthropic · Grok\nGemini · Ollama · Open WebUI", fillcolor="#c4b5fd"];
|
|
20
20
|
Target [label="🎯 Attack Surface\nHosts · Web · Cloud\nRadio · Hardware", fillcolor="#fda4af"];
|
|
21
21
|
}
|
|
22
22
|
{rank=same; User; CI; LLM; Target}
|
|
@@ -37,7 +37,7 @@ digraph "PWN_Overall_Architecture" {
|
|
|
37
37
|
label="PWN::AI::Agent"; fontcolor="#ddd6fe";
|
|
38
38
|
style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
|
|
39
39
|
Loop [label="Loop\nTaskSummarizer briefs\nplan_first → dispatch\n→ observe → escalate\nbudget-pressure caps", fillcolor="#c4b5fd"];
|
|
40
|
-
Registry [label="Registry\n12 toolsets ·
|
|
40
|
+
Registry [label="Registry\n12 toolsets · 82 tools\ntool_router (CORE+topK)", fillcolor="#c4b5fd"];
|
|
41
41
|
Swarm [label="Swarm\npersonas · debate · bus", fillcolor="#c4b5fd"];
|
|
42
42
|
Prompt [label="PromptBuilder\nengine-budgeted blocks\nMemoryIndex → relevance-ranked",fillcolor="#c4b5fd"];
|
|
43
43
|
}
|
|
@@ -51,7 +51,7 @@ digraph "PWN_Overall_Architecture" {
|
|
|
51
51
|
SAST [label="SAST\n48 rules", fillcolor="#6ee7b7"];
|
|
52
52
|
WWW [label="WWW\n21 site drivers", fillcolor="#6ee7b7"];
|
|
53
53
|
AWS [label="AWS\n90 services", fillcolor="#6ee7b7"];
|
|
54
|
-
SDR [label="SDR\nGQRX · Flipper · RFID\nDecoder::* (20)", fillcolor="#6ee7b7"];
|
|
54
|
+
SDR [label="SDR\nGQRX · Flipper · RFID\nDecoder::* (20+Base/DSP)", fillcolor="#6ee7b7"];
|
|
55
55
|
Chain [label="Blockchain\nBTC · ETH", fillcolor="#6ee7b7"];
|
|
56
56
|
Bounty [label="Bounty\nlifecycle replay", fillcolor="#6ee7b7"];
|
|
57
57
|
Reports [label="Reports\nHTML · JSON", fillcolor="#6ee7b7"];
|
|
@@ -73,8 +73,9 @@ digraph "PWN_Overall_Architecture" {
|
|
|
73
73
|
SwarmB [label="swarm/*/bus.jsonl", shape=cylinder, fillcolor="#fcd34d"];
|
|
74
74
|
CronF [label="cron/jobs.yml", shape=cylinder, fillcolor="#fcd34d"];
|
|
75
75
|
Finetune [label="finetune/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
|
|
76
|
+
Prefs [label="preferences.jsonl", shape=cylinder, fillcolor="#fcd34d"];
|
|
76
77
|
}
|
|
77
|
-
{rank=same; Memory; MemIdx; Skills; Learn; Metrics; MistF; Extro; Sessions; SwarmB; CronF; Finetune}
|
|
78
|
+
{rank=same; Memory; MemIdx; Skills; Learn; Metrics; MistF; Extro; Sessions; SwarmB; CronF; Finetune; Prefs}
|
|
78
79
|
|
|
79
80
|
/* ── L0 → L1 ── */
|
|
80
81
|
User -> REPL [color="#38bdf8"];
|
|
@@ -110,6 +111,7 @@ digraph "PWN_Overall_Architecture" {
|
|
|
110
111
|
Chain -> Sessions [color="#f59e0b"];
|
|
111
112
|
Bounty -> SwarmB [color="#f59e0b"];
|
|
112
113
|
Reports -> CronF [color="#f59e0b"];
|
|
114
|
+
Reports -> Prefs [style=invis];
|
|
113
115
|
|
|
114
116
|
/* ── side flows (few, non-constraining) ── */
|
|
115
117
|
Loop -> LLM [label="tool-use API", color="#c4b5fd", constraint=false, penwidth=2];
|
|
@@ -28,7 +28,7 @@ digraph "PWN_Persistence" {
|
|
|
28
28
|
crn [label="cron/jobs.yml + log/\nseeded: curriculum_practice_nightly\ncurriculum_train_weekly"];
|
|
29
29
|
agt [label="agents.yml\npersona registry"];
|
|
30
30
|
swm [label="swarm/<id>/bus.jsonl\nmulti-agent chat"];
|
|
31
|
-
cur [label="curriculum
|
|
31
|
+
cur [label="curriculum/ + curriculum_kpi.jsonl\nself-play · A/B eval · KPI trend"];
|
|
32
32
|
ftn [label="finetune/*.jsonl\nShareGPT / OpenAI SFT + DPO"];
|
|
33
33
|
bkp [label="backup/<ts>/ · quarantine/\nMigrate autofix snapshots"];
|
|
34
34
|
hist [label="~/.pwn_history\nREPL history"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
digraph "PWN_SDR" {
|
|
2
2
|
graph [
|
|
3
|
-
label=<<B>PWN::SDR - Software-Defined Radio & RF Hacking</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">GQRX · FlipperZero · RFIDler · FrequencyAllocation · Decoder::* (20) · Base.run_iq (true-air) · FFI::{Volk,Liquid,FFTW,RTLSdr,HackRF,AdalmPluto,SoapySDR}</FONT>>,
|
|
3
|
+
label=<<B>PWN::SDR - Software-Defined Radio & RF Hacking</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">GQRX · FlipperZero · RFIDler · FrequencyAllocation · Decoder::* (20+Base/DSP) · Base.run_iq (true-air) · FFI::{Volk,Liquid,FFTW,RTLSdr,HackRF,AdalmPluto,SoapySDR}</FONT>>,
|
|
4
4
|
labelloc=t, fontsize=20, fontname="Helvetica",
|
|
5
5
|
rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.1,
|
|
6
6
|
bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
|