Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e9208c7
スキルを更新
ryuring Jun 20, 2026
0fa1d56
スキルを更新
ryuring Jun 20, 2026
fdc0bfa
bc-mcpプラグインを追加
ryuring Jun 20, 2026
962dfa9
ユニットテストへの影響を調整
ryuring Jun 21, 2026
68b4c65
コアプラグインコンバートスキルを更新
ryuring Jun 21, 2026
cae7231
Merge branch '5.4.x' into dev-agentic
ryuring Jun 21, 2026
37638c6
全体テストで BcMcp のテーブルが消失する問題を修正
ryuring Jun 21, 2026
0fde04e
MCPプロキシ統合テストをサーバー起動不可環境でスキップ
ryuring Jun 21, 2026
56c36db
MCP統合テスト: プロセス存在でなく実ポート到達を待つ
ryuring Jun 21, 2026
e182604
MCP統合テスト: 到達不可時は skip でなく失敗させる
ryuring Jun 21, 2026
d7661cb
指示書に外部プロセス依存テストの方針を明記
ryuring Jun 21, 2026
fdab6b5
MCP統合テスト: 到達不可時にサーバー起動ログを失敗メッセージへ出力
ryuring Jun 21, 2026
d09245b
MCP統合テスト: テスト内で BcMcp を有効化してサーバーを起動可能にする
ryuring Jun 21, 2026
2b33d7c
Merge branch '5.3.x' into dev-agentic
ryuring Jun 22, 2026
f3796b7
BcMcp: PHP8.1互換のまま非推奨を解消(抑制なし)
ryuring Jun 23, 2026
e8feb58
スキル更新: 非推奨対応の知見を追記
ryuring Jun 23, 2026
323f353
MCP統合テスト: 子プロセスを test 接続で起動しコマンド未登録を解消
ryuring Jun 23, 2026
85c3e68
MCP統合テスト: 常駐サーバーのリークによるCIハングを解消
ryuring Jun 24, 2026
170ddd6
Merge branch '5.4.x' into dev-agentic
ryuring Aug 12, 2026
5586025
【MCP】ツール実行時のエラーを追跡できるように調整
ryuring Aug 12, 2026
0039f82
MCP SDK を logiscape/mcp-sdk-php v2 に差し替え、2026-07-28 対応の設計書と実装計画を追加
ryuring Aug 12, 2026
b6177ff
MCP リクエストをプロセス内で処理する基盤とテストヘルパを追加
ryuring Aug 12, 2026
990730c
固定ページツールの追加を設計書と実装計画に反映
ryuring Aug 12, 2026
a0ed5c3
McpServer と BlogPostsTool を SDK のツール登録 API へ移植
ryuring Aug 12, 2026
6834e8e
残りの MCP ツールクラスを SDK のツール登録 API へ移植
ryuring Aug 12, 2026
4b02e25
ツール実行テストを移植し、全ツールに outputSchema を宣言
ryuring Aug 12, 2026
f504896
プロキシの内部 HTTP 転送を廃止しプロセス内実行へ切り替え
ryuring Aug 12, 2026
e561689
MCP ネゴシエーション内容のロギングを追加
ryuring Aug 12, 2026
26533eb
常駐 MCP サーバープロセスを廃止し管理画面を情報表示に再構成
ryuring Aug 12, 2026
60cc92b
Modern と Legacy の両世代疎通を検証するテストを追加
ryuring Aug 12, 2026
67155f6
Origin ヘッダ検証と iss パラメータの付与を追加
ryuring Aug 12, 2026
630d86a
MCP 2026-07-28 対応の完了条件を確認して設計書に記録
ryuring Aug 12, 2026
d35032e
Merge branch '5.4.x' into dev-mcp-2026-07-28
ryuring Aug 13, 2026
39ba2ad
固定ページの取得・作成・編集・削除ツールを追加
ryuring Aug 13, 2026
930e54f
Merge branch '5.4.x' into dev-mcp-2026-07-28
ryuring Aug 13, 2026
c5928e1
固定ページツールをサイト指定前提の仕様に変更
ryuring Aug 13, 2026
2fc3a22
固定ページ実装で判明した事実の記述を設計書で訂正
ryuring Aug 13, 2026
636ef27
Merge branch '5.4.x' into dev-mcp-2026-07-28
ryuring Aug 14, 2026
817e7bc
outputSchema の型指定を仕様に適合させ、getPages の戻り値形式を統一
ryuring Aug 14, 2026
9093cde
README を現在の実装に合わせて修正
ryuring Aug 16, 2026
8b892e7
bc-mcp のスコープと方針を定義し、実装計画を作成
ryuring Aug 16, 2026
8143d00
認証と権限を通らない stdio 経路を削除
ryuring Aug 16, 2026
09f6dba
スコープ外の search / fetch とチャンクアップロードを削除
ryuring Aug 16, 2026
bfbd8c5
isFileUploadable() のチャンクファイル名判定を削除
ryuring Aug 16, 2026
8b9df20
ツール注釈の定数と全数検証テストを追加
ryuring Aug 16, 2026
c67a6f9
bc-mcp の全51ツールにアノテーションを宣言
ryuring Aug 16, 2026
029c238
カスタムコンテンツのツールに注釈を宣言し、keyword を公開
ryuring Aug 16, 2026
16461ac
README をスコープ整理後の実態に合わせる
ryuring Aug 17, 2026
b21cbf9
README のレビュー指摘に対応する
ryuring Aug 17, 2026
99219ae
isFileUploadable() 変更に伴うeditBlogPost/addBlogPost/カスタムエントリーの棚卸し漏れを修正
ryuring Aug 17, 2026
229e395
addBlogPostのI-2回帰テストが投稿者未指定エラーで空振りしていたのを修正
ryuring Aug 17, 2026
6eef148
使われなくなった BC_CONNECTION による接続切替を削除
ryuring Aug 17, 2026
12b52d6
ツール注釈の全数テストが余分な項目も検出するよう修正
ryuring Aug 17, 2026
b016e37
editBlogPost のアイキャッチ差し替え成功をテストする
ryuring Aug 17, 2026
093e018
カスタムフィールドの型判定を読み込み済みの links から引く
ryuring Aug 17, 2026
d0a7228
Merge branch '5.4.x' into dev-agentic
ryuring Aug 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .agents/skills/php-migration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,19 @@ $code = str_increment($code);
`__serialize()` / `__unserialize()` を使う(PHP7 互換が不要なら移行)。

### 6. `$http_response_header` の非推奨
スーパーグローバル `$http_response_header` が非推奨。`http_get_last_response_headers()` を使う。**※ `http_get_last_response_headers()` は 8.4+。8.1 維持中は `$http_response_header` のまま据え置く。**
スーパーグローバル `$http_response_header` が 8.5 で非推奨。`http_get_last_response_headers()` を使う。**※ `http_get_last_response_headers()` は 8.4+** なので、8.1 互換を維持するなら**素朴な置換は不可**(8.1〜8.3 で undefined function の fatal になる)。
- **8.1〜8.5 を一度に満たす互換パターン**(推奨): 関数があれば使い、無ければ従来のスーパーグローバルにフォールバックする。8.5 では関数経由になるので非推奨を回避でき、8.1〜8.3 では関数が無いので `if` を素通りし、その下の `isset($http_response_header)`(直前の `file_get_contents` 等が設定するスーパーグローバル)を読む——どのバージョンでも fatal にならない。
```php
// file_get_contents() 等の HTTP 取得直後
if (function_exists('http_get_last_response_headers')) { // 8.4+
$http_response_header = http_get_last_response_headers();
}
if (isset($http_response_header)) { // 8.1〜8.3 は従来のスーパーグローバルを参照
foreach ($http_response_header as $header) { /* Content-Type 抽出等 */ }
}
```
- **症状**: 8.5+テスト(`Error.errorLevel = E_ALL`)では、このスーパーグローバル参照の非推奨が顕在化し、ファイル取得系を通るテストが不安定化・失敗することがある(baserCMS 実績: `BcMcp\Mcp\BaseMcpTool` の URL 画像取得で Content-Type 判定に使用)。
- 単純に「8.1 維持中は据え置き」でも 8.5 では警告のみで動作はするが、テストを通すなら上記の互換パターンで解消する方が確実。

### 7. バッククォート演算子の非推奨
`` `command` ``(`shell_exec()` のエイリアス)が非推奨。`shell_exec()` を直接使う。
Expand Down
5 changes: 5 additions & 0 deletions .github/instructions/basercms.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ baserCMSの開発についての指示をまとめたものです。
- プラグインが見つからない場合は `BcUtil::includePluginClass()` を利用。
- APIテストは `/baser/api/admin/baser-core/users/login.json` で認証→トークン取得→各API呼び出し。
- CI/CDはGitHub Actions(`test.yml`)で自動化。主要コマンドは `composer install`、`docker compose up`。
- **外部プロセス(MCPサーバー等)に依存するテストの方針**:
- 必要なプロセスは**該当テスト側で起動**し、`setUp` 全体ではなく**それを要する個別テストの先頭**でガードする(他テストに起動待ちを波及させない)。
- 起動判定は「プロセスの存在(pidファイル)」だけで済ませない。**プロキシ等が実際に接続する先(例 `127.0.0.1:{port}`)へ到達できるまで待つ**(`fsockopen` 等でポーリング、最大十数秒)。プロセス起動直後はポートの bind が間に合わず接続拒否=500 になり、CI でのみ失敗する典型。
- **到達できない場合は `markTestSkipped` で隠さず、`assertTrue` 等で明示的に失敗させる**。スキップはサーバー起動の不具合を握りつぶし CI を緑にしてしまうため不可。「外部プロセスが動いていること」も統合テストの検証対象とみなす。
- 実装例: `plugins/bc-mcp/tests/TestCase/Controller/Admin/OAuth2ControllerTest.php` の `requireMcpServer()`。

## コーディング規約・パターン
- クラスに新メソッド追加時は「必ず最後」に追加。
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/split_monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
split_repository: 'bc-installer'
- local_path: 'bc-mail'
split_repository: 'bc-mail'
- local_path: 'bc-mcp'
split_repository: 'bc-mcp'
- local_path: 'bc-search-index'
split_repository: 'bc-search-index'
- local_path: 'bc-seo'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ yarn-error.log
!/plugins/BcColumn
!/plugins/bc-seo
!/plugins/bc-burger-editor
!/plugins/bc-mcp
/plugins/*/vendor
/plugins/*/composer.lock
/profile/*
Expand Down Expand Up @@ -121,6 +122,7 @@ node_modules
/webroot/bc_installer
/webroot/bc_custom_content
/webroot/bc_burger_editor
/webroot/bc_mcp
/webroot/bc_spa_sample
/webroot/debug_kit
/webroot/.gitignore
Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ext-gd": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-pdo": "*",
"ext-sqlite3": "*",
"ext-zip": "*",
Expand All @@ -20,9 +21,13 @@
"ezyang/htmlpurifier": "~4.19.0",
"firebase/php-jwt": "~7.0.2",
"josegonzalez/dotenv": "~4.0.0",
"league/oauth2-server": "^8.5",
"logiscape/mcp-sdk-php": "^2.0",
"mobiledetect/mobiledetectlib": "~3.74.4",
"psr/http-message": "^1.0",
"robmorgan/phinx": "0.16.10"
"nyholm/psr7": "~1.8.2",
"psr/http-message": "~1.1",
"robmorgan/phinx": "0.16.10",
"symfony/psr-http-message-bridge": "~2.3.1"
},
"require-dev": {
"ext-xdebug": "*",
Expand All @@ -47,6 +52,7 @@
"baserproject/bc-front": "5.4.x",
"baserproject/bc-installer": "5.4.x",
"baserproject/bc-mail": "5.4.x",
"baserproject/bc-mcp": "5.4.x",
"baserproject/bc-plugin-sample": "5.4.x",
"baserproject/bc-search-index": "5.4.x",
"baserproject/bc-seo": "5.4.x",
Expand Down Expand Up @@ -77,6 +83,7 @@
"BcFront\\": "plugins/bc-front/src/",
"BcInstaller\\": "plugins/bc-installer/src/",
"BcMail\\": "plugins/bc-mail/src/",
"BcMcp\\": "plugins/bc-mcp/src/",
"BcPluginSample\\": "plugins/BcPluginSample/src/",
"BcSearchIndex\\": "plugins/bc-search-index/src/",
"BcSeo\\": "plugins/bc-seo/src/",
Expand All @@ -99,6 +106,7 @@
"BcFavorite\\Test\\": "plugins/bc-favorite/tests/",
"BcInstaller\\Test\\": "plugins/bc-installer/tests/",
"BcMail\\Test\\": "plugins/bc-mail/tests/",
"BcMcp\\Test\\": "plugins/bc-mcp/tests/",
"BcSearchIndex\\Test\\": "plugins/bc-search-index/tests/",
"BcSeo\\Test\\": "plugins/bc-seo/tests/",
"BcThemeConfig\\Test\\": "plugins/bc-theme-config/tests/",
Expand Down
Loading
Loading