feat: adding http-mcp and opencode plugin extension for seamless integration

This commit is contained in:
Apunkt 2026-05-28 10:38:10 +02:00
parent 5da28062b9
commit 4f6b91aef8
No known key found for this signature in database
6 changed files with 780 additions and 1 deletions

View file

@ -741,6 +741,15 @@ def dispatch(store: MemoryStore, method: str, params: dict) -> dict:
# wake_depth knob reaches the assembler.
from iai_mcp.session import assemble_session_start, SessionStartPayload
sid = params.get("session_id", "-")
# D5-02 per-call wake_depth override: a caller (e.g. the HTTP adapter
# serving session-context for system-prompt injection) can request
# standard/deep content WITHOUT mutating the global profile knob.
# Invalid/absent values fall back to the per-process profile state.
profile_state = _profile_state
wd_override = params.get("wake_depth")
if wd_override in ("minimal", "standard", "deep"):
profile_state = dict(_profile_state or {})
profile_state["wake_depth"] = wd_override
records_count = store.count_rows("records")
if records_count == 0:
empty = SessionStartPayload(
@ -756,7 +765,7 @@ def dispatch(store: MemoryStore, method: str, params: dict) -> dict:
payload = assemble_session_start(
store, assignment, rc,
session_id=sid,
profile_state=_profile_state,
profile_state=profile_state,
)
return _payload_to_json(payload)