pwn 0.5.618 → 0.5.621

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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/README.md +14 -6
  4. data/bin/pwn_gqrx_scanner +25 -5
  5. data/documentation/Agent-Tool-Registry.md +4 -4
  6. data/documentation/Cron.md +13 -0
  7. data/documentation/Diagrams.md +6 -2
  8. data/documentation/Extrospection.md +96 -11
  9. data/documentation/Home.md +5 -4
  10. data/documentation/How-PWN-Works.md +7 -4
  11. data/documentation/Mistakes.md +97 -0
  12. data/documentation/Persistence.md +4 -1
  13. data/documentation/SDR.md +23 -5
  14. data/documentation/Skills-Memory-Learning.md +16 -5
  15. data/documentation/Transparent-Browser.md +18 -1
  16. data/documentation/diagrams/agent-tool-registry.svg +103 -100
  17. data/documentation/diagrams/ai-integration-tool-calling.svg +24 -24
  18. data/documentation/diagrams/aws-cloud-security.svg +25 -25
  19. data/documentation/diagrams/burp-vs-zap-preference.svg +12 -12
  20. data/documentation/diagrams/code-scanning-sast.svg +25 -25
  21. data/documentation/diagrams/cron-scheduling.svg +23 -23
  22. data/documentation/diagrams/dot/agent-tool-registry.dot +3 -3
  23. data/documentation/diagrams/dot/extrospection-world-awareness.dot +33 -10
  24. data/documentation/diagrams/dot/memory-skills-detailed.dot +16 -5
  25. data/documentation/diagrams/dot/mistakes-negative-feedback.dot +93 -0
  26. data/documentation/diagrams/dot/overall-pwn-architecture.dot +7 -5
  27. data/documentation/diagrams/dot/persistence-filesystem.dot +4 -2
  28. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +25 -7
  29. data/documentation/diagrams/dot/sdr-radio-flow.dot +13 -11
  30. data/documentation/diagrams/driver-framework.svg +13 -13
  31. data/documentation/diagrams/extrospection-world-awareness.svg +241 -93
  32. data/documentation/diagrams/fuzzing-workflow.svg +24 -24
  33. data/documentation/diagrams/hardware-hacking.svg +18 -18
  34. data/documentation/diagrams/history-to-drivers.svg +18 -18
  35. data/documentation/diagrams/memory-skills-detailed.svg +169 -97
  36. data/documentation/diagrams/mistakes-negative-feedback.svg +266 -0
  37. data/documentation/diagrams/network-infra-testing.svg +27 -27
  38. data/documentation/diagrams/overall-pwn-architecture.svg +184 -173
  39. data/documentation/diagrams/penetration-testing-workflow.svg +30 -30
  40. data/documentation/diagrams/persistence-filesystem.svg +111 -87
  41. data/documentation/diagrams/plugin-ecosystem.svg +35 -35
  42. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +263 -149
  43. data/documentation/diagrams/pwn-repl-prototyping.svg +20 -20
  44. data/documentation/diagrams/reporting-pipeline.svg +18 -18
  45. data/documentation/diagrams/reverse-engineering-flow.svg +21 -21
  46. data/documentation/diagrams/sdr-radio-flow.svg +76 -56
  47. data/documentation/diagrams/sessions-cron-automation.svg +18 -18
  48. data/documentation/diagrams/swarm-multi-agent.svg +39 -39
  49. data/documentation/diagrams/web-application-testing.svg +26 -26
  50. data/documentation/diagrams/zero-day-research-flow.svg +25 -25
  51. data/documentation/pwn-ai-Agent.md +28 -15
  52. data/lib/pwn/ai/agent/extrospection.rb +494 -6
  53. data/lib/pwn/ai/agent/learning.rb +67 -7
  54. data/lib/pwn/ai/agent/loop.rb +72 -6
  55. data/lib/pwn/ai/agent/mistakes.rb +369 -0
  56. data/lib/pwn/ai/agent/prompt_builder.rb +10 -1
  57. data/lib/pwn/ai/agent/tools/extrospection.rb +88 -3
  58. data/lib/pwn/ai/agent/tools/mistakes.rb +132 -0
  59. data/lib/pwn/ai/agent.rb +1 -0
  60. data/lib/pwn/plugins/jira_data_center.rb +2 -2
  61. data/lib/pwn/sdr/decoder/adsb.rb +82 -0
  62. data/lib/pwn/sdr/decoder/apt.rb +136 -0
  63. data/lib/pwn/sdr/decoder/base.rb +258 -171
  64. data/lib/pwn/sdr/decoder/bluetooth.rb +71 -0
  65. data/lib/pwn/sdr/decoder/dect.rb +70 -0
  66. data/lib/pwn/sdr/decoder/dsp.rb +396 -0
  67. data/lib/pwn/sdr/decoder/flex.rb +177 -210
  68. data/lib/pwn/sdr/decoder/gps.rb +74 -0
  69. data/lib/pwn/sdr/decoder/gsm.rb +31 -62
  70. data/lib/pwn/sdr/decoder/iridium.rb +66 -0
  71. data/lib/pwn/sdr/decoder/lora.rb +80 -0
  72. data/lib/pwn/sdr/decoder/lte.rb +67 -0
  73. data/lib/pwn/sdr/decoder/morse.rb +138 -0
  74. data/lib/pwn/sdr/decoder/p25.rb +74 -0
  75. data/lib/pwn/sdr/decoder/pager.rb +61 -0
  76. data/lib/pwn/sdr/decoder/pocsag.rb +176 -54
  77. data/lib/pwn/sdr/decoder/rfid.rb +79 -0
  78. data/lib/pwn/sdr/decoder/rtl433.rb +86 -0
  79. data/lib/pwn/sdr/decoder/rtty.rb +139 -0
  80. data/lib/pwn/sdr/decoder/wifi.rb +77 -0
  81. data/lib/pwn/sdr/decoder/zigbee.rb +74 -0
  82. data/lib/pwn/sdr/decoder.rb +75 -7
  83. data/lib/pwn/sdr/frequency_allocation.rb +82 -41
  84. data/lib/pwn/sdr/gqrx.rb +186 -95
  85. data/lib/pwn/version.rb +1 -1
  86. data/spec/lib/pwn/ai/agent/mistakes_spec.rb +36 -0
  87. data/spec/lib/pwn/ai/agent/tools/mistakes_spec.rb +12 -0
  88. data/spec/lib/pwn/sdr/decoder/adsb_spec.rb +15 -0
  89. data/spec/lib/pwn/sdr/decoder/apt_spec.rb +15 -0
  90. data/spec/lib/pwn/sdr/decoder/bluetooth_spec.rb +15 -0
  91. data/spec/lib/pwn/sdr/decoder/dect_spec.rb +15 -0
  92. data/spec/lib/pwn/sdr/decoder/dsp_spec.rb +15 -0
  93. data/spec/lib/pwn/sdr/decoder/gps_spec.rb +15 -0
  94. data/spec/lib/pwn/sdr/decoder/iridium_spec.rb +15 -0
  95. data/spec/lib/pwn/sdr/decoder/lora_spec.rb +15 -0
  96. data/spec/lib/pwn/sdr/decoder/lte_spec.rb +15 -0
  97. data/spec/lib/pwn/sdr/decoder/morse_spec.rb +15 -0
  98. data/spec/lib/pwn/sdr/decoder/p25_spec.rb +15 -0
  99. data/spec/lib/pwn/sdr/decoder/pager_spec.rb +15 -0
  100. data/spec/lib/pwn/sdr/decoder/rfid_spec.rb +15 -0
  101. data/spec/lib/pwn/sdr/decoder/rtl433_spec.rb +15 -0
  102. data/spec/lib/pwn/sdr/decoder/rtty_spec.rb +15 -0
  103. data/spec/lib/pwn/sdr/decoder/wifi_spec.rb +15 -0
  104. data/spec/lib/pwn/sdr/decoder/zigbee_spec.rb +15 -0
  105. data/third_party/pwn_rdoc.jsonl +115 -5
  106. metadata +46 -6
  107. data/README.md.bak +0 -200
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d2c26dca00a6c45a763df37f813f0d789098ed87f8b7c5296dca5a7a72d4281
4
- data.tar.gz: fc40bc082f3d549efd2cef1fbb11807a53b416caf2a8190769818f681cc600dd
3
+ metadata.gz: '0708b22c22f49ec48a8263fe296b3dea6055d87259fe6bd6f63b484049432d6a'
4
+ data.tar.gz: 7b0dd573b0e169afd93e8ae228a40d02b4331fcf989a78df884cfdd5649fac8a
5
5
  SHA512:
6
- metadata.gz: f0269c36ff988d1817214345cf77c347a8c1f22104ba822b6982aa4fe6318086e69793f42a5d563bb061ec543cf7a5bb99877649f7f1554c8d6a182ab281356a
7
- data.tar.gz: 269676fd1f2dbd6f5f78c3e645d0d4675df08d681b7db21d49c7937fc121bd1b74dfbd4f82b1a049c9e6f4579ed7e2d697403f28c45312dffbc29b6557cbb16a
6
+ metadata.gz: 840dd2114e03a96ecc79fad15d9204f18d1ce5f444561fe230d0da5ca3e6a35f4d93a41c6c69cf3d87b37edf46e5bbd64ca0cbe4440b1a3ef9a268b5f918b39b
7
+ data.tar.gz: 0a18d690d4bc222a319500c7301c20f8a9629111e11498489ddf7516b6c2afe5ab6d6daf20354bea580688ad58bd7b85708f699cfe9c399dc8f1d23f65391bb1
data/Gemfile CHANGED
@@ -50,7 +50,7 @@ gem 'libusb', '0.7.2'
50
50
  gem 'luhn', '3.0.0'
51
51
  gem 'mail', '2.9.1'
52
52
  gem 'mcp', '0.23.0'
53
- gem 'meshtastic', '0.0.167'
53
+ gem 'meshtastic', '0.0.169'
54
54
  gem 'metasm', '1.0.6'
55
55
  gem 'mongo', '2.24.1'
56
56
  gem 'msfrpc-client', '1.1.2'
@@ -81,7 +81,7 @@ gem 'rmagick', '7.0.5'
81
81
  gem 'rqrcode', '3.2.0'
82
82
  gem 'rspec', '3.13.2'
83
83
  gem 'rtesseract', '3.1.4'
84
- gem 'rubocop', '1.88.1'
84
+ gem 'rubocop', '1.88.2'
85
85
  gem 'rubocop-rake', '0.7.1'
86
86
  gem 'rubocop-rspec', '3.10.2'
87
87
  gem 'ruby-audio', '1.6.1'
data/README.md CHANGED
@@ -51,19 +51,26 @@ Five layers, edges only ever go down:
51
51
  ![PWN Overall Architecture](documentation/diagrams/overall-pwn-architecture.svg)
52
52
 
53
53
  The AI layer closes a **self-improvement loop** on every turn — Metrics +
54
- Learning (introspection) joined with Snapshot + Drift + Intel (extrospection)
55
- via `extro_correlate`, so the agent knows whether a failure was *its* fault or
56
- *the world* changed:
54
+ Learning + **Mistakes** (introspection / negative feedback) joined with
55
+ Snapshot + Drift + Intel + RF + **Web** (extrospection) plus browser-backed **`extro_verify`** self fact-checking — via `extro_correlate`, so the
56
+ agent knows whether a failure was *its* fault or *the world* changed
57
+ **and does not repeat the same mistake twice**:
57
58
 
58
59
  ![pwn-ai Feedback Learning Loop](documentation/diagrams/pwn-ai-feedback-learning-loop.svg)
59
60
 
61
+ Failures are fingerprinted cross-session (`~/.pwn/mistakes.json`), tagged
62
+ `[REPEATING]` / `[REGRESSED]`, and their **fix** is handed straight back inline
63
+ on the next recurrence:
64
+
65
+ ![Mistakes Negative-Feedback Loop](documentation/diagrams/mistakes-negative-feedback.svg)
66
+
60
67
  And **Swarm** runs multiple personas — each a full tool-calling agent,
61
68
  optionally on a *different* LLM engine — over a shared append-only bus:
62
69
 
63
70
  ![Swarm Multi-Agent](documentation/diagrams/swarm-multi-agent.svg)
64
71
 
65
72
  Full pages: [How PWN Works](documentation/How-PWN-Works.md) ·
66
- [All 26 Data-Flow Diagrams](documentation/Diagrams.md)
73
+ [All 27 Data-Flow Diagrams](documentation/Diagrams.md)
67
74
 
68
75
  ---
69
76
 
@@ -76,8 +83,9 @@ The complete wiki lives in this repo at **[`documentation/Home.md`](documentatio
76
83
  | [What is PWN](documentation/What-is-PWN.md) | [`pwn` REPL](documentation/pwn-REPL.md) | [AI / LLM Integration](documentation/AI-Integration.md) | [Plugins (66)](documentation/Plugins.md) |
77
84
  | [Why PWN](documentation/Why-PWN.md) | [`pwn-ai` Agent](documentation/pwn-ai-Agent.md) | [Agent Tool Registry](documentation/Agent-Tool-Registry.md) | [SAST (48)](documentation/SAST.md) |
78
85
  | [How PWN Works](documentation/How-PWN-Works.md) | [CLI Drivers (52)](documentation/CLI-Drivers.md) | [Memory · Skills · Learning](documentation/Skills-Memory-Learning.md) | [AWS (90)](documentation/AWS.md) |
79
- | [Installation](documentation/Installation.md) | [Build a Driver](documentation/Drivers.md) | [Extrospection](documentation/Extrospection.md) | [WWW (21)](documentation/WWW.md) |
80
- | [General Usage](documentation/General-PWN-Usage.md) | | [Swarm (multi-agent)](documentation/Swarm.md) | [SDR / Radio](documentation/SDR.md) |
86
+ | [Installation](documentation/Installation.md) | [Build a Driver](documentation/Drivers.md) | [Mistakes (neg-feedback)](documentation/Mistakes.md) | [WWW (21)](documentation/WWW.md) |
87
+ | [General Usage](documentation/General-PWN-Usage.md) | | [Extrospection](documentation/Extrospection.md) | [SDR / Radio](documentation/SDR.md) |
88
+ | [Configuration](documentation/Configuration.md) | | [Swarm (multi-agent)](documentation/Swarm.md) | [Hardware](documentation/Hardware.md) |
81
89
  | [Configuration](documentation/Configuration.md) | | [Sessions](documentation/Sessions.md) · [Cron](documentation/Cron.md) | [Reports](documentation/Reporting.md) |
82
90
  | [`~/.pwn/` Persistence](documentation/Persistence.md) | | | [BurpSuite](documentation/BurpSuite.md) · [NmapIt](documentation/NmapIt.md) |
83
91
  | **[All Diagrams](documentation/Diagrams.md)** | | | [Metasploit](documentation/Metasploit.md) · [Fuzzing](documentation/Fuzzing.md) |
data/bin/pwn_gqrx_scanner CHANGED
@@ -76,7 +76,7 @@ PWN::Driver::Parser.new do |options|
76
76
  opts[:fft_scan] = f
77
77
  end
78
78
 
79
- options.on('-SRATE', '--sample-rate=RATE', '<Optional --fft-scan - Visible span/sample_rate in Hz (default 1_000_000)>') do |s|
79
+ options.on('--sample-rate=RATE', '<Optional --fft-scan - Visible span/sample_rate in Hz (default 1_000_000). NOTE: no short flag; -S is --strength-lock>') do |s|
80
80
  opts[:sample_rate] = s
81
81
  end
82
82
 
@@ -84,11 +84,11 @@ PWN::Driver::Parser.new do |options|
84
84
  opts[:nfft] = n
85
85
  end
86
86
 
87
- options.on('-AINT', '--avg=INT', '<Optional --fft-scan - FFT averages (default 2)>') do |a|
87
+ options.on('--avg=INT', '<Optional --fft-scan - FFT averages (default 8). NOTE: no short flag; -A is --audio-gain>') do |a|
88
88
  opts[:avg] = a
89
89
  end
90
90
 
91
- options.on('-CSEC', '--capture-secs=SEC', '<Optional --fft-scan - Capture seconds per chunk (default 0.03)>') do |c|
91
+ options.on('-CSEC', '--capture-secs=SEC', '<Optional --fft-scan - Capture seconds per chunk (default 0.10)>') do |c|
92
92
  opts[:capture_secs] = c
93
93
  end
94
94
 
@@ -99,6 +99,14 @@ PWN::Driver::Parser.new do |options|
99
99
  options.on('-ODB', '--strength-offset-db=FLOAT', '<Optional - Power offset in dB (default 0.0)>') do |o|
100
100
  opts[:strength_offset_db] = o
101
101
  end
102
+
103
+ options.on('--min-snr-db=FLOAT', '<Optional --fft-scan - Minimum SNR (dB above per-chunk noise floor) to report a signal (default 12.0)>') do |m|
104
+ opts[:min_snr_db] = m
105
+ end
106
+
107
+ options.on('--min-bw-ratio=FLOAT', '<Optional --fft-scan - Reject FFT peaks narrower than RATIO * band-plan bandwidth as spurs (default 0.30)>') do |r|
108
+ opts[:min_bw_ratio] = r
109
+ end
102
110
  end.parse!
103
111
 
104
112
  begin
@@ -178,13 +186,17 @@ begin
178
186
  sample_rate = sample_rate.to_i
179
187
  nfft = opts[:nfft] || 2048
180
188
  nfft = nfft.to_i
181
- avgv = opts[:avg] || 2
189
+ avgv = opts[:avg] || 8
182
190
  avgv = avgv.to_i
183
- capture_secs = opts[:capture_secs] || 0.03
191
+ capture_secs = opts[:capture_secs] || 0.10
184
192
  capture_secs = capture_secs.to_f
185
193
  keep_spectrum = opts[:keep_spectrum] ? true : false
186
194
  strength_offset_db = opts[:strength_offset_db]
187
195
  strength_offset_db = strength_offset_db.to_f unless strength_offset_db.nil?
196
+ min_snr_db = opts[:min_snr_db]
197
+ min_snr_db = min_snr_db.to_f unless min_snr_db.nil?
198
+ min_bw_ratio = opts[:min_bw_ratio]
199
+ min_bw_ratio = min_bw_ratio.to_f unless min_bw_ratio.nil?
188
200
 
189
201
  if fft_scan
190
202
  puts '[*] --fft-scan requested: using fast FFT panoramic mode (#fast_scan_range)'
@@ -198,6 +210,14 @@ begin
198
210
  strength_lock: strength_lock,
199
211
  keep_spectrum: keep_spectrum,
200
212
  strength_offset_db: strength_offset_db,
213
+ min_snr_db: min_snr_db,
214
+ precision: precision,
215
+ min_bw_ratio: min_bw_ratio,
216
+ demodulator_mode: demodulator_mode,
217
+ bandwidth: bandwidth,
218
+ squelch: squelch,
219
+ decoder: decoder,
220
+ location: location,
201
221
  scan_log: scan_log
202
222
  )
203
223
  puts "FFT Scan complete: #{fast_resp[:total]} signals found."
@@ -6,7 +6,7 @@ toolsets; the JSON-Schema for each tool is what the model actually sees.
6
6
 
7
7
  ![Tool registry](diagrams/agent-tool-registry.svg)
8
8
 
9
- ## Toolsets → Tools
9
+ ## Toolsets → Tools (10 toolsets · 54 tools)
10
10
 
11
11
  | Toolset | Tools | Backed by |
12
12
  |---|---|---|
@@ -15,9 +15,9 @@ toolsets; the JSON-Schema for each tool is what the model actually sees.
15
15
  | `memory` | `memory_remember` · `memory_recall` · `memory_forget` · `memory_clear` | `PWN::Memory` → `~/.pwn/memory.json` |
16
16
  | `skills` | `skill_list` · `skill_view` · `skill_create` · `skill_add_reference` · `skill_delete` | `~/.pwn/skills/*.md` |
17
17
  | `sessions` | `sessions_list` · `sessions_view` · `sessions_current` · `sessions_delete` · `sessions_stats` | `PWN::Sessions` → `~/.pwn/sessions/` |
18
- | `learning` | `learning_note_outcome` · `learning_reflect` · `learning_distill_skill` · `learning_stats` · `learning_outcomes` · `learning_consolidate` · `learning_reset` · `learning_auto_reflect_toggle` | `PWN::AI::Agent::Learning` → `~/.pwn/learning.jsonl` |
18
+ | `learning` | `learning_note_outcome` · `learning_reflect` · `learning_distill_skill` · `learning_stats` · `learning_outcomes` · `learning_consolidate` · `learning_reset` · `learning_auto_reflect_toggle` · **`mistakes_list`** · **`mistakes_record`** · **`mistakes_resolve`** · **`mistakes_reset`** | `PWN::AI::Agent::Learning` + `PWN::AI::Agent::Mistakes` → `~/.pwn/learning.jsonl` + `~/.pwn/mistakes.json` |
19
19
  | `metrics` | `metrics_summary` · `metrics_reset` | `PWN::AI::Agent::Metrics` → `~/.pwn/metrics.json` |
20
- | `extrospection` | `extro_snapshot` · `extro_drift` · `extro_observe` · `extro_observations` · `extro_intel` · `extro_correlate` · `extro_stats` · `extro_reset` · `extro_auto_toggle` | `PWN::AI::Agent::Extrospection` → `~/.pwn/extrospection.json` |
20
+ | `extrospection` | `extro_snapshot` · `extro_drift` · `extro_observe` · `extro_observations` · `extro_intel` · **`extro_watch`** · **`extro_verify`** · `extro_correlate` · `extro_stats` · `extro_reset` · `extro_auto_toggle` | `PWN::AI::Agent::Extrospection` (+ `PWN::Plugins::TransparentBrowser`) → `~/.pwn/extrospection.json` |
21
21
  | `cron` | `cron_list` · `cron_create` · `cron_run` · `cron_enable` · `cron_disable` · `cron_remove` | `PWN::Cron` → `~/.pwn/cron/jobs.yml` |
22
22
  | `swarm` | `agent_list` · `agent_spawn` · `agent_ask` · `agent_debate` · `agent_broadcast` · `swarm_bus` · `swarm_list` | `PWN::AI::Agent::Swarm` → `~/.pwn/agents.yml` + `~/.pwn/swarm/` |
23
23
 
@@ -51,6 +51,6 @@ recon:
51
51
  engine: ollama
52
52
  ```
53
53
 
54
- **See also:** [pwn-ai Agent](pwn-ai-Agent.md) · [Swarm](Swarm.md)
54
+ **See also:** [pwn-ai Agent](pwn-ai-Agent.md) · [Mistakes](Mistakes.md) · [Swarm](Swarm.md)
55
55
 
56
56
  [← Home](Home.md)
@@ -41,6 +41,19 @@ At 02:00 the system cron fires `PWN::Cron.run`, which spins up a headless
41
41
  also updates Learning/Metrics/Extrospection — so tomorrow's interactive
42
42
  session already knows what changed overnight.
43
43
 
44
+ ```ruby
45
+ cron_create(
46
+ name: 'memory_revalidate',
47
+ schedule: '0 4 * * 0',
48
+ ruby: 'PWN::AI::Agent::Extrospection.revalidate_memory'
49
+ )
50
+ ```
51
+
52
+ Weekly, headless-browser fact-check of every `PWN::Memory` `:fact` containing
53
+ a CVE / version string / URL. Refuted entries get prefixed `[UNVERIFIED
54
+ yyyy-mm-dd]` so the injected MEMORY block stops calcifying into
55
+ confidently-wrong priors — see [Extrospection § revalidate_memory](Extrospection.md).
56
+
44
57
  **See also:** [Sessions](Sessions.md) · [Extrospection](Extrospection.md) ·
45
58
  [CLI Drivers](CLI-Drivers.md)
46
59
 
@@ -1,6 +1,6 @@
1
1
  # PWN Data-Flow Diagrams
2
2
 
3
- 26 SVG diagrams, all rendered from Graphviz sources in
3
+ 27 SVG diagrams, all rendered from Graphviz sources in
4
4
  [`diagrams/dot/`](diagrams/dot/) with a single shared visual theme
5
5
  (see [`_THEME.md`](diagrams/dot/_THEME.md)). Rebuild everything with:
6
6
 
@@ -51,11 +51,15 @@ groups) so lines never criss-cross.
51
51
  [source](diagrams/dot/pwn-ai-feedback-learning-loop.dot) · doc: [Skills, Memory & Learning](Skills-Memory-Learning.md)
52
52
  ![pwn-ai-feedback-learning-loop](diagrams/pwn-ai-feedback-learning-loop.svg)
53
53
 
54
+ ### Mistakes — Negative-Feedback Loop
55
+ [source](diagrams/dot/mistakes-negative-feedback.dot) · doc: [Mistakes](Mistakes.md)
56
+ ![mistakes-negative-feedback](diagrams/mistakes-negative-feedback.svg)
57
+
54
58
  ### Multi-Provider LLM Integration
55
59
  [source](diagrams/dot/ai-integration-tool-calling.dot) · doc: [AI Integration](AI-Integration.md)
56
60
  ![ai-integration-tool-calling](diagrams/ai-integration-tool-calling.svg)
57
61
 
58
- ### Agent Tool Registry (10 toolsets)
62
+ ### Agent Tool Registry (10 toolsets · 54 tools)
59
63
  [source](diagrams/dot/agent-tool-registry.dot) · doc: [Agent Tool Registry](Agent-Tool-Registry.md)
60
64
  ![agent-tool-registry](diagrams/agent-tool-registry.svg)
61
65
 
@@ -1,23 +1,47 @@
1
1
  # Extrospection — World Awareness
2
2
 
3
3
  `PWN::AI::Agent::Extrospection` is the **outward-facing** counterpart to
4
- [Learning](Skills-Memory-Learning.md). Where Learning/Metrics ask *"how well
5
- did **I** do?"*, Extrospection asks *"what does the **world** look like right
6
- now, and has it changed under me?"*
4
+ [Learning](Skills-Memory-Learning.md). Where Learning/Metrics/Mistakes ask
5
+ *"how well did **I** do?"*, Extrospection asks *"what does the **world** look
6
+ like right now, and has it changed under me?"*
7
7
 
8
8
  ![Extrospection engine](diagrams/extrospection-world-awareness.svg)
9
9
 
10
+ ## Snapshot sections (`extro_snapshot(sections: […])`)
11
+
12
+ | Section | Probe | Captures |
13
+ |---|---|---|
14
+ | `:host` | `probe_host` | hostname · uname · distro · arch · CPU · mem |
15
+ | `:net` | `probe_net` | interfaces · listening ports · default route |
16
+ | `:toolchain` | `probe_toolchain` | `PROBE_BINS` — nmap curl git ruby python3 gcc msfconsole sqlmap burpsuite zaproxy openssl docker **+ RF_BINS** |
17
+ | `:repo` | `probe_repo` | HEAD · branch · dirty · origin |
18
+ | `:env` | `probe_env` | ruby / gem / bundler / PWN version |
19
+ | **`:rf`** | **`probe_rf`** | **RTL-SDR / HackRF presence · SoapySDR devices · GQRX socket (127.0.0.1:7356) · Flipper serial · `/dev/tty{USB,ACM}*` · band-plan count** |
20
+ | **`:web`** *(opt-in)* | **`probe_web`** | **Renders `web_anchors` via `PWN::Plugins::TransparentBrowser` (`:headless`) — HTTP status · final URL · `<title>` · meta[generator] · `Server` · SHA-256 of *rendered* DOM text · TLS cert fp / notAfter · optional screenshot → `~/.pwn/extrospection/web/<host>.png`** |
21
+
22
+ `RF_BINS = %w[rtl_sdr rtl_test rtl_433 hackrf_info gqrx dump1090 multimon-ng SoapySDRUtil]`
23
+ — these are also merged into `PROBE_BINS` so RF-toolchain drift shows up under
24
+ `toolchain.*` diff keys.
25
+
26
+ `DEFAULT_WEB_ANCHORS` = NVD CVE 2.0 API, Exploit-DB, upstream `pwn/version.rb`.
27
+ Override / extend via `PWN::Env[:ai][:agent][:extrospection][:web][:anchors]`; set
28
+ `allow_targets: true` to also fingerprint `PWN::Env[:targets]`. **`:web` is never
29
+ run by `auto_extrospect`** — a headless browser is ~1–3 s cold vs ~50 ms for
30
+ `probe_host`, so it's opt-in (`extro_snapshot(sections: %i[web])`).
31
+
10
32
  ## Verbs
11
33
 
12
34
  | Tool | Does | Persists to |
13
35
  |---|---|---|
14
- | `extro_snapshot` | Fingerprint host/net/toolchain/repo/env → hash | `extrospection.json` (`snapshot` + rotates `previous`) |
36
+ | `extro_snapshot` | Fingerprint host/net/toolchain/repo/env/**rf**/*web* → hash | `extrospection.json` (`snapshot` + rotates `previous`) |
15
37
  | `extro_drift` | Diff live-vs-stored (or stored-vs-previous) | — returns `{changed, added, removed}` with dotted keys |
16
- | `extro_observe` | Record a recon fact (banner, CVE match, topology note) | `observations[]` |
38
+ | `extro_observe` | Record a fact — `category:` one of `recon vuln intel target network env` **`rf` `web`** `misc` | `observations[]` |
17
39
  | `extro_observations` | Query recorded facts by source/category/target/tag | — |
18
40
  | `extro_intel` | Query NVD / CIRCL / Exploit-DB for keyword or CVE | optional `record: true` → `:intel` observations |
41
+ | **`extro_watch`** | **Render a URL headless, hash the *rendered* DOM, screenshot, diff vs prior** | `observations[]` (`category: :web`) |
42
+ | **`extro_verify`** | **Browser-backed self fact-check of a claim (`:cve` `:version` `:doc` `:generic`) → `:confirmed`/`:refuted`/`:unknown`** | `Mistakes.record` / `observe(:intel)` / `Learning.note_outcome` |
19
43
  | `extro_correlate` | **Join** introspection ↔ extrospection | — actionable findings |
20
- | `extro_stats` | snapshot age · observation count · drift counts | — |
44
+ | `extro_stats` | snapshot age · observation count · drift counts · **rf_devices** · **web_anchors** | — |
21
45
  | `extro_reset` | Wipe snapshot + observations (new engagement) | — |
22
46
  | `extro_auto_toggle` | Enable/disable auto-snapshot after every final answer | `PWN::Env[:ai][:agent][:auto_extrospect]` |
23
47
 
@@ -27,28 +51,89 @@ now, and has it changed under me?"*
27
51
  (a) Metrics tools with <50 % success × toolchain drift / missing binaries
28
52
  (b) Learning failures on day X × host/net/repo drift on day X
29
53
  (c) recorded :intel observations × installed component versions
54
+ (d) recorded :rf observations × missing SDR hardware / RF_BINS
55
+ (e) recorded :web DOM drift on target × Learning failures citing that host
56
+ (f) extro_verify :refuted claims × stale PWN::Memory :fact entries
57
+ (g) :intel obs whose feed anchor is × probe_web-unreachable → downgrade weight
30
58
  ```
31
59
 
32
60
  Output tells the agent whether a failure was **its own fault** ("I called the
33
- API wrong") or **the world changed** ("nmap was upgraded and the flag moved")
34
- and that distinction is written back into MEMORY so the next run doesn't
35
- waste iterations rediscovering it.
61
+ API wrong" → belongs in [Mistakes](Mistakes.md)) or **the world changed**
62
+ ("nmap was upgraded and the flag moved", "the HackRF was unplugged") and
63
+ that distinction is written back into MEMORY so the next run doesn't waste
64
+ iterations rediscovering it.
65
+
66
+ ## `extro_verify` — proactive fact-checking (the browser as a sense organ)
67
+
68
+ `probe_rf` gave Extrospection **ears**; `PWN::Plugins::TransparentBrowser` gives
69
+ it **eyes**. `extro_verify(claim:)` renders a canonical source *with JavaScript
70
+ executed* and returns a verdict:
71
+
72
+ | `kind:` | Canonical source (rendered headless) | Verdict logic |
73
+ |---|---|---|
74
+ | `:cve` | `nvd.nist.gov/vuln/detail/<id>` + `cve.org/CVERecord?id=` | CVE exists? affected-product string overlaps claimed product/version? |
75
+ | `:version` | rubygems.org / PyPI / GitHub search | claimed "latest is X" vs scraped latest |
76
+ | `:doc` | the URL the model cited | 200? title/body contains ≥ 40 % of the quoted-snippet tokens (fuzzy)? |
77
+ | `:generic` | DuckDuckGo HTML (proxy-able, no API key) | ≥ 50 % token overlap in top result snippets |
78
+
79
+ ```text
80
+ ┌── :refuted → Mistakes.record(tool:'assumption', …) → KNOWN MISTAKES block ∀ future runs
81
+ extro_verify ─────┼── :confirmed→ observe(category::intel, ttl:30d) → EXTROSPECTION block, freshness-bound
82
+ └── :unknown → Learning.note_outcome(tags:[needs_human])
83
+ ```
84
+
85
+ This adds a **proactive** trigger to the negative-feedback loop: today
86
+ `Mistakes.record` fires only *reactively* (a tool blew up, or a human said
87
+ "that's wrong"). `extro_verify` lets the agent catch itself being wrong about
88
+ the world **before** a human does. `commit: false` returns the verdict without
89
+ side-effects.
90
+
91
+ ### `revalidate_memory` — the browser as GC for `PWN::Memory`
92
+
93
+ `learning_consolidate` only dedupes/truncates; it never asks *"is this still
94
+ true?"*. `PWN::AI::Agent::Extrospection.revalidate_memory` walks every
95
+ `PWN::Memory` `:fact` containing a CVE / version string / URL, runs `verify()`
96
+ on it, and prefixes stale ones with `[UNVERIFIED yyyy-mm-dd]` so the injected
97
+ MEMORY block stops calcifying into confidently-wrong priors. Schedule it:
98
+
99
+ ```ruby
100
+ cron_create(name: 'memory_revalidate', schedule: '0 4 * * 0',
101
+ ruby: 'PWN::AI::Agent::Extrospection.revalidate_memory')
102
+ ```
103
+
104
+ ### Configuration
105
+
106
+ ```ruby
107
+ PWN::Env[:ai][:agent][:extrospection][:web] = {
108
+ anchors: ['https://target.acme/api/version', …], # else DEFAULT_WEB_ANCHORS
109
+ proxy: 'tor', # or 'http://127.0.0.1:8080' (Burp) — honoured by verify/watch/probe_web
110
+ max_anchors: 8,
111
+ per_page_timeout: 15,
112
+ screenshot: false, # → ~/.pwn/extrospection/web/<host>.png
113
+ allow_targets: false # OPSEC: also fingerprint PWN::Env[:targets] (active recon!)
114
+ }
115
+ ```
116
+
36
117
 
37
118
  ## Typical engagement flow
38
119
 
39
120
  ```ruby
40
121
  extro_reset(confirm: true) # clean slate for new scope
41
- extro_snapshot # baseline
122
+ extro_snapshot # baseline (six local sections; add sections:%i[web] for anchors)
42
123
  # … recon …
43
124
  extro_observe(source: 'nmap', target: '10.0.0.5',
44
125
  category: 'recon', data: 'OpenSSH 8.2p1 Ubuntu')
126
+ extro_observe(source: 'gqrx', target: '433.920MHz',
127
+ category: 'rf', data: 'peak -34.2 dBFS bw=200k FSK — likely garage remote')
45
128
  extro_intel(query: 'OpenSSH 8.2p1', record: true)
129
+ extro_watch(url: 'https://target.acme/api/version') # DOM-hash + screenshot; changed:true on next run
130
+ extro_verify(claim: 'CVE-2026-12345 affects OpenSSL 3.2.1') # → Mistakes/Memory/observe on verdict
46
131
  # … days later, something breaks …
47
132
  extro_drift # what moved?
48
133
  extro_correlate # why did it break?
49
134
  ```
50
135
 
51
136
  **See also:** [Skills, Memory & Learning](Skills-Memory-Learning.md) ·
52
- [pwn-ai Agent](pwn-ai-Agent.md)
137
+ [Mistakes](Mistakes.md) · [SDR](SDR.md) · [Transparent Browser](Transparent-Browser.md) · [Cron](Cron.md) · [pwn-ai Agent](pwn-ai-Agent.md)
53
138
 
54
139
  [← Home](Home.md)
@@ -20,7 +20,7 @@
20
20
  | [Installation](Installation.md) | RVM, gem, `./install.sh`, first launch |
21
21
  | [General Usage](General-PWN-Usage.md) | Day-one cheat sheet |
22
22
  | [Configuration](Configuration.md) | `~/.pwn/config.yml` — engines, keys, agent options |
23
- | **[All Data-Flow Diagrams](Diagrams.md)** | **26 SVGs** in one scrollable page |
23
+ | **[All Data-Flow Diagrams](Diagrams.md)** | **27 SVGs** in one scrollable page |
24
24
 
25
25
  ## 🚪 Entry Points
26
26
 
@@ -36,9 +36,10 @@
36
36
  | | |
37
37
  |---|---|
38
38
  | [AI / LLM Integration](AI-Integration.md) | OpenAI · Anthropic · Grok (OAuth) · Gemini · Ollama |
39
- | [Agent Tool Registry](Agent-Tool-Registry.md) | 10 toolsets · 45+ LLM-callable tools |
39
+ | [Agent Tool Registry](Agent-Tool-Registry.md) | 10 toolsets · 54 LLM-callable tools |
40
40
  | [Memory · Skills · Learning](Skills-Memory-Learning.md) | Introspection — the self-improvement loop |
41
- | [Extrospection](Extrospection.md) | World-awarenesssnapshot · drift · intel · correlate |
41
+ | [Mistakes](Mistakes.md) | **Negative feedback** fingerprint failures · do-NOT-repeat · `[REPEATING]`/`[REGRESSED]` · inline self-correction |
42
+ | [Extrospection](Extrospection.md) | World-awareness — snapshot · drift · intel · **watch** · **verify** · correlate · **rf** · **web** |
42
43
  | [Swarm (Multi-Agent)](Swarm.md) | Personas · ask · debate · broadcast · shared bus |
43
44
  | [Sessions](Sessions.md) | Transcript persistence + reflection |
44
45
  | [Cron](Cron.md) | Scheduled autonomous jobs |
@@ -57,7 +58,7 @@
57
58
  | [SAST (48 rules)](SAST.md) | Static analysis + test-case engine |
58
59
  | [WWW (21 drivers)](WWW.md) | Browser automations for real sites |
59
60
  | [AWS (90 services)](AWS.md) | Cloud-security enumeration |
60
- | [SDR](SDR.md) | GQRX · FlipperZero · RFIDler · SonMicro |
61
+ | [SDR](SDR.md) | GQRX · FlipperZero · RFIDler · SonMicro · **Decoder::* (20 protocols)** |
61
62
  | [Blockchain](Blockchain.md) | BTC · ETH helpers |
62
63
  | [Bounty](Bounty.md) | Lifecycle / auth-replay tooling |
63
64
  | [Reports](Reporting.md) | HTML/JSON output + DefectDojo/Jira |
@@ -27,11 +27,12 @@ hardware).
27
27
  | Module | Role |
28
28
  |---|---|
29
29
  | `Loop` | plan → dispatch tool_calls → observe → repeat until final answer |
30
- | `Registry` | JSON-Schema function definitions grouped into 10 **toolsets** |
30
+ | `Registry` | JSON-Schema function definitions grouped into 10 **toolsets** · 54 tools |
31
31
  | `Dispatch` / `Result` | execute a tool, capture stdout/value/error/duration |
32
- | `PromptBuilder` | inject MEMORY / SKILLS / LEARNING / EXTROSPECTION blocks |
32
+ | `PromptBuilder` | inject MEMORY / SKILLS / LEARNING / **KNOWN MISTAKES + FIXES** / METRICS / EXTROSPECTION blocks |
33
33
  | `Metrics` · `Learning` | **introspection** — how well am I doing? |
34
- | `Extrospection` | **extrospection** — what does the world look like? |
34
+ | `Mistakes` | **negative feedback** — fingerprint failures, do NOT repeat, `[REPEATING]`/`[REGRESSED]`, inline `correction_hint` |
35
+ | `Extrospection` | **extrospection** — what does the world look like? (host · net · toolchain · repo · env · **rf**) |
35
36
  | `Swarm` | multi-agent personas over a shared JSONL bus |
36
37
 
37
38
  See [Agent Tool Registry](Agent-Tool-Registry.md) for every tool the LLM can call.
@@ -53,7 +54,9 @@ See [Persistence](Persistence.md) for the byte-level layout of each file.
53
54
 
54
55
  ## The feedback loop
55
56
 
56
- The reason L2 exists is to close this loop on every turn:
57
+ The reason L2 exists is to close this loop on every turn — successes
58
+ become skills/lessons, **failures become fingerprinted mistakes with fixes**,
59
+ and both are re-injected into the very next system prompt:
57
60
 
58
61
  ![Self-improvement loop](diagrams/pwn-ai-feedback-learning-loop.svg)
59
62
 
@@ -0,0 +1,97 @@
1
+ # Mistakes — The Negative-Feedback Loop
2
+
3
+ `PWN::AI::Agent::Mistakes` is the **negative** half of the pwn-ai learning
4
+ loop. Where [Learning](Skills-Memory-Learning.md) records *what worked* and
5
+ [Metrics](Skills-Memory-Learning.md) records *how often* a tool worked,
6
+ Mistakes records **specific failure patterns** with a stable fingerprint so
7
+ the agent can (a) recognise it is repeating itself, (b) be told exactly what
8
+ **not** to do again in every future system prompt, and (c) capture the **fix**
9
+ once one is found so the avoidance lesson becomes an actionable correction.
10
+
11
+ ![Mistakes negative-feedback loop](diagrams/mistakes-negative-feedback.svg)
12
+
13
+ ## The failure fingerprint
14
+
15
+ A "mistake" is keyed by `sha12(tool + normalised_error)`. Normalisation strips
16
+ volatile bits — paths, hex addresses, `:LINE`, `port N`, timestamps, UUIDs,
17
+ PIDs — so `NoMethodError … at foo.rb:42` and `… at foo.rb:99` collapse to
18
+ **one** signature and its `:count` climbs. **That count *is* the repeat
19
+ detector**, and it survives across sessions.
20
+
21
+ | Field | Meaning |
22
+ |---|---|
23
+ | `signature` | 12-hex-char sha of `(tool, normalised_error)` — stable across runs |
24
+ | `tool` | component the failure was in (`shell`, `pwn_eval`, `assumption`, `assistant_answer`, a module name…) |
25
+ | `error` | normalised error text (paths/lines/addrs/ts stripped) |
26
+ | `count` | **cross-session** recurrence count — drives `[REPEATING]` at ≥ 3 |
27
+ | `resolved` / `fix` | set by `mistakes_resolve` — promoted to a `PWN::Memory` `:lesson` |
28
+ | `regressed` | auto-set when a *resolved* signature recurs — reopened as `[REGRESSED]` |
29
+ | `sessions` | last 10 session_ids that hit it |
30
+
31
+ ## How the loop closes (why it does **not** repeat mistakes)
32
+
33
+ ```text
34
+ Loop.run --(tool failure)---------> Mistakes.record (persist + count++)
35
+ Loop.run --(same sig, count≥3)----> guard_repeated_failure (uses PERSISTENT count →
36
+ fires on the 1st recurrence
37
+ in a NEW session, not the 3rd)
38
+ Loop.run --(failure w/ known fix)-> inline correction_hint ("seen 5×, sig=…, KNOWN FIX: …"
39
+ → self-corrects NEXT iteration)
40
+ Loop.run --(user says "wrong")----> check_user_correction (flip last outcome + record)
41
+ PromptBuilder <-------------------- Mistakes.to_context (KNOWN MISTAKES + KNOWN FIXES)
42
+ model --(tool call)---------------> mistakes_record / mistakes_resolve
43
+ ```
44
+
45
+ ## Five ingest paths — nothing slips through
46
+
47
+ | Source | Trigger | What is recorded |
48
+ |---|---|---|
49
+ | `:tool` | any tool dispatch returns `success:false` / raises | *automatic* — `Loop.record_metrics` |
50
+ | `:loop` | iteration budget exhausted with no final answer | *automatic* — `Loop.run` epilogue |
51
+ | `:user_correction` | next user message matches `CORRECTION_RX` (*"no that's wrong"*, *"still broken"*, *"try again"*, …) | `check_user_correction` — also flips the previous `Learning` outcome to `success:false` |
52
+ | `:model` | the model itself calls `mistakes_record` | wrong assumption, wrong file, hallucinated API — failures that are **not** dispatch errors |
53
+ | **`:model` (proactive)** | **`extro_verify(claim:)` returns `:refuted`** | **`Mistakes.record(tool:'assumption', error:'REFUTED …: <claim>')` — the browser caught the model being wrong about the world *before* a human did** |
54
+
55
+ ## Tools
56
+
57
+ | Tool | Does |
58
+ |---|---|
59
+ | `mistakes_list` | count-sorted fingerprints (signature · tool · error · count · resolved · fix) |
60
+ | `mistakes_record` | proactively fingerprint a semantic mistake YOU just made |
61
+ | `mistakes_resolve` | attach the **fix** → promoted to `PWN::Memory` `:lesson` **and** handed straight back inline via `correction_hint` on the next recurrence. If the same sig recurs it auto-reopens as `[REGRESSED]`. |
62
+ | `mistakes_reset` | wipe `~/.pwn/mistakes.json` (new engagement) |
63
+
64
+ ## What the model sees every turn
65
+
66
+ `PromptBuilder` injects `Mistakes.to_context` between the `LEARNING` and
67
+ `TOOL EFFECTIVENESS` blocks:
68
+
69
+ ```text
70
+ KNOWN MISTAKES (do NOT repeat — call mistakes_resolve once fixed)
71
+ ✗ [a1b2c3d4e5f6] shell ×4 [REPEATING]: nmpa: command not found
72
+ ✗ [7f8e9d0c1b2a] pwn_eval ×2 [REGRESSED]: nomethoderror: undefined method `scan_range' — last fix (insufficient): use fast_scan_range
73
+ KNOWN FIXES (apply these instead of repeating the mistake)
74
+ ✓ [c0ffee123456] shell: connection refused port N — FIX: start ZAP first via PWN::Plugins::Zaproxy.start
75
+ ```
76
+
77
+ …and every failed dispatch gets an **inline** postscript:
78
+
79
+ ```text
80
+ [pwn-ai/mistakes] seen 4× across 3 session(s), sig=a1b2c3d4e5f6 | KNOWN FIX: binary is spelled `nmap`
81
+ ```
82
+
83
+ so the very next iteration self-corrects without re-discovering the fix.
84
+
85
+ ## Regression detection
86
+
87
+ Resolving a mistake does **not** delete it. If the same signature fires again
88
+ after `mistakes_resolve`, `record()` clears `:resolved`, sets `:regressed`,
89
+ and the entry re-enters the `KNOWN MISTAKES` block tagged `[REGRESSED]` with
90
+ its (now-insufficient) previous fix shown inline — the strongest possible
91
+ "your last fix didn't hold" signal.
92
+
93
+ **See also:** [Skills, Memory & Learning](Skills-Memory-Learning.md) ·
94
+ [Extrospection](Extrospection.md) · [Persistence](Persistence.md) ·
95
+ [pwn-ai Agent](pwn-ai-Agent.md)
96
+
97
+ [← Home](Home.md)
@@ -10,8 +10,10 @@ Every byte PWN remembers between processes lives here.
10
10
  | `memory.json` | `PWN::Memory` | JSON array | `memory_clear` | facts · prefs · lessons · env — injected into every prompt |
11
11
  | `skills/*.md` | `PWN::Config.load_skills` | Markdown + YAML front-matter | `skill_delete` | reusable procedures + `references:` (CWE/CVE/ATT&CK/NIST) |
12
12
  | `learning.jsonl` | `PWN::AI::Agent::Learning` | JSON-per-line | `learning_reset` | task outcome log → success_rate |
13
+ | **`mistakes.json`** | **`PWN::AI::Agent::Mistakes`** | **JSON `{sig → entry}`** | **`mistakes_reset`** | **failure fingerprints · cross-session count · fix · `[REPEATING]` · `[REGRESSED]`** |
13
14
  | `metrics.json` | `PWN::AI::Agent::Metrics` | JSON | `metrics_reset` | per-tool calls · success · avg_duration · last_error |
14
- | `extrospection.json` | `PWN::AI::Agent::Extrospection` | JSON | `extro_reset` | host snapshot + previous baseline + observations[] |
15
+ | `extrospection.json` | `PWN::AI::Agent::Extrospection` | JSON | `extro_reset` | host/net/toolchain/repo/env/**rf**/**web** snapshot + previous baseline + observations[] |
16
+ | `extrospection/web/*.png` | `PWN::AI::Agent::Extrospection` | PNG | `rm -rf` | headless-browser screenshots from `probe_web` / `extro_watch` (opt-in) |
15
17
  | `sessions/*.jsonl` | `PWN::Sessions` | JSON-per-line | `sessions_delete` | full transcript per pwn-ai run |
16
18
  | `cron/jobs.yml` | `PWN::Cron` | YAML | `cron_remove` | scheduled prompt/ruby/script jobs |
17
19
  | `cron/log/*.log` | `PWN::Cron` | text | rm | last_run output |
@@ -31,6 +33,7 @@ tar czf pwn-state-$(date +%F).tgz -C "$HOME" .pwn
31
33
  ```ruby
32
34
  # inside pwn-ai — keeps config & skills, wipes engagement-specific state
33
35
  extro_reset(confirm: true) # host snapshot + observations
36
+ mistakes_reset(confirm: true) # failure fingerprints (host-specific errors)
34
37
  learning_reset(confirm: true) # task outcomes (optional)
35
38
  metrics_reset(confirm: true) # tool telemetry (optional)
36
39
  ```
data/documentation/SDR.md CHANGED
@@ -6,18 +6,23 @@
6
6
 
7
7
  | Module | Purpose |
8
8
  |---|---|
9
- | **`GQRX`** | Remote-control a running GQRX instance over TCP: tune, set demod, squelch, record, `get_spectrum_snapshot` (pure-Ruby FFT), scan ranges |
9
+ | **`GQRX`** | Remote-control a running GQRX instance over TCP: tune, set demod, squelch, record, `get_spectrum_snapshot` (pure-Ruby FFT — median noise floor, DC/LO-leakage null, band-edge guard), `fast_scan_range` |
10
10
  | `FlipperZero` | Serial control of Flipper (sub-GHz, NFC, IR, iButton) |
11
11
  | `RFIDler` | 125 kHz RFID reader/emulator |
12
12
  | `SonMicroRFID` | SM130 13.56 MHz reader |
13
13
  | `FrequencyAllocation` | ITU/FCC band-plan lookup — "what lives at 433.92 MHz?" |
14
- | `Decoder::*` | Demodulator/protocol helpers |
14
+ | **`Decoder::*`** | 20 protocol demodulators/decoders — `ADSB APT Bluetooth DECT FLEX GPS GSM Iridium LoRa LTE Morse P25 Pager POCSAG RDS RFID RTL433 RTTY WiFi ZigBee` |
15
15
 
16
16
  ## CLI
17
17
 
18
18
  ```bash
19
- pwn_gqrx_scanner --start 430e6 --stop 440e6 --step 12.5e3 --mode fast
20
- pwn_gqrx_scanner --start 118e6 --stop 137e6 --mode iterative --squelch -60
19
+ # FFT sweep SNR-gated peak detection (no false-positive flood)
20
+ pwn_gqrx_scanner --start 430e6 --stop 440e6 --fft-scan \
21
+ --avg 8 --min-snr-db 10 --capture-secs 0.10
22
+
23
+ # Classic iterative S-meter scan
24
+ pwn_gqrx_scanner --start 118e6 --stop 137e6 --step 12.5e3 \
25
+ --strength-lock -60 --audio-gain-db 6
21
26
  ```
22
27
 
23
28
  See skill `pwn_gqrx_scanner_fast_vs_iterative_scanning` for the trade-off.
@@ -33,7 +38,20 @@ PWN::SDR::FrequencyAllocation.lookup(freq: 433_920_000)
33
38
  # => { band: 'ISM 433', typical: ['garage doors', 'weather stations', …] }
34
39
  ```
35
40
 
36
- Record signal intel with `extro_observe(source: 'gqrx', category: 'recon', …)`.
41
+ ## RF Extrospection
42
+
43
+ The AI agent is RF-aware. `extro_snapshot(sections: [:rf])` runs `probe_rf`
44
+ (RTL-SDR / HackRF / SoapySDR / Flipper / GQRX-socket inventory) and RF signal
45
+ intel is recorded with a first-class `:rf` observation category:
46
+
47
+ ```ruby
48
+ extro_observe(source: 'gqrx', category: :rf, target: '433.920MHz',
49
+ data: 'peak -34.2 dBFS bw=200k FSK — likely garage remote')
50
+ ```
51
+
52
+ `extro_correlate` then cross-references `:rf` observations against missing
53
+ `RF_BINS` / unplugged hardware so the agent can tell "no signal" from "no
54
+ dongle".
37
55
 
38
56
  **See also:** [Hardware](Hardware.md) · [Extrospection](Extrospection.md)
39
57