diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19b64c8..05f514b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/README.md b/README.md index bbca67a..20133e3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/installation.md b/docs/installation.md index 8bc78f9..f0d2762 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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 -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 -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: @@ -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. @@ -44,12 +44,12 @@ 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). @@ -57,12 +57,12 @@ All six overrides are required because the packages depend on one another and ar 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 diff --git a/docs/quickstart.md b/docs/quickstart.md index 52fd5a2..d16a9f4 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -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 diff --git a/examples/catalog/.latch/manifest.json b/examples/catalog/.latch/manifest.json index 17f8d17..63b3e54 100644 --- a/examples/catalog/.latch/manifest.json +++ b/examples/catalog/.latch/manifest.json @@ -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, diff --git a/examples/catalog/src/latch.generated/integration.ts b/examples/catalog/src/latch.generated/integration.ts index ecc5ab5..65b8ff5 100644 --- a/examples/catalog/src/latch.generated/integration.ts +++ b/examples/catalog/src/latch.generated/integration.ts @@ -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" }; diff --git a/examples/docs/.latch/manifest.json b/examples/docs/.latch/manifest.json index 146d9fc..f3c3568 100644 --- a/examples/docs/.latch/manifest.json +++ b/examples/docs/.latch/manifest.json @@ -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, diff --git a/examples/docs/src/latch.generated/integration.ts b/examples/docs/src/latch.generated/integration.ts index 5742650..863fe3d 100644 --- a/examples/docs/src/latch.generated/integration.ts +++ b/examples/docs/src/latch.generated/integration.ts @@ -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"; diff --git a/package.json b/package.json index 8a06beb..78945d1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/check-examples.mjs b/scripts/check-examples.mjs new file mode 100644 index 0000000..aded627 --- /dev/null +++ b/scripts/check-examples.mjs @@ -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); +}