main
5 次代码提交
| 作者 | SHA1 | 备注 | 提交日期 | |
|---|---|---|---|---|
|
|
d98a6b0ca0 |
Add a native FCC desktop launcher for Windows and macOS (#1225)
## Problem Free Claude Code currently has to remain attached to a terminal, so closing that window stops the proxy and users have no native way to reopen Admin or control the background server. The contributed Windows wrapper also would have introduced a second bundled server lifecycle instead of reusing FCC's cleanup and restart ownership. Fixes #1147. ## Changes | Before | After | | --- | --- | | Users keep `fcc-server` running in a terminal. | Windows and macOS users can launch a console-free FCC Desktop host from a desktop/application shortcut and control it from the tray or menu bar. | | A wrapper would need to spawn and terminate a child server. | The terminal and desktop paths share one in-process supervisor, one graceful runtime shutdown path, and an OS-held singleton lock. | | Installers manage only command entry points. | Windows installs desktop and Start-menu shortcuts; macOS installs a per-user app bundle and owned desktop link; uninstallers remove only those FCC artifacts. | | Desktop behavior had no contract coverage. | Lifecycle, duplicate launch, restart/quit, GUI packaging, Windows shortcuts, macOS bundle creation, quoting, and ownership boundaries are covered alongside the full CI suite. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR adds a native FCC desktop launcher for Windows and macOS. The main changes are: - A shared server supervisor for terminal and desktop launches. - A singleton desktop host with tray or menu-bar controls. - Windows shortcuts and a per-user macOS app bundle. - Ownership checks for launcher installation and removal. - Tests for lifecycle, packaging, shortcuts, and uninstall behavior. </details> <h3>Confidence Score: 5/5</h3> This looks safe to merge. Startup restart requests are reserved before the worker starts. macOS bundle operations verify ownership before modifying or deleting files. Windows shortcut operations verify their targets before replacement or removal. No blocking issues were found in the updated code. <details><summary><h3><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="20" align="absmiddle"></a> T-Rex Logs</h3></summary> **What T-Rex did** - Compared the pre-change contract test results against the parent commit f81af55630aa1adb518b748b9e6985c73c4c4775 and observed 3 failures and 4 passes, indicating the missing scheduled-startup lifecycle contract. - Executed the after-state contract validation with uv run pytest -n 0 tests/cli/test\_desktop.py -q and confirmed the run finished with 7 passes and an exit code of 0. - Verified that no real proxy or native GUI dependency was started during the after-state run. - Inspected the two log artifacts that accompany the proof to corroborate the test outcomes. <a href="https://app.greptile.com/trex/runs/15235588/artifacts"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifactsDark.svg?v=4"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifacts.svg?v=4"><img alt="View all artifacts" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifacts.svg?v=4"></picture></a> <sub><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="14" align="absmiddle"></a> Ran code and verified through T-Rex</sub> </details> <details open><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | src/free_claude_code/cli/commands.py | Adds the shared server supervisor and scheduled-run state for startup restart requests. | | src/free_claude_code/cli/desktop.py | Adds singleton locking and coordinates the tray loop with the server worker. | | scripts/install.sh | Creates the macOS app bundle only when an existing bundle is FCC-owned. | | scripts/uninstall.sh | Removes the macOS launcher only on macOS and only with the expected ownership marker. | | scripts/install.ps1 | Creates Windows shortcuts while preserving shortcuts with unrelated targets. | | scripts/uninstall.ps1 | Removes Windows shortcuts only when their targets match an FCC desktop entry point. | </details> <sub>Reviews (3): Last reviewed commit: ["fix: coalesce desktop startup restarts"](https://github.com/alishahryar1/free-claude-code/commit/b9554729770e08a58818d677de39757c751e760e) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=45925660)</sub> <!-- /greptile_comment --> |
||
|
|
5305bd7e08 |
Remove obsolete init and server alias commands (#1220)
## Problem
FCC still publishes `fcc-init` and the `free-claude-code` server alias
from an obsolete installation flow. Configuration creation now belongs
to the Admin UI, while `fcc-server` owns startup and legacy migration.
## Changes
| Before | After |
| --- | --- |
| The package installs six console commands. | The package installs only
`fcc-server`, `fcc-claude`, `fcc-codex`, and `fcc-pi`. |
| `fcc-init` duplicates configuration creation outside the Admin UI. |
The Admin UI exclusively creates managed configuration, and server
startup retains legacy migration. |
| Smoke contracts and architecture describe the retired commands. |
Smoke contracts and architecture describe the supported command surface.
|
| Installer safety lists contain unexplained retired names. | Installer
safety lists document why retired names remain detectable during updates
and uninstall. |
| The package version is `4.11.4`. | The package version is `4.11.5`. |
<!-- greptile_comment -->
<details open><summary><h3>Greptile Summary</h3></summary>
This PR retires the obsolete initialization command and server alias.
The main changes are:
- Removes `fcc-init` and `free-claude-code` from package scripts.
- Moves fresh configuration creation exclusively to the Admin UI.
- Keeps legacy environment migration in `fcc-server` startup.
- Updates smoke coverage, installer comments, documentation, and package
metadata.
</details>
<h3>Confidence Score: 4/5</h3>
The CLI removal needs a compatible release version or temporary aliases
before merging.
Existing automation can lose `fcc-init` and `free-claude-code` after a
patch upgrade. Fresh installs can still start the server and create
configuration through the Admin UI.
pyproject.toml and uv.lock; legacy configuration migration remains
before settings loading.
<details><summary><h3><a href="https://www.greptile.com/trex"><img
alt="T-Rex"
src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg"
height="20" align="absmiddle"></a> T-Rex Logs</h3></summary>
**What T-Rex did**
- I reproduced the patch upgrade path by installing base revision
|
||
|
|
2fe2ba82d2 |
Add Pi as a first-class FCC client (#1088)
## Problem FCC had no first-class Pi path, so Pi users had to maintain provider configuration themselves. FCC's installers and ownership docs also covered only Claude Code and Codex. ## Changes | Before | After | | --- | --- | | Pi required persistent user-managed provider configuration. | `fcc-pi` registers an ephemeral FCC provider from the live model catalog and leaves Pi-owned state untouched. | | Client launchers normalized blank proxy authentication separately. | Claude, Codex, and Pi share one neutral proxy-auth policy. | | FCC installers and uninstallers did not account for Pi. | Installers delegate missing Pi setup to its official platform installer, while uninstallers remove only `fcc-pi` and preserve native Pi. | | Pi compatibility had no executable FCC contract. | Deterministic launcher and lifecycle coverage plus a real Pi 0.80.6 smoke verify model discovery and `/v1/messages` end to end. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR adds Pi as a supported FCC client. The main changes are: - A new `fcc-pi` launcher and bundled Pi extension. - Shared proxy-auth handling for client launchers. - Pi installation, verification, and uninstall coverage in platform scripts. - Pi-focused tests, smoke coverage, and user documentation. </details> <h3>Confidence Score: 5/5</h3> This looks safe to merge. No blocking issues found in the changed code. None. <details><summary><h3><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="20" align="absmiddle"></a> T-Rex Logs</h3></summary> **What T-Rex did** - Ran the targeted pytest command and confirmed deterministic success with 27 passed in 2.68s and EXIT\_CODE: 0. - Analyzed the blocker log and determined that Pi CLI and live-smoke prerequisites are missing, blocking external Pi execution; uv is available and provider smoke models are discoverable, narrowing the issue to Pi CLI plus live-smoke opt-in. <a href="https://app.greptile.com/trex/runs/14192651/artifacts"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifactsDark.svg?v=4"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifacts.svg?v=4"><img alt="View all artifacts" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifacts.svg?v=4"></picture></a> <sub><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="14" align="absmiddle"></a> Ran code and verified through T-Rex</sub> </details> <details open><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | src/free_claude_code/cli/launchers/pi.py | Adds the `fcc-pi` launcher, Pi capability checks, passthrough handling, extension loading, and FCC-scoped environment setup. | | src/free_claude_code/cli/launchers/pi_extension.ts | Adds the Pi extension that fetches FCC models and registers a process-local Anthropic Messages provider. | | scripts/install.sh | Adds Pi install, PATH refresh, capability verification, and `fcc-pi` command checks for POSIX installs. | | scripts/install.ps1 | Adds Pi install, PATH refresh, capability verification, and `fcc-pi` command checks for Windows installs. | | pyproject.toml | Registers the `fcc-pi` console script and bumps the package version. | </details> <!-- greptile_failed_comments --> <h3>Comments Outside Diff (1)</h3> 1. General comment <a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"></a> **Pi entrypoint contract test fails due install-hint mismatch** - **Bug** - The narrow Pi launcher/entrypoint test selection fails on current HEAD. `test_launch_pi_rejects_unrelated_pi_binary` expects stderr to include the Windows PowerShell install URL `https://pi.dev/install.ps1`, but the launcher emitted the POSIX install command `curl -fsSL https://pi.dev/install.sh | sh` in this Linux sandbox. - **Cause** - The Pi launcher's incompatible-binary error path and the test contract disagree about which platform-specific install hint should be emitted for this scenario. - **Fix** - Align the Pi launcher contract with the test expectation: either update the launcher to emit the expected platform-specific hint for the mocked scenario, or update the test to assert the correct hint for the active/mocked platform. Then rerun `uv run --frozen pytest -q tests/cli/test_entrypoints.py -k 'pi'`. <sub><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="14" align="absmiddle"></a> Ran code and verified through T-Rex</sub> <!-- /greptile_failed_comments --> <sub>Reviews (3): Last reviewed commit: ["Add first-class Pi client integration"](https://github.com/alishahryar1/free-claude-code/commit/cd5c335f8cf2dee93d927496d7cabbffec86f169) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=43721088)</sub> <!-- /greptile_comment --> |
||
|
|
ee15ce4122 |
Make installers native, fail-fast, and verifiable (#1086)
## Problem The install and uninstall scripts mixed tool ownership, relied on npm and package-manager detection, and could report success after native commands or FCC removal failed. Users could be left without runnable FCC commands or lose `~/.fcc` while the FCC tool remained. Fixes #547, #753, #908, #942, #952, #1078, and #1080. ## Changes | Before | After | | --- | --- | | Missing Claude Code and Codex were installed through global npm. | Missing clients use their official native installers without requiring Node.js or npm. | | Existing uv installations were updated through package-manager detection. | Compatible uv installations are preserved; missing or obsolete uv uses Astral's standalone installer. | | Python 3.14 was installed as a separate step. | `uv tool install --python 3.14.0` owns Python selection and FCC installation together. | | PowerShell relied on `$ErrorActionPreference` and process metadata. | Native exits are checked explicitly and the PowerShell host resolves through `$PSHOME` with a PATH fallback. | | Missing Git surfaced late during `uv tool install`. | Git is verified before any installation mutation. | | PATH setup and FCC entry points were trusted after installation. | Persistent PATH setup, FCC entry points, and `fcc-server --version` must verify before success. | | Missing uv caused uninstall to skip FCC removal and still delete `~/.fcc`. | Missing uv stops uninstall before configuration is touched. | | FCC removal trusted `uv tool uninstall` without checking commands. | All five FCC entry points must be absent before `~/.fcc` is deleted. | | Dry runs printed successful installation or removal messages. | Dry runs execute no mutations and report that no changes were made. | | Installer tests inspected source strings. | Hermetic POSIX, PowerShell 5.1, and PowerShell 7 scenarios execute success and failure branches. | | README commands used GitHub HTML redirects or direct `iex` pipelines. | README commands use raw URLs and parameter-safe PowerShell script blocks. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR makes the installer and uninstaller flows native, fail-fast, and verified. The main changes are: - Native Claude Code, Codex, and uv installer paths. - Git and command-exit checks before install mutations continue. - FCC installation through `uv tool install --python 3.14.0`. - PATH persistence and FCC entrypoint verification before install success. - Verified uv-tool removal before deleting `~/.fcc/`. - Raw GitHub README commands and expanded installer tests. </details> <h3>Confidence Score: 5/5</h3> This looks safe to merge. No blocking issues found in the changed code. No files need attention. <details><summary><h3><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="20" align="absmiddle"></a> T-Rex Logs</h3></summary> **What T-Rex did** - T-Rex reviewed the general-contract-validation-proof and confirmed the installer validation log records the exact commands, working directory, PowerShell availability checks, pytest summary, skip indicators, and exit code. - T-Rex verified from the log that there were no installer/uninstaller failures observed in the hermetic POSIX test path. - T-Rex identified the installer-validation.log as the primary artifact supporting this validation and noted it as the key evidence for reviewers to inspect. <a href="https://app.greptile.com/trex/runs/14183505/artifacts"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifactsDark.svg?v=4"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifacts.svg?v=4"><img alt="View all artifacts" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewAllArtifacts.svg?v=4"></picture></a> <sub><a href="https://www.greptile.com/trex"><img alt="T-Rex" src="https://greptile-static-assets.s3.amazonaws.com/trex/trex_green.svg" height="14" align="absmiddle"></a> Ran code and verified through T-Rex</sub> </details> <details open><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | scripts/install.ps1 | Adds native installer execution, PowerShell executable fallback, fail-fast command handling, uv checks, and FCC verification. | | scripts/install.sh | Adds native installer downloads, prerequisite checks, uv handling, Python selection, and FCC entrypoint verification. | | scripts/uninstall.ps1 | Verifies uv tool removal and FCC entrypoint absence before purging Windows user data. | | scripts/uninstall.sh | Verifies uv tool removal and FCC entrypoint absence before purging POSIX user data. | | tests/scripts/test_installers.py | Replaces source-string checks with hermetic installer success and failure scenarios. | | tests/scripts/test_uninstallers.py | Adds hermetic uninstaller scenarios for verified removal, idempotency, dry runs, and failed cleanup. | | README.md | Updates install and uninstall commands to raw script URLs and scriptblock PowerShell invocation. | | pyproject.toml | Bumps the package patch version for the installer changes. | | uv.lock | Reflects the updated package version. | </details> <sub>Reviews (3): Last reviewed commit: ["Make FCC uninstall fail-fast and verifia..."](https://github.com/alishahryar1/free-claude-code/commit/031e79fa4990606c4eb04dcc3980458e560167e4) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=43701775)</sub> <!-- /greptile_comment --> |
||
|
|
c51a15608d | Add FCC uninstall scripts (#836) |