Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/laptop-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,34 @@ jobs:
context = {key: os.environ[key] for key in keys}
path = Path(os.environ["RUNNER_TEMP"]) / "instructions/release/runner.json"
path.write_text(json.dumps(context), encoding="utf-8")
- name: Install Tesseract for the quickstart's historical scan (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y tesseract-ocr tesseract-ocr-eng
- name: Install Tesseract for the quickstart's historical scan (macOS)
if: runner.os == 'macOS'
run: command -v tesseract || brew install tesseract
- name: Install Tesseract for the quickstart's historical scan (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
for ($attempt = 1; $attempt -le 3; $attempt++) {
choco install tesseract --yes --no-progress
if ($LASTEXITCODE -eq 0) { break }
Start-Sleep -Seconds 30
}
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Join-Path $env:ProgramFiles 'Tesseract-OCR' >> $env:GITHUB_PATH
- name: Give the test user's quickstart English OCR
shell: python
run: |
import json, os, shutil, subprocess
from pathlib import Path
tesseract = shutil.which("tesseract")
assert tesseract, "Tesseract is not on PATH"
languages = subprocess.check_output([tesseract, "--list-langs"], text=True)
assert "eng" in languages.splitlines(), languages
path = Path(os.environ["RUNNER_TEMP"]) / "instructions/release/ocr.json"
path.write_text(json.dumps({"tesseract": str(Path(tesseract).resolve())}), encoding="utf-8")
- name: Verify as a standard macOS user
if: runner.os == 'macOS'
shell: bash
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- On Windows, the laptop suite installer's `-Uninstall` and `-Clean` wait up to 90 seconds for Chatty programs running from the files they remove, such as the search worker, to exit, and otherwise stop without changing anything. First shipped in laptop suite 2026.12.4.

## [0.6.0] - 2026-12-04

### Added

- Build a literature corpus from a topic or from seed papers. `chatty corpus create NAME --topic "..."` or `--seed PMCID` collects papers with text-fetch from the `--sources` given (default `europepmc`), following references and citations with `--expand` and `--depth`, within a `--max-papers` budget (default 25). `--dry-run` previews the selection and `--yes` downloads and indexes it. `chatty corpus add` collects more papers into an existing corpus, and `chatty corpus index` indexes the documents in a corpus's `sources` folder.
- Follow citations inside a corpus. `chatty refs` lists the references of a paper, passage or physical page, and `--missing --fetch` collects the ones the corpus lacks. `chatty cited-by` finds the papers that cite a paper, with their citing passages, and `chatty corpus graph` exports the citation graph page by page as JSON or CSV.
- `chatty verify` checks a quotation, and a claimed value and unit, at its cited location. `--claims FILE` checks a JSONL file of claims. With `--json`, an unsupported claim exits 7 with `claim_not_supported`.
- `chatty verify` checks a quotation, and a claimed value and unit, at its cited location. `--claims FILE` checks a JSONL file of claims. An unsupported claim exits 7 (`claim_not_supported` in the `--json` report).
- Save a passage's `evidence_handle` with a citation. After a later index, `context` and `paper` check it against the stored passage and return `stale_handle` when the text changed, with a replacement when the passage moved.
- `chatty retrieve --queries FILE` runs a JSONL batch of queries. The first hybrid or semantic search starts a private local worker that keeps the embedding models loaded for later searches of the same corpus. Set `CHATTY_RETRIEVAL_SERVICE=0` to run each command in a fresh process instead.
- `chatty index --background` returns as soon as the imported text can be searched exactly, and hybrid retrieval uses exact matches until the vectors are built. `chatty corpus status` reports exact, semantic and hybrid readiness and vector progress. `chatty index --ocr force` re-reads scans with an unreliable text layer.
- `chatty corpus create NAME --example` installs a prepared index of public-domain Los Alamos history excerpts, so a first search works offline.
- `chatty mcp` serves Chatty to desktop MCP clients such as Claude Desktop over stdio. `--corpus` limits which corpora it can see, `--timeout` limits each call (default 120 seconds), and `--allow-writes` exposes corpus creation, collection, indexing and deletion. `integrations/chatty.mcpb` is a desktop extension with the read-only tools. Install the `mcp` extra.
- SLURM builds. With `executor = "slurm"` in `~/.config/chatty/hpc.toml` (or a site default in `/etc/chatty/hpc.toml`, or the profile named by `CHATTY_HPC_CONFIG`), `chatty index` and confirmed collections run as single-node jobs in a Charliecloud image, using node-local scratch and local safetensors weights only. `chatty index --dry-run` previews the job and `chatty job status` reports its progress.
- SLURM builds. With `executor = "slurm"` in `~/.config/chatty/hpc.toml` (a site default can go in `/etc/chatty/hpc.toml`, and `CHATTY_HPC_CONFIG` names a profile that overrides both), `chatty index` and confirmed collections run as single-node jobs in a Charliecloud image, using node-local scratch and local safetensors weights only. `chatty index --dry-run` previews the job and `chatty job status` reports its progress.
- `chatty skill` prints the agent guide for the installed version, and `--out PATH` writes it to a file. Named corpora record their mode. Existing corpora default to `research`, and `chatty skill --mode research` prints the research guidance.
- `chatty corpus list --only NAME` lists only the named corpora.
- With `--json`, errors include suggested remedies. An invalid argument exits 2 with `invalid_argument`, and an unknown corpus, paper or passage exits 3 with close matches.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ On a Linux NFS home with remote locking enabled, lifecycle commands use a privat

<!-- install-macos-arm64 linux-x86_64 linux-arm64 -->
```bash
/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh
/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh
```

**Windows x64** (64-bit Windows PowerShell 5.1 or PowerShell 7)

<!-- install-windows-x64 -->
```powershell
& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.ps1)))
& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.ps1)))
```

Open a fresh terminal (or run the `export PATH` command printed by the Linux or macOS installer; on Windows, close all Windows Terminal windows first).
From any directory, run `chatty --version`, `text-fetch --version`, and `litkit --version`.
The 2026.12.3 installer above supplies Chatty 0.5.0, text-fetch 0.4.0 and LitKit 0.4.0.
The 2026.12.4 installer above supplies Chatty 0.6.0, text-fetch 0.5.0 and LitKit 0.5.0.

The current source build includes 101 pages of Los Alamos and Manhattan Project history, including original scans from Edith C. Truslow’s report. Try `chatty corpus create demo --example` and
Starting with laptop suite 2026.12.4, Chatty includes 101 pages of Los Alamos and Manhattan Project history, including original scans from Edith C. Truslow’s report. Try `chatty corpus create demo --example` and
`chatty retrieve '"Black Beauties"' --corpus demo --mode exact` to find Gosling’s account of wartime kitchens offline.
`chatty index --example` builds the index from the bundled PDFs and uses Tesseract to read the scan,
and `chatty index YOUR_FOLDER` imports your own documents. Follow the
Expand All @@ -55,12 +55,12 @@ or uninstall suite-owned files while preserving other files in the installation

```bash
# Linux and macOS (replace --status with --clean or --uninstall)
/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status
/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status
```

```powershell
# Windows (replace -Status with -Clean or -Uninstall)
& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.ps1))) -Status
& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.ps1))) -Status
```

Keep your corpus and LitKit workspace (including its indices) in your own working
Expand All @@ -69,7 +69,7 @@ sessions in `./sessions` by default. To share sessions across working directorie
set `session_path = "~/.config/chatty/sessions"` in that config. These locations
are independent of the installed runtime.

The [laptop-2026.12.3 manifest](https://github.com/lanl/chatty/releases/download/laptop-2026.12.3/manifest.json)
The [laptop-2026.12.4 manifest](https://github.com/lanl/chatty/releases/download/laptop-2026.12.4/manifest.json)
records the source revisions and wheel hashes. See the [maintainer release guide](release/README.md)
to reproduce the suite.

Expand Down Expand Up @@ -429,7 +429,7 @@ With `--json`, invalid command arguments exit 2 and write an `invalid_argument`

New named corpora default to `research`. Set it explicitly with `chatty corpus create NAME --mode research`, inspect it with `chatty corpus status NAME`, and use `chatty skill --mode research` for its paper workflow. Older corpora use the same default.

Run `chatty skill` to print the agent guide for your installed version, or write it to a skill directory with `chatty skill --out ~/.claude/skills/chatty-corpus/SKILL.md`. This command is available in source builds after laptop suite 2026.12.3. For that release, read the [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md).
Run `chatty skill` to print the agent guide for your installed version, or write it to a skill directory with `chatty skill --out ~/.claude/skills/chatty-corpus/SKILL.md`. Laptop suite 2026.12.3 lacks this command. For that release, read the [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md).

### Warm retrieval across commands

Expand Down
10 changes: 5 additions & 5 deletions docs/laptop-quickstart.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Index a folder and retrieve your first passage

The Los Alamos demo is available from the current source checkout. Install the indexing tools with Python 3.12 and uv (`uv sync --locked --python 3.12 --extra index`), then activate the environment (`source .venv/bin/activate` or `.venv\Scripts\Activate.ps1`).
The [published laptop installer](../README.md#laptop-release-chatty-text-fetch-and-lanl-litkit) supplies the Los Alamos demo and everything else on this page except Tesseract and the desktop integration, starting with laptop suite 2026.12.4. To work from a checkout instead, install the indexing tools with Python 3.12 and uv (`uv sync --locked --python 3.12 --extra index`), then activate the environment (`source .venv/bin/activate` or `.venv\Scripts\Activate.ps1`).

The published laptop suite 2026.12.3 includes the earlier rain-gauge demo. If you used that installer, follow its [versioned quickstart](https://github.com/lanl/chatty/blob/3612d5be0421546940b5701525a4d8cb9f212e5a/docs/laptop-quickstart.md).
Laptop suite 2026.12.3 includes the earlier rain-gauge demo. If you installed that suite, follow its [versioned quickstart](https://github.com/lanl/chatty/blob/3612d5be0421546940b5701525a4d8cb9f212e5a/docs/laptop-quickstart.md).

## Index and search

Expand All @@ -29,14 +29,14 @@ chatty retrieve "What were the Black Beauties in Los Alamos kitchens?"

Open page 26 of `gosling-los-alamos-excerpt.pdf` in the workspace’s `example/los-alamos` directory to compare the passage with the caption. For your own scan with an unreliable text layer, run `chatty index YOUR_SCAN.pdf --pdf-backend fast --ocr force --ocr-engine tesseract` in a fresh workspace.

For the corresponding JSON commands and citation workflow, run `chatty skill` in a source build after laptop suite 2026.12.3. To save the installed guide, run `chatty skill --out PATH` with your agent's destination filename. For suite 2026.12.3, use its [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md).
For the corresponding JSON commands and citation workflow, run `chatty skill`. To save the installed guide, run `chatty skill --out PATH` with your agent's destination filename. For suite 2026.12.3, use its [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md).

The first build downloads SPECTER2 and all-MPNet-base-v2 (about 880 MB together). Chatty stores them in a shared Hugging Face cache under `~/.cache/chatty-suite/hf_cache` by default (override with `HF_HOME`), so models are downloaded once across all workspaces and named corpora. A workspace indexed by an earlier release keeps using its own `hf_cache` folder until the shared cache exists. To choose another default workspace, set the top-level `rag_workspace` in `~/.config/chatty/config.toml`. An explicit `CHATTY_RAG_WORKSPACE` takes precedence over `LITKIT_WORKSPACE` and the configured path. `chatty workspace` prints the selection. To manage multiple isolated topic corpora, use `chatty corpus create <name>` and pass `--corpus <name>` to `chatty index`, `chatty retrieve`, `chatty search papers`, `chatty context`, `chatty paper`, `chatty doctor`, and `chatty chat`.

- For scientific PDFs, use `chatty index YOUR_FOLDER --rich` to download IBM Granite-Docling and extract equations, tables and scans. The managed model uses PyTorch. With the pinned PyTorch 2.6 runtime on macOS, PDF conversion runs on CPU and LitKit can still use MPS for embeddings. To prefetch it and both embedding models, run `chatty models --download --with-pdf`. Set `HF_HUB_OFFLINE=1` to require cached models.
- For fast conversion and per-page OCR, use `--pdf-backend fast`. Apple Vision is available on supported Macs. Tesseract requires a local executable and language data. Select an engine with `--ocr-engine vision`, `tesseract`, `auto` or `off`. The importer reports unreadable files and skipped scans.
- To append new documents, run `chatty index YOUR_FOLDER --update`. You can also add a different folder. Keep each source folder at its original path. Existing documents and their citations stay in the index. To index edits or remove deleted documents, build in a fresh workspace.
- Local builds from this checkout index extracted table headers and cells by default. With laptop suite 2026.12.3, set `LITKIT_INCLUDE_TABLES=1` before indexing to enable them. Use `chatty paper <paper-id> --tables --json` to read them. For documents indexed before tables were enabled, build a fresh workspace from the originals. To skip tables in a new build, set `LITKIT_INCLUDE_TABLES=0`.
- Chatty indexes extracted table headers and cells by default, starting with laptop suite 2026.12.4. With suite 2026.12.3, set `LITKIT_INCLUDE_TABLES=1` before indexing to enable them. Use `chatty paper <paper-id> --tables --json` to read them. For documents indexed before tables were enabled, build a fresh workspace from the originals. To skip tables in a new build, set `LITKIT_INCLUDE_TABLES=0`.
- Run `chatty doctor --retrieval` to inspect OCR, models and indices offline. `chatty doctor` also checks the configured LLM and, if configured, the text-fetch GROBID endpoint.

## Chat with the corpus
Expand All @@ -54,7 +54,7 @@ Store the key on its own line in that file. On Linux or macOS, run `chmod 600 ~/

## Use a named corpus in Claude Desktop

Install the desktop integration from a checkout with `uv sync --locked --python 3.12 --extra mcp --extra index`. Create and index a named corpus with the same Chatty installation. This integration is available in source builds after laptop suite 2026.12.3.
Install the desktop integration from a checkout with `uv sync --locked --python 3.12 --extra mcp --extra index`. Create and index a named corpus with the same Chatty installation. The laptop suite doesn't include the `mcp` extra, so the integration needs a checkout.

Download and open the [Chatty desktop extension](../integrations/chatty.mcpb?raw=1) in Claude Desktop. Select the checkout's `.venv/bin/chatty` executable on macOS or `.venv\Scripts\chatty.exe` on Windows. The extension uses the read-only tools. Ask the app to search a corpus, verify a quotation against its evidence handle, or identify the earlier papers cited by a passage.

Expand Down
3 changes: 2 additions & 1 deletion release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ today's package index is only part of cutting a **new** set.
prerelease before promotion.
**Verify published laptop wheels** runs the literal commands from outside a
checkout as standard users on all four targets. Only OS tools are on the install
PATH. The verifier checks the published installer bytes, all reported wheels,
PATH. The workflow installs Tesseract with English data, as a user would for scanned
PDFs, and adds only Tesseract to the PATH of the quickstart check. The verifier checks the published installer bytes, all reported wheels,
symlink collision guards in `~/.local/bin`, shell hygiene (no unsolicited
Bash dotfiles on zsh-only Macs, fish support, normal dotfile umask),
fresh-shell command discovery, the managed Python and Chatty's LitKit imports.
Expand Down
Loading
Loading