文件历史

15 次代码提交

作者 SHA1 备注 提交日期
Ali Khokhar 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 -->
2026-07-21 05:48:17 -07:00
Ali Khokhar 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
d37b34b02f in an isolated Python 3.14
environment and verified that fcc-init --version and free-claude-code
--version reported 4.11.4 with exit code 0. After upgrading to head
revision 9a65f654f5e06c0ca96a31d3ad03db8c63d8dec7, the installed version
changed to 4.11.5 and both entrypoints disappeared, with subsequent
invocations yielding command-not-found errors (exit code 127).
- Local smoke tests and server migrations completed successfully: the
CLI local smoke test exited with code 0, the installed-entrypoints
checks passed, and the server migrated to a healthy state with the
health endpoint responding.

<a
href="https://app.greptile.com/trex/runs/15196662/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 |
|----------|----------|
| pyproject.toml | Removes two public console commands while applying a
patch version bump. |
| src/free_claude_code/cli/commands.py | Removes template-based
initialization while preserving startup migration. |
| src/free_claude_code/cli/entrypoints.py | Removes the retired
initialization entrypoint and retains server version handling. |
| smoke/lib/child_process.py | Removes the init helper and renames the
server helper consistently. |
| scripts/install.sh | Keeps retired names in process detection for safe
upgrades. |
| scripts/uninstall.sh | Keeps retired names in removal checks for older
installations. |
| uv.lock | Tracks the patch version that must change if the command
removal remains breaking. |

</details>

<a
href="https://app.greptile.com/api/ide/codex?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22alishahryar1%2Ffree-claude-code%22%20on%20the%20existing%20branch%20%22remove-obsolete-cli-commands%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22remove-obsolete-cli-commands%22.%0A%0AFix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Apyproject.toml%3A7%0A**Breaking%20Commands%20Ship%20as%20Patch**%0A%0AUpgrading%20from%204.11.4%20removes%20the%20published%20%60fcc-init%60%20and%20%60free-claude-code%60%20commands%2C%20so%20existing%20scripts%20fail%20with%20%E2%80%9Ccommand%20not%20found.%E2%80%9D%20The%20repository%20policy%20classifies%20incompatible%20CLI%20removals%20as%20major%20changes%3B%20keep%20compatibility%20aliases%20for%204.x%20or%20publish%20this%20removal%20as%205.0.0.%0A%0A&repo=alishahryar1%2Ffree-claude-code&pr=1220&platform=github"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodexDark.svg?v=6"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=6"><img
alt="Fix All in Codex"
src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=6"></picture></a>

<sub>Reviews (1): Last reviewed commit: ["Remove obsolete CLI entry
points"](https://github.com/alishahryar1/free-claude-code/commit/9a65f654f5e06c0ca96a31d3ad03db8c63d8dec7)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=45848525)</sub>

> Greptile also left **1 inline comment** on this PR.

<!-- /greptile_comment -->
2026-07-20 21:55:49 -07:00
Ali Khokhar fa39a1d45a Fail safely when FCC is running during installation (#1182)
## Problem

A running Free Claude Code command can make `uv tool install --force`
fail after partially deleting the installed tool environment. The
installers did not detect this precondition, and the POSIX fallback
relied on truncated process names.

## Changes

| Before | After |
| --- | --- |
| Installers entered tool replacement while FCC commands were running. |
Installers report matching FCC commands and PIDs, then exit before
mutation. |
| A process starting during client or uv setup could reach tool
replacement. | Installers recheck immediately before `uv tool install`.
|
| The no-`pgrep` fallback compared truncated `comm` names. | Install and
uninstall fallbacks match full command lines. |
| Running-process coverage existed only for uninstallers. |
Cross-platform tests cover every FCC entry point, late starts, similar
names, and fallback detection. |
| The package version was 4.8.7. | The package version is 4.8.8. |

<!-- greptile_comment -->

<details open><summary><h3>Greptile Summary</h3></summary>

This PR prevents tool replacement while Free Claude Code commands are
running. The main changes are:

- Adds early and pre-install process checks to both installers.
- Uses full process arguments in the POSIX fallback.
- Adds tests for all FCC commands, late process starts, and similarly
named processes.
- Bumps the package version to 4.8.8.
</details>

<h3>Confidence Score: 5/5</h3>

This looks safe to merge.

The updated fallback checks full process arguments instead of the
truncated process name. Tests cover direct and interpreter-launched
command lines. 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**
- Before the changes, the parent installer failed all six
active-entry-point checks and the late-start check (7 failed, 1 passed).
- After applying the changes, the installer passed all eight targeted
tests (8 passed, 70 deselected, exit code 0).
- The harness assertions verified that blocking cases do not mutate
state and the late-start case never invokes the uv tool install.

<a
href="https://app.greptile.com/trex/runs/14936764/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.sh | Adds early and late process guards with
full-command-line fallback matching. |
| scripts/uninstall.sh | Replaces truncated process-name matching with
PID and argument inspection. |
| scripts/install.ps1 | Adds running-process checks before setup and
tool replacement. |
| tests/scripts/test_installers.py | Covers all FCC commands, late
process starts, similar names, and POSIX fallback matching. |
| tests/scripts/test_uninstallers.py | Covers full-command-line matching
in the POSIX uninstaller fallback. |

</details>

<sub>Reviews (2): Last reviewed commit: ["Fail safely when FCC is
running during
i..."](https://github.com/alishahryar1/free-claude-code/commit/589d983bc936ae28c914b7cb713c6b0775ab8a39)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=45286907)</sub>

<!-- /greptile_comment -->
2026-07-17 22:51:26 -07:00
Ali Khokhar 776a6a4c5f Enable uv malware checks on every CI runner (#1177)
## Problem

Dependabot updates passed CI without uv checking their locked packages
against known malware advisories. The supported uv minimum also predated
this capability.

## Changes

| Before | After |
| --- | --- |
| Project, installers, and CI allowed uv versions without malware
checking. | All supported surfaces require uv `0.11.16` or newer. |
| Parallel CI runners synchronized dependencies without an OSV malware
check. | Workflow-wide uv environment settings enable the check
independently on every runner. |
| Installers treated prerelease builds as their equivalent stable
version. | Installers accept stable uv releases only while preserving
valid build metadata. |
| uv security-policy values and edge behavior could drift between
maintained surfaces. | Contract and installer tests enforce the shared
policy. |
| FCC reported version `4.8.5`. | FCC reports patch version `4.8.6`. |

<!-- greptile_comment -->

<details open><summary><h3>Greptile Summary</h3></summary>

This PR enables uv malware checks across CI and raises the supported uv
baseline. The main changes are:

- Requires uv `0.11.16` across project, installer, and CI configuration.
- Enables the malware-check preview policy at workflow scope.
- Rejects prerelease uv versions in both installers.
- Adds policy and installer tests for the updated behavior.
- Bumps the package and lockfile version to `4.8.6`.
</details>

<h3>Confidence Score: 5/5</h3>

This looks safe to merge.

The installer fix preserves prerelease suffixes and rejects them before
numeric comparison. Both installer variants cover stable releases, build
metadata, and prerelease versions. No blocking issues remain in the
changed 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**
- Policy declarations were verified to include uv 0.11.16 in the
pyproject, in both installers, and in CI setup, along with
workflow-level malware variables.
- The installer dry run printed all planned stages and ended with the
message "Dry run complete. No changes were made.".
- PowerShell execution was intentionally not attempted on Linux as part
of the contract validation.
- A set of 10 log artifacts was collected to support inspection of
policy coverage, dry-run results, and environment constraints.

<a
href="https://app.greptile.com/trex/runs/14927224/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 |
|----------|----------|
| .github/workflows/tests.yml | Enables the uv malware-check policy at
workflow scope and installs uv 0.11.16. |
| pyproject.toml | Raises the required uv version and bumps the package
patch version. |
| scripts/install.sh | Rejects prerelease uv versions while accepting
stable versions with build metadata. |
| scripts/install.ps1 | Applies the same stable-version requirement to
the PowerShell installer. |
| tests/contracts/test_uv_policy.py | Checks uv minimum consistency and
workflow-wide malware policy placement. |
| tests/scripts/test_installers.py | Adds stable, build-metadata, and
prerelease cases for both installers. |
| uv.lock | Synchronizes the locked project version with the package
version bump. |

</details>

<sub>Reviews (2): Last reviewed commit: ["Reject prerelease uv in
installers"](https://github.com/alishahryar1/free-claude-code/commit/d35d9d44d68d78ab2f00af0cb7297ffd7b7c4c3f)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=45238978)</sub>

<!-- /greptile_comment -->
2026-07-17 18:47:55 -07:00
Ali Khokhar 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 -->
2026-07-12 20:54:57 -07:00
Ali Khokhar 2da271505c Install FCC without requiring Git (#1087)
## Problem

FCC required Git solely to fetch its source from GitHub. Customers had
to install an unrelated prerequisite before running an otherwise
self-contained installer.

## Changes

| Before | After |
| --- | --- |
| Installers fetched FCC through a mutable `git+` repository URL. |
Installers fetch the same visible `main` source through GitHub's
generated ZIP archive. |
| Git had to exist before either installer could continue. | FCC
installation has no Git dependency or Git-specific branch. |
| The unnamed source requirement relied on Git metadata. | Every base
and voice variant uses a named direct-archive requirement. |
| Reinstallation relied on Git to discover the current branch head. |
`--refresh-package free-claude-code` fetches the current archive on
every rerun. |
| Installer tests provisioned a fake Git executable. | Windows and Linux
scenarios pass with no Git executable and verify archive and voice
specifications. |
| The README described installer internals and a manual Git
prerequisite. | The install section presents the platform commands
directly. |
| The package version was 3.5.18. | The package version is 3.5.19 with a
synchronized lockfile. |

<!-- greptile_comment -->

<details open><summary><h3>Greptile Summary</h3></summary>

This PR removes the Git requirement from the FCC installers. The main
changes are:

- Installer package specs now use GitHub's generated `main.zip` archive.
- POSIX and PowerShell installers no longer check for `git`.
- `uv tool install` now refreshes FCC during tool install.
- Installer tests now assert archive URLs, voice extras, and no Git
calls.
- The package version and lockfile move to `3.5.19`.
- The README no longer lists Git as a manual prerequisite.
</details>

<h3>Confidence Score: 5/5</h3>

This looks safe to merge.

No blocking issues found in the changed code. The installer changes are
consistent across POSIX and PowerShell. The package metadata uses plain
Hatchling configuration and does not rely on Git-derived versioning.

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**
- Ran the installer tests and observed a test run summary of 23 passed
and 21 skipped with EXIT\_CODE 0.
- Executed a dry-run installer test with git intentionally unavailable,
which reported an archive URL, a refresh flag, and EXIT\_CODE 0.
- Saved the no\_git\_installer\_harness.sh script to simulate a missing
git on PATH while keeping UV, Python, and core utilities available.
- Ran a grep-based validation that confirmed the test pass summary,
identified the no-git condition, captured the archive URL, and verified
exit codes.

<a
href="https://app.greptile.com/trex/runs/14184929/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.sh | Uses archive-based package specs, removes the Git
prerequisite, and refreshes FCC during tool install. |
| scripts/install.ps1 | Mirrors the archive install flow and Git removal
for Windows. |
| tests/scripts/test_installers.py | Updates installer tests for archive
URLs, no Git calls, and voice/torch argument handling. |
| pyproject.toml | Bumps the project version to `3.5.19`. |
| uv.lock | Synchronizes the locked local package version. |
| README.md | Removes the obsolete manual Git prerequisite from install
instructions. |

</details>

<sub>Reviews (1): Last reviewed commit: ["Install FCC without requiring
Git"](https://github.com/alishahryar1/free-claude-code/commit/9b1af99f89658867a5b2e8a1f7150fde297c0420)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=43708108)</sub>

<!-- /greptile_comment -->
2026-07-12 18:40:25 -07:00
Ali Khokhar 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 -->
2026-07-12 18:14:24 -07:00
Ali Khokhar 85b601884d Remove legacy future annotation imports (#982)
## Problem

Python 3.14 provides native lazy annotations, but the codebase still
relied on legacy future annotation imports. Those imports also made
type-only import cycles easier to hide instead of fixing ownership
boundaries.

## Changes

| Before | After |
| --- | --- |
| Python files used `from __future__ import annotations`. | Python files
rely on Python 3.14 native lazy annotations. |
| Some runtime modules used `TYPE_CHECKING` or local imports for
required dependencies. | Runtime modules use top-level owner-module
imports with explicit boundaries. |
| Local and GitHub guardrails only rejected type ignore suppressions. |
Local and GitHub guardrails reject type ignore suppressions and legacy
future annotation imports. |
| Agent docs only documented the no-type-ignore rule. | Agent docs
document the Python 3.14 annotation and import-boundary rules. |

<!-- greptile_comment -->

<details open><summary><h3>Greptile Summary</h3></summary>

This PR moves the codebase to Python 3.14 native lazy annotations. The
main changes are:

- Removed legacy `from __future__ import annotations` imports across
Python modules.
- Promoted selected runtime dependencies from `TYPE_CHECKING` or local
imports to explicit owner-module imports.
- Added local, GitHub, and contract-test guardrails to reject legacy
future annotation imports.
- Updated agent docs with the annotation and import-boundary rules.
- Bumped the package patch version for production-file changes.
</details>

<h3>Confidence Score: 5/5</h3>

Safe to merge with low risk.

The changes are mostly mechanical annotation cleanup with matching CI
and contract-test guardrails. Reviewed import-boundary updates did not
show a confirmed runtime cycle or dependency break.

No files require special 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**
- Performed an end-to-end validation of the guardrail contract suite: an
environment check confirmed uv availability, a guardrail pytest run used
CPython 3.14.0 with 5 passing contract tests, 3 focused CI-script tests
passed, and the direct CI suppressions guardrail command (including the
legacy future-annotations grep) also passed.

<a
href="https://app.greptile.com/trex/runs/13303335/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 |
|----------|----------|
| api/runtime.py | Moves messaging, CLI manager, session, limiter, and
tree dependencies from local/type-checking imports to explicit top-level
owner-module imports. |
| messaging/platforms/telegram.py | Removes future annotations and
promotes Telegram SDK type imports into the existing availability guard.
|
| messaging/platforms/telegram_inbound.py | Removes future annotations
and imports Telegram SDK types at module scope for inbound
normalization. |
| tests/contracts/test_import_boundaries.py | Adds an AST contract that
rejects legacy future annotation imports across Python files. |
| scripts/ci.sh | Extends the local suppression check to reject legacy
future annotation imports alongside type-ignore suppressions. |
| scripts/ci.ps1 | Mirrors the local PowerShell CI suppression check for
legacy future annotations. |
| .github/workflows/tests.yml | Renames and broadens the GitHub
guardrail job to reject both type suppressions and legacy future
annotations. |
| pyproject.toml | Bumps the patch version for production-file changes.
|

</details>

<details open><summary><h3>Sequence Diagram</h3></summary>

<a href="#gh-light-mode-only">

```mermaid
%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Dev as Developer/CI
participant Guard as Suppression guard
participant AST as Import-boundary contract test
participant Py as Python modules

Dev->>Guard: Run local/GitHub suppression check
Guard->>Py: "Scan *.py for type ignores and future annotations"
Guard-->>Dev: Fail if legacy annotation import remains
Dev->>AST: Run pytest contract tests
AST->>Py: Parse imports with ast
AST-->>Dev: Assert no future annotations/import-boundary violations
Py-->>Dev: Use Python 3.14 native lazy annotations
```

</a>
<a href="#gh-dark-mode-only">

```mermaid
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Dev as Developer/CI
participant Guard as Suppression guard
participant AST as Import-boundary contract test
participant Py as Python modules

Dev->>Guard: Run local/GitHub suppression check
Guard->>Py: "Scan *.py for type ignores and future annotations"
Guard-->>Dev: Fail if legacy annotation import remains
Dev->>AST: Run pytest contract tests
AST->>Py: Parse imports with ast
AST-->>Dev: Assert no future annotations/import-boundary violations
Py-->>Dev: Use Python 3.14 native lazy annotations
```

</a>
</details>

<sub>Reviews (2): Last reviewed commit: ["Remove legacy future
annotations
import"](https://github.com/alishahryar1/free-claude-code/commit/6e6cda69da243bbdb92831207aecb3731ad469f8)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=41875785)</sub>

<!-- /greptile_comment -->
2026-07-04 21:41:51 -07:00
Alishahryar1 acf5885b16 Fix Windows installer uv version parsing 2026-06-19 14:03:30 -07:00
Alishahryar1 e24711af3f Make local CI scripts autofix Ruff issues 2026-06-18 18:17:31 -07:00
Ali Khokhar c51a15608d Add FCC uninstall scripts (#836) 2026-06-17 01:43:28 -07:00
Alishahryar1 b26957faaf Update README 2026-06-16 17:01:24 -07:00
Alishahryar1 4631ff9c49 fix: update uv with install manager 2026-05-29 16:35:10 -07:00
Alishahryar1 b8c1f72865 fix installer dependency checks 2026-05-23 15:35:24 -07:00
Alishahryar1 428746e0e0 docs: add first-class install scripts 2026-05-22 16:05:07 -07:00