feat: simplify install + upgrade — self-contained wheel, c3-mcp entry point, c3 upgrade (v2.36.0)#16
Merged
Merged
Conversation
… point, c3 upgrade (v2.36.0) Self-contained wheel: moved guide/ to cli/guide/ and ship it as package data; added a /guide route to the per-project UI and the Hub, so a pure pip install includes the in-app docs (previously source-only). .mcp.json (plus project + global Codex/Gemini configs) now use the installed c3-mcp entry point instead of an absolute path into the source checkout, so upgrades need no per-project reconfiguration. Falls back to the source script when run from a checkout with no console script. Added c3 upgrade (+ --check) with source/editable-install detection, a version-skew notice on c3 init, and a throttled VersionCheckAgent that nudges when a newer PyPI release exists (opt-out via agents.VersionCheck). c3 with no args now launches the TUI from the entry point. Docs: README leads with pipx + documents c3 upgrade and a dev install; install.bat/install.sh gained pipx/PyPI + c3 upgrade guidance. Tests: +15 (guide route/colocation, install-mcp entry point, c3 upgrade, version compare, VersionCheckAgent). Full suite 404 passing; ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR streamlines installation and upgrades by making the PyPI wheel self-contained (including the in-app guide), wiring projects to a stable c3-mcp entry point so upgrades don’t require per-project config edits, and adding c3 upgrade + a background version nudge.
Changes:
- Bundle and serve the in-app guide from the installed package (
/guide/*) in both per-project UI and Hub. - Update MCP install wiring to prefer the installed
c3-mcpentry point (fallback to source script), plus addc3 upgradeand aVersionCheckAgent. - Update docs/install scripts and bump version to
v2.36.0with accompanying tests and changelog entry.
Reviewed changes
Copilot reviewed 14 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_upgrade_and_version.py | Adds coverage for version tuple parsing, c3 upgrade, and VersionCheckAgent throttling/notifications. |
| tests/test_install_mcp_entrypoint.py | Verifies install-mcp writes c3-mcp when available and falls back to source invocation. |
| tests/test_hub_server_smoke.py | Adds smoke tests for guide colocation and /guide/* routing behavior. |
| services/agents.py | Introduces version resolution helpers and VersionCheckAgent; registers it in create_agents(). |
| README.md | Updates installation/upgrade docs to a PyPI-first flow and documents c3 upgrade. |
| pyproject.toml | Bumps version and adjusts packaging so cli/guide/* ships in wheels; updates ruff excludes. |
| install.sh | Updates installer messaging and help to reflect PyPI/pipx installs and c3 upgrade. |
| install.bat | Updates help text to include c3 upgrade and new guide path references. |
| core/config.py | Adds defaults for BranchWatch and VersionCheck in AGENT_DEFAULTS. |
| cli/server.py | Adds /guide/ route to serve bundled guide assets from cli/guide. |
| cli/hub_server.py | Adds /guide/ route to serve bundled guide assets from cli/guide. |
| cli/guide/index.html | Adds bundled in-app guide homepage. |
| cli/guide/getting-started.html | Adds bundled in-app “Getting Started” documentation page. |
| cli/guide/workflow.html | Adds bundled workflow guide page (includes diagram rendering code). |
| cli/guide/tools.html | Adds bundled tool reference documentation page. |
| cli/guide/shared.css | Adds shared styling for the bundled guide pages. |
| cli/guide/oracle.html | Adds bundled Oracle Discovery API guide page. |
| cli/guide/bitbucket.html | Adds bundled Bitbucket integration guide page. |
| cli/commands/parser.py | Adds upgrade subcommand and --check flag to the CLI parser. |
| cli/c3.py | Bumps version, adds version skew notice, implements c3 upgrade, switches bare c3 to launch the TUI, and updates MCP config writing to prefer c3-mcp. |
| CHANGELOG.md | Adds a 2.36.0 entry describing install/upgrade simplifications and new behaviors. |
| The recommended install is [pipx](https://pipx.pypa.io) (isolated environment, on your PATH): | ||
|
|
||
| ```bash | ||
| pipx install code-context-control |
| ``` | ||
|
|
||
| The interactive setup walks you through: | ||
| Running `c3` with no arguments opens the interactive TUI. `c3 init` walks you through: |
| if mcp_mode != "proxy": | ||
| _found = shutil.which("c3-mcp") | ||
| if _found: | ||
| c3_mcp_exe = Path(_found).resolve().as_posix() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes a pure
pip/pipxinstall of C3 self-contained, and makes upgrading a no-op for existing projects — no per-project reconfiguration. This is the install-simplification work (proposal tiers 1–5) on top of v2.35.0.What changed
Self-contained wheel (Tier 1)
guide/→cli/guide/and ship it as package data; previously the in-app guide existed only in a source checkout (the wheelexcluded it)./guide/<page>route to the per-project UI (cli/server.py) and the Hub (cli/hub_server.py), so the guide works from an installed package and the existingdocs.htmllink resolves..mcp.jsondecoupled from the source path (Tier 2)install-mcpnow writes the installedc3-mcpentry point (resolved viashutil.which) for the Claude.mcp.json, the Codex TOML, and the project + global Codex/Gemini session configs. Upgrading relocates nothing in any project's config.python <source>/cli/mcp_server.pywhen run from a checkout with no installed console script.PyPI-canonical install + entry point (Tier 3)
c3with no args launches the TUI fromcli.c3:main(the console entry point now fully replaces thec3.batwrapper).pipx install code-context-control, documents upgrades, and adds a contributorpip install -e ".[dev]"path.Upgrade UX (Tier 4)
c3 upgrade(+--check): in-placepip -Uwithin the running interpreter (pip & pipx); detects source/editable installs and points them atgit pull.c3 initfor projects set up by an older C3.VersionCheckAgent: once-a-day, best-effort PyPI nudge; opt-out viaagents.VersionCheck.Installer slimming (Tier 5)
install.sh/install.batgained pipx/PyPI guidance andc3 upgradein their help.~/.c3lazy-init confirmed already handled in code (ProjectManager/ hub writersmkdiron demand).BranchWatch+VersionCheckinAGENT_DEFAULTS.Deliberate scope calls
c3 init . --force), not silent auto-migration.install.batgot targeted help edits, not a flow rewrite — an interactive batch script can't be safely run/tested in CI; the now-redundant wrapper/data-dir steps remain for a future Windows-validated cleanup.Tests
+15 (
guide route/colocation, install-mcp entry point,c3 upgrade, version compare,VersionCheckAgent), all network/subprocess mocked. Full suite 404 passing, ruff clean. Wheel build verified to includecli/guide/*.Release
Bumps to v2.36.0 (
pyproject.toml+cli/c3.py); CHANGELOG updated. Taggingv2.36.0after merge triggers the automated PyPI publish + GitHub release viarelease.yml.🤖 Generated with Claude Code