()
| 382 | |
| 383 | |
| 384 | def _find_plugin_root() -> Path | None: |
| 385 | for current in [Path(__file__).resolve().parent, *Path(__file__).resolve().parents]: |
| 386 | if (current / ".codex-plugin" / "plugin.json").exists(): |
| 387 | return current |
| 388 | return None |
| 389 | |
| 390 | |
| 391 | def plugin_metadata() -> dict[str, Any]: |