Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions e2e/bub/tests/test_harbor_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,13 @@ def test_harbor_acp_runner_completes_a_prompt_with_the_pinned_client_sdk(tmp_pat

def test_codex_plugin_accepts_the_server_url_the_harness_writes(monkeypatch, tmp_path: Path) -> None:
# The plugin validates its .mcp.json strictly, so load the rewritten copy with the plugin's own settings.
for name in ("settings.py", "powercontext_client_config.py", ".mcp.json"):
for name in ("settings.py", ".mcp.json"):
shutil.copy2(_CODEX_PLUGIN / name, tmp_path / name)
shutil.copytree(
_CODEX_PLUGIN / "powercontext_lifecycle",
tmp_path / "powercontext_lifecycle",
ignore=shutil.ignore_patterns("__pycache__"),
)
server_url = "http://host-gateway:8000"
subprocess.run( # noqa: S603 - fixed interpreter and arguments
[sys.executable, "-c", MCP_URL_REWRITE, str(tmp_path / ".mcp.json"), plugin_mcp_url(server_url)],
Expand All @@ -156,7 +161,7 @@ def test_codex_plugin_accepts_the_server_url_the_harness_writes(monkeypatch, tmp
monkeypatch.setenv("POWERCONTEXT_CLIENT_CONFIG_FILE", str(tmp_path / "clients.json"))
monkeypatch.setenv("POWERCONTEXT_CODEX_ALLOW_INSECURE_HTTP", "true")
monkeypatch.syspath_prepend(str(tmp_path))
for module in ("settings", "powercontext_client_config"):
for module in ("settings", "powercontext_lifecycle", "powercontext_lifecycle.client_config"):
monkeypatch.delitem(sys.modules, module, raising=False)

plugin_settings = importlib.import_module("settings")
Expand Down
174 changes: 0 additions & 174 deletions integrations/claude-code/plugins/powercontext/bootstrap_state.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2026 OceanBase.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""What the shared lifecycle modules need to know about Claude Code."""

from powercontext_lifecycle.bootstrap_state import BootstrapState
from powercontext_lifecycle.diagnostics import DiagnosticThrottle
from powercontext_lifecycle.host_profile import HostProfile

CLAUDE_CODE = HostProfile(
integration="claude-code",
user_agent="powercontext-claude-code-plugin/0.1.3",
component="powercontext.claude_code",
diagnostics=DiagnosticThrottle(state_file="claude-code-diagnostics.json"),
bootstrap_state=BootstrapState(
directory_variable="POWERCONTEXT_CLAUDE_BOOTSTRAP_STATE_DIR",
plugin_data_variable="CLAUDE_PLUGIN_DATA",
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from pathlib import Path
from urllib.parse import urlsplit, urlunsplit

from powercontext_client_config import load_client_settings, parse_boolean, resolve_allow_insecure_http
from powercontext_lifecycle.client_config import load_client_settings, parse_boolean, resolve_allow_insecure_http

# Kept in lockstep with powercontext.transport.LOOPBACK_HOSTS; the plugin ships
# isolated and cannot import powercontext.
Expand Down
110 changes: 0 additions & 110 deletions integrations/claude-code/plugins/powercontext/hooks/diagnostics.py

This file was deleted.

Loading
Loading