Metadata-Version: 2.4
Name: freesolo-agent
Version: 0.1.0
Summary: Thin CLI for queuing Freesolo backend training jobs.
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: freesolo>=0.2.4
Requires-Dist: httpx>=0.27.0

# Freesolo Agent CLI

Thin command-line client for queuing Freesolo backend training jobs.

The public package does not contain the Codex/GitHub/training worker. It only:

- validates JSON or interactive setup input
- verifies `FREESOLO_API_KEY`
- uploads a local dataset file or folder when `datasetPath` is provided
- enqueues `/api/training/jobs`
- polls `/api/training/jobs/{job_id}` until the backend worker finishes

The private worker implementation lives under `backend/src/training_agent`.

## Run

Interactive setup starts when the CLI is launched from a terminal without JSON
input:

```bash
uv run freesolo
```

Automation can call the JSON interface:

```bash
uv run freesolo '{"operation":"draft","orgId":"org_123","input":{"sourceRepoUrl":"https://github.com/acme/app.git","prompt":"Create a contract for the feature behavior..."}}'
```

Supported operations are `draft`, `edit`, `optimize`, and `training`.

To provide a local dataset, pass `datasetPath` as either a file or folder path.
The CLI uploads it to the backend first, then the backend worker materializes it
as read-only context for the training agent:

```bash
uv run freesolo '{"operation":"training","orgId":"org_123","input":{"targetRepoUrl":"https://github.com/acme/app-freesolo-training","datasetPath":"/mnt/data/my_dataset"}}'
```

## Environment

- `FREESOLO_API_KEY`: required.
- `FREESOLO_BASE_URL`: optional backend URL override. Defaults to production.
- `FREESOLO_TRAINING_JOB_POLL_INTERVAL_SECONDS`: optional polling interval.

Private GitHub app credentials, Codex settings, Tinker dependencies, and training
runtime configuration belong to the backend worker, not this CLI package.
