Summary
Extend rock.sdk.mcp.McpEnv to consume ScaffoldHub EnvLifecycleFactory and orchestrate environment lifecycles within the existing ROCK runtime flow.
Scope
- construct registered environment lifecycles by MCP server key
- inject the ROCK sandbox and start environment lifecycles before the user before_launch hook
- make McpEnv.is_alive(key: str | None = None) asynchronous and aggregate lifecycle status without short-circuiting
- release environment lifecycles before runtime/auth cleanup while preserving cleanup and error-priority semantics
- update the optional mcp dependency only after an actual ScaffoldHub release containing EnvLifecycle is available
Acceptance criteria
- unit tests cover construction, start order/config, async liveness, release order, cleanup continuation, and error propagation
- existing MCP integration tests collect with awaited is_alive calls
- relevant Ruff checks pass
- PR references this issue
Dependency
ScaffoldHub feature/env-lifecycle must provide EnvLifecycle, EnvLifecycleFactory, and GoogleSheetsEnvLifecycle under the fixed google_sheet server key.
Summary
Extend rock.sdk.mcp.McpEnv to consume ScaffoldHub EnvLifecycleFactory and orchestrate environment lifecycles within the existing ROCK runtime flow.
Scope
Acceptance criteria
Dependency
ScaffoldHub feature/env-lifecycle must provide EnvLifecycle, EnvLifecycleFactory, and GoogleSheetsEnvLifecycle under the fixed google_sheet server key.