debug-mcp 0.2.0 → 0.2.1

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: 6257424af8b8ba371cecbb8f76fa8b0b68b1bb7d087528b7d5a99b4f53cccf92
4
- data.tar.gz: abaaef014089cfc1dfa20e653a5c86f0614b3de3c685fc0d19602fcc8a411edc
3
+ metadata.gz: 3deb8c5be59f4db39f02fbf3e4930cf89f3baf3c7389907e313fc1c50fbf9ebf
4
+ data.tar.gz: a42a9c9c6b89566810cfc939a550c12fa5729c85ad6f60d1608c3b8174a4cc15
5
5
  SHA512:
6
- metadata.gz: 8a747e5eb9a03f257af96d135128b4ade00c64700ae8c7fe9c7dd7f93c8b025fa41dfc7d345bce78aa2544ab8af0e701329257205294b4e74c1682d23b323a93
7
- data.tar.gz: db31877e159f7777f2fa4f242bc07440deb512d99e7eb929de36538ce5f5f879e5efe1b511e5838cdf7d4122f1ebd214176afa2411f3e105621c40038003eaf2
6
+ metadata.gz: 47de1a4d322016105ec10929a3bffb06c2b627582b910f58ac4d0455022a640c9ee5907cc06f14b463cb40c4a81de26a4717f25a9cb382da346c67191f2e8b90
7
+ data.tar.gz: 214301d83a465f5df7206eed4c0592fe849f62882548979931a7bc8ea8aae689af12c3499c727d57c29fedec7dc719e6fc9ff0c1efb4aef5b04a335b22c9f7ee
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1 — 2026-06-17
4
+
5
+ ### Bug Fixes
6
+
7
+ - **Fix `list_files` with explicit `session_id`** — `list_files` used an outdated
8
+ `SessionManager#get` call path when a session ID was provided, causing
9
+ `NoMethodError` instead of listing files. It now uses the same
10
+ `SessionManager#client(session_id)` API as other tools.
11
+
3
12
  ## 0.2.0 — 2026-05-14
4
13
 
5
14
  ### Features
data/README.ja.md CHANGED
@@ -411,7 +411,11 @@ Agent: get_context()
411
411
 
412
412
  debug-mcpはデバッグツールであり、実行中のRubyプロセスへの深いランタイムアクセスを提供します。
413
413
 
414
- **専用ツールにより任意コード実行を最小化。** 変数の確認・ソースコードの閲覧・モデル構造の調査など、ほとんどのデバッグ操作は任意コードを実行しない専用ツールで行われます。ランタイム検査用に`evaluate_code`も利用可能で、危険な操作に対しては組み込みの安全性チェッカーが警告します。
414
+ **開発環境専用です。** debug-mcpは自分のローカル/開発プロセスへのattachを想定しており、本番環境は対象外です。深いランタイムアクセス(`evaluate_code`によるコード実行を含む)を提供するもので、敵対的な対象に対して安全に作られているわけではありません。
415
+
416
+ **専用ツールにより任意コード実行を最小化。** 変数の確認・ソースコードの閲覧・モデル構造の調査など、ほとんどのデバッグ操作は任意コードを実行しない専用ツールで行われます。ランタイム検査用に`evaluate_code`も利用可能で、危険な操作に対しては組み込みの安全性チェッカーが警告します。なお、このチェッカーやツール選択の誘導はあくまでadvisory(助言)であり、エージェントを促すだけで実行をブロックするものではありません。
417
+
418
+ **信頼できないデータには向けないでください。** エージェントは対象プロセスのランタイムデータ(変数値・DBの行・HTTPレスポンスなど)を読み取り、`evaluate_code`を通じてそれに基づいて動作し得ます。上記の安全策はadvisoryなので、そのデータにprompt injectionのペイロードが含まれているとエージェントが誘導される可能性があります。injectionが差し込まれ得る入力を扱うプロセスに対してdebug-mcpを実行しないでください。
415
419
 
416
420
  **debug gemには認証機能がありません。** デバッグソケットにアクセスできれば、対象プロセスで任意のコードを実行できます。必ずlocalhost(`127.0.0.1`)にバインドするか、Unixソケットを使用してください。具体的な設定例は[Docker節](#docker内のrailsアプリをデバッグ)を参照してください。
417
421
 
data/README.md CHANGED
@@ -412,7 +412,11 @@ Agent: get_context()
412
412
 
413
413
  debug-mcp is a debugging tool that intentionally provides deep runtime access. Here's what you should know:
414
414
 
415
- **Structured tools minimize arbitrary code execution.** Most debugging tasks viewing variables, reading source code, inspecting model structureare handled by dedicated tools that don't run arbitrary code. `evaluate_code` is available for runtime inspection, and a built-in safety checker warns about dangerous operations.
415
+ **For development environments only.** debug-mcp is meant for attaching to your own local or development processesnot production. It grants deep runtime access (including code execution via `evaluate_code`) and is not designed to be safe against a hostile target.
416
+
417
+ **Structured tools minimize arbitrary code execution.** Most debugging tasks — viewing variables, reading source code, inspecting model structure — are handled by dedicated tools that don't run arbitrary code. `evaluate_code` is available for runtime inspection, and a built-in safety checker warns about dangerous operations. Note that this checker and the tool-selection guidance are advisory — they nudge the agent but do not block execution.
418
+
419
+ **Don't point it at untrusted data.** The agent reads runtime data from the target process (variable values, DB rows, HTTP responses) and can act on it via `evaluate_code`. Because the safeguards above are advisory, a prompt-injection payload in that data could steer the agent. Don't run debug-mcp against a process handling input where injection could be introduced.
416
420
 
417
421
  **The debug gem has no authentication.** Anyone who can reach the debug socket can execute arbitrary code in the target process. Always bind to localhost (`127.0.0.1`) or use Unix sockets. See the [Docker section](#debug-a-dockerized-rails-app) for configuration examples.
418
422
 
@@ -55,11 +55,7 @@ module DebugMcp
55
55
  private
56
56
 
57
57
  def get_client(server_context, session_id)
58
- if session_id
59
- server_context[:session_manager].get(session_id).client
60
- else
61
- server_context[:session_manager].client
62
- end
58
+ server_context[:session_manager].client(session_id)
63
59
  rescue DebugMcp::Error
64
60
  nil
65
61
  end
@@ -76,11 +72,7 @@ module DebugMcp
76
72
  end
77
73
 
78
74
  def remote_cwd(server_context, session_id)
79
- client = if session_id
80
- server_context[:session_manager].get(session_id).client
81
- else
82
- server_context[:session_manager].client
83
- end
75
+ client = server_context[:session_manager].client(session_id)
84
76
  client.auto_repause!
85
77
  result = client.send_command("p Dir.pwd")
86
78
  cleaned = result.strip.sub(/\A=> /, "")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DebugMcp
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debug-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rira100000000