pwn 0.5.731 → 0.5.732

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fba7b3d4693ca9b846825957a7bde24e2a1cd6fd18577666cac32f3abfc0fcb2
4
- data.tar.gz: a1ea687f125fb659f363d7195ac4f32f332918b7707ecf1aa78acafa653eff36
3
+ metadata.gz: f2cdd80d1b4ca26e89b583dbf7d8ad326f1a2a0d9217eabcf0856e57edfd2f80
4
+ data.tar.gz: 7dad008aa8906f6179687c13af204b60e6b8c7ae654cd82b6c6e033adeacef70
5
5
  SHA512:
6
- metadata.gz: 50cd5f5f05075760b364ef46dc82ff469d1698bbaf724880563f97793108437fcfbbc441e2283817ce10b44c46f36566b6254f36879be66f67432cdeecc8c57a
7
- data.tar.gz: 2085d58ae27b634c5d0893ab0c30f428e9442a15695721a4e45d3c923cbbaa67eb95d35e578bb07d1e1b6253be089ac2c833381ba839adf406c2137229063cd3
6
+ metadata.gz: c56ac381842f7264fd01780860b2133a8b23364909cd80b0195758bdcec71d7785d6c7e7f6ed0ff9253d1bc689415b9979381daa8fd909533f1b81a1717cd644
7
+ data.tar.gz: 8dd6752b81448de9a92d173b56c5ddab6b50480faeb24a2442c6d3c03a450ae6f0d3e073eace4a7bf50d4301b39de8cff8e016f88054a9068fd5d5b68e7a74f2
data/Gemfile CHANGED
@@ -50,7 +50,7 @@ gem 'libusb', '0.8.0'
50
50
  gem 'luhn', '3.0.0'
51
51
  gem 'mail', '2.9.1'
52
52
  gem 'mcp', '1.5.1'
53
- gem 'meshtastic', '0.0.176'
53
+ gem 'meshtastic', '0.0.178'
54
54
  gem 'metasm', '1.0.6'
55
55
  gem 'mongo', '2.26.0'
56
56
  gem 'msfrpc-client', '1.1.2'
@@ -13,6 +13,7 @@ toolsets; the JSON-Schema for each tool is what the model actually sees.
13
13
  | `http` | `http_proxy_start` · `http_proxy_stop` · `http_proxy_entries` · `http_proxy_rules` · `http_replay` | `PWN::Plugins::MitmProxy`: native HTTP HAR capture/replay; opaque CONNECT tunnels |
14
14
  | `terminal` | `shell` | `Open3.capture3` on the host, after `PWN::AI::Agent::ToolGuard` |
15
15
  | `pwn` | `pwn_eval` | `TOPLEVEL_BINDING.eval` in the live REPL process, after `ToolGuard` |
16
+ | `mcp` | `mcp` | `PWN::AI::MCP` session broker → any `PWN::AI::MCP::*` stdio client |
16
17
  | `memory` | `memory_remember` · `memory_recall` · `memory_forget` · `memory_clear` · **`memory_lean`** | `PWN::Memory` → `~/.pwn/memory.json` |
17
18
  | `skills` | `skills_consolidate` · **`skills_recall`** · `skill_list` · `skill_view` · `skill_create` · `skill_add_reference` · `skill_delete` · `skill_migrate_legacy` | `~/.pwn/skills/<name>/SKILL.md` (**[agentskills.io](https://agentskills.io) spec**; legacy flat `*.md` auto-migrated) |
18
19
  | `sessions` | **`session_recall`** · `sessions_list` · `sessions_view` · `sessions_current` · `sessions_delete` · `sessions_stats` · **`sessions_lean`** | `PWN::Sessions` → `~/.pwn/sessions/` |
@@ -164,3 +164,17 @@ When you change code under `/opt/pwn`:
164
164
  filler, no internal agent backlog codes).
165
165
 
166
166
  Do not commit doc refreshes while lint or tests are still red.
167
+
168
+ ### Optional combo.nation MCP integration tests
169
+
170
+ The default `bundle exec rake` does not launch `/opt/combo.nation/combo.nation`.
171
+ Protocol, menu-ID, and hardware-gate coverage uses an in-process fake MCP server.
172
+ The real stdio binary is excluded with `combo_nation_mcp` metadata unless:
173
+
174
+ ```bash
175
+ PWN_TEST_COMBO_NATION_MCP=1 bundle exec rspec spec/lib/pwn/ai/mcp/combo_nation_spec.rb
176
+ ```
177
+
178
+ That opt-in never passes `--mcp-allow-hardware` and never opens devices. It fails
179
+ if the executable is missing rather than skipping pending.
180
+
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: pwn-ai-agent-tools-mcp
3
+ description: Drive PWN::Ai::Agent::Tools::Mcp from pwn_eval.
4
+ license: MIT
5
+ allowed-tools: [pwn, pwn_eval]
6
+ metadata:
7
+ bundled: true
8
+ generated: true
9
+ module: PWN::Ai::Agent::Tools::Mcp
10
+ source: pwn/ai/agent/tools/mcp.rb
11
+ ---
12
+
13
+ # PWN::Ai::Agent::Tools::Mcp
14
+
15
+ Public API for PWN::Ai::Agent::Tools::Mcp.
16
+
17
+ ## When to use
18
+
19
+ Call `PWN::Ai::Agent::Tools::Mcp` from `pwn_eval` when the task needs this module.
20
+ Do not reimplement it in shell.
21
+
22
+ ## Methodologies
23
+
24
+ Generated from `pwn/ai/agent/tools/mcp.rb`. Prefer the public class methods below.
25
+ Class methods take `(opts = {})` and read `opts`.
26
+
27
+ ## How to call
28
+
29
+ ```ruby
30
+ PWN::Ai::Agent::Tools::Mcp.help
31
+ PWN::Ai::Agent::Tools::Mcp.help(opts)
32
+ ```
33
+
34
+ ## Public methods
35
+
36
+ - _(no public class methods parsed)_
37
+
38
+ ## Source
39
+
40
+ `pwn/ai/agent/tools/mcp.rb`
41
+
42
+ ## Verification
43
+
44
+ `PWN::Ai::Agent::Tools::Mcp.respond_to?(:help)` after the
45
+ module is loaded. Read the source for parameter names.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: pwn-ai-mcp
3
+ description: Drive PWN::AI::MCP from pwn_eval.
4
+ license: MIT
5
+ allowed-tools: [pwn, pwn_eval]
6
+ metadata:
7
+ bundled: true
8
+ generated: true
9
+ module: PWN::AI::MCP
10
+ source: pwn/ai/mcp.rb
11
+ ---
12
+
13
+ # PWN::AI::MCP
14
+
15
+ Autoload MCP client modules that speak JSON-RPC 2.0 to local MCP servers. Session state lives here so pwn-ai Registry tools persist across turns.
16
+
17
+ ## When to use
18
+
19
+ Call `PWN::AI::MCP` from `pwn_eval` when the task needs this module.
20
+ Do not reimplement it in shell.
21
+
22
+ ## Methodologies
23
+
24
+ Generated from `pwn/ai/mcp.rb`. Prefer the public class methods below.
25
+ Class methods take `(opts = {})` and read `opts`.
26
+
27
+ ## How to call
28
+
29
+ ```ruby
30
+ PWN::AI::MCP.help
31
+ PWN::AI::MCP.backends(opts)
32
+ ```
33
+
34
+ ## Public methods
35
+
36
+ - `backends`
37
+ - `resolve`
38
+ - `use`
39
+ - `current`
40
+ - `connect`
41
+ - `disconnect`
42
+ - `ping`
43
+ - `list_tools`
44
+ - `call_tool`
45
+ - `poll_until`
46
+ - `invoke`
47
+ - `reset`
48
+ - `authors`
49
+ - `help`
50
+ - `reset!`
51
+
52
+ ## Source
53
+
54
+ `pwn/ai/mcp.rb`
55
+
56
+ ## Verification
57
+
58
+ `PWN::AI::MCP.respond_to?(:backends)` after the
59
+ module is loaded. Read the source for parameter names.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: pwn-ai-mcp-combonation
3
+ description: Drive PWN::AI::MCP::ComboNation from pwn_eval.
4
+ license: MIT
5
+ allowed-tools: [pwn, pwn_eval]
6
+ metadata:
7
+ bundled: true
8
+ generated: true
9
+ module: PWN::AI::MCP::ComboNation
10
+ source: pwn/ai/mcp/combo_nation.rb
11
+ ---
12
+
13
+ # PWN::AI::MCP::ComboNation
14
+
15
+ JSON-RPC 2.0 / MCP 2024-11-05 stdio client for combo.nation. Speaks the native menu-oriented tools over newline-delimited JSON; it does not scrape a terminal or enable hardware unless requested.
16
+
17
+ ## When to use
18
+
19
+ Call `PWN::AI::MCP::ComboNation` from `pwn_eval` when the task needs this module.
20
+ Do not reimplement it in shell.
21
+
22
+ ## Methodologies
23
+
24
+ Generated from `pwn/ai/mcp/combo_nation.rb`. Prefer the public class methods below.
25
+ Class methods take `(opts = {})` and read `opts`.
26
+
27
+ ## How to call
28
+
29
+ ```ruby
30
+ PWN::AI::MCP::ComboNation.help
31
+ PWN::AI::MCP::ComboNation.required_bins(opts)
32
+ ```
33
+
34
+ ## Public methods
35
+
36
+ - `required_bins`
37
+ - `argv`
38
+ - `connect`
39
+ - `disconnect`
40
+ - `request`
41
+ - `notify`
42
+ - `ping`
43
+ - `list_tools`
44
+ - `call_tool`
45
+ - `menu_catalog`
46
+ - `menu_main`
47
+ - `menu_dial_calibration`
48
+ - `menu_guess`
49
+ - `hardware_connect`
50
+ - `operation_status`
51
+ - `operation_answer`
52
+ - `operation_cancel`
53
+ - `servo_pause`
54
+ - `poll_until`
55
+ - `authors`
56
+ - `help`
57
+
58
+ ## Source
59
+
60
+ `pwn/ai/mcp/combo_nation.rb`
61
+
62
+ ## Verification
63
+
64
+ `PWN::AI::MCP::ComboNation.respond_to?(:required_bins)` after the
65
+ module is loaded. Read the source for parameter names.
@@ -62,6 +62,7 @@ PWN::Plugins::REPL.ready_tty(opts)
62
62
  - `pwn_ai_run_memory`
63
63
  - `pwn_ai_run_learning`
64
64
  - `pwn_ai_run_skills`
65
+ - `pwn_ai_run_mcp`
65
66
  - `enable_autocomplete`
66
67
  - `start`
67
68
  - `authors`
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pwn/ai/agent/registry'
4
+ require 'pwn/ai/mcp'
5
+
6
+ PWN::AI::Agent::Registry.register(
7
+ name: 'mcp',
8
+ toolset: 'mcp',
9
+ schema: {
10
+ name: 'mcp',
11
+ description: 'Talk to local MCP servers through any PWN::AI::MCP::* client. ' \
12
+ 'action=backends lists clients. action=use selects one. ' \
13
+ 'connect/list_tools/call_tool/ping/status/disconnect operate on ' \
14
+ 'that backend; session state persists across turns. ' \
15
+ 'allow_hardware is connect-only and default false. ' \
16
+ 'Pass tool arguments as a JSON object; keep string IDs as strings.',
17
+ parameters: {
18
+ type: 'object',
19
+ properties: {
20
+ action: {
21
+ type: 'string',
22
+ description: 'backends | use | current | connect | disconnect | ping | list_tools | call_tool | poll_until | status'
23
+ },
24
+ backend: { type: 'string', description: 'Snake_case PWN::AI::MCP client name from action=backends.' },
25
+ session_id: { type: 'string', description: 'Optional session key. Defaults to the backend name.' },
26
+ name: { type: 'string', description: 'MCP tool name for call_tool, from list_tools on the selected backend.' },
27
+ arguments: { type: 'object', description: 'JSON object passed to tools/call. String IDs stay strings.' },
28
+ allow_hardware: { type: 'boolean', description: 'Only for connect. Default false. Never implied.' },
29
+ command: { type: 'string', description: 'Optional executable path for connect.' },
30
+ timeout: { type: 'integer', description: 'Seconds for handshake, reads, or poll_until.' },
31
+ states: { type: 'array', items: { type: 'string' }, description: 'poll_until terminal states if the backend implements it.' },
32
+ interval: { type: 'number', description: 'Seconds between poll_until status reads.' }
33
+ },
34
+ required: %w[action]
35
+ }
36
+ },
37
+ handler: lambda { |args|
38
+ PWN::AI::MCP.invoke(args)
39
+ }
40
+ )