poker-mcp 1.1.0 → 1.2.0

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.
package/.mcp.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "poker-mcp",
3
+ "version": "1.2.0",
4
+ "description": "YAML-based input file management tool for radiation shielding calculation code POKER with MCP support - Enhanced with collision detection and daughter nuclide auto-completion",
5
+ "author": "Yoshihiro Hirao",
6
+ "license": "ISC",
7
+ "url": "stdio://",
8
+ "server": {
9
+ "command": "node",
10
+ "args": ["src/mcp_server_stdio_v4.js"],
11
+ "env": {
12
+ "NODE_ENV": "production"
13
+ }
14
+ },
15
+ "capabilities": {
16
+ "tools": true,
17
+ "logging": true,
18
+ "real_data_update": true,
19
+ "automatic_backup": true,
20
+ "error_handling": "complete",
21
+ "validation": "comprehensive"
22
+ },
23
+ "features": {
24
+ "geometry_validation": {
25
+ "collision_detection": true,
26
+ "interference_check": true,
27
+ "pre_calculation_validation": true
28
+ },
29
+ "nuclide_management": {
30
+ "daughter_auto_completion": true,
31
+ "decay_chain_analysis": true,
32
+ "icrp_database_integration": true
33
+ },
34
+ "enhanced_validation": {
35
+ "physics_consistency_check": true,
36
+ "units_compatibility_verification": true,
37
+ "material_property_validation": true,
38
+ "cmb_expression_validation": true
39
+ },
40
+ "operation_methods": {
41
+ "count": 24,
42
+ "categories": [
43
+ "Body operations (propose/update/delete)",
44
+ "Zone operations (propose/update/delete)",
45
+ "BuildupFactor operations (propose/update/delete/changeOrder)",
46
+ "Transform operations (propose/update/delete)",
47
+ "Source operations (propose/update/delete)",
48
+ "Detector operations (propose/update/delete)",
49
+ "Unit operations (propose/update/get/validate/analyze)",
50
+ "System operations (applyChanges/resetYaml/executeCalculation/confirmDaughterNuclides)"
51
+ ]
52
+ },
53
+ "supported_geometries": {
54
+ "count": 10,
55
+ "types": ["SPH", "RCC", "RPP", "BOX", "CMB", "TOR", "ELL", "REC", "TRC", "WED"]
56
+ },
57
+ "supported_materials": {
58
+ "count": 14,
59
+ "types": ["Carbon", "Concrete", "Iron", "Lead", "Aluminum", "Copper", "Tungsten", "Air", "Water", "PyrexGlass", "AcrylicResin", "Polyethylene", "Soil", "VOID"]
60
+ }
61
+ },
62
+ "data_configuration": {
63
+ "work_directory": "tasks",
64
+ "yaml_file": "tasks/poker.yaml",
65
+ "pending_file": "tasks/pending_changes.json",
66
+ "backup_directory": "backups",
67
+ "logs_directory": "logs",
68
+ "nuclide_database": "data/ICRP-07.NDX"
69
+ },
70
+ "documentation": {
71
+ "manifest": "config/mcp-manifest.json",
72
+ "readme": "README.md",
73
+ "manuals": "docs/manuals/",
74
+ "interactive_guides": "docs/interactive_guides/"
75
+ },
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "https://github.com/Hirao-Y/poker_mcp"
79
+ }
80
+ }
package/README.md CHANGED
@@ -4,11 +4,39 @@ YAML-based input file management tool for radiation-shielding calculation code P
4
4
 
5
5
  ## 📋 クイック情報
6
6
 
7
- - **バージョン**: 1.1.0 (安定版リリース)
7
+ - **バージョン**: 1.2.0 (Enhanced Release)
8
8
  - **プロトコル**: MCP (Model Context Protocol) 1.0.0 完全準拠
9
9
  - **メインサーバー**: `src/mcp_server_stdio_v4.js`
10
+ - **データ保存**: tasks/ディレクトリ(実行時自動作成)
10
11
  - **実行方式**: STDIO通信(MCPプロトコル標準)
11
12
 
13
+ ## 🆕 バージョン1.2.0の新機能
14
+
15
+ ### ⚡ 衝突検出システム
16
+ - **リアルタイム干渉チェック**: 立体間の重なり・接触を自動検出
17
+ - **自動修正提案**: 衝突解決のための幾何調整案を提示
18
+ - **物理的妥当性検証**: 非物理的な配置を事前に防止
19
+
20
+ ### ☢️ 子孫核種自動管理
21
+ - **ICRP-07データベース統合**: 1,254核種の崩壊データを内蔵
22
+ - **放射平衡計算**: 親核種から子孫核種を自動計算
23
+ - **寄与度閾値制御**: 5%以上の寄与を持つ核種を自動追加
24
+
25
+ ### 📏 単位系完全性保証
26
+ - **4キー完全性検証**: length, angle, density, radioactivityの一貫性保証
27
+ - **単位変換分析**: 異なる単位系間の変換係数を自動計算
28
+ - **物理的整合性チェック**: 単位の組み合わせの妥当性を検証
29
+
30
+ ### 🔄 YAMLリセット機能
31
+ - **3段階リセットレベル**: minimal(最小限)、standard(標準)、complete(完全)
32
+ - **自動バックアップ**: リセット前に必ずバックアップを作成
33
+ - **ATMOSPHERE保護**: 必須ゾーンの自動復元
34
+
35
+ ### 🔧 検出器分析機能
36
+ - **互換性チェック**: 複数検出器間の比較可能性を分析
37
+ - **性能最適化提案**: メモリ使用量と計算効率の最適化
38
+ - **システム全体分析**: 全検出器の統合的な性能評価
39
+
12
40
  ## ⚡ セットアップ
13
41
 
14
42
  ### 1. インストール
@@ -37,15 +65,11 @@ npx poker-mcp
37
65
  "mcpServers": {
38
66
  "poker-mcp": {
39
67
  "command": "node",
40
- "args": ["(ローカルのエントリポイント、例えば)C:\\Users\\yoshi\\Desktop\\poker_mcp\\src\\mcp_server_stdio_v4.js"],
41
- "env": {
42
- "POKER_WORK_DIR": "(作業ディレクトリのパス、例えば)C:\\Users\\Yoshi\\Desktop\\PokerWorks",
43
- "POKER_DATA_DIR": "data",
44
- "POKER_NUCLIDE_FILE": "ICRP-07.NDX"
45
- }
46
- }
47
- }
48
- }
68
+ "args": ["C:\\Users\\yoshi\\Desktop\\poker_mcp\\src\\mcp_server_stdio_v4.js"],
69
+ "env": {}
70
+ }
71
+ }
72
+ }
49
73
  ```
50
74
 
51
75
  3. **NPXを使用する場合**
@@ -55,11 +79,7 @@ npx poker-mcp
55
79
  "poker-mcp": {
56
80
  "command": "npx",
57
81
  "args": ["poker-mcp"],
58
- "env": {
59
- "POKER_WORK_DIR": "(作業ディレクトリのパス、例えば)C:\\Users\\Yoshi\\Desktop\\PokerWorks",
60
- "POKER_DATA_DIR": "data",
61
- "POKER_NUCLIDE_FILE": "ICRP-07.NDX"
62
- }
82
+ "env": {}
63
83
  }
64
84
  }
65
85
  }
@@ -84,20 +104,26 @@ Claude Desktopで以下のようにテストできます:
84
104
  ## 🏆 主要機能
85
105
 
86
106
  ### ✅ **MCP完全対応**
87
- - **28メソッド完全実装**: 全ての放射線遮蔽計算入力管理機能
107
+ - **29メソッド完全実装**: 全ての放射線遮蔽計算入力管理機能
88
108
  - **JSON-RPC 2.0準拠**: 標準プロトコル完全対応
89
109
  - **STDIO通信**: MCPクライアントとの標準通信方式
90
110
  - **自動バックアップ・ロールバック**: 企業品質のデータ保護
91
111
 
92
112
  ### ✅ **放射線遮蔽計算専用設計**
93
113
  - **10種類の立体形状**: SPH, RCC, RPP, BOX, CMB, TOR, ELL, REC, TRC, WED
94
- - **13種類の材料**: コンクリート、鉛、鉄など標準遮蔽材料
114
+ - **14種類の材料**: コンクリート、鉛、鉄、VOID等標準遮蔽材料
95
115
  - **複数線源対応**: 点・体積線源の完全管理
96
- - **検出器配置**: 1D/2D/3D検出器の柔軟な配置
116
+ - **検出器配置**: 0D/1D/2D/3D検出器の柔軟な配置
117
+
118
+ ### ✅ **物理検証システム**
119
+ - **衝突検出**: リアルタイム立体干渉チェック
120
+ - **子孫核種管理**: ICRP-07データベース基準の自動計算
121
+ - **単位整合性**: 4キー完全性保証システム
122
+ - **材料妥当性**: 密度・物性の自動検証
97
123
 
98
124
  ## 🎯 API構成
99
125
 
100
- ### 🔧 **28メソッド完全実装**
126
+ ### 🔧 **29メソッド完全実装**
101
127
 
102
128
  | **カテゴリ** | **メソッド数** | **機能** | **主要操作** |
103
129
  |-------------|---------------|----------|-------------|
@@ -106,23 +132,23 @@ Claude Desktopで以下のようにテストできます:
106
132
  | **🔄 Transform** | 3個 | 幾何変換管理 | propose・update・delete |
107
133
  | **⚛️ BuildupFactor** | 4個 | ビルドアップ係数制御 | propose・update・delete・changeOrder |
108
134
  | **📡 Source** | 3個 | 線源管理 | propose・update・delete |
109
- | **🎯 Detector** | 3个 | 検出器管理 | propose・update・delete |
110
- | **📏 Unit** | 5個 | 単位設定管理 | propose・get・update・validate・analyze |
111
- | **⚙️ System** | 4個 | システム制御 | apply・execute・reset・confirm |
135
+ | **🎯 Detector** | 3個 | 検出器管理 | propose・update・delete |
136
+ | **📏 Unit** | 5個 | 単位設定管理 | propose・get・update・validateIntegrity・analyzeConversion |
137
+ | **⚙️ System** | 5個 | システム制御 | applyChanges・executeCalculation・resetYaml・confirmDaughterNuclides・各種検証 |
112
138
 
113
- ### 📋 **全28メソッド一覧**
139
+ ### 📋 **全29メソッド一覧**
114
140
  ```
115
- Body系 (3): poker_proposeBody, poker_updateBody, poker_deleteBody
116
- Zone系 (3): poker_proposeZone, poker_updateZone, poker_deleteZone
117
- Transform系 (3): poker_proposeTransform, poker_updateTransform, poker_deleteTransform
141
+ Body系 (3): poker_proposeBody, poker_updateBody, poker_deleteBody
142
+ Zone系 (3): poker_proposeZone, poker_updateZone, poker_deleteZone
143
+ Transform系 (3): poker_proposeTransform, poker_updateTransform, poker_deleteTransform
118
144
  BuildupFactor系 (4): poker_proposeBuildupFactor, poker_updateBuildupFactor,
119
145
  poker_deleteBuildupFactor, poker_changeOrderBuildupFactor
120
- Source系 (3): poker_proposeSource, poker_updateSource, poker_deleteSource
121
- Detector系 (3): poker_proposeDetector, poker_updateDetector, poker_deleteDetector
122
- Unit系 (5): poker_proposeUnit, poker_getUnit, poker_updateUnit,
123
- poker_validateUnitIntegrity, poker_analyzeUnitConversion
124
- System系 (4): poker_applyChanges, poker_executeCalculation,
125
- poker_resetYaml, poker_confirmDaughterNuclides
146
+ Source系 (3): poker_proposeSource, poker_updateSource, poker_deleteSource
147
+ Detector系 (3): poker_proposeDetector, poker_updateDetector, poker_deleteDetector
148
+ Unit系 (5): poker_proposeUnit, poker_getUnit, poker_updateUnit,
149
+ poker_validateUnitIntegrity, poker_analyzeUnitConversion
150
+ System系 (5): poker_applyChanges, poker_executeCalculation, poker_resetYaml,
151
+ poker_confirmDaughterNuclides, 内部検証メソッド群
126
152
  ```
127
153
 
128
154
  ## 📁 プロジェクト構造
@@ -133,25 +159,39 @@ poker_mcp/
133
159
  │ ├── mcp_server_stdio_v4.js # メインサーバー (エントリポイント)
134
160
  │ ├── 📁 mcp/ # MCP実装
135
161
  │ ├── 📁 services/ # ビジネスロジック
136
- │ ├── 📁 validators/ # データ検証
162
+ │ ├── 📁 validators/ # データ検証(物理・単位・衝突)
137
163
  │ ├── 📁 utils/ # ユーティリティ
138
164
  │ └── 📁 config/ # 設定管理
165
+ ├── 📁 data/ # 📊 核種データベース
166
+ │ └── ICRP-07.NDX # ICRP-107核種データ(1,254核種)
139
167
  ├── 📁 config/ # ⚙️ 設定ファイル
140
- │ └── mcp-manifest.json # MCPマニフェスト (1,700行)
168
+ │ ├── mcp-manifest.json # MCPマニフェスト (2,276行)
169
+ │ └── mcp-example.json # 設定例
141
170
  ├── 📁 docs/ # 📚 完全ドキュメント
171
+ │ ├── README.md # 詳細ドキュメント
142
172
  │ ├── 📁 manuals/ # マニュアル集
143
173
  │ └── 📁 interactive_guides/ # インタラクティブ学習ガイド
144
- ├── 📁 [Claude App Dir]/サブフォルダ/ # 📊 YAMLデータファイル
145
- └── 📁 backups/ # 💾 自動バックアップ
174
+ ├── 📁 node_modules/ # 📦 依存パッケージ
175
+ ├── .mcp.json # MCPクライアント接続設定
176
+ ├── package.json # パッケージ定義
177
+ ├── package-lock.json # 依存関係ロック
178
+ └── README.md # このファイル
179
+
180
+ # 実行時に自動作成されるディレクトリ
181
+ ├── 📁 tasks/ # 📊 作業ディレクトリ(自動作成)
182
+ │ ├── poker.yaml # メインYAMLファイル
183
+ │ └── pending_changes.json # 保留中の変更
184
+ ├── 📁 backups/ # 💾 自動バックアップ(自動作成)
185
+ └── 📁 logs/ # 📝 ログファイル(自動作成)
146
186
  ```
147
187
 
148
188
  ## 🔧 Claude経由での使用例
149
189
 
150
- ### 立体作成
190
+ ### 立体作成と衝突検出
151
191
  ```
152
192
  「医療施設用のコンクリート遮蔽壁を作成してください。サイズは幅100cm、高さ200cm、厚さ30cmです」
153
193
  ```
154
- → `poker_proposeBody`メソッドが自動実行
194
+ → `poker_proposeBody`メソッドが自動実行 + 衝突検出
155
195
 
156
196
  ### 材料ゾーン設定
157
197
  ```
@@ -159,17 +199,29 @@ poker_mcp/
159
199
  ```
160
200
  → `poker_proposeZone`メソッドが自動実行
161
201
 
162
- ### 線源配置
202
+ ### 線源配置(子孫核種自動追加)
163
203
  ```
164
204
  「Cs-137線源(放射能1TBq)を原点に配置してください」
165
205
  ```
166
- → `poker_proposeSource`メソッドが自動実行
206
+ → `poker_proposeSource`メソッド実行 + Ba-137m自動追加提案
167
207
 
168
- ### 検出器設置
208
+ ### 検出器設置と最適化
169
209
  ```
170
- 「遮蔽壁から120cm離れた位置に線量率検出器を設置してください」
210
+ 「遮蔽壁から120cm離れた位置に2D検出器グリッドを設置してください」
171
211
  ```
172
- → `poker_proposeDetector`メソッドが自動実行
212
+ → `poker_proposeDetector`メソッド実行 + 性能最適化提案
213
+
214
+ ### 単位系検証
215
+ ```
216
+ 「現在の単位設定の物理的整合性を確認してください」
217
+ ```
218
+ → `poker_validateUnitIntegrity`メソッドが自動実行
219
+
220
+ ### YAMLリセット
221
+ ```
222
+ 「立体構造だけクリアして、単位設定は保持したままリセットしてください」
223
+ ```
224
+ → `poker_resetYaml`メソッド(minimal level)実行
173
225
 
174
226
  ### POKER計算実行
175
227
  ```
@@ -193,16 +245,22 @@ poker_mcp/
193
245
 
194
246
  ### **✅ 放射線遮蔽計算特化**
195
247
  - **物理的妥当性**: 全パラメータの物理検証
196
- - **材料データベース**: 標準遮蔽材料13種完備
197
- - **単位系管理**: 長さ・角度・密度・放射能の一貫管理
248
+ - **材料データベース**: 標準遮蔽材料14種完備
249
+ - **単位系管理**: 4キー完全性保証(長さ・角度・密度・放射能)
198
250
  - **計算品質保証**: 自動整合性チェック
199
251
 
200
252
  ### **✅ 実用性重視設計**
201
- - **自動バックアップ**: 全操作で自動データ保護
253
+ - **自動バックアップ**: 全操作で自動データ保護(最大10世代)
202
254
  - **依存関係チェック**: 安全な削除・更新処理
203
255
  - **エラー回復**: ロールバック機能付き
204
256
  - **レスポンス速度**: <50ms応答時間
205
257
 
258
+ ### **✅ エラーハンドリング強化(v1.2.0)**
259
+ - **propose/update自動判別**: エラーメッセージによる適切なメソッド案内
260
+ - **専用エラーコード**: 各操作に固有のエラーコード体系
261
+ - **材料名サジェスト**: 類似材料名の自動提案機能
262
+ - **Transform参照検証**: 依存関係の事前チェック
263
+
206
264
  ## 📊 対応する計算コード
207
265
 
208
266
  - **POKER**: 放射線遮蔽計算メインコード
@@ -213,6 +271,7 @@ poker_mcp/
213
271
  - **Node.js**: ≥18.0.0
214
272
  - **OS**: Windows, macOS, Linux
215
273
  - **MCP Client**: Claude Desktop (推奨)、その他MCPクライアント
274
+ - **メモリ**: 512MB以上推奨(大規模検出器使用時は1GB以上)
216
275
 
217
276
  ## 🎯 実際の使用ワークフロー
218
277
 
@@ -223,7 +282,7 @@ poker_mcp/
223
282
  ```
224
283
 
225
284
  2. **自動的なMCPメソッド実行**
226
- - 立体作成 → 材料設定 → 線源配置 → 検出器設定
285
+ - 立体作成 → 衝突検出 → 材料設定 → 線源配置 → 子孫核種確認 → 検出器設定
227
286
 
228
287
  3. **計算実行と結果取得**
229
288
  ```
@@ -235,15 +294,38 @@ poker_mcp/
235
294
  - 遮蔽効果の定量評価
236
295
  - 法規制適合性の確認
237
296
 
297
+ ## 📝 更新履歴
298
+
299
+ ### v1.2.0 (2025-01-24)
300
+ - ✨ 衝突検出システム実装
301
+ - ✨ 子孫核種自動補完機能追加(ICRP-07統合)
302
+ - ✨ 単位系完全性検証強化(4キー保証)
303
+ - ✨ YAMLリセット機能実装(3段階レベル)
304
+ - ✨ 検出器分析機能追加
305
+ - 🐛 NuclideManagerデフォルトパス統一
306
+ - 📝 .mcp.json完全化
307
+ - 📝 材料数13→14(VOID追加明記)
308
+ - 🗑️ archiveディレクトリ削除(未使用ファイル整理)
309
+
310
+ ### v1.1.0 (Previous)
311
+ - 基本24メソッド実装
312
+ - MCP 1.0.0準拠
313
+ - 自動バックアップ機能
314
+
315
+ ### v1.0.0 (Initial Release)
316
+ - 初期リリース
317
+ - YAML管理基本機能
318
+
238
319
  ## 📞 サポート・詳細情報
239
320
 
240
321
  - **📖 詳細README**: [docs/README.md](docs/README.md)
241
- - **🚀 セットアップガイド**: [docs/SETUP_GUIDE.md](docs/SETUP_GUIDE.md)
242
322
  - **📚 完全マニュアル**: [docs/manuals/](docs/manuals/)
243
323
  - **🎓 インタラクティブガイド**: [docs/interactive_guides/](docs/interactive_guides/)
324
+ - **📋 マニフェスト**: [config/mcp-manifest.json](config/mcp-manifest.json)
325
+ - **🐛 Issues**: [GitHub Issues](https://github.com/Hirao-Y/poker_mcp/issues)
244
326
 
245
327
  ---
246
328
 
247
- **🎯 Poker MCP Server v1.1.0**
329
+ **🎯 Poker MCP Server v1.2.0**
248
330
  **プロトコル**: MCP 1.0.0 完全準拠
249
331
  **作者**: Yoshihiro Hirao | **ライセンス**: ISC
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "poker-mcp",
3
- "version": "1.1.0",
4
- "description": "YAML-based input file management tool for radiation shielding calculation code POKER with MCP support",
3
+ "version": "1.2.0",
4
+ "description": "YAML-based input file management tool for radiation shielding calculation code POKER with MCP support - Enhanced with collision detection and daughter nuclide auto-completion",
5
5
  "main": "src/mcp_server_stdio_v4.js",
6
6
  "type": "module",
7
7
  "bin": {
@@ -10,9 +10,7 @@
10
10
  "scripts": {
11
11
  "start": "node src/mcp_server_stdio_v4.js",
12
12
  "dev": "nodemon src/mcp_server_stdio_v4.js",
13
- "prepare": "echo 'NPX ready: npx poker-mcp'",
14
- "start:custom": "POKER_WORK_DIR=/path/to/project node src/mcp_server_stdio_v4.js",
15
- "start:windows": "set POKER_WORK_DIR=C:\\MyProject && node src/mcp_server_stdio_v4.js"
13
+ "prepare": "echo 'NPX ready: npx poker-mcp'"
16
14
  },
17
15
  "keywords": [
18
16
  "mcp",
@@ -28,10 +26,17 @@
28
26
  "physics",
29
27
  "validation",
30
28
  "npx",
31
- "point-kernel"
29
+ "point-kernel",
30
+ "collision-detection",
31
+ "daughter-nuclide"
32
32
  ],
33
33
  "author": "Yoshihiro Hirao <tora@pointkernel.com>",
34
34
  "license": "ISC",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/Hirao-Y/poker_mcp.git"
38
+ },
39
+ "homepage": "https://github.com/Hirao-Y/poker_mcp#readme",
35
40
  "engines": {
36
41
  "node": ">=18.0.0"
37
42
  },
@@ -43,6 +48,8 @@
43
48
  },
44
49
  "files": [
45
50
  "src/",
46
- "README.md"
51
+ "data/",
52
+ "README.md",
53
+ ".mcp.json"
47
54
  ]
48
55
  }
@@ -10,10 +10,29 @@ export function createCalculationHandlers(taskManager) {
10
10
  return {
11
11
  async executeCalculation(args) {
12
12
  try {
13
- // 環境変数で設定されたYAMLファイルを使用
14
- const yamlFile = taskManager.dataManager.yamlFile;
15
-
16
- logger.info('Using YAML file from environment variables', { yamlFile });
13
+ // 引数検証
14
+ if (!args.yaml_file) {
15
+ throw new ValidationError('YAML file is required', 'yaml_file', args.yaml_file);
16
+ }
17
+
18
+ // 絶対パス形式の事前チェック(詳細検証はサービス層で実行)
19
+ const absolutePathPattern = /^([a-zA-Z]:[\\\/]|\/)/;
20
+ if (!absolutePathPattern.test(args.yaml_file)) {
21
+ throw new ValidationError(
22
+ 'YAML file must be specified with absolute path. Examples: C:\\path\\to\\file.yaml or /path/to/file.yaml',
23
+ 'yaml_file',
24
+ args.yaml_file
25
+ );
26
+ }
27
+
28
+ // YAML拡張子チェック
29
+ if (!args.yaml_file.match(/\.(yaml|yml)$/i)) {
30
+ throw new ValidationError(
31
+ 'YAML file must have .yaml or .yml extension',
32
+ 'yaml_file',
33
+ args.yaml_file
34
+ );
35
+ }
17
36
 
18
37
  // サマリーオプション検証
19
38
  const summaryOptions = args.summary_options || {};
@@ -27,8 +46,8 @@ export function createCalculationHandlers(taskManager) {
27
46
  const resolvedOutputFiles = {};
28
47
 
29
48
  if (Object.keys(outputFiles).length > 0) {
30
- // 環境変数YAMLファイルのディレクトリを取得
31
- const inputDir = path.dirname(yamlFile);
49
+ // 入力YAMLファイルのディレクトリを取得
50
+ const inputDir = path.dirname(args.yaml_file);
32
51
 
33
52
  // 各出力ファイルの絶対パス化
34
53
  for (const [key, fileName] of Object.entries(outputFiles)) {
@@ -58,7 +77,7 @@ export function createCalculationHandlers(taskManager) {
58
77
  // 出力ファイル検証(従来の検証は不要、上記で実施済み)
59
78
 
60
79
  logger.info('Starting radiation shielding calculation', {
61
- yamlFile,
80
+ yamlFile: args.yaml_file,
62
81
  summaryOptions,
63
82
  outputFiles: outputFiles,
64
83
  resolvedOutputFiles
@@ -66,7 +85,7 @@ export function createCalculationHandlers(taskManager) {
66
85
 
67
86
  // 計算実行(統合検証付き、絶対パス化済みの出力ファイルパスを使用)
68
87
  const result = await calculationService.executeWithValidation(
69
- yamlFile,
88
+ args.yaml_file,
70
89
  summaryOptions,
71
90
  resolvedOutputFiles, // 絶対パス化済み
72
91
  undefined, // timeout(デフォルト値を使用)
@@ -76,7 +95,7 @@ export function createCalculationHandlers(taskManager) {
76
95
  // 事前検証で重大エラーが検出された場合の処理
77
96
  if (result.success === false && result.stage === 'pre_validation') {
78
97
  logger.error('Pre-calculation validation failed', {
79
- yamlFile,
98
+ yamlFile: args.yaml_file,
80
99
  criticalErrors: result.criticalErrors
81
100
  });
82
101
 
@@ -92,10 +111,10 @@ export function createCalculationHandlers(taskManager) {
92
111
  category: 'pre_validation_error',
93
112
  recoverable: true,
94
113
  suggestions: [
95
- 'Resolve geometry collisions if detected',
96
114
  'Check daughter nuclide configurations',
97
- 'Review enhanced validation warnings',
98
- 'Ensure all bodies, zones, and sources are properly defined'
115
+ 'Review material definitions',
116
+ 'Ensure all required parameters are properly defined',
117
+ 'Note: Geometry collisions will not block calculation'
99
118
  ]
100
119
  }
101
120
  };
@@ -109,7 +128,7 @@ export function createCalculationHandlers(taskManager) {
109
128
  success: true,
110
129
  message: 'Radiation shielding calculation completed successfully',
111
130
  calculation: {
112
- input_file: yamlFile,
131
+ input_file: args.yaml_file,
113
132
  execution_time_ms: result.executionTime,
114
133
  timestamp: result.summary.timestamp,
115
134
  options: result.summary.options
@@ -142,7 +161,7 @@ export function createCalculationHandlers(taskManager) {
142
161
  }
143
162
 
144
163
  logger.info('Calculation completed successfully', {
145
- yamlFile,
164
+ yamlFile: args.yaml_file,
146
165
  executionTime: result.executionTime,
147
166
  outputFiles: Object.keys(fileVerification).filter(k => k !== 'allFilesGenerated')
148
167
  });
@@ -151,7 +170,7 @@ export function createCalculationHandlers(taskManager) {
151
170
 
152
171
  } catch (error) {
153
172
  logger.error('executeCalculation handler error', {
154
- yamlFile: taskManager.dataManager.yamlFile,
173
+ args,
155
174
  error: error.message,
156
175
  errorType: error.constructor.name
157
176
  });