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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm audit --audit-level=low
- run: pnpm build
- run: pnpm check:examples
- run: pnpm test
- run: pnpm exec playwright install --with-deps chromium
- run: node scripts/ci-handler.mjs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The [September compatibility record](docs/compatibility-2026-09-08.md), [Septemb

The local CLI requires **Node 22+** and **pnpm 10.17.1+**. Integration targets an existing React, TypeScript, and Vite application. The [installation guide](docs/installation.md) lists tested versions and browser setup.

Version **1.0.1** uses six prebuilt package tarballs with checksums in the [GitHub release](https://github.com/agammann/latch/releases/tag/v1.0.1). The `@latch-local/*` names are local distribution identifiers; packages have not been published to a registry. The public Studio runs on OpenAI Sites. This repository contains the CLI, runtime, local console, examples, and release evidence; the Studio website source is maintained separately. Studio version 5 runtime downloads were verified against the six published v1.0.0 packages on October 7, 2026 (UTC); see the [delivered-release check](docs/studio.md#delivered-v1-release-check-october-7-2026-utc). The [v1 stability contract](docs/stability.md) covers the CLI, typed runtime contracts and React/Vite integration.
Version **1.0.2** uses six prebuilt package tarballs with checksums in the [GitHub release](https://github.com/agammann/latch/releases/tag/v1.0.2). The `@latch-local/*` names are local distribution identifiers; packages have not been published to a registry. The public Studio runs on OpenAI Sites. This repository contains the CLI, runtime, local console, examples, and release evidence; the Studio website source is maintained separately. Studio version 5 runtime downloads were verified against the six published v1.0.0 packages on October 7, 2026 (UTC); see the [delivered-release check](docs/studio.md#delivered-v1-release-check-october-7-2026-utc). The [v1 stability contract](docs/stability.md) covers the CLI, typed runtime contracts and React/Vite integration.

## Documentation and project status

Expand Down
34 changes: 17 additions & 17 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ The generator compiles against your `tsconfig.json`. The tested setup uses TypeS

Choose one source:

1. **From GitHub:** download all six `latch-local-*-1.0.1.tgz` assets and `SHA256SUMS` from the [v1.0.1 release](https://github.com/agammann/latch/releases/tag/v1.0.1). Verify each tarball against SHA256SUMS before installing it. On PowerShell, use `Get-FileHash <tarball> -Algorithm SHA256`; on Linux, run `sha256sum -c SHA256SUMS` in the download directory.
1. **From GitHub:** download all six `latch-local-*-1.0.2.tgz` assets and `SHA256SUMS` from the [v1.0.2 release](https://github.com/agammann/latch/releases/tag/v1.0.2). Verify each tarball against SHA256SUMS before installing it. On PowerShell, use `Get-FileHash <tarball> -Algorithm SHA256`; on Linux, run `sha256sum -c SHA256SUMS` in the download directory.
2. **From this repository:** follow the checkout and dependency steps in the [example quickstart](quickstart.md), then run `pnpm build` and `pnpm pack:local` from the Latch repository root. The tarballs are written to `artifacts/`.

Studio is maintained separately. Its runtime download is not established as the v1.0.1 package set; obtain v1 packages through GitHub or a v1 source checkout. Studio integration configurations use schema 1 and must still pass your installed CLI checks.
Studio is maintained separately. Its runtime download is not established as the v1.0.2 package set; obtain v1 packages through GitHub or a v1 source checkout. Studio integration configurations use schema 1 and must still pass your installed CLI checks.

In your application, create `vendor/latch/` and copy all six tarballs into it. Keep the `.tgz` files intact; pnpm installs them directly. The following steps assume this directory structure:

Expand All @@ -28,12 +28,12 @@ your-app/
tsconfig.json
src/
vendor/latch/
latch-local-contracts-1.0.1.tgz
latch-local-browser-1.0.1.tgz
latch-local-runtime-1.0.1.tgz
latch-local-react-1.0.1.tgz
latch-local-test-1.0.1.tgz
latch-local-cli-1.0.1.tgz
latch-local-contracts-1.0.2.tgz
latch-local-browser-1.0.2.tgz
latch-local-runtime-1.0.2.tgz
latch-local-react-1.0.2.tgz
latch-local-test-1.0.2.tgz
latch-local-cli-1.0.2.tgz
```

For a pnpm workspace, put the overrides in the workspace root's `pnpm-workspace.yaml` and resolve their paths relative to that root. Run package installation commands in the application package. The example above assumes a single application root.
Expand All @@ -44,25 +44,25 @@ Add these entries to your application's `pnpm-workspace.yaml`. If the file exist

```yaml
overrides:
'@latch-local/contracts': file:./vendor/latch/latch-local-contracts-1.0.1.tgz
'@latch-local/browser': file:./vendor/latch/latch-local-browser-1.0.1.tgz
'@latch-local/runtime': file:./vendor/latch/latch-local-runtime-1.0.1.tgz
'@latch-local/react': file:./vendor/latch/latch-local-react-1.0.1.tgz
'@latch-local/test': file:./vendor/latch/latch-local-test-1.0.1.tgz
'@latch-local/cli': file:./vendor/latch/latch-local-cli-1.0.1.tgz
'@latch-local/contracts': file:./vendor/latch/latch-local-contracts-1.0.2.tgz
'@latch-local/browser': file:./vendor/latch/latch-local-browser-1.0.2.tgz
'@latch-local/runtime': file:./vendor/latch/latch-local-runtime-1.0.2.tgz
'@latch-local/react': file:./vendor/latch/latch-local-react-1.0.2.tgz
'@latch-local/test': file:./vendor/latch/latch-local-test-1.0.2.tgz
'@latch-local/cli': file:./vendor/latch/latch-local-cli-1.0.2.tgz
```

All six overrides are required because the packages depend on one another and are not published to a registry. Do not put these overrides only in `package.json`; pnpm 11 uses the workspace YAML settings. See the [pnpm settings reference](https://pnpm.io/settings).

Now install the browser dependencies and developer tools:

```sh
pnpm add --ignore-scripts ./vendor/latch/latch-local-contracts-1.0.1.tgz ./vendor/latch/latch-local-browser-1.0.1.tgz ./vendor/latch/latch-local-runtime-1.0.1.tgz ./vendor/latch/latch-local-react-1.0.1.tgz
pnpm add -D --ignore-scripts ./vendor/latch/latch-local-test-1.0.1.tgz ./vendor/latch/latch-local-cli-1.0.1.tgz
pnpm add --ignore-scripts ./vendor/latch/latch-local-contracts-1.0.2.tgz ./vendor/latch/latch-local-browser-1.0.2.tgz ./vendor/latch/latch-local-runtime-1.0.2.tgz ./vendor/latch/latch-local-react-1.0.2.tgz
pnpm add -D --ignore-scripts ./vendor/latch/latch-local-test-1.0.2.tgz ./vendor/latch/latch-local-cli-1.0.2.tgz
pnpm exec latch --version
```

The version command should print `1.0.1`. The Latch tarballs are prebuilt and need no installation scripts. These commands skip dependency lifecycle scripts for this installation; keep your existing application's build dependencies configured separately. This also avoids pnpm 11 stopping on an unapproved dependency build script. Retain the tarballs at their configured paths for future installs. Registry lookups for `@latch-local/*` usually mean an override is missing or points at the wrong directory.
The version command should print `1.0.2`. The Latch tarballs are prebuilt and need no installation scripts. These commands skip dependency lifecycle scripts for this installation; keep your existing application's build dependencies configured separately. This also avoids pnpm 11 stopping on an unapproved dependency build script. Retain the tarballs at their configured paths for future installs. Registry lookups for `@latch-local/*` usually mean an override is missing or points at the wrong directory.

## 3. Add your configuration and mount marker

Expand Down
5 changes: 3 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ Install Git, Node 22 or later, and pnpm 10.17.1 or later. The repository pins pn
Run these commands in a terminal:

```sh
git clone --branch v1.0.1 --depth 1 https://github.com/agammann/latch.git
git clone --depth 1 https://github.com/agammann/latch.git
cd latch
pnpm install --frozen-lockfile --ignore-scripts
pnpm build
pnpm check:examples
pnpm exec playwright install chromium
```

On Linux, use `pnpm exec playwright install --with-deps chromium` if browser system dependencies are missing. Installing system dependencies may require administrator access.

A successful build produces the six packages under `packages/*/dist` and bundles the local console into the CLI. The example source and its generated integrations are already tracked in the checkout.
A successful build produces the six packages under `packages/*/dist` and bundles the local console into the CLI. This quickstart uses the current main branch. The example source and matching generated integrations are tracked in the checkout; `check:examples` verifies them before running the browser checks.

## 2. Run the ordinary browser checks

Expand Down
4 changes: 2 additions & 2 deletions examples/catalog/.latch/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": 1,
"generatorVersion": "1.0.1",
"generatorVersion": "1.0.2",
"files": {
"src/latch.generated/integration.ts": {
"before": null,
"after": "0821f8af189918d1fdc0fde49b5c8189bf65fc19555bb463d06024bb5f1242d9"
"after": "216976cc82e8d90addd58c6050fba0aa6c02cfb60f1f44cdf009b7799a8ee85a"
},
"src/latch.generated/env.d.ts": {
"before": null,
Expand Down
2 changes: 1 addition & 1 deletion examples/catalog/src/latch.generated/integration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Latch 1.0.1. Edit latch.config.json and application handlers, then regenerate.
// Generated by Latch 1.0.2. Edit latch.config.json and application handlers, then regenerate.
import { useLatch, type ScopeObserver } from '@latch-local/react';
import type { Handler, Contract } from '@latch-local/contracts';
export type Input0 = { "query"?: string; "category"?: "all" | "workspace" | "outdoors"; "sort"?: "name" | "price-asc" | "price-desc" };
Expand Down
4 changes: 2 additions & 2 deletions examples/docs/.latch/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": 1,
"generatorVersion": "1.0.1",
"generatorVersion": "1.0.2",
"files": {
"src/latch.generated/integration.ts": {
"before": null,
"after": "acfc48e253c7ba258198d0f12e01094916c9c951208ca4bc63b036ae8a08b0ae"
"after": "3540953391e5b1ce95ab05b280d67e1075f44d9f5e3684fb608a8edd147792ba"
},
"src/latch.generated/env.d.ts": {
"before": null,
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/src/latch.generated/integration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Latch 1.0.1. Edit latch.config.json and application handlers, then regenerate.
// Generated by Latch 1.0.2. Edit latch.config.json and application handlers, then regenerate.
import { useLatch, type ScopeObserver } from '@latch-local/react';
import type { Handler, Contract } from '@latch-local/contracts';
import { searchDocs as handler0 } from "../library";
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"packageManager": "pnpm@10.17.1",
"scripts": {
"build": "node scripts/build.mjs",
"check:examples": "node scripts/check-examples.mjs",
"test": "node --test tests/*.test.mjs",
"verify": "node scripts/verify.mjs",
"verify:consumer": "node scripts/consumer.mjs",
Expand Down
11 changes: 11 additions & 0 deletions scripts/check-examples.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { spawnSync } from 'node:child_process';

for (const example of ['catalog', 'docs']) {
const result = spawnSync(
process.execPath,
['packages/cli/dist/main.js', 'check', '--root', `examples/${example}`],
{ stdio: 'inherit' },
);
if (result.error) throw result.error;
if (result.status !== 0) process.exit(result.status ?? 1);
}
Loading