Skip to content

feat(setup): add first-class Bionic support - #13

Closed
TimofeySukh wants to merge 1 commit into
mainfrom
codex/bionic-support
Closed

TimofeySukh wants to merge 1 commit into
mainfrom
codex/bionic-support

Conversation

@TimofeySukh

Copy link
Copy Markdown

Summary

  • add bionic as a first-class Summer setup and skills target
  • publish the public LM Studio MCP discovery entry and support native Bionic user/project Agent Skills
  • bind project-scope Bionic connections with cwd and SUMMER_ENGINE_PROJECT
  • add capability-gated MCP Roots routing with safe rebinding and race protection
  • document current Bionic project-context limitations and the recommended setup flow

Local verification

  • npm run build
  • npm test — 50 files, 452 tests passed
  • bash scripts/smoke-test.sh — 36 passed, 0 failed
  • git diff --check
  • independent read-only review completed with no remaining findings

Important Bionic behavior

Bionic 1.0.7 and 1.0.9 do not advertise MCP Roots or pass the active Code Project to global MCP processes. The recommended project-scope setup therefore writes a static cwd and SUMMER_ENGINE_PROJECT; users should rerun setup when switching games.

Rebased onto v3.0.0. Ports the original change (168dc50) onto the v3
layout: agent-config and version-check under src/installer/, setup and
skills commands under src/cli/commands/, the skills install location
under src/installer/skill-locations.ts, AGENT_CLIENTS under
src/core/skills-registry.ts, the CLI intro under src/cli/index.ts, and
engine imports from src/lib/ -> src/core/. Bionic is also mapped as a
v3 integration: integrations/bionic/ (README + empty manifest-target)
plus a row in integrations/README.md and MANIFEST_TARGETS. The
skills-registry per-skill clients concept was deleted at the v3 cutover
(skills are agent-agnostic now), so only the AGENT_CLIENTS containment
test was carried over. The v3 getClient keeps its opt-in headless
routing block inside the new selection race-gate loop.
@TimofeySukh

Copy link
Copy Markdown
Author

Rebased onto v3.0.0 (main @ 11cc6a3) and force-pushed to codex/bionic-support. One commit, same message as the original (feat(setup): add first-class Bionic support), with the v3 port recorded in the body.

What was ported where

Bionic first-class agent (all of the original, no logic changes):

  • src/installer/agent-config.ts (was src/lib/agent-config.ts): bionic in supportedAgents, the four aliases (bionic, lm-bionic, lm-studio-bionic, lmstudiobionic), StdioMcpServerConfig.cwd, the project-scope static binding (cwd + SUMMER_ENGINE_PROJECT pinned to the game dir), the "statically bound" warnings (both the override and the default ~/.lmstudio/mcp.json path), SUMMER_BIONIC_CONFIG_FILE override, and the Bionic next-step ("Open Bionic Settings > Connected Apps…"). Wording is byte-identical to the PR.
  • src/cli/commands/setup.ts (was src/commands/setup.ts): AGENT_LABEL["bionic"]. The PR's --scope forwarding to the skills installer is already generic in v3 (src/installer/setup.ts passes --scope for every agent), so no bionic-specific branch was needed — the smoke check summer setup bionic forwards project skill scope still verifies the behavior end to end.
  • src/cli/commands/skills.ts (was src/commands/skills.ts): agentLabel bionic case + the printInstallSummary "Open Bionic Settings > Skills" line.
  • src/installer/skill-locations.ts (new home of resolveInstallLocation): bionic case — ~/.lmstudio/skills (user) / .agents/skills under cwd (project), exactly as the PR wrote it.
  • src/installer/version-check.ts (was src/lib/version-check.ts): Bionic marker candidate ~/.lmstudio/skills in defaultSkillMarkerCandidates (doctor's skills-version check now scans it).
  • src/core/skills-registry.ts (was src/lib/skills-registry.ts): AGENT_CLIENTS gains bionic.
  • src/cli/index.ts (the v2 src/bin/summer.ts intro moved here): Bionic added to the setup-wizard agent line.
  • MCP Roots: src/mcp/client-roots.ts + its 192-line test ported as-is (import adapted ../lib/engine.js../core/engine.js). It is a standalone, capability-gated additive feature and does not clash with v3's session-to-project binding (identity_mismatch) or single-flight headless routing — the roots resolution picks which project the selection points at, the identity guard then protects it. Explicit CLI/env binding still wins; ambiguous roots fail closed.
  • Server race-gate: src/mcp/server.ts gets the PR's full selection race protection — engineSelectionError, engineSelectionReady/queueMcpEngineSelectionRefresh gate, generation counters, in-flight-connect discard, and the roots wiring in startMcpServer (explicit-selection gate, cwd_fallback, mcp:roots logging). The 121-line server.selection-race.test.ts ports with it (mock path adapted). v3's opt-in SUMMER_HEADLESS_ROUTING block is preserved inside the gate loop, so it also waits for a settled selection.
  • Tests: all 4 agent-config tests (aliases, fresh config shape, idempotency + preserve-unrelated, static project binding), the version-check marker test, and the AGENT_CLIENTS containment test — 18 net-new tests, all green.
  • Docs: docs/BIONIC.md verbatim; docs/SETUP_PROMPT.md, docs/SKILLS.md auto-merged (bionic + kilo-code list fixes); docs/OVERVIEW.md (glue sentence + the bionic skills-table row); CHANGELOG.md Unreleased section; README.md union (bionic in the three agent lists, the lm-studio-MCP-only vs bionic-skills distinction, the Bionic enable note, the docs link); package.json (description + bionic/lm-studio keywords; version kept at main's 3.0.0).
  • Smoke test: all 4 Bionic checks ported onto the v3 script and passing.
  • v3 integration map (new convention): integrations/bionic/ (README documenting what setup writes + empty manifest-target.json), bionic: [] in scripts/generate-registry/targets.ts MANIFEST_TARGETS (the parity test requires folder ↔ key lockstep), and a bionic row in integrations/README.md.

Exclusions (follow-ups, not lost work)

  1. docs/DEVELOPMENT.md edit dropped: the PR edited the "setup targets wire MCP into …" sentence, which v3 removed from that file entirely. The equivalent content now lives in docs/OVERVIEW.md (updated) and integrations/README.md (updated). Nothing Bionic-specific is lost; restoring the sentence in DEVELOPMENT.md would be new placement invented by me, so I left it out.
  2. Per-skill clients test dropped: the PR's skills-registry.test.ts also asserted every public skill's clients array includes bionic. The per-skill clients concept was deleted at the v3 cutover — skills are agent-agnostic and install for every AGENT_CLIENTS agent — so the assertion has no target. The AGENT_CLIENTS containment half was ported.
  3. README per-harness "Bionic" section dropped: v3 removed the per-harness install sections from the README (the agent map lives in integrations/README.md and the full guide in docs/BIONIC.md, both carried). The PR's README landing-page paragraph edit likewise had no target sentence; the bionic listing was added to the current agent lists instead.
  4. skills/README.md + src/lib/skills-registry.ts (modify/delete): both deleted on main, changes moot.
  5. No registry commit needed: npm run generate:registry produces zero diff (no library/ content changed in this PR).

Verification (all run on the rebased branch, after npm run build)

  • npx tsc --noEmit — pass
  • npx vitest run1467 passed, 10 skipped, 0 failed (104 files; main is 1449 — the +18 are this PR's tests)
  • npm run validate:library — 208 resources valid, 0 errors (pre-existing hints unchanged)
  • npm run eval:routing -- --check (CI parity gate) — PASS, no regression vs baseline
  • bash scripts/smoke-test.sh (not in CI) — 35 passed, 0 failed, 1 skipped (the skip is the engine-dependent block: no running Summer Engine in the sandbox). All four Bionic checks pass: bionic mcp config write, project-scope cwd+SUMMER_ENGINE_PROJECT binding, setup --scope project forwarding, and bionic skills install.
  • npm run generate:registry — no drift.

One thing a reviewer should know: the smoke test runs against a headless environment, so the Bionic app itself was not exercised (no Bionic install exists in CI) — the same is true of every other agent the smoke script covers; what is verified is everything Summer writes and every code path around it.

@TimofeySukh

Copy link
Copy Markdown
Author

Parked for now (owner decision 2026-09-11): Bionic support is deprioritized — the repo has since moved to the 3.1.0 agent-table architecture and this branch (built for the older hardcoded-maps layout) no longer ports mechanically. The branch and the earlier v3.0.0 port (c255633) are preserved here; if/when Bionic becomes a priority again, re-register it as an agent-table entry following the latest integration pattern. Not blocked on anything technical — just not worth the port effort right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant