MCPcopy
hub / github.com/MinishLab/semble / _apply

Function _apply

src/semble/installer/installer.py:164–178  ·  view source on GitHub ↗

Execute install or uninstall for all chosen agents and integrations, printing results.

(mode: Mode, agents: list[AgentTarget], integrations: list[_Integration])

Source from the content-addressed store, hash-verified

162
163
164def _apply(mode: Mode, agents: list[AgentTarget], integrations: list[_Integration]) -> None:
165 """Execute install or uninstall for all chosen agents and integrations, printing results."""
166 print()
167 for agent in agents:
168 print(f" {_BOLD}{agent.display_name}{_RESET}")
169 for integ in integrations:
170 result = integ.apply(agent, mode)
171 if result is None:
172 print(f" {_DIM}– {integ.id}: not supported{_RESET}")
173 continue
174 ok = result.action in ("created", "updated", "removed", "unchanged")
175 detail = _ACTION_DETAIL.get(result.action, "")
176 suffix = f" — {detail}" if detail else ""
177 print(f" {_tick(ok)} {integ.id} ({result.action}){suffix} → {result.path}")
178 print()
179
180
181def run(mode: Mode) -> None:

Callers 1

runFunction · 0.85

Calls 2

_tickFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected