diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 0230ce664..0af002de6 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -12,7 +12,6 @@
# Release packaging: these run in the jobs that hold the Apple signing and
# notarization credentials, and produce the artifacts users install.
-/scripts/package-macos.sh @SinaKhalili @wingleeio
/scripts/package-linux.sh @SinaKhalili @wingleeio
/scripts/package-windows.ps1 @SinaKhalili @wingleeio
/scripts/ios/ @SinaKhalili @wingleeio
diff --git a/.github/actions/linux-ci/action.yml b/.github/actions/linux-ci/action.yml
index 19c8837d4..acea4dc7b 100644
--- a/.github/actions/linux-ci/action.yml
+++ b/.github/actions/linux-ci/action.yml
@@ -58,7 +58,7 @@ runs:
path: ~/apt-debs/*.deb
key: apt-debs-v1-${{ inputs.apt-cache }}-${{ hashFiles('scripts/ci/apt-install.sh') }}
- # Exported for the rest of the job. Tests and the browser fixture are built in
+ # Exported for the rest of the job. Tests are built in
# the dev profile without debug info (smaller, faster to link). CARGO_* variables
# are part of the rust-cache key, so every job sharing a cache must set the same.
- name: Build settings
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 64fa3c884..846952297 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,13 +8,13 @@ name: CI
# (scripts/ci/reuse.py; every job records its pass as its last
# step). Pull requests get the fast tier: Windows,
# macOS, voice and Android only when the change looks platform
-# specific, and the Windows packaging, iOS simulator and macOS
-# fixtures only for their own files; the `ci:full` label (then
-# re-run) or the CI_PR_TIER=full repository variable runs everything.
+# specific, and the Windows packaging and iOS simulator only for
+# their own files; the `ci:full` label (then re-run) or the
+# CI_PR_TIER=full repository variable runs everything.
# Main, the merge queue and manual runs get the full tier; the
-# nightly schedule runs everything, slow tests included. Voice and
-# the Linux browser fixture run only nightly, manually or with
-# `ci:full`. Fork pull requests reuse only main's passes.
+# nightly schedule runs everything, slow tests included. Voice runs
+# only nightly, manually or with `ci:full`. Fork pull requests reuse
+# only main's passes.
# admit waits until every runner the run needs is free, so that once a
# run starts, none of its jobs queues behind another run's
# (scripts/ci/admit.py). Its name carries the reservation; other runs
@@ -44,7 +44,7 @@ on:
branches: [main]
merge_group:
workflow_dispatch:
- # Nightly: every suite and job in full (slow tests and fixtures included), nothing reused.
+ # Nightly: every suite and job in full (slow tests included), nothing reused.
schedule:
- cron: '23 6 * * *'
@@ -126,19 +126,8 @@ jobs:
uses: ./.github/workflows/ui-tests.yml
with:
core: true
- ui: false
pass-key: ${{ fromJSON(needs.plan.outputs.keys).core || '' }}
- linux-ui:
- needs: [plan, admit]
- if: fromJSON(needs.plan.outputs.suites).ui
- uses: ./.github/workflows/ui-tests.yml
- with:
- core: false
- ui: true
- browser: ${{ contains(fromJSON(needs.plan.outputs.flags).ui || fromJSON('[]'), 'browser') }}
- pass-key: ${{ fromJSON(needs.plan.outputs.keys).ui || '' }}
-
cursor:
needs: [plan, admit]
if: fromJSON(needs.plan.outputs.suites).cursor
@@ -183,28 +172,15 @@ jobs:
uses: ./.github/workflows/macos.yml
with:
native: true
- frame-source: false
ios: false
- fixtures: ${{ contains(fromJSON(needs.plan.outputs.flags).macos || fromJSON('[]'), 'fixtures') }}
pass-key: ${{ fromJSON(needs.plan.outputs.keys).macos || '' }}
- frame-source:
- needs: [plan, admit]
- if: fromJSON(needs.plan.outputs.suites).frame_source
- uses: ./.github/workflows/macos.yml
- with:
- native: false
- frame-source: true
- ios: false
- pass-key: ${{ fromJSON(needs.plan.outputs.keys).frame_source || '' }}
-
ios:
needs: [plan, admit]
if: fromJSON(needs.plan.outputs.suites).ios
uses: ./.github/workflows/macos.yml
with:
native: false
- frame-source: false
ios: true
skip: ${{ toJSON(fromJSON(needs.plan.outputs.skip).ios || fromJSON('[]')) }}
pass-key: ${{ fromJSON(needs.plan.outputs.keys).ios || '' }}
@@ -233,7 +209,7 @@ jobs:
result:
name: CI result
- needs: [plan, admit, linux-core, linux-ui, cursor, edge, installer, voice, windows, macos, frame-source, ios, android, zgx]
+ needs: [plan, admit, linux-core, cursor, edge, installer, voice, windows, macos, ios, android, zgx]
if: always()
runs-on: ubuntu-24.04
timeout-minutes: 5
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 9c8720f07..6c499991d 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -12,16 +12,9 @@ on:
native:
type: boolean
default: true
- frame-source:
- type: boolean
- default: true
ios:
type: boolean
default: true
- fixtures:
- description: Also run the WebKit browser and preview fixtures (pull requests that touch them; always otherwise).
- type: boolean
- default: true
skip:
description: JSON list of jobs not to run (ci.yml; `ios-tests` when a pull request leaves the app alone).
type: string
@@ -41,8 +34,8 @@ env:
# rustc 1.98.0 and another 1.98.1) and rust-cache keys include the rustc version, so a job that lands
# on an older image would otherwise miss the cache that `main` seeded.
jobs:
- # Updater and preview tests, native UI regressions and the two native WebKit fixtures. Everything is
- # compiled once (one cargo invocation, so dependencies are built once) and then run.
+ # Updater, preview, CoreText and `zeron` command-line tests. Everything is compiled once (one cargo
+ # invocation, so dependencies are built once) and then run.
macos-native:
if: inputs.native
runs-on: macos-latest
@@ -73,70 +66,20 @@ jobs:
mkdir -p "$bin"
tar -xzf "$RUNNER_TEMP/nextest.tar.gz" -C "$bin" cargo-nextest
echo "$bin" >> "$GITHUB_PATH"
- # The app (`-p zeron --bins`) is compiled with the tests, sharing their zeron-ui
- # build: a separate `cargo build -p zeron` rebuilt zeron-ui without the fixture
- # feature (and a `cargo check` before that recompiled every dependency).
- - name: Build tests and the application
+ # The `zeron` binaries (`-p zeron --bins`) are compiled with the tests.
+ - name: Build tests and the binaries
run: |
cargo nextest run --config-file scripts/ci/nextest.toml --no-run --locked \
- -p zeron-update -p zeron-preview -p zeron-ui -p zeron-text -p zeron \
- --features zeron-ui/browser-fixture --lib --bins --tests
- - name: Build fixtures
- if: inputs.fixtures
- run: |
- cargo build --locked -p zeron-update -p zeron-preview -p zeron-ui \
- --features zeron-ui/browser-fixture --example browser-fixture --example preview-fixture
- - name: Updater, preview, CoreText and native UI regressions
+ -p zeron-update -p zeron-preview -p zeron-text -p zeron \
+ --lib --bins --tests
+ - name: Updater, preview, CoreText and command-line tests
run: |
# zeron-text's coretext tests are macOS-only (#![cfg(target_os = "macos")]); its other
- # tests run on Linux in ios-core. The attachment filters cover file staging, chips and
- # external Finder drops, whose paths and file metadata are platform-specific.
+ # tests run on Linux in ios-core.
cargo nextest run --config-file scripts/ci/nextest.toml --no-fail-fast --locked \
- -p zeron-update -p zeron-preview -p zeron-ui -p zeron-text -p zeron \
- --features zeron-ui/browser-fixture --lib --bins --tests \
- -E 'package(zeron-update) | package(zeron-preview) | binary_id(zeron-text::coretext) | binary_id(zeron::cli) | (binary_id(zeron-ui) & (test(native_diff_font_geometry) | test(/notify::tests::/) | test(/^attachments::tests::/) | test(/composer::attachment_chip_tests::/) | test(/shell::chat_dropzone_tests::/) | test(=queue::tests::queue_rows_label_attachment_chips_and_file_only_sends) | test(=transcript::tests::user_bubbles_project_attachment_chips_in_place_of_the_strip) | test(=transcript::tests::sent_chips_show_upload_progress_until_their_bytes_land)))'
- - name: Native browser regression and screenshots
- if: inputs.fixtures
- timeout-minutes: 7
- env:
- RUST_BACKTRACE: 1
- FIXTURE_ATTEMPT_TIMEOUT: 110
- run: |
- scripts/ci/run-macos-fixture.sh target/debug/examples/browser-fixture "$RUNNER_TEMP/browser-captures"
- test -f "$RUNNER_TEMP/browser-captures/result.txt"
- - name: Persistent browser profiles across app launches
- if: inputs.fixtures
- timeout-minutes: 5
- run: python3 scripts/test-browser-storage.py --fixture target/debug/examples/browser-fixture
- - name: Upload browser screenshots
- if: ${{ inputs.fixtures && always() }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: browser-macos-captures
- path: ${{ runner.temp }}/browser-captures*
- if-no-files-found: ignore
- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- if: inputs.fixtures
- with:
- node-version: 24
- - name: Install preview fixture server
- if: inputs.fixtures
- run: npm ci --prefix edge
- - name: Project discovery, stable URLs and HMR in native WebKit
- if: inputs.fixtures
- timeout-minutes: 5
- env:
- ZERON_PREVIEW_AUTO_OPEN: 1
- run: |
- VITE_BINARY="$GITHUB_WORKSPACE/edge/node_modules/vite/bin/vite.js" scripts/ci/run-macos-fixture.sh target/debug/examples/preview-fixture "$RUNNER_TEMP/preview-captures"
- test -f "$RUNNER_TEMP/preview-captures/result.txt"
- - name: Upload preview screenshots
- if: ${{ inputs.fixtures && always() }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: preview-macos-captures
- path: ${{ runner.temp }}/preview-captures*
- if-no-files-found: ignore
+ -p zeron-update -p zeron-preview -p zeron-text -p zeron \
+ --lib --bins --tests \
+ -E 'package(zeron-update) | package(zeron-preview) | binary_id(zeron-text::coretext) | binary_id(zeron::cli)'
- name: Record the pass (CI skips this job while its inputs stay the same)
if: inputs.pass-key != ''
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -144,40 +87,6 @@ jobs:
path: rust-toolchain.toml
key: ${{ inputs.pass-key }}-macos-native
- # gpui_macos lives in the pinned GPUI checkout, a separate workspace with its own cache.
- macos-frame-source:
- if: inputs.frame-source
- runs-on: macos-latest
- timeout-minutes: 30
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - name: Rust toolchain
- run: |
- rustup update stable --no-self-update
- rustup show active-toolchain || rustup toolchain install
- - name: Check out pinned GPUI for native frame-source tests
- shell: bash
- run: |
- rev=$(python3 -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["dependencies"]["gpui"]["rev"])')
- git init frame-source-tests
- git -C frame-source-tests remote add origin https://github.com/zeronsh/zui
- git -C frame-source-tests fetch --depth=1 origin "$rev"
- git -C frame-source-tests checkout --detach FETCH_HEAD
- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- with:
- save-if: ${{ github.ref == 'refs/heads/main' }}
- cache-on-failure: true
- workspaces: frame-source-tests
- - name: Native frame-source recovery regression
- working-directory: frame-source-tests
- run: cargo test --locked -p gpui_macos --test frame_source_recovery
- - name: Record the pass (CI skips this job while its inputs stay the same)
- if: inputs.pass-key != ''
- uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- with:
- path: rust-toolchain.toml
- key: ${{ inputs.pass-key }}-macos-frame-source
-
# The iOS checks that do not need Apple tooling run on Linux: Rust mobile core tests, and "the
# committed Swift bindings are current" (the UniFFI metadata is identical for any target, so the
# bindings are generated from the host build of the library).
diff --git a/.github/workflows/release-profile-tests.yml b/.github/workflows/release-profile-tests.yml
index 12d8dc7d4..9ba8f0cda 100644
--- a/.github/workflows/release-profile-tests.yml
+++ b/.github/workflows/release-profile-tests.yml
@@ -1,7 +1,7 @@
name: Release-profile tests
# Pull-request and main CI test the dev profile (fast rebuilds). This runs the
-# same Linux suites once a day against the optimized release profile that
+# same Linux core suite once a day against the optimized release profile that
# ships, so optimization-only failures still surface. It does not save a Rust
# cache, so it cannot evict the main-seeded caches pull requests depend on.
@@ -29,19 +29,3 @@ jobs:
- name: Harness, engine, sync, update, doc and preview tests (release)
run: scripts/ci/test-core.sh --release
- ui-tests:
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - uses: ./.github/actions/linux-ci
- with:
- rust-cache: release-profile-ui
- apt-cache: gpui
- apt-packages: >-
- libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev
- libx11-dev libxcb1-dev libx11-xcb-dev
- libfontconfig1-dev libfreetype-dev libasound2-dev
- libvulkan-dev pkg-config cmake libwebkit2gtk-4.1-dev libjson-glib-dev
- - name: UI and headless layout regressions (release)
- run: cargo nextest run --config-file scripts/ci/nextest.toml --locked --no-fail-fast --release -p zeron-ui --lib
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b6ac7c5b7..37626ef91 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,10 +11,7 @@ name: release
# `curl -fsSL https://zeron.sh/install.sh | sh`), bumping latest.txt.
#
# Every shipped Zeron installs these (crates/update at v0.2.138 reads the same
-# names, checksums and `--version` answers), so a release can move to the old
-# app (apps/zeron, the jobs below) and back: the `app` input of a run by hand,
-# or the repository variable STABLE_APP=gpui for a tag. That's the way back
-# if the zgx app has to be withdrawn: a newer version of the old app.
+# names, checksums and `--version` answers).
#
# Trigger: push a tag `v` matching the workspace version in
# Cargo.toml (bump it in the same commit), or run manually via
@@ -25,13 +22,8 @@ on:
tags: ["v*"]
workflow_dispatch:
inputs:
- app:
- description: Which app to build.
- type: choice
- options: [zgx, gpui]
- default: zgx
platforms:
- description: Which to build (the zgx app).
+ description: Which to build.
type: string
default: macos linux windows
@@ -43,31 +35,22 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
- app: ${{ steps.version.outputs.app }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - name: version (the workspace's; a tag's must be it) and app
+ - name: version (the workspace's; a tag's must be it)
id: version
- env:
- APP: ${{ inputs.app || vars.STABLE_APP || 'zgx' }}
run: |
workspace="$(grep -m1 '^version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')"
if [ "$GITHUB_EVENT_NAME" = push ] && [ "${GITHUB_REF_NAME#v}" != "$workspace" ]; then
echo "tag $GITHUB_REF_NAME isn't the workspace's v$workspace"; exit 1
fi
- case "$APP" in
- zgx|gpui) ;;
- *) echo "app '$APP' is neither zgx nor gpui"; exit 1 ;;
- esac
echo "version=$workspace" >>"$GITHUB_OUTPUT"
- echo "app=$APP" >>"$GITHUB_OUTPUT"
cursor-compatibility:
uses: ./.github/workflows/cursor-compatibility.yml
zgx:
needs: version
- if: needs.version.outputs.app == 'zgx'
uses: ./.github/workflows/zgx-build.yml
secrets: inherit
with:
@@ -78,138 +61,10 @@ jobs:
# latest; their first package moves them here.)
windows-feed: https://zeron.sh/releases
- # The old app (apps/zeron), when a release has to go back to it.
- linux:
- needs: version
- if: needs.version.outputs.app == 'gpui'
- strategy:
- fail-fast: false
- matrix:
- include:
- - runner: ubuntu-24.04 # x86_64
- - runner: ubuntu-24.04-arm # aarch64
- runs-on: ${{ matrix.runner }}
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - name: gpui system deps
- run: |
- sudo apt-get update -qq
- sudo apt-get install -y -qq \
- libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
- libx11-dev libxcb1-dev libx11-xcb-dev \
- libfontconfig1-dev libfreetype-dev libasound2-dev \
- libvulkan-dev pkg-config cmake libwebkit2gtk-4.1-dev libjson-glib-dev
- - name: rust toolchain (rust-toolchain.toml)
- run: rustup show active-toolchain || rustup toolchain install
- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- - name: package
- run: scripts/package-linux.sh
- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: linux-${{ runner.arch }}
- path: target/package/*.tar.gz
- if-no-files-found: error
-
- # Every platform must build before publishing the release and updater manifest.
- #
- # Signing/notarization (both optional — absent secrets fall back to an
- # ad-hoc-signed build):
- # MACOS_CERT_P12 / MACOS_CERT_PASSWORD — base64 "Developer ID Application"
- # certificate + private key (.p12) and its export password.
- # AC_API_KEY_P8 / AC_API_KEY_ID / AC_API_ISSUER_ID — App Store Connect API
- # key (raw .p8 contents), for notarytool. All three present → the package
- # script notarizes and staples the app + dmg (no Gatekeeper warning).
- # They live in the `apple-release` environment, which only release tags and
- # main may use: a run from any other branch gets no environment, so no
- # credentials, and builds ad-hoc-signed.
- macos:
- needs: version
- if: needs.version.outputs.app == 'gpui'
- runs-on: macos-latest # Apple silicon
- environment: ${{ (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') && 'apple-release' || '' }}
- env:
- MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
- MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }}
- AC_API_KEY_P8: ${{ secrets.AC_API_KEY_P8 }}
- AC_API_KEY_ID: ${{ secrets.AC_API_KEY_ID }}
- AC_API_ISSUER_ID: ${{ secrets.AC_API_ISSUER_ID }}
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - name: rust toolchain (rust-toolchain.toml)
- run: rustup show active-toolchain || rustup toolchain install
- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- - name: import Developer ID certificate
- if: env.MACOS_CERT_P12 != ''
- run: |
- keychain="$RUNNER_TEMP/release.keychain-db"
- pass="$(openssl rand -hex 16)"
- security create-keychain -p "$pass" "$keychain"
- security set-keychain-settings -lut 3600 "$keychain"
- security unlock-keychain -p "$pass" "$keychain"
- printf '%s' "$MACOS_CERT_P12" | base64 -d >"$RUNNER_TEMP/cert.p12"
- security import "$RUNNER_TEMP/cert.p12" -k "$keychain" \
- -P "$MACOS_CERT_PASSWORD" -T /usr/bin/codesign
- rm -f "$RUNNER_TEMP/cert.p12"
- # Allow codesign to use the imported key without a UI prompt.
- security set-key-partition-list -S apple-tool:,apple: \
- -s -k "$pass" "$keychain" >/dev/null
- security list-keychains -d user -s "$keychain" login.keychain-db
- identity="$(security find-identity -v -p codesigning "$keychain" \
- | sed -n 's/.*"\(Developer ID Application: [^"]*\)".*/\1/p' | head -1)"
- [ -n "$identity" ] || { echo "p12 contains no Developer ID Application identity"; exit 1; }
- echo "CODESIGN_IDENTITY=$identity" >>"$GITHUB_ENV"
- - name: notary credentials
- if: env.AC_API_KEY_P8 != ''
- run: |
- printf '%s' "$AC_API_KEY_P8" >"$RUNNER_TEMP/ac_api_key.p8"
- {
- echo "NOTARY_KEY_PATH=$RUNNER_TEMP/ac_api_key.p8"
- echo "NOTARY_KEY_ID=$AC_API_KEY_ID"
- echo "NOTARY_ISSUER_ID=$AC_API_ISSUER_ID"
- } >>"$GITHUB_ENV"
- - name: package dmg
- run: scripts/package-macos.sh
- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: macos-${{ runner.arch }}
- path: |
- target/package/*.dmg
- target/package/*.tar.gz
- if-no-files-found: error
-
- windows:
- needs: version
- if: needs.version.outputs.app == 'gpui'
- runs-on: windows-2022
- timeout-minutes: 90
- defaults:
- run:
- shell: pwsh
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - name: rust toolchain (rust-toolchain.toml)
- run: rustup show active-toolchain || rustup toolchain install
- - name: Locate Windows SDK shader compiler
- run: |
- $fxc = Get-ChildItem "${env:ProgramFiles(x86)}/Windows Kits/10/bin/*/x64/fxc.exe" |
- Sort-Object FullName -Descending | Select-Object -First 1
- if (-not $fxc) { throw 'Windows SDK fxc.exe is required for GPUI release shaders' }
- "GPUI_FXC_PATH=$($fxc.FullName)" >> $env:GITHUB_ENV
- - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- - name: package installer and portable app
- run: ./scripts/package-windows.ps1 -ReleasesUrl "https://github.com/$env:GITHUB_REPOSITORY/releases/latest/download"
- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: windows-${{ runner.arch }}
- path: |
- target/package/*.zip
- target/package/*.exe
- if-no-files-found: error
-
publish:
- # One app's jobs run and the other's are skipped: none may have failed.
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !failure() && !cancelled()
- needs: [version, cursor-compatibility, zgx, linux, macos, windows]
+ # Every platform must build before publishing the release and updater manifest.
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
+ needs: [version, cursor-compatibility, zgx]
runs-on: ubuntu-latest
environment: cloudflare
env:
@@ -234,17 +89,11 @@ jobs:
done
echo "VERSION=$ver" >> "$GITHUB_ENV"
- name: updater manifest
- env:
- APP: ${{ needs.version.outputs.app }}
run: |
- # The zgx app needs macOS 13 (Ghostty's floor); the old app's 12. A
- # Mac below it is held on the release it has, and told why
- # (crates/update `offer`, in every Zeron since 0.2.136).
- if [ "$APP" = zgx ]; then
- manifest=$(jq -n --arg version "$VERSION" '{version: $version, minimumMacOS: "13.0", files: {}}')
- else
- manifest=$(jq -n --arg version "$VERSION" '{version: $version, files: {}}')
- fi
+ # The app needs macOS 13 (Ghostty's floor). A Mac below it is held on
+ # the release it has, and told why (crates/update `offer`, in every
+ # Zeron since 0.2.136).
+ manifest=$(jq -n --arg version "$VERSION" '{version: $version, minimumMacOS: "13.0", files: {}}')
for f in dist/*; do
sha=$(sha256sum "$f" | cut -d' ' -f1)
manifest=$(jq --arg name "$(basename "$f")" --arg sha "$sha" \
@@ -262,8 +111,6 @@ jobs:
# after a failed R2 upload gets past this step.
overwrite_files: false
- name: upload to R2 (zeron.sh/releases/*)
- env:
- APP: ${{ needs.version.outputs.app }}
if: env.CLOUDFLARE_API_TOKEN != ''
run: |
# The Cloudflare API returns the odd 502; retry each object.
@@ -288,22 +135,21 @@ jobs:
put "manifest-$VERSION.json" manifest.json
printf '%s' "$VERSION" > latest.txt
put latest.txt latest.txt
- # The beta channel carries every release of the zgx app: a beta
+ # The beta channel carries every release: a beta
# download (the website's) gets each stable release too, unless a
# newer beta is already there, and stays on beta (crates/update
# `follows_channels`). The same files under beta/, the manifest last.
- if [ "$APP" = zgx ]; then
- # Read from the bucket itself, not a cache; on any doubt, leave it.
- beta=""
- if npx wrangler@4 r2 object get comet-native-releases/beta/manifest.json --file beta-current.json --remote; then
- beta="$(jq -r '.version // empty' beta-current.json)"
- fi
- if [ -z "$beta" ]; then
- # Loudly: claim-only betas reach stable through this copy alone.
- # Re-run the job once the bucket answers.
- echo "::error::couldn't read the beta channel's manifest, so this release isn't in the beta channel"
- exit 1
- elif python3 - "$VERSION" "$beta" <<'PY'
+ # Read from the bucket itself, not a cache; on any doubt, leave it.
+ beta=""
+ if npx wrangler@4 r2 object get comet-native-releases/beta/manifest.json --file beta-current.json --remote; then
+ beta="$(jq -r '.version // empty' beta-current.json)"
+ fi
+ if [ -z "$beta" ]; then
+ # Loudly: claim-only betas reach stable through this copy alone.
+ # Re-run the job once the bucket answers.
+ echo "::error::couldn't read the beta channel's manifest, so this release isn't in the beta channel"
+ exit 1
+ elif python3 - "$VERSION" "$beta" <<'PY'
import re, sys
def key(v):
m = re.fullmatch(r"(\d+)\.(\d+)\.(\d+)(?:-beta\.(\d+))?", v.strip())
@@ -315,13 +161,12 @@ jobs:
new, old = key(sys.argv[1]), key(sys.argv[2])
sys.exit(0 if new and (old is None or new > old) else 1)
PY
- then
- for f in dist/*; do
- put "beta/$(basename "$f")" "$f"
- done
- put "beta/manifest-$VERSION.json" manifest.json
- put beta/manifest.json manifest.json
- else
- echo "the beta channel's $beta is newer than $VERSION: left as it is"
- fi
+ then
+ for f in dist/*; do
+ put "beta/$(basename "$f")" "$f"
+ done
+ put "beta/manifest-$VERSION.json" manifest.json
+ put beta/manifest.json manifest.json
+ else
+ echo "the beta channel's $beta is newer than $VERSION: left as it is"
fi
diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml
index 5b26b70cc..9ef6c8d23 100644
--- a/.github/workflows/ui-tests.yml
+++ b/.github/workflows/ui-tests.yml
@@ -12,13 +12,6 @@ on:
core:
type: boolean
default: true
- ui:
- type: boolean
- default: true
- browser:
- description: Also run the native browser fixture (ci.yml - nightly, manual runs and `ci:full`).
- type: boolean
- default: true
permissions:
contents: read
@@ -31,7 +24,7 @@ env:
ZERON_STRESS_ROUNDS: ${{ github.event_name == 'schedule' && '100' || '14' }}
jobs:
- # Every Linux Rust test that is not UI: one build, one nextest run (see
+ # The Linux Rust tests: one build, one nextest run (see
# scripts/ci/test-core.sh), including the voice protocol and transport tests
# that need no audio stack.
core-tests:
@@ -52,60 +45,3 @@ jobs:
with:
path: rust-toolchain.toml
key: ${{ inputs.pass-key }}-core-tests
-
- # UI and headless layout regressions, then (when `browser`) the native browser
- # on X11 and Wayland. One job: the browser fixture shares the UI build's
- # dependency graph and cache, so it costs a link rather than a second runner.
- ui-tests:
- if: inputs.ui
- runs-on: ubuntu-24.04
- timeout-minutes: 40
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - id: setup
- uses: ./.github/actions/linux-ci
- with:
- rust-cache: ui
- save-rust-cache: 'true'
- # One .deb cache for both package sets (apt-install.sh uses it as its archive).
- apt-cache: ui-browser
- apt-recommends: ${{ inputs.browser && 'true' || 'false' }}
- apt-packages: >-
- libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev
- libx11-dev libxcb1-dev libx11-xcb-dev libfontconfig1-dev
- libfreetype-dev libasound2-dev libvulkan-dev pkg-config cmake
- libwebkit2gtk-4.1-dev libjson-glib-dev
- ${{ inputs.browser && 'xvfb xauth xdotool openbox weston ffmpeg imagemagick fonts-noto-cjk' || '' }}
- - name: UI and headless layout regressions
- run: cargo nextest run --config-file scripts/ci/nextest.toml --locked --no-fail-fast -p zeron-ui --lib
- # The browser steps run even when a UI test failed (a separate signal), but not
- # when the setup did: without the packages they can only fail.
- - name: Build browser fixture
- if: ${{ inputs.browser && !cancelled() && steps.setup.outcome == 'success' }}
- run: cargo build --locked -p zeron-ui --example browser-fixture --features browser-fixture
- - name: Persistent browser profiles across app launches
- if: ${{ inputs.browser && !cancelled() && steps.setup.outcome == 'success' }}
- timeout-minutes: 5
- run: xvfb-run -a python3 scripts/test-browser-storage.py --fixture target/debug/examples/browser-fixture
- - name: X11 and Wayland browser regressions
- if: ${{ inputs.browser && !cancelled() && steps.setup.outcome == 'success' }}
- timeout-minutes: 5
- env:
- RUST_LOG: gpui_wgpu=info
- BROWSER_FIXTURE_BINARY: target/debug/examples/browser-fixture
- run: |
- scripts/test-linux-browser.sh "$RUNNER_TEMP/linux-browser/default"
- VK_DRIVER_FILES=/dev/null scripts/test-linux-browser.sh "$RUNNER_TEMP/linux-browser/opengl"
- - name: Upload native browser evidence
- if: ${{ inputs.browser && always() }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: linux-browser
- path: ${{ runner.temp }}/linux-browser
- if-no-files-found: warn
- - name: Record the pass (CI skips this job while its inputs stay the same)
- if: inputs.pass-key != ''
- uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- with:
- path: rust-toolchain.toml
- key: ${{ inputs.pass-key }}-ui-tests
diff --git a/.github/workflows/weekly-tests.yml b/.github/workflows/weekly-tests.yml
index cca42e40f..1828263e8 100644
--- a/.github/workflows/weekly-tests.yml
+++ b/.github/workflows/weekly-tests.yml
@@ -35,7 +35,7 @@ jobs:
- uses: ./.github/actions/linux-ci
with:
rust-cache: weekly-crates
- apt-cache: ui-browser
+ apt-cache: weekly-crates
apt-packages: >-
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libx11-dev libxcb1-dev
libx11-xcb-dev libfontconfig1-dev libfreetype-dev libasound2-dev libvulkan-dev
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index d6989ca18..8a6607395 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -1,7 +1,7 @@
name: Windows tests
# Called by ci.yml (which decides when Windows runs and holds the runners for
-# it, see scripts/ci/admit.py). Dispatch it by hand for the native GUI probes.
+# it, see scripts/ci/admit.py).
on:
workflow_call:
inputs:
@@ -13,15 +13,7 @@ on:
description: JSON list of jobs that already passed on the same inputs (ci.yml skips them).
type: string
default: '[]'
- native_gui:
- type: boolean
- default: false
workflow_dispatch:
- inputs:
- native_gui:
- description: 'Run native GUI/pixel probes (requires a usable desktop and Direct3D)'
- type: boolean
- default: false
permissions:
contents: read
@@ -39,8 +31,6 @@ jobs:
# Every Windows crate suite in ONE build: separate `cargo test` invocations
# with different package sets each recompiled the shared dependency graph
# (they used to be three jobs, ~20 min each, almost all of it compiling).
- # nextest runs each test in its own process, so zeron-ui's tests run side by
- # side (the old in-process `--test-threads=1` run needed them one at a time).
tests:
if: ${{ !contains(fromJSON(inputs.skip || '[]'), 'tests') }}
runs-on: windows-2022
@@ -53,32 +43,29 @@ jobs:
- name: Build tests
run: >-
cargo nextest run --config-file scripts/ci/nextest.toml --no-run --release --locked
- -p zeron-ui -p zeron-harness -p gpui_windows -p zeron -p zeron-update -p zeron-proto -p zeron-engine -p zeron-voice-media
+ -p zeron-harness -p zeron -p zeron-update -p zeron-proto -p zeron-engine -p zeron-voice-media
--features zeron-harness/native-fixture
--lib --bins
--test codex_availability --test windows_native --test opencode --test cursor_shim --test pi_rpc
--test background_engine --test noop_browser
--test worktree_on_run --test codex_catalog --test codex_login_resolution --test auth
# Same selection as the old commands:
- # UI: the zeron-ui library (native_diff_font_geometry included)
# native harness security/integration + portable driver suites (OpenCode HTTP/SSE,
# the Cursor shim, Pi RPC; the shell- and python-fixture suites are unix-only)
- # shader layout, application and updater, worktree paths, engine unit/catalog/login/auth
+ # the `zeron` binary and updater, worktree paths, engine unit/catalog/login/auth
# voice-media (runtime resolution; used to be its own build in voice-tests.yml)
- # gpui_windows (shader layout) is a git dependency, which a filterset cannot name: the last
- # clause picks it as "not one of the workspace packages above".
- - name: UI, harness, shader layout, application, updater and engine tests
+ - name: Harness, command line, updater and engine tests
env:
RUST_BACKTRACE: '1'
run: >-
cargo nextest run --config-file scripts/ci/nextest.toml --release --locked --no-fail-fast
- -p zeron-ui -p zeron-harness -p gpui_windows -p zeron -p zeron-update -p zeron-proto -p zeron-engine -p zeron-voice-media
+ -p zeron-harness -p zeron -p zeron-update -p zeron-proto -p zeron-engine -p zeron-voice-media
--features zeron-harness/native-fixture
--lib --bins
--test codex_availability --test windows_native --test opencode --test cursor_shim --test pi_rpc
--test background_engine --test noop_browser
--test worktree_on_run --test codex_catalog --test codex_login_resolution --test auth
- -E "(package(zeron-ui) & kind(lib)) | package(zeron-harness) | package(zeron) | package(zeron-update) | (package(zeron-voice-media) & kind(lib)) | (package(zeron-proto) & test(device_paths)) | (package(zeron-engine) & (kind(lib) | binary_id(zeron-engine::codex_catalog) | binary_id(zeron-engine::codex_login_resolution) | binary_id(zeron-engine::auth) | (binary_id(zeron-engine::worktree_on_run) & test(worktree_location_)))) | (not package(zeron-ui) & not package(zeron-harness) & not package(zeron) & not package(zeron-update) & not package(zeron-proto) & not package(zeron-engine) & not package(zeron-voice-media) & test(layout))"
+ -E "package(zeron-harness) | package(zeron) | package(zeron-update) | (package(zeron-voice-media) & kind(lib)) | (package(zeron-proto) & test(device_paths)) | (package(zeron-engine) & (kind(lib) | binary_id(zeron-engine::codex_catalog) | binary_id(zeron-engine::codex_login_resolution) | binary_id(zeron-engine::auth) | (binary_id(zeron-engine::worktree_on_run) & test(worktree_location_))))"
- name: Record the pass (CI skips this job while its inputs stay the same)
if: inputs.pass-key != ''
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -94,7 +81,7 @@ jobs:
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: ./.github/actions/windows-ci-setup
- - name: Build application
+ - name: Build the zeron binary
# (Luau without its asserts, as scripts/package-windows.ps1 builds it
# next: the same flags, so it doesn't build it again.)
env:
@@ -104,8 +91,6 @@ jobs:
run: ./scripts/package-windows.ps1 -ReleasesUrl "https://github.com/$env:GITHUB_REPOSITORY/releases/latest/download"
- name: Installer install/uninstall
run: ./scripts/test-windows-installer.ps1
- - name: GUI subsystem and redirected CLI output
- run: ./scripts/test-windows-startup.ps1
- name: CLI startup without HOME
run: |
# Exercise real path resolution without touching the runner's account.
@@ -141,19 +126,6 @@ jobs:
if (-not ($output -match '^Mode:\s+local only$')) {
throw 'An isolated Windows startup must select local-only mode'
}
- - name: Build rendering fixture
- if: ${{ inputs.native_gui }}
- run: cargo build --release --locked -p zeron-ui --example windows-render-fixture --features windows-render-fixture
- - name: Upload GUI test binaries
- if: ${{ inputs.native_gui }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: windows-gui-binaries
- path: |
- target/release/zeron.exe
- target/release/examples/windows-render-fixture.exe
- if-no-files-found: error
- retention-days: 1
- name: Record the pass (CI skips this job while its inputs stay the same)
if: inputs.pass-key != ''
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -161,31 +133,3 @@ jobs:
path: rust-toolchain.toml
key: ${{ inputs.pass-key }}-app
- native-gui:
- if: ${{ inputs.native_gui }}
- needs: app
- runs-on: windows-2022
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
- with:
- name: windows-gui-binaries
- path: target/release
- - name: App lifecycle tests
- run: ./scripts/test-windows-lifecycle.ps1
- - name: Rendering tests
- run: ./scripts/test-windows-rendering.ps1
- - name: Upload GUI test results
- if: always()
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: windows-native-probes
- path: |
- target/windows-render-*/capture.png
- target/windows-render-*/measurements.json
- target/windows-render-*/stdout.txt
- target/windows-render-*/stderr.txt
- target/windows-lifecycle-*/result.txt
- target/windows-lifecycle-*/run-*.txt
- if-no-files-found: warn
diff --git a/.github/workflows/zgx-tests.yml b/.github/workflows/zgx-tests.yml
index 4e96302ad..a6ca130cb 100644
--- a/.github/workflows/zgx-tests.yml
+++ b/.github/workflows/zgx-tests.yml
@@ -4,8 +4,9 @@ name: zgx tests
# crate it or the engine's plugin host builds changes. zgx-beta.yml only builds.
#
# apps/zgx's unit tests (`cargo test --bin zeron-zgx`: src/plugins/*_tests.rs
-# among them) and its Luau UI tests (`zgx test ui`, the zgx CLI at the rev
-# apps/zgx/Cargo.toml pins), on macOS and Linux, the known failures let
+# among them), its integration tests (`cargo test --test '*'`:
+# apps/zgx/tests/*.rs) and its Luau UI tests (`zgx test ui`, the zgx CLI at
+# the rev apps/zgx/Cargo.toml pins), on macOS and Linux, the known failures let
# through (scripts/ci/test-zgx.sh, scripts/ci/zgx-known-failures.txt);
# and on macOS the engine's plugin tests (its lib's `plugins::` tests and
# tests/plugin_services.rs), which core-tests runs on Linux.
@@ -86,6 +87,9 @@ jobs:
--git https://github.com/zeronsh/zgx --rev "$REV" zgx-script --bin zgx --features inspect --root ~/zgx-cli
- name: apps/zgx unit tests
run: scripts/ci/test-zgx.sh rust
+ - name: apps/zgx integration tests
+ if: ${{ !cancelled() }}
+ run: scripts/ci/test-zgx.sh tests
- name: apps/zgx Luau UI tests
if: ${{ !cancelled() }}
run: scripts/ci/test-zgx.sh ui ~/zgx-cli/bin/zgx
@@ -143,6 +147,9 @@ jobs:
--git https://github.com/zeronsh/zgx --rev "$REV" zgx-script --bin zgx --features inspect --root ~/zgx-cli
- name: apps/zgx unit tests
run: scripts/ci/test-zgx.sh rust
+ - name: apps/zgx integration tests
+ if: ${{ !cancelled() }}
+ run: scripts/ci/test-zgx.sh tests
- name: apps/zgx Luau UI tests
if: ${{ !cancelled() }}
run: scripts/ci/test-zgx.sh ui ~/zgx-cli/bin/zgx
diff --git a/Cargo.lock b/Cargo.lock
index a8e9438a7..611152ef4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,115 +2,6 @@
# It is not intended for manual editing.
version = 4
-[[package]]
-name = "accesskit"
-version = "0.24.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320"
-dependencies = [
- "enumn",
- "uuid",
-]
-
-[[package]]
-name = "accesskit_atspi_common"
-version = "0.18.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954"
-dependencies = [
- "accesskit",
- "accesskit_consumer 0.36.0",
- "atspi-common 0.13.0",
- "phf 0.13.1",
- "serde",
- "zvariant",
-]
-
-[[package]]
-name = "accesskit_consumer"
-version = "0.36.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60"
-dependencies = [
- "accesskit",
- "hashbrown 0.16.1",
-]
-
-[[package]]
-name = "accesskit_consumer"
-version = "0.37.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f950720ce064757a1b629caad3a408e8d2c63bb01f29b8a3ff8daa331053ffeb"
-dependencies = [
- "accesskit",
- "hashbrown 0.16.1",
-]
-
-[[package]]
-name = "accesskit_consumer"
-version = "0.38.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245"
-dependencies = [
- "accesskit",
- "hashbrown 0.16.1",
-]
-
-[[package]]
-name = "accesskit_macos"
-version = "0.26.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076"
-dependencies = [
- "accesskit",
- "accesskit_consumer 0.38.0",
- "hashbrown 0.16.1",
- "objc2 0.5.2",
- "objc2-app-kit 0.2.2",
- "objc2-foundation 0.2.2",
-]
-
-[[package]]
-name = "accesskit_unix"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c"
-dependencies = [
- "accesskit",
- "accesskit_atspi_common",
- "async-channel",
- "async-executor",
- "async-task",
- "atspi 0.29.0",
- "futures-lite",
- "futures-util",
- "serde",
- "zbus",
-]
-
-[[package]]
-name = "accesskit_windows"
-version = "0.33.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36e93ac7bf50b964f1cbb75f741629a4e950571baa1ef1274457ab5a80d9bcc2"
-dependencies = [
- "accesskit",
- "accesskit_consumer 0.37.0",
- "hashbrown 0.16.1",
- "static_assertions",
- "windows 0.62.2",
- "windows-core 0.62.2",
-]
-
-[[package]]
-name = "addr2line"
-version = "0.25.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
-dependencies = [
- "gimli",
-]
-
[[package]]
name = "adler2"
version = "2.0.1"
@@ -136,7 +27,6 @@ dependencies = [
"cfg-if",
"cipher",
"cpufeatures 0.2.17",
- "zeroize",
]
[[package]]
@@ -160,7 +50,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [
"cfg-if",
- "const-random",
"getrandom 0.3.4",
"once_cell",
"serde",
@@ -193,7 +82,7 @@ dependencies = [
"piper",
"polling",
"regex-automata",
- "rustix 1.1.4",
+ "rustix",
"rustix-openpty",
"serde",
"signal-hook",
@@ -202,24 +91,6 @@ dependencies = [
"windows-sys 0.59.0",
]
-[[package]]
-name = "aligned"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685"
-dependencies = [
- "as-slice",
-]
-
-[[package]]
-name = "aligned-vec"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b"
-dependencies = [
- "equator",
-]
-
[[package]]
name = "allocator-api2"
version = "0.2.21"
@@ -325,15 +196,6 @@ version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac436601d6bdde674a0d7fb593e829ffe7b3387c351b356dd20e2d40f5bf3ee5"
-[[package]]
-name = "ar_archive_writer"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73cd58deff2140a0a8eae87e417bd01db68a33e148aa93d1e8cd837e55e312b6"
-dependencies = [
- "object 0.39.1",
-]
-
[[package]]
name = "arbitrary"
version = "1.4.2"
@@ -343,17 +205,6 @@ dependencies = [
"derive_arbitrary",
]
-[[package]]
-name = "arg_enum_proc_macro"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "arrayref"
version = "0.3.9"
@@ -372,21 +223,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ccd462b64c3c72f1be8305905a85d85403d768e8690c9b8bd3b9009a5761679"
-[[package]]
-name = "as-raw-xcb-connection"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
-
-[[package]]
-name = "as-slice"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516"
-dependencies = [
- "stable_deref_trait",
-]
-
[[package]]
name = "ash"
version = "0.38.0+1.3.281"
@@ -396,24 +232,6 @@ dependencies = [
"libloading",
]
-[[package]]
-name = "ashpd"
-version = "0.13.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb8421aaa9644a5faf26735f258b669b15f063313ef8f8e2bdb28912a1a6f111"
-dependencies = [
- "enumflags2",
- "futures-channel",
- "futures-util",
- "getrandom 0.4.3",
- "serde",
- "serde_repr",
- "wayland-backend",
- "wayland-client",
- "wayland-protocols",
- "zbus",
-]
-
[[package]]
name = "askama"
version = "0.16.1"
@@ -476,7 +294,7 @@ dependencies = [
"asn1-rs-derive 0.5.1",
"asn1-rs-impl",
"displaydoc",
- "nom 7.1.3",
+ "nom",
"num-traits",
"rusticata-macros",
"thiserror 1.0.69",
@@ -492,7 +310,7 @@ dependencies = [
"asn1-rs-derive 0.6.0",
"asn1-rs-impl",
"displaydoc",
- "nom 7.1.3",
+ "nom",
"num-traits",
"rusticata-macros",
"thiserror 2.0.20",
@@ -558,136 +376,6 @@ dependencies = [
"pin-project-lite",
]
-[[package]]
-name = "async-compression"
-version = "0.4.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3976abdc8fe7d1133d43d304afd42abdf5bc3e1319d263d223bde07b5efc4be8"
-dependencies = [
- "compression-codecs",
- "compression-core",
- "futures-io",
- "pin-project-lite",
-]
-
-[[package]]
-name = "async-executor"
-version = "1.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"
-dependencies = [
- "async-task",
- "concurrent-queue",
- "fastrand",
- "futures-lite",
- "pin-project-lite",
- "slab",
-]
-
-[[package]]
-name = "async-fs"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5"
-dependencies = [
- "async-lock",
- "blocking",
- "futures-lite",
-]
-
-[[package]]
-name = "async-io"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"
-dependencies = [
- "autocfg",
- "cfg-if",
- "concurrent-queue",
- "futures-io",
- "futures-lite",
- "parking",
- "polling",
- "rustix 1.1.4",
- "slab",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "async-lock"
-version = "3.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"
-dependencies = [
- "event-listener",
- "event-listener-strategy",
- "pin-project-lite",
-]
-
-[[package]]
-name = "async-net"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
-dependencies = [
- "async-io",
- "blocking",
- "futures-lite",
-]
-
-[[package]]
-name = "async-process"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75"
-dependencies = [
- "async-channel",
- "async-io",
- "async-lock",
- "async-signal",
- "async-task",
- "blocking",
- "cfg-if",
- "event-listener",
- "futures-lite",
- "rustix 1.1.4",
-]
-
-[[package]]
-name = "async-recursion"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "async-signal"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"
-dependencies = [
- "async-io",
- "async-lock",
- "atomic-waker",
- "cfg-if",
- "futures-core",
- "futures-io",
- "rustix 1.1.4",
- "signal-hook-registry",
- "slab",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "async-task"
-version = "4.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
-
[[package]]
name = "async-trait"
version = "0.1.92"
@@ -699,35 +387,6 @@ dependencies = [
"syn 3.0.3",
]
-[[package]]
-name = "atk"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"
-dependencies = [
- "atk-sys",
- "glib",
- "libc",
-]
-
-[[package]]
-name = "atk-sys"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"
-dependencies = [
- "glib-sys",
- "gobject-sys",
- "libc",
- "system-deps",
-]
-
-[[package]]
-name = "atomic"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba"
-
[[package]]
name = "atomic-polyfill"
version = "1.0.3"
@@ -743,94 +402,6 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
-[[package]]
-name = "atspi"
-version = "0.29.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d"
-dependencies = [
- "atspi-common 0.13.0",
- "atspi-proxies 0.13.0",
-]
-
-[[package]]
-name = "atspi"
-version = "0.30.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bf601cccedfffec598ec2db1f9d6745885458bccc0e8916d7023f017c94b3d0"
-dependencies = [
- "atspi-common 0.14.0",
- "atspi-connection",
- "atspi-proxies 0.14.0",
- "zbus",
-]
-
-[[package]]
-name = "atspi-common"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d"
-dependencies = [
- "enumflags2",
- "serde",
- "static_assertions",
- "zbus",
- "zbus-lockstep",
- "zbus-lockstep-macros",
- "zbus_names",
- "zvariant",
-]
-
-[[package]]
-name = "atspi-common"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8a79bed3f5b408ce3152f36e07327a845e6ed5d7e2821a89264037dbcc11daf"
-dependencies = [
- "enumflags2",
- "serde",
- "static_assertions",
- "zbus",
- "zbus-lockstep",
- "zbus-lockstep-macros",
- "zbus_names",
- "zvariant",
-]
-
-[[package]]
-name = "atspi-connection"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fab8e4f574f5a7d3af280b38eff25fb6f47a537dac9ae39ce152f52b19fb10b"
-dependencies = [
- "atspi-common 0.14.0",
- "atspi-proxies 0.14.0",
- "futures-lite",
- "zbus",
-]
-
-[[package]]
-name = "atspi-proxies"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc"
-dependencies = [
- "atspi-common 0.13.0",
- "serde",
- "zbus",
-]
-
-[[package]]
-name = "atspi-proxies"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53403acd3ab2fdb5914f6558da22e540fc07656fce5510f8c02be0e6ef68413e"
-dependencies = [
- "atspi-common 0.14.0",
- "serde",
- "zbus",
-]
-
[[package]]
name = "autocfg"
version = "1.5.1"
@@ -846,64 +417,6 @@ dependencies = [
"cc",
]
-[[package]]
-name = "av-scenechange"
-version = "0.14.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394"
-dependencies = [
- "aligned",
- "anyhow",
- "arg_enum_proc_macro",
- "arrayvec",
- "log",
- "num-rational",
- "num-traits",
- "pastey 0.1.1",
- "rayon",
- "thiserror 2.0.20",
- "v_frame",
- "y4m",
-]
-
-[[package]]
-name = "av1-grain"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8"
-dependencies = [
- "anyhow",
- "arrayvec",
- "log",
- "nom 8.0.0",
- "num-rational",
- "v_frame",
-]
-
-[[package]]
-name = "avif-serialize"
-version = "0.8.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38"
-dependencies = [
- "arrayvec",
-]
-
-[[package]]
-name = "backtrace"
-version = "0.3.76"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
-dependencies = [
- "addr2line",
- "cfg-if",
- "libc",
- "miniz_oxide",
- "object 0.37.3",
- "rustc-demangle",
- "windows-link 0.2.1",
-]
-
[[package]]
name = "base16ct"
version = "0.2.0"
@@ -952,26 +465,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bindgen"
-version = "0.71.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"
-dependencies = [
- "bitflags 2.13.1",
- "cexpr",
- "clang-sys",
- "itertools 0.12.1",
- "log",
- "prettyplease",
- "proc-macro2",
- "quote",
- "regex",
- "rustc-hash 2.1.3",
- "shlex 1.3.0",
- "syn 2.0.119",
-]
-
[[package]]
name = "bindgen"
version = "0.72.1"
@@ -992,30 +485,15 @@ dependencies = [
"syn 2.0.119",
]
-[[package]]
-name = "bit-set"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
-dependencies = [
- "bit-vec 0.8.0",
-]
-
[[package]]
name = "bit-set"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ddef2995421ab6a5c779542c81ee77c115206f4ad9d5a8e05f4ff49716a3dd"
dependencies = [
- "bit-vec 0.9.1",
+ "bit-vec",
]
-[[package]]
-name = "bit-vec"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
-
[[package]]
name = "bit-vec"
version = "0.9.1"
@@ -1025,12 +503,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "bit_field"
-version = "0.10.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6"
-
[[package]]
name = "bitflags"
version = "1.3.2"
@@ -1055,15 +527,6 @@ dependencies = [
"typenum",
]
-[[package]]
-name = "bitstream-io"
-version = "4.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f"
-dependencies = [
- "no_std_io2",
-]
-
[[package]]
name = "blake3"
version = "1.8.7"
@@ -1077,12 +540,6 @@ dependencies = [
"cpufeatures 0.3.0",
]
-[[package]]
-name = "block"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
-
[[package]]
name = "block-buffer"
version = "0.10.4"
@@ -1101,45 +558,13 @@ dependencies = [
"generic-array",
]
-[[package]]
-name = "block2"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
-dependencies = [
- "objc2 0.5.2",
-]
-
[[package]]
name = "block2"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
dependencies = [
- "objc2 0.6.4",
-]
-
-[[package]]
-name = "blocking"
-version = "1.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"
-dependencies = [
- "async-channel",
- "async-task",
- "futures-io",
- "futures-lite",
- "piper",
-]
-
-[[package]]
-name = "borsh"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a88b7ea17d208c4193f2c1e6de3c35fe71f98c96982d5ced308bdcc749ff6e1f"
-dependencies = [
- "bytes",
- "cfg_aliases",
+ "objc2",
]
[[package]]
@@ -1152,12 +577,6 @@ dependencies = [
"serde_core",
]
-[[package]]
-name = "built"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9"
-
[[package]]
name = "bumpalo"
version = "3.20.3"
@@ -1234,56 +653,6 @@ dependencies = [
"libbz2-rs-sys",
]
-[[package]]
-name = "cairo-rs"
-version = "0.18.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
-dependencies = [
- "bitflags 2.13.1",
- "cairo-sys-rs",
- "glib",
- "libc",
- "once_cell",
- "thiserror 1.0.69",
-]
-
-[[package]]
-name = "cairo-sys-rs"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
-dependencies = [
- "glib-sys",
- "libc",
- "system-deps",
-]
-
-[[package]]
-name = "calloop"
-version = "0.14.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7"
-dependencies = [
- "bitflags 2.13.1",
- "polling",
- "rustix 1.1.4",
- "slab",
- "tracing",
-]
-
-[[package]]
-name = "calloop-wayland-source"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"
-dependencies = [
- "calloop",
- "rustix 1.1.4",
- "wayland-backend",
- "wayland-client",
-]
-
[[package]]
name = "camino"
version = "1.2.6"
@@ -1341,24 +710,6 @@ dependencies = [
"cipher",
]
-[[package]]
-name = "cbindgen"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eadd868a2ce9ca38de7eeafdcec9c7065ef89b42b32f0839278d55f35c54d1ff"
-dependencies = [
- "heck 0.4.1",
- "indexmap",
- "log",
- "proc-macro2",
- "quote",
- "serde",
- "serde_json",
- "syn 2.0.119",
- "tempfile",
- "toml 0.8.23",
-]
-
[[package]]
name = "cc"
version = "1.2.67"
@@ -1395,17 +746,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
- "nom 7.1.3",
-]
-
-[[package]]
-name = "cfg-expr"
-version = "0.15.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
-dependencies = [
- "smallvec",
- "target-lexicon",
+ "nom",
]
[[package]]
@@ -1420,15 +761,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
-[[package]]
-name = "cgl"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "chacha20"
version = "0.9.1"
@@ -1576,66 +908,6 @@ dependencies = [
"thiserror 2.0.20",
]
-[[package]]
-name = "cocoa"
-version = "0.25.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c"
-dependencies = [
- "bitflags 1.3.2",
- "block",
- "cocoa-foundation 0.1.2",
- "core-foundation 0.9.4",
- "core-graphics 0.23.2",
- "foreign-types 0.5.0",
- "libc",
- "objc",
-]
-
-[[package]]
-name = "cocoa"
-version = "0.26.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
-dependencies = [
- "bitflags 2.13.1",
- "block",
- "cocoa-foundation 0.2.0",
- "core-foundation 0.10.1",
- "core-graphics 0.24.0",
- "foreign-types 0.5.0",
- "libc",
- "objc",
-]
-
-[[package]]
-name = "cocoa-foundation"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7"
-dependencies = [
- "bitflags 1.3.2",
- "block",
- "core-foundation 0.9.4",
- "core-graphics-types 0.1.3",
- "libc",
- "objc",
-]
-
-[[package]]
-name = "cocoa-foundation"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
-dependencies = [
- "bitflags 2.13.1",
- "block",
- "core-foundation 0.10.1",
- "core-graphics-types 0.2.0",
- "libc",
- "objc",
-]
-
[[package]]
name = "codespan-reporting"
version = "0.13.1"
@@ -1647,16 +919,6 @@ dependencies = [
"unicode-width",
]
-[[package]]
-name = "collections"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "gpui_util",
- "indexmap",
- "rustc-hash 2.1.3",
-]
-
[[package]]
name = "color_quant"
version = "1.1.0"
@@ -1694,24 +956,6 @@ dependencies = [
"static_assertions",
]
-[[package]]
-name = "compression-codecs"
-version = "0.4.38"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf"
-dependencies = [
- "bzip2",
- "compression-core",
- "flate2",
- "memchr",
-]
-
-[[package]]
-name = "compression-core"
-version = "0.4.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789"
-
[[package]]
name = "concurrent-queue"
version = "2.5.0"
@@ -1721,76 +965,18 @@ dependencies = [
"crossbeam-utils",
]
-[[package]]
-name = "console_error_panic_hook"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
-dependencies = [
- "cfg-if",
- "wasm-bindgen",
-]
-
[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
-[[package]]
-name = "const-random"
-version = "0.1.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
-dependencies = [
- "const-random-macro",
-]
-
-[[package]]
-name = "const-random-macro"
-version = "0.1.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
-dependencies = [
- "getrandom 0.2.17",
- "once_cell",
- "tiny-keccak",
-]
-
[[package]]
name = "constant_time_eq"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
-[[package]]
-name = "convert_case"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9"
-dependencies = [
- "unicode-segmentation",
-]
-
-[[package]]
-name = "convert_case"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "affbf0190ed2caf063e3def54ff444b449371d55c58e513a95ab98eca50adb49"
-dependencies = [
- "unicode-segmentation",
-]
-
-[[package]]
-name = "cookie"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87"
-dependencies = [
- "time",
- "version_check",
-]
-
[[package]]
name = "core-foundation"
version = "0.9.4"
@@ -1817,19 +1003,6 @@ version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
-[[package]]
-name = "core-graphics"
-version = "0.23.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081"
-dependencies = [
- "bitflags 1.3.2",
- "core-foundation 0.9.4",
- "core-graphics-types 0.1.3",
- "foreign-types 0.5.0",
- "libc",
-]
-
[[package]]
name = "core-graphics"
version = "0.24.0"
@@ -1838,35 +1011,11 @@ checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
dependencies = [
"bitflags 2.13.1",
"core-foundation 0.10.1",
- "core-graphics-types 0.2.0",
+ "core-graphics-types",
"foreign-types 0.5.0",
"libc",
]
-[[package]]
-name = "core-graphics-helmer-fork"
-version = "0.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32eb7c354ae9f6d437a6039099ce7ecd049337a8109b23d73e48e8ffba8e9cd5"
-dependencies = [
- "bitflags 2.13.1",
- "core-foundation 0.9.4",
- "core-graphics-types 0.1.3",
- "foreign-types 0.5.0",
- "libc",
-]
-
-[[package]]
-name = "core-graphics-types"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"
-dependencies = [
- "bitflags 1.3.2",
- "core-foundation 0.9.4",
- "libc",
-]
-
[[package]]
name = "core-graphics-types"
version = "0.2.0"
@@ -1878,19 +1027,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "core-graphics2"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4416167a69126e617f8d0a214af0e3c1dbdeffcb100ddf72dcd1a1ac9893c146"
-dependencies = [
- "bitflags 2.13.1",
- "block",
- "cfg-if",
- "core-foundation 0.10.1",
- "libc",
-]
-
[[package]]
name = "core-text"
version = "21.0.0"
@@ -1898,25 +1034,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a593227b66cbd4007b2a050dfdd9e1d1318311409c8d600dc82ba1b15ca9c130"
dependencies = [
"core-foundation 0.10.1",
- "core-graphics 0.24.0",
+ "core-graphics",
"foreign-types 0.5.0",
"libc",
]
-[[package]]
-name = "core-video"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "139679cc63eb9504bdbe37e37874b0247136177655f0008588781e90863afa62"
-dependencies = [
- "block",
- "core-foundation 0.10.1",
- "core-graphics2",
- "io-surface",
- "libc",
- "metal",
-]
-
[[package]]
name = "core_maths"
version = "0.1.1"
@@ -1940,30 +1062,6 @@ dependencies = [
"objc2-core-foundation",
]
-[[package]]
-name = "cosmic-text"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73"
-dependencies = [
- "bitflags 2.13.1",
- "fontdb",
- "harfrust",
- "linebender_resource_handle",
- "log",
- "rangemap",
- "rustc-hash 2.1.3",
- "self_cell",
- "skrifa 0.40.0",
- "smol_str",
- "swash",
- "sys-locale",
- "unicode-bidi",
- "unicode-linebreak",
- "unicode-script",
- "unicode-segmentation",
-]
-
[[package]]
name = "cpal"
version = "0.17.3"
@@ -1981,13 +1079,13 @@ dependencies = [
"ndk-context",
"num-derive",
"num-traits",
- "objc2 0.6.4",
+ "objc2",
"objc2-audio-toolbox",
"objc2-avf-audio",
"objc2-core-audio",
"objc2-core-audio-types",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
+ "objc2-foundation",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
@@ -2001,7 +1099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f02e8d0327b42d3e2e4ab2119af397344eb9fc54a34bf0ddeaa1277af8681f1"
dependencies = [
"alsa",
- "block2 0.6.2",
+ "block2",
"coreaudio-rs",
"dasp_sample",
"jni 0.22.4",
@@ -2012,13 +1110,13 @@ dependencies = [
"ndk-context",
"num-derive",
"num-traits",
- "objc2 0.6.4",
+ "objc2",
"objc2-audio-toolbox",
"objc2-avf-audio",
"objc2-core-audio",
"objc2-core-audio-types",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
+ "objc2-foundation",
"web-sys",
"windows 0.62.2",
"windows-core 0.62.2",
@@ -2091,8 +1189,6 @@ dependencies = [
"num-traits",
"once_cell",
"oorandom",
- "plotters",
- "rayon",
"regex",
"serde",
"serde_derive",
@@ -2189,39 +1285,6 @@ dependencies = [
"typenum",
]
-[[package]]
-name = "cssparser"
-version = "0.37.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98"
-dependencies = [
- "cssparser-macros",
- "dtoa-short",
- "itoa",
- "phf 0.13.1",
- "smallvec",
-]
-
-[[package]]
-name = "cssparser-macros"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a"
-dependencies = [
- "quote",
- "syn 3.0.3",
-]
-
-[[package]]
-name = "ctor"
-version = "1.0.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d"
-dependencies = [
- "link-section",
- "linktime-proc-macro",
-]
-
[[package]]
name = "ctr"
version = "0.9.2"
@@ -2331,12 +1394,6 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06"
-[[package]]
-name = "data-url"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"
-
[[package]]
name = "der"
version = "0.7.10"
@@ -2366,7 +1423,7 @@ checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553"
dependencies = [
"asn1-rs 0.6.2",
"displaydoc",
- "nom 7.1.3",
+ "nom",
"num-bigint",
"num-traits",
"rusticata-macros",
@@ -2380,7 +1437,7 @@ checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6"
dependencies = [
"asn1-rs 0.7.2",
"displaydoc",
- "nom 7.1.3",
+ "nom",
"num-bigint",
"num-traits",
"rusticata-macros",
@@ -2434,39 +1491,6 @@ dependencies = [
"syn 2.0.119",
]
-[[package]]
-name = "derive_more"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"
-dependencies = [
- "derive_more-impl",
-]
-
-[[package]]
-name = "derive_more-impl"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"
-dependencies = [
- "convert_case 0.10.0",
- "proc-macro2",
- "quote",
- "rustc_version",
- "syn 2.0.119",
- "unicode-xid",
-]
-
-[[package]]
-name = "derive_refineable"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "deser-hjson"
version = "2.2.6"
@@ -2500,16 +1524,7 @@ version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
- "dirs-sys 0.4.1",
-]
-
-[[package]]
-name = "dirs"
-version = "6.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
-dependencies = [
- "dirs-sys 0.5.0",
+ "dirs-sys",
]
[[package]]
@@ -2520,28 +1535,10 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
- "redox_users 0.4.6",
+ "redox_users",
"windows-sys 0.48.0",
]
-[[package]]
-name = "dirs-sys"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
-dependencies = [
- "libc",
- "option-ext",
- "redox_users 0.5.2",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "dispatch"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
-
[[package]]
name = "dispatch2"
version = "0.3.1"
@@ -2549,9 +1546,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
dependencies = [
"bitflags 2.13.1",
- "block2 0.6.2",
- "libc",
- "objc2 0.6.4",
+ "objc2",
]
[[package]]
@@ -2583,21 +1578,6 @@ dependencies = [
"litrs",
]
-[[package]]
-name = "dom_query"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fac5fca71e65e94cc718a6e2af65d6e0f9c6027751c2aa562fbb5087fda639bc"
-dependencies = [
- "bit-set 0.8.0",
- "cssparser",
- "foldhash 0.2.0",
- "html5ever",
- "precomputed-hash",
- "selectors",
- "tendril",
-]
-
[[package]]
name = "downcast-rs"
version = "1.2.1"
@@ -2610,28 +1590,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9"
dependencies = [
- "phf 0.11.3",
-]
-
-[[package]]
-name = "dpi"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"
-
-[[package]]
-name = "dtoa"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590"
-
-[[package]]
-name = "dtoa-short"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
-dependencies = [
- "dtoa",
+ "phf",
]
[[package]]
@@ -2640,24 +1599,6 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
-[[package]]
-name = "dwrote"
-version = "0.11.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b35532432acc8b19ceed096e35dfa088d3ea037fe4f3c085f1f97f33b4d02"
-dependencies = [
- "lazy_static",
- "libc",
- "winapi",
- "wio",
-]
-
-[[package]]
-name = "dyn-clone"
-version = "1.0.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
-
[[package]]
name = "ecdsa"
version = "0.16.9"
@@ -2725,21 +1666,6 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
-[[package]]
-name = "encoding_rs"
-version = "0.8.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "endi"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"
-
[[package]]
name = "ensure-cov"
version = "0.1.0"
@@ -2782,75 +1708,12 @@ dependencies = [
"syn 2.0.119",
]
-[[package]]
-name = "enumflags2"
-version = "0.7.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"
-dependencies = [
- "enumflags2_derive",
- "serde",
-]
-
-[[package]]
-name = "enumflags2_derive"
-version = "0.7.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "enumn"
-version = "0.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "equator"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc"
-dependencies = [
- "equator-macro",
-]
-
-[[package]]
-name = "equator-macro"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "equivalent"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
-[[package]]
-name = "erased-serde"
-version = "0.4.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec"
-dependencies = [
- "serde",
- "serde_core",
- "typeid",
-]
-
[[package]]
name = "errno"
version = "0.3.14"
@@ -2867,25 +1730,6 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6"
-[[package]]
-name = "etagere"
-version = "0.2.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc89bf99e5dc15954a60f707c1e09d7540e5cd9af85fa75caa0b510bc08c5342"
-dependencies = [
- "euclid",
- "svg_fmt",
-]
-
-[[package]]
-name = "euclid"
-version = "0.22.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06"
-dependencies = [
- "num-traits",
-]
-
[[package]]
name = "event-listener"
version = "5.4.2"
@@ -2906,23 +1750,6 @@ dependencies = [
"pin-project-lite",
]
-[[package]]
-name = "exr"
-version = "1.74.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3"
-dependencies = [
- "bit_field",
- "half",
- "lebe",
- "miniz_oxide",
- "num-complex",
- "pulp",
- "rayon-core",
- "smallvec",
- "zune-inflate",
-]
-
[[package]]
name = "eyre"
version = "0.6.14"
@@ -2951,15 +1778,6 @@ name = "fastrand"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
-dependencies = [
- "getrandom 0.4.3",
-]
-
-[[package]]
-name = "fax"
-version = "0.2.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a"
[[package]]
name = "fdeflate"
@@ -3019,7 +1837,7 @@ dependencies = [
"ahash",
"aho-corasick",
"blake3",
- "dirs 5.0.1",
+ "dirs",
"dunce",
"fff-grep",
"fff-notify-debouncer-full",
@@ -3054,16 +1872,6 @@ version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
-[[package]]
-name = "field-offset"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
-dependencies = [
- "memoffset 0.9.1",
- "rustc_version",
-]
-
[[package]]
name = "file-id"
version = "0.2.3"
@@ -3100,12 +1908,6 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890"
-[[package]]
-name = "fixedbitset"
-version = "0.5.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
-
[[package]]
name = "flate2"
version = "1.1.9"
@@ -3117,45 +1919,6 @@ dependencies = [
"zlib-rs",
]
-[[package]]
-name = "float-cmp"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
-
-[[package]]
-name = "float-ord"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d"
-
-[[package]]
-name = "float_next_after"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8"
-
-[[package]]
-name = "fluent-uri"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d"
-dependencies = [
- "bitflags 1.3.2",
-]
-
-[[package]]
-name = "flume"
-version = "0.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e139bc46ca777eb5efaf62df0ab8cc5fd400866427e56c68b22e414e53bd3be"
-dependencies = [
- "fastrand",
- "futures-core",
- "futures-sink",
- "spin 0.9.9",
-]
-
[[package]]
name = "fnv"
version = "1.0.7"
@@ -3174,47 +1937,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
-[[package]]
-name = "font-types"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7"
-dependencies = [
- "bytemuck",
-]
-
-[[package]]
-name = "font-types"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75382bc7392ef10aad10935f92fc3db36d2d4dad0e5d96d8d65e04f89a07ec39"
-dependencies = [
- "bytemuck",
-]
-
-[[package]]
-name = "fontconfig-parser"
-version = "0.5.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbc773e24e02d4ddd8395fd30dc147524273a83e54e0f312d986ea30de5f5646"
-dependencies = [
- "roxmltree 0.20.0",
-]
-
-[[package]]
-name = "fontdb"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"
-dependencies = [
- "fontconfig-parser",
- "log",
- "memmap2",
- "slotmap",
- "tinyvec",
- "ttf-parser",
-]
-
[[package]]
name = "foreign-types"
version = "0.3.2"
@@ -3266,17 +1988,6 @@ dependencies = [
"percent-encoding",
]
-[[package]]
-name = "freetype-sys"
-version = "0.20.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e7edc5b9669349acfda99533e9e0bcf26a51862ab43b08ee7745c55d28eb134"
-dependencies = [
- "cc",
- "libc",
- "pkg-config",
-]
-
[[package]]
name = "fs-err"
version = "3.3.1"
@@ -3326,19 +2037,6 @@ dependencies = [
"futures-sink",
]
-[[package]]
-name = "futures-concurrency"
-version = "7.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "175cd8cca9e1d45b87f18ffa75088f2099e3c4fe5e2f83e42de112560bea8ea6"
-dependencies = [
- "fixedbitset",
- "futures-core",
- "futures-lite",
- "pin-project",
- "smallvec",
-]
-
[[package]]
name = "futures-core"
version = "0.3.34"
@@ -3362,19 +2060,6 @@ version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
-[[package]]
-name = "futures-lite"
-version = "2.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"
-dependencies = [
- "fastrand",
- "futures-core",
- "futures-io",
- "parking",
- "pin-project-lite",
-]
-
[[package]]
name = "futures-macro"
version = "0.3.34"
@@ -3415,64 +2100,6 @@ dependencies = [
"slab",
]
-[[package]]
-name = "gdk"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"
-dependencies = [
- "cairo-rs",
- "gdk-pixbuf",
- "gdk-sys",
- "gio",
- "glib",
- "libc",
- "pango",
-]
-
-[[package]]
-name = "gdk-pixbuf"
-version = "0.18.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
-dependencies = [
- "gdk-pixbuf-sys",
- "gio",
- "glib",
- "libc",
- "once_cell",
-]
-
-[[package]]
-name = "gdk-pixbuf-sys"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
-dependencies = [
- "gio-sys",
- "glib-sys",
- "gobject-sys",
- "libc",
- "system-deps",
-]
-
-[[package]]
-name = "gdk-sys"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"
-dependencies = [
- "cairo-sys-rs",
- "gdk-pixbuf-sys",
- "gio-sys",
- "glib-sys",
- "gobject-sys",
- "libc",
- "pango-sys",
- "pkg-config",
- "system-deps",
-]
-
[[package]]
name = "generator"
version = "0.8.9"
@@ -3519,7 +2146,7 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"
dependencies = [
- "rustix 1.1.4",
+ "rustix",
"windows-link 0.2.1",
]
@@ -3552,11 +2179,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
- "js-sys",
"libc",
"r-efi 5.3.0",
"wasip2",
- "wasm-bindgen",
]
[[package]]
@@ -3593,44 +2218,6 @@ dependencies = [
"weezl",
]
-[[package]]
-name = "gimli"
-version = "0.32.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
-
-[[package]]
-name = "gio"
-version = "0.18.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
-dependencies = [
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-util",
- "gio-sys",
- "glib",
- "libc",
- "once_cell",
- "pin-project-lite",
- "smallvec",
- "thiserror 1.0.69",
-]
-
-[[package]]
-name = "gio-sys"
-version = "0.18.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
-dependencies = [
- "glib-sys",
- "gobject-sys",
- "libc",
- "system-deps",
- "winapi",
-]
-
[[package]]
name = "git2"
version = "0.21.0"
@@ -3654,53 +2241,6 @@ dependencies = [
"xml-rs",
]
-[[package]]
-name = "glib"
-version = "0.18.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
-dependencies = [
- "bitflags 2.13.1",
- "futures-channel",
- "futures-core",
- "futures-executor",
- "futures-task",
- "futures-util",
- "gio-sys",
- "glib-macros",
- "glib-sys",
- "gobject-sys",
- "libc",
- "memchr",
- "once_cell",
- "smallvec",
- "thiserror 1.0.69",
-]
-
-[[package]]
-name = "glib-macros"
-version = "0.18.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
-dependencies = [
- "heck 0.4.1",
- "proc-macro-crate 2.0.0",
- "proc-macro-error",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "glib-sys"
-version = "0.18.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
-dependencies = [
- "libc",
- "system-deps",
-]
-
[[package]]
name = "glidesort"
version = "0.1.2"
@@ -3786,17 +2326,6 @@ dependencies = [
"gl_generator",
]
-[[package]]
-name = "gobject-sys"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
-dependencies = [
- "glib-sys",
- "libc",
- "system-deps",
-]
-
[[package]]
name = "goblin"
version = "0.8.2"
@@ -3842,366 +2371,6 @@ dependencies = [
"bitflags 2.13.1",
]
-[[package]]
-name = "gpui"
-version = "0.2.2"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "accesskit",
- "anyhow",
- "async-channel",
- "async-task",
- "backtrace",
- "bindgen 0.71.1",
- "bitflags 2.13.1",
- "block",
- "cbindgen",
- "chrono",
- "cocoa 0.26.0",
- "cocoa-foundation 0.2.0",
- "collections",
- "core-foundation 0.10.1",
- "core-foundation-sys",
- "core-graphics 0.24.0",
- "core-text",
- "core-video",
- "criterion",
- "ctor",
- "derive_more",
- "embed-resource",
- "etagere",
- "foreign-types 0.5.0",
- "futures",
- "futures-concurrency",
- "getrandom 0.3.4",
- "gpui_macros",
- "gpui_shared_string",
- "gpui_util",
- "hdrhistogram",
- "heapless 0.9.3",
- "http_client",
- "image",
- "inventory",
- "itertools 0.14.0",
- "log",
- "lyon",
- "mach2 0.5.0",
- "media",
- "metal",
- "num_cpus",
- "objc",
- "parking",
- "parking_lot",
- "pathfinder_geometry",
- "pin-project",
- "pollster 0.4.0",
- "postage",
- "profiling",
- "proptest",
- "rand 0.9.5",
- "raw-window-handle",
- "refineable",
- "regex",
- "resvg",
- "scheduler",
- "schemars",
- "seahash",
- "serde",
- "serde_json",
- "slotmap",
- "smallvec",
- "spin 0.10.1",
- "stacksafe",
- "strum",
- "sum_tree",
- "taffy",
- "thiserror 2.0.20",
- "ttf-parser",
- "url",
- "usvg",
- "util_macros",
- "uuid",
- "waker-fn",
- "web-time",
- "windows 0.61.3",
- "zed-font-kit",
- "zed-scap",
-]
-
-[[package]]
-name = "gpui-base"
-version = "0.5.2"
-source = "git+https://github.com/zeronsh/gpui-component?rev=cab50b071497683a119ae0e4038880f195c0f23f#cab50b071497683a119ae0e4038880f195c0f23f"
-dependencies = [
- "aho-corasick",
- "anyhow",
- "async-channel",
- "chrono",
- "gpui",
- "gpui_macros",
- "instant",
- "lsp-types",
- "objc2 0.6.4",
- "objc2-app-kit 0.3.2",
- "objc2-foundation 0.3.2",
- "raw-window-handle",
- "regex",
- "ropey",
- "schemars",
- "serde",
- "serde_json",
- "smallvec",
- "smol",
- "tracing",
- "unicode-segmentation",
- "web-time",
- "zed-sum-tree",
-]
-
-[[package]]
-name = "gpui_linux"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "accesskit",
- "accesskit_unix",
- "anyhow",
- "as-raw-xcb-connection",
- "ashpd",
- "bitflags 2.13.1",
- "bytemuck",
- "calloop",
- "calloop-wayland-source",
- "collections",
- "filedescriptor",
- "futures",
- "gpui",
- "gpui_util",
- "gpui_wgpu",
- "http_client",
- "image",
- "itertools 0.14.0",
- "libc",
- "log",
- "notify-rust",
- "oo7",
- "open",
- "parking_lot",
- "pathfinder_geometry",
- "pollster 0.4.0",
- "profiling",
- "raw-window-handle",
- "smallvec",
- "smol",
- "strum",
- "swash",
- "url",
- "uuid",
- "wayland-backend",
- "wayland-client",
- "wayland-cursor",
- "wayland-protocols",
- "wayland-protocols-plasma",
- "wayland-protocols-wlr",
- "x11-clipboard",
- "x11rb 0.13.2",
- "xkbcommon",
- "zed-scap",
- "zed-xim",
-]
-
-[[package]]
-name = "gpui_macos"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "accesskit",
- "accesskit_macos",
- "anyhow",
- "async-task",
- "block",
- "block2 0.6.2",
- "cbindgen",
- "cocoa 0.26.0",
- "collections",
- "core-foundation 0.10.1",
- "core-foundation-sys",
- "core-graphics 0.24.0",
- "core-text",
- "core-video",
- "ctor",
- "derive_more",
- "dispatch2",
- "etagere",
- "foreign-types 0.5.0",
- "futures",
- "gpui",
- "gpui_util",
- "image",
- "itertools 0.14.0",
- "libc",
- "log",
- "mach2 0.5.0",
- "media",
- "metal",
- "objc",
- "objc2 0.6.4",
- "objc2-app-kit 0.3.2",
- "objc2-foundation 0.3.2",
- "objc2-user-notifications",
- "parking_lot",
- "pathfinder_geometry",
- "raw-window-handle",
- "semver",
- "smallvec",
- "strum",
- "uuid",
- "zed-font-kit",
-]
-
-[[package]]
-name = "gpui_macros"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "heck 0.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "gpui_platform"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "console_error_panic_hook",
- "gpui",
- "gpui_linux",
- "gpui_macos",
- "gpui_web",
- "gpui_windows",
-]
-
-[[package]]
-name = "gpui_shared_string"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "schemars",
- "serde",
- "smol_str",
-]
-
-[[package]]
-name = "gpui_tokio"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "anyhow",
- "gpui",
- "gpui_util",
- "tokio",
-]
-
-[[package]]
-name = "gpui_util"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "anyhow",
- "log",
- "which",
-]
-
-[[package]]
-name = "gpui_web"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "anyhow",
- "console_error_panic_hook",
- "futures",
- "gpui",
- "gpui_wgpu",
- "http_client",
- "js-sys",
- "log",
- "parking_lot",
- "raw-window-handle",
- "smallvec",
- "uuid",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "wasm_thread",
- "web-sys",
- "web-time",
-]
-
-[[package]]
-name = "gpui_wgpu"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "anyhow",
- "ash",
- "bytemuck",
- "collections",
- "cosmic-text",
- "etagere",
- "gpui",
- "gpui_util",
- "itertools 0.14.0",
- "js-sys",
- "log",
- "parking_lot",
- "pollster 0.4.0",
- "profiling",
- "raw-window-handle",
- "smallvec",
- "swash",
- "unicode-segmentation",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
- "wgpu",
- "zed-font-kit",
-]
-
-[[package]]
-name = "gpui_windows"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "accesskit",
- "accesskit_windows",
- "anyhow",
- "collections",
- "dunce",
- "etagere",
- "futures",
- "gpui",
- "gpui_util",
- "image",
- "itertools 0.14.0",
- "log",
- "parking_lot",
- "rand 0.9.5",
- "raw-window-handle",
- "smallvec",
- "uuid",
- "windows 0.61.3",
- "windows-core 0.61.2",
- "windows-numerics 0.2.0",
- "windows-registry",
-]
-
-[[package]]
-name = "grid"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5"
-
[[package]]
name = "group"
version = "0.13.0"
@@ -4213,58 +2382,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "gtk"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"
-dependencies = [
- "atk",
- "cairo-rs",
- "field-offset",
- "futures-channel",
- "gdk",
- "gdk-pixbuf",
- "gio",
- "glib",
- "gtk-sys",
- "gtk3-macros",
- "libc",
- "pango",
- "pkg-config",
-]
-
-[[package]]
-name = "gtk-sys"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"
-dependencies = [
- "atk-sys",
- "cairo-sys-rs",
- "gdk-pixbuf-sys",
- "gdk-sys",
- "gio-sys",
- "glib-sys",
- "gobject-sys",
- "libc",
- "pango-sys",
- "system-deps",
-]
-
-[[package]]
-name = "gtk3-macros"
-version = "0.18.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"
-dependencies = [
- "proc-macro-crate 1.3.1",
- "proc-macro-error",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "half"
version = "2.7.1"
@@ -4277,19 +2394,6 @@ dependencies = [
"zerocopy",
]
-[[package]]
-name = "harfrust"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9"
-dependencies = [
- "bitflags 2.13.1",
- "bytemuck",
- "core_maths",
- "read-fonts 0.37.0",
- "smallvec",
-]
-
[[package]]
name = "hash32"
version = "0.2.1"
@@ -4352,20 +2456,6 @@ dependencies = [
"hashbrown 0.14.5",
]
-[[package]]
-name = "hdrhistogram"
-version = "7.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f49d1053f4708f0af3cf9fc5bffc7e68a914a3c45becb231c80068c9c3f78bea"
-dependencies = [
- "base64 0.22.1",
- "byteorder",
- "crossbeam-channel",
- "flate2",
- "nom 8.0.0",
- "num-traits",
-]
-
[[package]]
name = "heapless"
version = "0.7.17"
@@ -4376,7 +2466,7 @@ dependencies = [
"hash32 0.2.1",
"rustc_version",
"serde",
- "spin 0.9.9",
+ "spin",
"stable_deref_trait",
]
@@ -4507,16 +2597,6 @@ version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
-[[package]]
-name = "html5ever"
-version = "0.39.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8"
-dependencies = [
- "log",
- "markup5ever",
-]
-
[[package]]
name = "http"
version = "1.5.0"
@@ -4550,26 +2630,6 @@ dependencies = [
"pin-project-lite",
]
-[[package]]
-name = "http_client"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "anyhow",
- "async-compression",
- "bytes",
- "derive_more",
- "futures",
- "http",
- "http-body",
- "log",
- "parking_lot",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "url",
-]
-
[[package]]
name = "httparse"
version = "1.10.1"
@@ -4863,16 +2923,11 @@ dependencies = [
"bytemuck",
"byteorder-lite",
"color_quant",
- "exr",
"gif",
"image-webp",
"moxcms",
"num-traits",
"png 0.18.1",
- "qoi",
- "ravif",
- "rayon",
- "tiff",
"zune-core",
"zune-jpeg",
]
@@ -4884,21 +2939,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3"
dependencies = [
"byteorder-lite",
- "quick-error 2.0.1",
+ "quick-error",
]
-[[package]]
-name = "imagesize"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c"
-
-[[package]]
-name = "imgref"
-version = "1.12.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89194689a993ab15268672e99e7b0e19da2da3268ac682e8f02d29d4d1434cd7"
-
[[package]]
name = "indenter"
version = "0.3.4"
@@ -4971,41 +3014,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
"cfg-if",
- "js-sys",
- "wasm-bindgen",
- "web-sys",
-]
-
-[[package]]
-name = "interpolate_name"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "inventory"
-version = "0.3.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b"
-dependencies = [
- "rustversion",
-]
-
-[[package]]
-name = "io-surface"
-version = "0.16.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "554b8c5d64ec09a3a520fe58e4d48a73e00ff32899cdcbe32a4877afd4968b8e"
-dependencies = [
- "cgl",
- "core-foundation 0.10.1",
- "core-foundation-sys",
- "leaky-cow",
]
[[package]]
@@ -5023,15 +3031,6 @@ version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78"
-[[package]]
-name = "is-docker"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
-dependencies = [
- "once_cell",
-]
-
[[package]]
name = "is-terminal"
version = "0.4.17"
@@ -5043,16 +3042,6 @@ dependencies = [
"windows-sys 0.61.2",
]
-[[package]]
-name = "is-wsl"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
-dependencies = [
- "is-docker",
- "once_cell",
-]
-
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
@@ -5101,29 +3090,6 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
-[[package]]
-name = "javascriptcore-rs"
-version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc"
-dependencies = [
- "bitflags 1.3.2",
- "glib",
- "javascriptcore-rs-sys",
-]
-
-[[package]]
-name = "javascriptcore-rs-sys"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124"
-dependencies = [
- "glib-sys",
- "gobject-sys",
- "libc",
- "system-deps",
-]
-
[[package]]
name = "jni"
version = "0.21.1"
@@ -5230,16 +3196,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "json5"
-version = "1.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "733a844dbd6fef128e98cb4487b887cb55454d92cd9994b1bafe004fabbe670c"
-dependencies = [
- "serde",
- "ucd-trie",
-]
-
[[package]]
name = "khronos-egl"
version = "6.0.0"
@@ -5277,51 +3233,18 @@ dependencies = [
"libc",
]
-[[package]]
-name = "kurbo"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2"
-dependencies = [
- "arrayvec",
- "euclid",
- "polycool",
- "smallvec",
-]
-
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
-[[package]]
-name = "leak"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"
-
-[[package]]
-name = "leaky-cow"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc"
-dependencies = [
- "leak",
-]
-
[[package]]
name = "leb128"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c83bff1d572d6b9aeef67ddfc8448e4a3737909cb28e81f97c791b9018703e52"
-[[package]]
-name = "lebe"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8"
-
[[package]]
name = "libbz2-rs-sys"
version = "0.2.5"
@@ -5334,16 +3257,6 @@ version = "0.2.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
-[[package]]
-name = "libfuzzer-sys"
-version = "0.4.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2"
-dependencies = [
- "arbitrary",
- "cc",
-]
-
[[package]]
name = "libgit2-sys"
version = "0.18.8+1.9.7"
@@ -5414,30 +3327,6 @@ dependencies = [
"vcpkg",
]
-[[package]]
-name = "linebender_resource_handle"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
-
-[[package]]
-name = "link-section"
-version = "0.19.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39c29a617ce3df32c08497bdc1ab6e2376e0b17948ac166a2fbe5977c5954cd9"
-
-[[package]]
-name = "linktime-proc-macro"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e57c38c1e860fd37c604281cdfb1dd2216977fd76a50f85ba2f388ef3219616"
-
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
-
[[package]]
name = "linux-raw-sys"
version = "0.12.1"
@@ -5481,10 +3370,6 @@ name = "log"
version = "0.4.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
-dependencies = [
- "serde_core",
- "value-bag",
-]
[[package]]
name = "loom"
@@ -5501,15 +3386,6 @@ dependencies = [
"tracing-subscriber",
]
-[[package]]
-name = "loop9"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
-dependencies = [
- "imgref",
-]
-
[[package]]
name = "loro"
version = "1.17.1"
@@ -5660,19 +3536,6 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
-[[package]]
-name = "lsp-types"
-version = "0.97.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53353550a17c04ac46c585feb189c2db82154fc84b79c7a66c96c2c644f66071"
-dependencies = [
- "bitflags 1.3.2",
- "fluent-uri",
- "serde",
- "serde_json",
- "serde_repr",
-]
-
[[package]]
name = "luau0-src"
version = "0.22.0+luau740"
@@ -5682,58 +3545,6 @@ dependencies = [
"cc",
]
-[[package]]
-name = "lyon"
-version = "1.0.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd0578bdecb7d6d88987b8b2b1e3a4e2f81df9d0ece1078623324a567904e7b7"
-dependencies = [
- "lyon_algorithms",
- "lyon_tessellation",
-]
-
-[[package]]
-name = "lyon_algorithms"
-version = "1.0.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8575c0d003ae459399623c4def180c63b77f343b1a7fee64f249b349e7699a31"
-dependencies = [
- "lyon_path",
- "num-traits",
-]
-
-[[package]]
-name = "lyon_geom"
-version = "1.0.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4336502e29e32af93cf2dad2214ed6003c17ceb5bd499df77b1de663b9042b92"
-dependencies = [
- "arrayvec",
- "euclid",
- "num-traits",
-]
-
-[[package]]
-name = "lyon_path"
-version = "1.0.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c463f9c428b7fc5ec885dcd39ce4aa61e29111d0e33483f6f98c74e89d8621e"
-dependencies = [
- "lyon_geom",
- "num-traits",
-]
-
-[[package]]
-name = "lyon_tessellation"
-version = "1.0.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e43b7e44161571868f5c931d12583592c223c5583eef86b08aa02b7048a3552"
-dependencies = [
- "float_next_after",
- "lyon_path",
- "num-traits",
-]
-
[[package]]
name = "lz4_flex"
version = "0.11.6"
@@ -5749,20 +3560,6 @@ version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e20f57f9918e5bd7bc58c22cdd70a6afc7375d4dd9683af5f2b34bd3d2bba619"
-[[package]]
-name = "mac-notification-sys"
-version = "0.6.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd604973958ddcc11b561193c0fb96ba146506ef2f231ef2e7c35fd2cbc9beca"
-dependencies = [
- "cc",
- "log",
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
- "time",
- "uuid",
-]
-
[[package]]
name = "mach2"
version = "0.5.0"
@@ -5785,7 +3582,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3ae8f6d608c795738406608304d30a2dfbdc8e58e44f7ba43236da5208ded3c"
dependencies = [
"macro_rules_attribute-proc_macro",
- "pastey 0.2.3",
+ "pastey",
]
[[package]]
@@ -5803,17 +3600,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "markup5ever"
-version = "0.39.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de"
-dependencies = [
- "log",
- "tendril",
- "web_atoms",
-]
-
[[package]]
name = "matchers"
version = "0.2.0"
@@ -5833,16 +3619,6 @@ dependencies = [
"rawpointer",
]
-[[package]]
-name = "maybe-rayon"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
-dependencies = [
- "cfg-if",
- "rayon",
-]
-
[[package]]
name = "md-5"
version = "0.10.6"
@@ -5859,21 +3635,6 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"
-[[package]]
-name = "media"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "anyhow",
- "bindgen 0.71.1",
- "core-foundation 0.10.1",
- "core-video",
- "ctor",
- "foreign-types 0.5.0",
- "metal",
- "objc",
-]
-
[[package]]
name = "memchr"
version = "2.8.3"
@@ -5907,38 +3668,6 @@ dependencies = [
"autocfg",
]
-[[package]]
-name = "mermaid-rs-renderer"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6cb5b469222ce6b9896edf0a969cf68464f5a028ef394fd6643f00bd943df117"
-dependencies = [
- "anyhow",
- "fontdb",
- "json5 1.3.1",
- "once_cell",
- "regex",
- "serde",
- "serde_json",
- "thiserror 2.0.20",
- "ttf-parser",
-]
-
-[[package]]
-name = "metal"
-version = "0.33.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15"
-dependencies = [
- "bitflags 2.13.1",
- "block",
- "core-graphics-types 0.2.0",
- "foreign-types 0.5.0",
- "log",
- "objc",
- "paste",
-]
-
[[package]]
name = "mimalloc"
version = "0.1.52"
@@ -6072,7 +3801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2bf919621e7975acb27d881bae2fb993e0d45c8e0446e85e6272971e00dc8df"
dependencies = [
"arrayvec",
- "bit-set 0.9.1",
+ "bit-set",
"bitflags 2.13.1",
"cfg-if",
"cfg_aliases",
@@ -6135,7 +3864,6 @@ dependencies = [
"log",
"ndk-sys",
"num_enum",
- "raw-window-handle",
"thiserror 1.0.69",
]
@@ -6163,12 +3891,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "new_debug_unreachable"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
-
[[package]]
name = "nix"
version = "0.25.1"
@@ -6196,15 +3918,6 @@ dependencies = [
"memoffset 0.9.1",
]
-[[package]]
-name = "no_std_io2"
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "nom"
version = "7.1.3"
@@ -6215,27 +3928,12 @@ dependencies = [
"minimal-lexical",
]
-[[package]]
-name = "nom"
-version = "8.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "nonmax"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51"
-[[package]]
-name = "noop_proc_macro"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
-
[[package]]
name = "notify"
version = "7.0.0"
@@ -6275,20 +3973,6 @@ dependencies = [
"xxhash-rust",
]
-[[package]]
-name = "notify-rust"
-version = "4.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5b4c1b4f2aa9f25f63a7a49d3dd0ed567b3670da15330a66b29434be899b891"
-dependencies = [
- "futures-lite",
- "log",
- "mac-notification-sys",
- "serde",
- "tauri-winrt-notification",
- "zbus",
-]
-
[[package]]
name = "notify-types"
version = "1.0.1"
@@ -6349,30 +4033,12 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "num-bigint-dig"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7f9a86e097b0d187ad0e65667c2f58b9254671e86e7dbb78036b16692eae099"
-dependencies = [
- "libm",
- "num-integer",
- "num-iter",
- "num-traits",
- "once_cell",
- "rand 0.9.5",
- "serde",
- "smallvec",
- "zeroize",
-]
-
[[package]]
name = "num-complex"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
dependencies = [
- "bytemuck",
"num-traits",
]
@@ -6433,16 +4099,6 @@ dependencies = [
"libm",
]
-[[package]]
-name = "num_cpus"
-version = "1.17.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
-dependencies = [
- "hermit-abi",
- "libc",
-]
-
[[package]]
name = "num_enum"
version = "0.7.6"
@@ -6459,7 +4115,7 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8"
dependencies = [
- "proc-macro-crate 3.5.0",
+ "proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.119",
@@ -6472,34 +4128,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
dependencies = [
"malloc_buf",
- "objc_exception",
-]
-
-[[package]]
-name = "objc-foundation"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
-dependencies = [
- "block",
- "objc",
- "objc_id",
-]
-
-[[package]]
-name = "objc-sys"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
-
-[[package]]
-name = "objc2"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
-dependencies = [
- "objc-sys",
- "objc2-encode",
]
[[package]]
@@ -6509,44 +4137,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
dependencies = [
"objc2-encode",
- "objc2-exception-helper",
-]
-
-[[package]]
-name = "objc2-app-kit"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.5.1",
- "libc",
- "objc2 0.5.2",
- "objc2-core-data 0.2.2",
- "objc2-core-image 0.2.2",
- "objc2-foundation 0.2.2",
- "objc2-quartz-core 0.2.2",
-]
-
-[[package]]
-name = "objc2-app-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.6.2",
- "libc",
- "objc2 0.6.4",
- "objc2-cloud-kit",
- "objc2-core-data 0.3.2",
- "objc2-core-foundation",
- "objc2-core-graphics",
- "objc2-core-image 0.3.2",
- "objc2-core-text",
- "objc2-core-video",
- "objc2-foundation 0.3.2",
- "objc2-quartz-core 0.3.2",
]
[[package]]
@@ -6557,11 +4147,11 @@ checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08"
dependencies = [
"bitflags 2.13.1",
"libc",
- "objc2 0.6.4",
+ "objc2",
"objc2-core-audio",
"objc2-core-audio-types",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
+ "objc2-foundation",
]
[[package]]
@@ -6571,19 +4161,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13a380031deed8e99db00065c45937da434ca987c034e13b87e4441f9e4090be"
dependencies = [
"bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
-]
-
-[[package]]
-name = "objc2-cloud-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
+ "objc2",
+ "objc2-foundation",
]
[[package]]
@@ -6593,10 +4172,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2"
dependencies = [
"dispatch2",
- "objc2 0.6.4",
+ "objc2",
"objc2-core-audio-types",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
+ "objc2-foundation",
]
[[package]]
@@ -6606,30 +4185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c"
dependencies = [
"bitflags 2.13.1",
- "objc2 0.6.4",
-]
-
-[[package]]
-name = "objc2-core-data"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.5.1",
- "objc2 0.5.2",
- "objc2-foundation 0.2.2",
-]
-
-[[package]]
-name = "objc2-core-data"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
+ "objc2",
]
[[package]]
@@ -6639,55 +4195,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
dependencies = [
"bitflags 2.13.1",
- "block2 0.6.2",
+ "block2",
"dispatch2",
"libc",
- "objc2 0.6.4",
-]
-
-[[package]]
-name = "objc2-core-graphics"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"
-dependencies = [
- "bitflags 2.13.1",
- "dispatch2",
- "objc2 0.6.4",
- "objc2-core-foundation",
- "objc2-io-surface",
-]
-
-[[package]]
-name = "objc2-core-image"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
-dependencies = [
- "block2 0.5.1",
- "objc2 0.5.2",
- "objc2-foundation 0.2.2",
- "objc2-metal 0.2.2",
-]
-
-[[package]]
-name = "objc2-core-image"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006"
-dependencies = [
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
-]
-
-[[package]]
-name = "objc2-core-location"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009"
-dependencies = [
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
+ "objc2",
]
[[package]]
@@ -6700,58 +4211,12 @@ dependencies = [
"objc2-core-foundation",
]
-[[package]]
-name = "objc2-core-text"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-core-foundation",
- "objc2-core-graphics",
-]
-
-[[package]]
-name = "objc2-core-video"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-core-foundation",
- "objc2-core-graphics",
- "objc2-io-surface",
-]
-
[[package]]
name = "objc2-encode"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
-[[package]]
-name = "objc2-exception-helper"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a"
-dependencies = [
- "cc",
-]
-
-[[package]]
-name = "objc2-foundation"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.5.1",
- "libc",
- "objc2 0.5.2",
-]
-
[[package]]
name = "objc2-foundation"
version = "0.3.2"
@@ -6759,45 +4224,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
dependencies = [
"bitflags 2.13.1",
- "block2 0.6.2",
+ "block2",
"libc",
- "objc2 0.6.4",
+ "objc2",
"objc2-core-foundation",
]
-[[package]]
-name = "objc2-io-surface"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-core-foundation",
-]
-
-[[package]]
-name = "objc2-javascript-core"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a1e6550c4caed348956ce3370c9ffeca70bb1dbed4fa96112e7c6170e074586"
-dependencies = [
- "objc2 0.6.4",
- "objc2-core-foundation",
-]
-
-[[package]]
-name = "objc2-metal"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.5.1",
- "objc2 0.5.2",
- "objc2-foundation 0.2.2",
-]
-
[[package]]
name = "objc2-metal"
version = "0.3.2"
@@ -6805,22 +4237,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
dependencies = [
"bitflags 2.13.1",
- "block2 0.6.2",
- "objc2 0.6.4",
- "objc2-foundation 0.3.2",
-]
-
-[[package]]
-name = "objc2-quartz-core"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.5.1",
- "objc2 0.5.2",
- "objc2-foundation 0.2.2",
- "objc2-metal 0.2.2",
+ "block2",
+ "objc2",
+ "objc2-foundation",
]
[[package]]
@@ -6830,98 +4249,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"
dependencies = [
"bitflags 2.13.1",
- "objc2 0.6.4",
+ "objc2",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
- "objc2-metal 0.3.2",
-]
-
-[[package]]
-name = "objc2-security"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "709fe137109bd1e8b5a99390f77a7d8b2961dafc1a1c5db8f2e60329ad6d895a"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-core-foundation",
-]
-
-[[package]]
-name = "objc2-ui-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22"
-dependencies = [
- "bitflags 2.13.1",
- "objc2 0.6.4",
- "objc2-core-foundation",
- "objc2-foundation 0.3.2",
-]
-
-[[package]]
-name = "objc2-user-notifications"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.6.2",
- "objc2 0.6.4",
- "objc2-core-location",
- "objc2-foundation 0.3.2",
-]
-
-[[package]]
-name = "objc2-web-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f"
-dependencies = [
- "bitflags 2.13.1",
- "block2 0.6.2",
- "objc2 0.6.4",
- "objc2-app-kit 0.3.2",
- "objc2-core-foundation",
- "objc2-foundation 0.3.2",
- "objc2-javascript-core",
- "objc2-security",
-]
-
-[[package]]
-name = "objc_exception"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"
-dependencies = [
- "cc",
-]
-
-[[package]]
-name = "objc_id"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
-dependencies = [
- "objc",
-]
-
-[[package]]
-name = "object"
-version = "0.37.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "object"
-version = "0.39.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b"
-dependencies = [
- "memchr",
+ "objc2-foundation",
+ "objc2-metal",
]
[[package]]
@@ -6976,41 +4307,6 @@ dependencies = [
"pkg-config",
]
-[[package]]
-name = "oo7"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78f2bfed90f1618b4b48dcad9307f25e14ae894e2949642c87c351601d62cebd"
-dependencies = [
- "aes",
- "ashpd",
- "async-fs",
- "async-io",
- "async-lock",
- "blocking",
- "cbc",
- "cipher",
- "digest",
- "endi",
- "futures-lite",
- "futures-util",
- "getrandom 0.4.3",
- "hkdf",
- "hmac",
- "md-5",
- "num",
- "num-bigint-dig",
- "pbkdf2",
- "serde",
- "serde_bytes",
- "sha2",
- "subtle",
- "zbus",
- "zbus_macros",
- "zeroize",
- "zvariant",
-]
-
[[package]]
name = "oorandom"
version = "11.1.5"
@@ -7023,16 +4319,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
-[[package]]
-name = "open"
-version = "5.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9cfef937e9c486488c7e3d949ae31c0f1d06bdacd75b99c086cb35356e30408"
-dependencies = [
- "is-wsl",
- "libc",
-]
-
[[package]]
name = "openssl"
version = "0.10.81"
@@ -7091,16 +4377,6 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "ordered-stream"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"
-dependencies = [
- "futures-core",
- "pin-project-lite",
-]
-
[[package]]
name = "ort"
version = "2.0.0-rc.13"
@@ -7159,31 +4435,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "pango"
-version = "0.18.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
-dependencies = [
- "gio",
- "glib",
- "libc",
- "once_cell",
- "pango-sys",
-]
-
-[[package]]
-name = "pango-sys"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
-dependencies = [
- "glib-sys",
- "gobject-sys",
- "libc",
- "system-deps",
-]
-
[[package]]
name = "parakeet-rs"
version = "0.3.8"
@@ -7235,12 +4486,6 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
-[[package]]
-name = "pastey"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec"
-
[[package]]
name = "pastey"
version = "0.2.3"
@@ -7253,35 +4498,6 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
-[[package]]
-name = "pathfinder_geometry"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3"
-dependencies = [
- "log",
- "pathfinder_simd",
-]
-
-[[package]]
-name = "pathfinder_simd"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4500030c302e4af1d423f36f3b958d1aecb6c04184356ed5a833bf6b60435777"
-dependencies = [
- "rustc_version",
-]
-
-[[package]]
-name = "pbkdf2"
-version = "0.12.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
-dependencies = [
- "digest",
- "hmac",
-]
-
[[package]]
name = "pem"
version = "4.0.0"
@@ -7316,16 +4532,6 @@ version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
-[[package]]
-name = "perf"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "collections",
- "serde",
- "serde_json",
-]
-
[[package]]
name = "pest"
version = "2.9.0"
@@ -7374,29 +4580,8 @@ version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
dependencies = [
- "phf_macros 0.11.3",
- "phf_shared 0.11.3",
-]
-
-[[package]]
-name = "phf"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
-dependencies = [
- "phf_macros 0.13.1",
- "phf_shared 0.13.1",
- "serde",
-]
-
-[[package]]
-name = "phf_codegen"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
-dependencies = [
- "phf_generator 0.13.1",
- "phf_shared 0.13.1",
+ "phf_macros",
+ "phf_shared",
]
[[package]]
@@ -7405,41 +4590,18 @@ version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
dependencies = [
- "phf_shared 0.11.3",
+ "phf_shared",
"rand 0.8.7",
]
-[[package]]
-name = "phf_generator"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
-dependencies = [
- "fastrand",
- "phf_shared 0.13.1",
-]
-
[[package]]
name = "phf_macros"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
dependencies = [
- "phf_generator 0.11.3",
- "phf_shared 0.11.3",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "phf_macros"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"
-dependencies = [
- "phf_generator 0.13.1",
- "phf_shared 0.13.1",
+ "phf_generator",
+ "phf_shared",
"proc-macro2",
"quote",
"syn 2.0.119",
@@ -7454,41 +4616,6 @@ dependencies = [
"siphasher",
]
-[[package]]
-name = "phf_shared"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
-dependencies = [
- "siphasher",
-]
-
-[[package]]
-name = "pico-args"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
-
-[[package]]
-name = "pin-project"
-version = "1.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "pin-project-lite"
version = "0.2.17"
@@ -7547,34 +4674,6 @@ dependencies = [
"time",
]
-[[package]]
-name = "plotters"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747"
-dependencies = [
- "num-traits",
- "plotters-backend",
- "plotters-svg",
- "wasm-bindgen",
- "web-sys",
-]
-
-[[package]]
-name = "plotters-backend"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a"
-
-[[package]]
-name = "plotters-svg"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670"
-dependencies = [
- "plotters-backend",
-]
-
[[package]]
name = "png"
version = "0.17.16"
@@ -7611,16 +4710,10 @@ dependencies = [
"concurrent-queue",
"hermit-abi",
"pin-project-lite",
- "rustix 1.1.4",
+ "rustix",
"windows-sys 0.61.2",
]
-[[package]]
-name = "pollster"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7"
-
[[package]]
name = "pollster"
version = "0.4.0"
@@ -7638,15 +4731,6 @@ dependencies = [
"universal-hash",
]
-[[package]]
-name = "polycool"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6"
-dependencies = [
- "arrayvec",
-]
-
[[package]]
name = "polyval"
version = "0.6.2"
@@ -7695,23 +4779,6 @@ dependencies = [
"winreg 0.10.1",
]
-[[package]]
-name = "postage"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af3fb618632874fb76937c2361a7f22afd393c982a2165595407edc75b06d3c1"
-dependencies = [
- "atomic",
- "crossbeam-queue",
- "futures",
- "log",
- "parking_lot",
- "pin-project",
- "pollster 0.2.5",
- "static_assertions",
- "thiserror 1.0.69",
-]
-
[[package]]
name = "postcard"
version = "1.1.3"
@@ -7760,12 +4827,6 @@ dependencies = [
"zerocopy",
]
-[[package]]
-name = "precomputed-hash"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
-
[[package]]
name = "presser"
version = "0.3.1"
@@ -7810,25 +4871,6 @@ dependencies = [
"elliptic-curve",
]
-[[package]]
-name = "proc-macro-crate"
-version = "1.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
-dependencies = [
- "once_cell",
- "toml_edit 0.19.15",
-]
-
-[[package]]
-name = "proc-macro-crate"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
-dependencies = [
- "toml_edit 0.20.7",
-]
-
[[package]]
name = "proc-macro-crate"
version = "3.5.0"
@@ -7838,52 +4880,6 @@ dependencies = [
"toml_edit 0.25.13+spec-1.1.0",
]
-[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
-dependencies = [
- "proc-macro-error-attr",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro-error-attr"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
-dependencies = [
- "proc-macro2",
- "quote",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro-error-attr2"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
-dependencies = [
- "proc-macro2",
- "quote",
-]
-
-[[package]]
-name = "proc-macro-error2"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
-dependencies = [
- "proc-macro-error-attr2",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "proc-macro2"
version = "1.0.107"
@@ -7898,59 +4894,6 @@ name = "profiling"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5"
-dependencies = [
- "profiling-procmacros",
-]
-
-[[package]]
-name = "profiling-procmacros"
-version = "1.0.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb"
-dependencies = [
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "proptest"
-version = "1.10.0"
-source = "git+https://github.com/proptest-rs/proptest?rev=3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b#3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b"
-dependencies = [
- "bit-set 0.8.0",
- "bit-vec 0.8.0",
- "bitflags 2.13.1",
- "num-traits",
- "proptest-macro",
- "rand 0.9.5",
- "rand_chacha 0.9.0",
- "rand_xorshift",
- "regex-syntax",
- "rusty-fork",
- "tempfile",
- "unarray",
-]
-
-[[package]]
-name = "proptest-macro"
-version = "0.5.0"
-source = "git+https://github.com/proptest-rs/proptest?rev=3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b#3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b"
-dependencies = [
- "convert_case 0.11.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "psm"
-version = "0.1.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dcd034599e63b970727f70d79e02d62390a4a84f7c6b827c27c46d5ac3fa622"
-dependencies = [
- "ar_archive_writer",
- "cc",
-]
[[package]]
name = "ptr_meta"
@@ -7991,50 +4934,12 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
-[[package]]
-name = "pulp"
-version = "0.22.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a"
-dependencies = [
- "bytemuck",
- "cfg-if",
- "libm",
- "num-complex",
- "paste",
- "pulp-wasm-simd-flag",
- "raw-cpuid",
- "reborrow",
- "version_check",
-]
-
-[[package]]
-name = "pulp-wasm-simd-flag"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740"
-
[[package]]
name = "pxfm"
version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea"
-[[package]]
-name = "qoi"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
-dependencies = [
- "bytemuck",
-]
-
-[[package]]
-name = "quick-error"
-version = "1.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
-
[[package]]
name = "quick-error"
version = "2.0.1"
@@ -8246,15 +5151,6 @@ dependencies = [
"rand_core 0.10.1",
]
-[[package]]
-name = "rand_xorshift"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a"
-dependencies = [
- "rand_core 0.9.5",
-]
-
[[package]]
name = "rand_xoshiro"
version = "0.6.0"
@@ -8270,71 +5166,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"
-[[package]]
-name = "rangemap"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d"
-
-[[package]]
-name = "rav1e"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b"
-dependencies = [
- "aligned-vec",
- "arbitrary",
- "arg_enum_proc_macro",
- "arrayvec",
- "av-scenechange",
- "av1-grain",
- "bitstream-io",
- "built",
- "cfg-if",
- "interpolate_name",
- "itertools 0.14.0",
- "libc",
- "libfuzzer-sys",
- "log",
- "maybe-rayon",
- "new_debug_unreachable",
- "noop_proc_macro",
- "num-derive",
- "num-traits",
- "paste",
- "profiling",
- "rand 0.9.5",
- "rand_chacha 0.9.0",
- "simd_helpers",
- "thiserror 2.0.20",
- "v_frame",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "ravif"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45"
-dependencies = [
- "avif-serialize",
- "imgref",
- "loop9",
- "quick-error 2.0.1",
- "rav1e",
- "rayon",
- "rgb",
-]
-
-[[package]]
-name = "raw-cpuid"
-version = "11.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
-dependencies = [
- "bitflags 2.13.1",
-]
-
[[package]]
name = "raw-window-handle"
version = "0.6.2"
@@ -8347,10 +5178,10 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135"
dependencies = [
- "objc2 0.6.4",
+ "objc2",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
- "objc2-quartz-core 0.3.2",
+ "objc2-foundation",
+ "objc2-quartz-core",
]
[[package]]
@@ -8404,28 +5235,6 @@ dependencies = [
"yasna",
]
-[[package]]
-name = "read-fonts"
-version = "0.37.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5"
-dependencies = [
- "bytemuck",
- "core_maths",
- "font-types 0.11.3",
-]
-
-[[package]]
-name = "read-fonts"
-version = "0.41.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709"
-dependencies = [
- "bytemuck",
- "font-types 0.12.3",
- "once_cell",
-]
-
[[package]]
name = "realfft"
version = "3.5.0"
@@ -8435,12 +5244,6 @@ dependencies = [
"rustfft",
]
-[[package]]
-name = "reborrow"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430"
-
[[package]]
name = "redox_syscall"
version = "0.5.18"
@@ -8461,45 +5264,6 @@ dependencies = [
"thiserror 1.0.69",
]
-[[package]]
-name = "redox_users"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
-dependencies = [
- "getrandom 0.2.17",
- "libredox",
- "thiserror 2.0.20",
-]
-
-[[package]]
-name = "ref-cast"
-version = "1.0.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d"
-dependencies = [
- "ref-cast-impl",
-]
-
-[[package]]
-name = "ref-cast-impl"
-version = "1.0.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[package]]
-name = "refineable"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "derive_refineable",
-]
-
[[package]]
name = "regex"
version = "1.13.1"
@@ -8585,23 +5349,6 @@ dependencies = [
"webpki-roots 1.0.9",
]
-[[package]]
-name = "resvg"
-version = "0.46.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b563218631706d614e23059436526d005b50ab5f2d506b55a17eb65c5eb83419"
-dependencies = [
- "gif",
- "image-webp",
- "log",
- "pico-args",
- "rgb",
- "svgtypes",
- "tiny-skia",
- "usvg",
- "zune-jpeg",
-]
-
[[package]]
name = "rfc6979"
version = "0.4.0"
@@ -8612,15 +5359,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "rgb"
-version = "0.8.53"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
-dependencies = [
- "bytemuck",
-]
-
[[package]]
name = "ring"
version = "0.17.14"
@@ -8665,30 +5403,6 @@ dependencies = [
"syn 3.0.3",
]
-[[package]]
-name = "ropey"
-version = "2.0.0-beta.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4045a00dc327d084a2bbf126976e14125b54f23bd30511d45b842eba76c52d74"
-dependencies = [
- "str_indices",
-]
-
-[[package]]
-name = "roxmltree"
-version = "0.20.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
-
-[[package]]
-name = "roxmltree"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1964b10c76125c36f8afe190065a4bf9a87bf324842c05701330bba9f1cacbb"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "rtc"
version = "0.20.5"
@@ -8991,46 +5705,6 @@ dependencies = [
"smallvec",
]
-[[package]]
-name = "rust-embed"
-version = "8.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "025908b8682a26ba8d12f6f2d66b987584a4a87bc024abc5bbc12553a8cd178a"
-dependencies = [
- "rust-embed-impl",
- "rust-embed-utils",
- "walkdir",
-]
-
-[[package]]
-name = "rust-embed-impl"
-version = "8.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6065f1a4392b71819ec1ea1df1120673418bf386f50de1d6f54204d836d4349c"
-dependencies = [
- "proc-macro2",
- "quote",
- "rust-embed-utils",
- "syn 2.0.119",
- "walkdir",
-]
-
-[[package]]
-name = "rust-embed-utils"
-version = "8.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6cc0c81648b20b70c491ff8cce00c1c3b223bb8ed2b5d41f0e54c6c4c0a3594"
-dependencies = [
- "sha2",
- "walkdir",
-]
-
-[[package]]
-name = "rustc-demangle"
-version = "0.1.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb"
-
[[package]]
name = "rustc-hash"
version = "1.1.0"
@@ -9072,20 +5746,7 @@ version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
dependencies = [
- "nom 7.1.3",
-]
-
-[[package]]
-name = "rustix"
-version = "0.38.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
-dependencies = [
- "bitflags 2.13.1",
- "errno",
- "libc",
- "linux-raw-sys 0.4.15",
- "windows-sys 0.59.0",
+ "nom",
]
[[package]]
@@ -9097,7 +5758,7 @@ dependencies = [
"bitflags 2.13.1",
"errno",
"libc",
- "linux-raw-sys 0.12.1",
+ "linux-raw-sys",
"windows-sys 0.61.2",
]
@@ -9109,7 +5770,7 @@ checksum = "1de16c7c59892b870a6336f185dc10943517f1327447096bbb7bb32cd85e2393"
dependencies = [
"errno",
"libc",
- "rustix 1.1.4",
+ "rustix",
]
[[package]]
@@ -9153,18 +5814,6 @@ version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
-[[package]]
-name = "rusty-fork"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2"
-dependencies = [
- "fnv",
- "quick-error 1.2.3",
- "tempfile",
- "wait-timeout",
-]
-
[[package]]
name = "rustybuzz"
version = "0.20.1"
@@ -9213,47 +5862,6 @@ dependencies = [
"windows-sys 0.61.2",
]
-[[package]]
-name = "scheduler"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "async-task",
- "backtrace",
- "chrono",
- "flume",
- "futures",
- "parking_lot",
- "rand 0.9.5",
- "web-time",
-]
-
-[[package]]
-name = "schemars"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a"
-dependencies = [
- "dyn-clone",
- "indexmap",
- "ref-cast",
- "schemars_derive",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "schemars_derive"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d98c67716b46af2f0b8cf752abc930f6f9aecfbf671ecfb531db8a31dbe4e2ba"
-dependencies = [
- "proc-macro2",
- "quote",
- "serde_derive_internals",
- "syn 3.0.3",
-]
-
[[package]]
name = "scoped-tls"
version = "1.0.1"
@@ -9266,29 +5874,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
-[[package]]
-name = "screencapturekit"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a5eeeb57ac94960cfe5ff4c402be6585ae4c8d29a2cf41b276048c2e849d64e"
-dependencies = [
- "screencapturekit-sys",
-]
-
-[[package]]
-name = "screencapturekit-sys"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22411b57f7d49e7fe08025198813ee6fd65e1ee5eff4ebc7880c12c82bde4c60"
-dependencies = [
- "block",
- "dispatch",
- "objc",
- "objc-foundation",
- "objc_id",
- "once_cell",
-]
-
[[package]]
name = "scroll"
version = "0.12.0"
@@ -9309,12 +5894,6 @@ dependencies = [
"syn 2.0.119",
]
-[[package]]
-name = "seahash"
-version = "4.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"
-
[[package]]
name = "sec1"
version = "0.7.3"
@@ -9352,31 +5931,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "selectors"
-version = "0.38.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d"
-dependencies = [
- "bitflags 2.13.1",
- "cssparser",
- "derive_more",
- "log",
- "new_debug_unreachable",
- "phf 0.13.1",
- "phf_codegen",
- "precomputed-hash",
- "rustc-hash 2.1.3",
- "servo_arc",
- "smallvec",
-]
-
-[[package]]
-name = "self_cell"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813"
-
[[package]]
name = "semver"
version = "1.0.28"
@@ -9397,16 +5951,6 @@ dependencies = [
"serde_derive",
]
-[[package]]
-name = "serde_bytes"
-version = "0.11.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
-dependencies = [
- "serde",
- "serde_core",
-]
-
[[package]]
name = "serde_columnar"
version = "0.3.14"
@@ -9452,26 +5996,6 @@ dependencies = [
"syn 3.0.3",
]
-[[package]]
-name = "serde_derive_internals"
-version = "0.30.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[package]]
-name = "serde_fmt"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e497af288b3b95d067a23a4f749f2861121ffcb2f6d8379310dcda040c345ed"
-dependencies = [
- "serde_core",
-]
-
[[package]]
name = "serde_json"
version = "1.0.151"
@@ -9486,17 +6010,6 @@ dependencies = [
"zmij",
]
-[[package]]
-name = "serde_repr"
-version = "0.1.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
[[package]]
name = "serde_spanned"
version = "0.6.9"
@@ -9582,15 +6095,6 @@ dependencies = [
"serial-core",
]
-[[package]]
-name = "servo_arc"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930"
-dependencies = [
- "stable_deref_trait",
-]
-
[[package]]
name = "sha1"
version = "0.10.7"
@@ -9602,12 +6106,6 @@ dependencies = [
"digest",
]
-[[package]]
-name = "sha1_smol"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
-
[[package]]
name = "sha2"
version = "0.10.9"
@@ -9702,15 +6200,6 @@ dependencies = [
"simdutf8",
]
-[[package]]
-name = "simd_helpers"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
-dependencies = [
- "quote",
-]
-
[[package]]
name = "simdutf8"
version = "0.1.5"
@@ -9723,15 +6212,6 @@ version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa"
-[[package]]
-name = "simplecss"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c"
-dependencies = [
- "log",
-]
-
[[package]]
name = "siphasher"
version = "1.0.3"
@@ -9748,26 +6228,6 @@ dependencies = [
"typenum",
]
-[[package]]
-name = "skrifa"
-version = "0.40.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac"
-dependencies = [
- "bytemuck",
- "read-fonts 0.37.0",
-]
-
-[[package]]
-name = "skrifa"
-version = "0.44.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68"
-dependencies = [
- "bytemuck",
- "read-fonts 0.41.0",
-]
-
[[package]]
name = "slab"
version = "0.4.12"
@@ -9798,33 +6258,6 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8e2fb0f499abb4d162f2bedad68f5ef91a1682b5a03596ddb67efd37768d100"
-[[package]]
-name = "smol"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f"
-dependencies = [
- "async-channel",
- "async-executor",
- "async-fs",
- "async-io",
- "async-lock",
- "async-net",
- "async-process",
- "blocking",
- "futures-lite",
-]
-
-[[package]]
-name = "smol_str"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4aaa7368fcf4852a4c2dd92df0cace6a71f2091ca0a23391ce7f3a31833f1523"
-dependencies = [
- "borsh",
- "serde_core",
-]
-
[[package]]
name = "socket2"
version = "0.6.5"
@@ -9846,32 +6279,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "soup3"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f"
-dependencies = [
- "futures-channel",
- "gio",
- "glib",
- "libc",
- "soup3-sys",
-]
-
-[[package]]
-name = "soup3-sys"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27"
-dependencies = [
- "gio-sys",
- "glib-sys",
- "gobject-sys",
- "libc",
- "system-deps",
-]
-
[[package]]
name = "spin"
version = "0.9.9"
@@ -9881,15 +6288,6 @@ dependencies = [
"lock_api",
]
-[[package]]
-name = "spin"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3"
-dependencies = [
- "lock_api",
-]
-
[[package]]
name = "spirv"
version = "0.4.0+sdk-1.4.341.0"
@@ -9916,7 +6314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5851699c4033c63636f7ea4cf7b7c1f1bf06d0cc03cfb42e711de5a5c46cf326"
dependencies = [
"base64 0.13.1",
- "nom 7.1.3",
+ "nom",
"serde",
"unicode-segmentation",
]
@@ -9927,52 +6325,12 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
-[[package]]
-name = "stacker"
-version = "0.1.25"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967"
-dependencies = [
- "cc",
- "cfg-if",
- "libc",
- "psm",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "stacksafe"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d9c1172965d317e87ddb6d364a040d958b40a1db82b6ef97da26253a8b3d090"
-dependencies = [
- "stacker",
- "stacksafe-macro",
-]
-
-[[package]]
-name = "stacksafe-macro"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "172175341049678163e979d9107ca3508046d4d2a7c6682bee46ac541b17db69"
-dependencies = [
- "proc-macro-error2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-[[package]]
-name = "str_indices"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6"
-
[[package]]
name = "streaming-iterator"
version = "0.1.9"
@@ -9990,33 +6348,6 @@ name = "strict-num"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"
-dependencies = [
- "float-cmp",
-]
-
-[[package]]
-name = "string_cache"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901"
-dependencies = [
- "new_debug_unreachable",
- "parking_lot",
- "phf_shared 0.13.1",
- "precomputed-hash",
-]
-
-[[package]]
-name = "string_cache_codegen"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69"
-dependencies = [
- "phf_generator 0.13.1",
- "phf_shared 0.13.1",
- "proc-macro2",
- "quote",
-]
[[package]]
name = "strsim"
@@ -10024,27 +6355,6 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-[[package]]
-name = "strum"
-version = "0.27.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
-dependencies = [
- "strum_macros",
-]
-
-[[package]]
-name = "strum_macros"
-version = "0.27.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"
-dependencies = [
- "heck 0.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "substring"
version = "1.4.5"
@@ -10060,122 +6370,6 @@ version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
-[[package]]
-name = "sum_tree"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "heapless 0.9.3",
- "log",
- "rayon",
-]
-
-[[package]]
-name = "sval"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec4a2a7d92fa86fcc6222e4c3845f8486cff899d9db32480b26c91a5dbf2e22d"
-
-[[package]]
-name = "sval_buffer"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4324db9ac500c609d659b752edf9c8abbf2233f8afd61a503fd6f88ed625032"
-dependencies = [
- "sval",
- "sval_ref",
- "zerocopy",
-]
-
-[[package]]
-name = "sval_dynamic"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4046add0eecf55e680b9e207edf5fc7737b18a1d950db363d97e7f1b2d7c629c"
-dependencies = [
- "sval",
-]
-
-[[package]]
-name = "sval_fmt"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "911a3486b5984a0a4f25edefcf2c2dba23654c29f63e75493b671d338bf24243"
-dependencies = [
- "itoa",
- "ryu",
- "sval",
-]
-
-[[package]]
-name = "sval_json"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da53aae7c737b5b5f1be4bcb0ff20e057bf6b2ee4e9d025560075c5830d09f95"
-dependencies = [
- "itoa",
- "ryu",
- "sval",
-]
-
-[[package]]
-name = "sval_nested"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df24df43cbdc4bb8c9f5ed19d0d57dc8f60a1a4259cdce52d597fe774ad3a71f"
-dependencies = [
- "sval",
- "sval_buffer",
- "sval_ref",
-]
-
-[[package]]
-name = "sval_ref"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bebc17f0f1fad060e57b778728d41ef87627e9111a6365d7463472cb58fc1b3"
-dependencies = [
- "sval",
-]
-
-[[package]]
-name = "sval_serde"
-version = "2.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f26fe3f6a68b40e6c8d654ea48c00e4316272fddf68c80493714c1b034ae70b"
-dependencies = [
- "serde_core",
- "sval",
- "sval_nested",
-]
-
-[[package]]
-name = "svg_fmt"
-version = "0.4.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb"
-
-[[package]]
-name = "svgtypes"
-version = "0.16.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "695b5790b3131dafa99b3bbfd25a216edb3d216dad9ca208d4657bfb8f2abc3d"
-dependencies = [
- "kurbo",
- "siphasher",
-]
-
-[[package]]
-name = "swash"
-version = "0.2.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c2499c2d826531388872b2268718aed907a39bd785ab0dcfe57fab26283f92e"
-dependencies = [
- "skrifa 0.44.0",
- "yazi",
- "zeno",
-]
-
[[package]]
name = "symlink"
version = "0.1.0"
@@ -10244,15 +6438,6 @@ dependencies = [
"syn 2.0.119",
]
-[[package]]
-name = "sys-locale"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "sysinfo"
version = "0.31.4"
@@ -10263,7 +6448,6 @@ dependencies = [
"libc",
"memchr",
"ntapi",
- "rayon",
"windows 0.57.0",
]
@@ -10288,54 +6472,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "system-deps"
-version = "6.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
-dependencies = [
- "cfg-expr",
- "heck 0.5.0",
- "pkg-config",
- "toml 0.8.23",
- "version-compare",
-]
-
-[[package]]
-name = "taffy"
-version = "0.12.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "340a09581f29809fc0df82a3955501dc7f2a21f887e5d1c13dbe288fe1c0bef4"
-dependencies = [
- "arrayvec",
- "grid",
- "serde",
- "slotmap",
-]
-
-[[package]]
-name = "tao-core-video-sys"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "271450eb289cb4d8d0720c6ce70c72c8c858c93dd61fc625881616752e6b98f6"
-dependencies = [
- "cfg-if",
- "core-foundation-sys",
- "libc",
- "objc",
-]
-
-[[package]]
-name = "tao-macros"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "tar"
version = "0.4.46"
@@ -10347,23 +6483,6 @@ dependencies = [
"xattr",
]
-[[package]]
-name = "target-lexicon"
-version = "0.12.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
-
-[[package]]
-name = "tauri-winrt-notification"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ed071c670382e85fc2f48ae706492d8c338f4f89bf72520d32f8abfe880aade"
-dependencies = [
- "thiserror 2.0.20",
- "windows 0.61.3",
- "windows-version",
-]
-
[[package]]
name = "tempfile"
version = "3.27.0"
@@ -10373,19 +6492,10 @@ dependencies = [
"fastrand",
"getrandom 0.4.3",
"once_cell",
- "rustix 1.1.4",
+ "rustix",
"windows-sys 0.61.2",
]
-[[package]]
-name = "tendril"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08"
-dependencies = [
- "new_debug_unreachable",
-]
-
[[package]]
name = "termcolor"
version = "1.4.1"
@@ -10463,20 +6573,6 @@ dependencies = [
"cfg-if",
]
-[[package]]
-name = "tiff"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"
-dependencies = [
- "fax",
- "flate2",
- "half",
- "quick-error 2.0.1",
- "weezl",
- "zune-jpeg",
-]
-
[[package]]
name = "time"
version = "0.3.55"
@@ -10507,15 +6603,6 @@ dependencies = [
"time-core",
]
-[[package]]
-name = "tiny-keccak"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
-dependencies = [
- "crunchy",
-]
-
[[package]]
name = "tiny-skia"
version = "0.11.4"
@@ -10725,28 +6812,6 @@ dependencies = [
"serde_core",
]
-[[package]]
-name = "toml_edit"
-version = "0.19.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
-dependencies = [
- "indexmap",
- "toml_datetime 0.6.11",
- "winnow 0.5.40",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.20.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
-dependencies = [
- "indexmap",
- "toml_datetime 0.6.11",
- "winnow 0.5.40",
-]
-
[[package]]
name = "toml_edit"
version = "0.22.27"
@@ -10845,7 +6910,6 @@ version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
- "log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -11263,12 +7327,6 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e"
-[[package]]
-name = "typeid"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
-
[[package]]
name = "typenum"
version = "1.20.1"
@@ -11281,23 +7339,6 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
-[[package]]
-name = "uds_windows"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
-dependencies = [
- "memoffset 0.9.1",
- "tempfile",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "unarray"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
-
[[package]]
name = "unicase"
version = "2.9.0"
@@ -11328,12 +7369,6 @@ version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
-[[package]]
-name = "unicode-linebreak"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
-
[[package]]
name = "unicode-normalization-alignments"
version = "0.1.12"
@@ -11361,12 +7396,6 @@ version = "1.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
-[[package]]
-name = "unicode-vo"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94"
-
[[package]]
name = "unicode-width"
version = "0.2.2"
@@ -11576,33 +7605,6 @@ version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
-[[package]]
-name = "usvg"
-version = "0.46.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e419dff010bb12512b0ae9e3d2f318dfbdf0167fde7eb05465134d4e8756076f"
-dependencies = [
- "base64 0.22.1",
- "data-url",
- "flate2",
- "fontdb",
- "imagesize",
- "kurbo",
- "log",
- "pico-args",
- "roxmltree 0.21.1",
- "rustybuzz",
- "simplecss",
- "siphasher",
- "strict-num",
- "svgtypes",
- "tiny-skia-path",
- "unicode-bidi",
- "unicode-script",
- "unicode-vo",
- "xmlwriter",
-]
-
[[package]]
name = "utf-8"
version = "0.7.6"
@@ -11627,16 +7629,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
-[[package]]
-name = "util_macros"
-version = "0.1.0"
-source = "git+https://github.com/zeronsh/zui?rev=15ee7082c4f910618be306166436a6d9fe0451be#15ee7082c4f910618be306166436a6d9fe0451be"
-dependencies = [
- "perf",
- "quote",
- "syn 2.0.119",
-]
-
[[package]]
name = "uuid"
version = "1.24.0"
@@ -11646,18 +7638,6 @@ dependencies = [
"getrandom 0.4.3",
"js-sys",
"serde_core",
- "sha1_smol",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "v_frame"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2"
-dependencies = [
- "aligned-vec",
- "num-traits",
"wasm-bindgen",
]
@@ -11667,54 +7647,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
-[[package]]
-name = "value-bag"
-version = "1.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "068e763e8279de7ab94b6afebded2cb701678af094feb1c12ccb061b4783c1be"
-dependencies = [
- "value-bag-serde1",
- "value-bag-sval2",
-]
-
-[[package]]
-name = "value-bag-serde1"
-version = "1.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "417d6197dd0ee696783d6be4276ac6ea74b985e00024c85ccfb37aff4f2bed82"
-dependencies = [
- "erased-serde",
- "serde_core",
- "serde_fmt",
-]
-
-[[package]]
-name = "value-bag-sval2"
-version = "1.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c61f7251ecde2c9ed431bbe0659853e7991753447447bbf1ae59d8b31c578d4e"
-dependencies = [
- "sval",
- "sval_buffer",
- "sval_dynamic",
- "sval_fmt",
- "sval_json",
- "sval_ref",
- "sval_serde",
-]
-
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
-[[package]]
-name = "version-compare"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"
-
[[package]]
name = "version_check"
version = "0.9.5"
@@ -11755,21 +7693,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "wait-timeout"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "waker-fn"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7"
-
[[package]]
name = "walkdir"
version = "2.5.0"
@@ -11872,104 +7795,6 @@ dependencies = [
"web-sys",
]
-[[package]]
-name = "wasm_thread"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7516db7f32decdadb1c3b8deb1b7d78b9df7606c5cc2f6241737c2ab3a0258e"
-dependencies = [
- "futures",
- "js-sys",
- "wasm-bindgen",
- "web-sys",
-]
-
-[[package]]
-name = "wayland-backend"
-version = "0.3.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "016ccf01d1c58b6f8999612813e17c9b2390f7d70671428869913310f83f54b8"
-dependencies = [
- "cc",
- "downcast-rs",
- "rustix 1.1.4",
- "scoped-tls",
- "smallvec",
- "wayland-sys",
-]
-
-[[package]]
-name = "wayland-client"
-version = "0.31.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073"
-dependencies = [
- "bitflags 2.13.1",
- "rustix 1.1.4",
- "wayland-backend",
- "wayland-scanner",
-]
-
-[[package]]
-name = "wayland-cursor"
-version = "0.31.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d"
-dependencies = [
- "rustix 1.1.4",
- "wayland-client",
- "xcursor",
-]
-
-[[package]]
-name = "wayland-protocols"
-version = "0.32.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6"
-dependencies = [
- "bitflags 2.13.1",
- "wayland-backend",
- "wayland-client",
- "wayland-scanner",
-]
-
-[[package]]
-name = "wayland-protocols-plasma"
-version = "0.3.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91"
-dependencies = [
- "bitflags 2.13.1",
- "wayland-backend",
- "wayland-client",
- "wayland-protocols",
- "wayland-scanner",
-]
-
-[[package]]
-name = "wayland-protocols-wlr"
-version = "0.3.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234"
-dependencies = [
- "bitflags 2.13.1",
- "wayland-backend",
- "wayland-client",
- "wayland-protocols",
- "wayland-scanner",
-]
-
-[[package]]
-name = "wayland-scanner"
-version = "0.31.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0"
-dependencies = [
- "proc-macro2",
- "quick-xml",
- "quote",
-]
-
[[package]]
name = "wayland-sys"
version = "0.31.11"
@@ -12002,62 +7827,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "web_atoms"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3"
-dependencies = [
- "phf 0.13.1",
- "phf_codegen",
- "string_cache",
- "string_cache_codegen",
-]
-
-[[package]]
-name = "webkit2gtk"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793"
-dependencies = [
- "bitflags 1.3.2",
- "cairo-rs",
- "gdk",
- "gdk-sys",
- "gio",
- "gio-sys",
- "glib",
- "glib-sys",
- "gobject-sys",
- "gtk",
- "gtk-sys",
- "javascriptcore-rs",
- "libc",
- "once_cell",
- "soup3",
- "webkit2gtk-sys",
-]
-
-[[package]]
-name = "webkit2gtk-sys"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5"
-dependencies = [
- "bitflags 1.3.2",
- "cairo-sys-rs",
- "gdk-sys",
- "gio-sys",
- "glib-sys",
- "gobject-sys",
- "gtk-sys",
- "javascriptcore-rs-sys",
- "libc",
- "pkg-config",
- "soup3-sys",
- "system-deps",
-]
-
[[package]]
name = "webpki-root-certs"
version = "1.0.9"
@@ -12127,56 +7896,20 @@ checksum = "f8f6c2b4b20a03b165378172f0dbe23c49b2630b70091026589afbe04e79cd3e"
dependencies = [
"anyhow",
"autotools",
- "bindgen 0.72.1",
+ "bindgen",
"cc",
"fs_extra",
"pkg-config",
"regex",
]
-[[package]]
-name = "webview2-com"
-version = "0.38.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a"
-dependencies = [
- "webview2-com-macros",
- "webview2-com-sys",
- "windows 0.61.3",
- "windows-core 0.61.2",
- "windows-implement 0.60.2",
- "windows-interface 0.59.3",
-]
-
-[[package]]
-name = "webview2-com-macros"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "webview2-com-sys"
-version = "0.38.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c"
-dependencies = [
- "thiserror 2.0.20",
- "windows 0.61.3",
- "windows-core 0.61.2",
-]
-
[[package]]
name = "weedle2"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e"
dependencies = [
- "nom 7.1.3",
+ "nom",
]
[[package]]
@@ -12222,8 +7955,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f519832254e56965a9940c4af57dcb75f702b6f6fa4a0b172f685395843a4d7"
dependencies = [
"arrayvec",
- "bit-set 0.9.1",
- "bit-vec 0.9.1",
+ "bit-set",
+ "bit-vec",
"bitflags 2.13.1",
"bytemuck",
"cfg_aliases",
@@ -12284,9 +8017,9 @@ dependencies = [
"android_system_properties",
"arrayvec",
"ash",
- "bit-set 0.9.1",
+ "bit-set",
"bitflags 2.13.1",
- "block2 0.6.2",
+ "block2",
"bytemuck",
"cfg-if",
"cfg_aliases",
@@ -12302,11 +8035,11 @@ dependencies = [
"log",
"naga",
"ndk-sys",
- "objc2 0.6.4",
+ "objc2",
"objc2-core-foundation",
- "objc2-foundation 0.3.2",
- "objc2-metal 0.3.2",
- "objc2-quartz-core 0.3.2",
+ "objc2-foundation",
+ "objc2-metal",
+ "objc2-quartz-core",
"once_cell",
"ordered-float",
"parking_lot",
@@ -12353,18 +8086,6 @@ dependencies = [
"web-sys",
]
-[[package]]
-name = "which"
-version = "6.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f"
-dependencies = [
- "either",
- "home",
- "rustix 0.38.44",
- "winsafe",
-]
-
[[package]]
name = "winapi"
version = "0.3.9"
@@ -12406,51 +8127,16 @@ dependencies = [
"windows-targets 0.52.6",
]
-[[package]]
-name = "windows"
-version = "0.61.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
-dependencies = [
- "windows-collections 0.2.0",
- "windows-core 0.61.2",
- "windows-future 0.2.1",
- "windows-link 0.1.3",
- "windows-numerics 0.2.0",
-]
-
[[package]]
name = "windows"
version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
- "windows-collections 0.3.2",
+ "windows-collections",
"windows-core 0.62.2",
- "windows-future 0.3.2",
- "windows-numerics 0.3.1",
-]
-
-[[package]]
-name = "windows-capture"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a4df73e95feddb9ec1a7e9c2ca6323b8c97d5eeeff78d28f1eccdf19c882b24"
-dependencies = [
- "parking_lot",
- "rayon",
- "thiserror 2.0.20",
- "windows 0.61.3",
- "windows-future 0.2.1",
-]
-
-[[package]]
-name = "windows-collections"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
-dependencies = [
- "windows-core 0.61.2",
+ "windows-future",
+ "windows-numerics",
]
[[package]]
@@ -12474,19 +8160,6 @@ dependencies = [
"windows-targets 0.52.6",
]
-[[package]]
-name = "windows-core"
-version = "0.61.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
-dependencies = [
- "windows-implement 0.60.2",
- "windows-interface 0.59.3",
- "windows-link 0.1.3",
- "windows-result 0.3.4",
- "windows-strings 0.4.2",
-]
-
[[package]]
name = "windows-core"
version = "0.62.2"
@@ -12500,17 +8173,6 @@ dependencies = [
"windows-strings 0.5.1",
]
-[[package]]
-name = "windows-future"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
-dependencies = [
- "windows-core 0.61.2",
- "windows-link 0.1.3",
- "windows-threading 0.1.0",
-]
-
[[package]]
name = "windows-future"
version = "0.3.2"
@@ -12519,7 +8181,7 @@ checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
"windows-core 0.62.2",
"windows-link 0.2.1",
- "windows-threading 0.2.1",
+ "windows-threading",
]
[[package]]
@@ -12578,16 +8240,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
-[[package]]
-name = "windows-numerics"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
-dependencies = [
- "windows-core 0.61.2",
- "windows-link 0.1.3",
-]
-
[[package]]
name = "windows-numerics"
version = "0.3.1"
@@ -12771,15 +8423,6 @@ dependencies = [
"windows_x86_64_msvc 0.53.1",
]
-[[package]]
-name = "windows-threading"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
-dependencies = [
- "windows-link 0.1.3",
-]
-
[[package]]
name = "windows-threading"
version = "0.2.1"
@@ -12789,15 +8432,6 @@ dependencies = [
"windows-link 0.2.1",
]
-[[package]]
-name = "windows-version"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631"
-dependencies = [
- "windows-link 0.2.1",
-]
-
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
@@ -12978,15 +8612,6 @@ version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
-[[package]]
-name = "winnow"
-version = "0.5.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "winnow"
version = "0.7.15"
@@ -13024,138 +8649,18 @@ dependencies = [
"windows-sys 0.59.0",
]
-[[package]]
-name = "winsafe"
-version = "0.0.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904"
-
-[[package]]
-name = "wio"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5"
-dependencies = [
- "winapi",
-]
-
[[package]]
name = "wit-bindgen"
version = "0.57.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
-[[package]]
-name = "workspace-hack"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "beffa227304dbaea3ad6a06ac674f9bc83a3dec3b7f63eeb442de37e7cb6bb01"
-
[[package]]
name = "writeable"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
-[[package]]
-name = "wry"
-version = "0.56.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "375becb4aded9913f736443cf88000c6311478db69814cc06070465e4cc44c98"
-dependencies = [
- "base64 0.22.1",
- "block2 0.6.2",
- "cookie",
- "crossbeam-channel",
- "dirs 6.0.0",
- "dom_query",
- "dpi",
- "dunce",
- "gtk",
- "http",
- "javascriptcore-rs",
- "jni 0.21.1",
- "libc",
- "ndk",
- "objc2 0.6.4",
- "objc2-app-kit 0.3.2",
- "objc2-core-foundation",
- "objc2-foundation 0.3.2",
- "objc2-ui-kit",
- "objc2-web-kit",
- "once_cell",
- "percent-encoding",
- "raw-window-handle",
- "sha2",
- "soup3",
- "tao-macros",
- "thiserror 2.0.20",
- "url",
- "webkit2gtk",
- "webkit2gtk-sys",
- "webview2-com",
- "windows 0.61.3",
- "windows-core 0.61.2",
- "windows-version",
-]
-
-[[package]]
-name = "x11"
-version = "2.21.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
-dependencies = [
- "libc",
- "pkg-config",
-]
-
-[[package]]
-name = "x11-clipboard"
-version = "0.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "662d74b3d77e396b8e5beb00b9cad6a9eccf40b2ef68cc858784b14c41d535a3"
-dependencies = [
- "libc",
- "x11rb 0.13.2",
-]
-
-[[package]]
-name = "x11rb"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414"
-dependencies = [
- "as-raw-xcb-connection",
- "gethostname",
- "libc",
- "rustix 1.1.4",
- "x11rb-protocol 0.13.2",
- "xcursor",
-]
-
-[[package]]
-name = "x11rb"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a8885a854a8bfdf87a301e53e41b17c5f8f33639903131338b997b1eb614f44"
-dependencies = [
- "gethostname",
- "rustix 1.1.4",
- "x11rb-protocol 0.14.0",
-]
-
-[[package]]
-name = "x11rb-protocol"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd"
-
-[[package]]
-name = "x11rb-protocol"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acf4d1bc32aa46eec18caa634ec3cf4c05bfa151f12b93b510b15190f69a1ca8"
-
[[package]]
name = "x25519-dalek"
version = "2.0.1"
@@ -13178,7 +8683,7 @@ dependencies = [
"data-encoding",
"der-parser 9.0.0",
"lazy_static",
- "nom 7.1.3",
+ "nom",
"oid-registry 0.7.1",
"rusticata-macros",
"thiserror 1.0.69",
@@ -13195,7 +8700,7 @@ dependencies = [
"data-encoding",
"der-parser 10.0.0",
"lazy_static",
- "nom 7.1.3",
+ "nom",
"oid-registry 0.8.1",
"ring",
"rusticata-macros",
@@ -13210,85 +8715,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156"
dependencies = [
"libc",
- "rustix 1.1.4",
+ "rustix",
]
-[[package]]
-name = "xcb"
-version = "1.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6c2ad15e0e922856ee89afe862b8992334bbe7953adad56cd1199358cb30566"
-dependencies = [
- "bitflags 2.13.1",
- "libc",
- "quick-xml",
- "x11",
-]
-
-[[package]]
-name = "xcursor"
-version = "0.3.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23"
-
-[[package]]
-name = "xim-ctext"
-version = "0.3.0"
-source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8"
-dependencies = [
- "encoding_rs",
-]
-
-[[package]]
-name = "xim-parser"
-version = "0.2.1"
-source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8"
-dependencies = [
- "bitflags 2.13.1",
-]
-
-[[package]]
-name = "xkbcommon"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9"
-dependencies = [
- "as-raw-xcb-connection",
- "libc",
- "memmap2",
- "xkeysym",
-]
-
-[[package]]
-name = "xkeysym"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"
-
[[package]]
name = "xml-rs"
version = "0.8.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7"
-[[package]]
-name = "xmlwriter"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"
-
[[package]]
name = "xxhash-rust"
version = "0.8.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aee1b19627c7c60102ab80d3a9cbe18de90bfe03bfa6c3715447681f0e8c8af6"
-[[package]]
-name = "y4m"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448"
-
[[package]]
name = "yansi"
version = "1.0.1"
@@ -13301,27 +8742,10 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282"
dependencies = [
- "bit-vec 0.9.1",
+ "bit-vec",
"time",
]
-[[package]]
-name = "yazi"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5"
-
-[[package]]
-name = "yeslogic-fontconfig-sys"
-version = "6.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76"
-dependencies = [
- "dlib",
- "once_cell",
- "pkg-config",
-]
-
[[package]]
name = "yoke"
version = "0.8.3"
@@ -13347,194 +8771,12 @@ dependencies = [
[[package]]
name = "zatex"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"tiny-skia",
"ttf-parser",
]
-[[package]]
-name = "zbus"
-version = "5.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907"
-dependencies = [
- "async-broadcast",
- "async-executor",
- "async-io",
- "async-lock",
- "async-process",
- "async-recursion",
- "async-task",
- "async-trait",
- "blocking",
- "enumflags2",
- "event-listener",
- "futures-core",
- "futures-lite",
- "hex",
- "libc",
- "ordered-stream",
- "rustix 1.1.4",
- "serde",
- "serde_repr",
- "tracing",
- "uds_windows",
- "uuid",
- "windows-sys 0.61.2",
- "winnow 1.0.4",
- "zbus_macros",
- "zbus_names",
- "zvariant",
-]
-
-[[package]]
-name = "zbus-lockstep"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863"
-dependencies = [
- "zbus_xml",
- "zvariant",
-]
-
-[[package]]
-name = "zbus-lockstep-macros"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "zbus-lockstep",
- "zbus_xml",
- "zvariant",
-]
-
-[[package]]
-name = "zbus_macros"
-version = "5.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40"
-dependencies = [
- "proc-macro-crate 3.5.0",
- "proc-macro2",
- "quote",
- "syn 3.0.3",
- "zbus_names",
- "zvariant",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zbus_names"
-version = "4.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e"
-dependencies = [
- "serde",
- "winnow 1.0.4",
- "zvariant",
-]
-
-[[package]]
-name = "zbus_xml"
-version = "5.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a"
-dependencies = [
- "serde",
- "winnow 1.0.4",
- "zbus_names",
- "zvariant",
-]
-
-[[package]]
-name = "zcheapstr"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "zed-font-kit"
-version = "0.14.1-zed"
-source = "git+https://github.com/zed-industries/font-kit?rev=94b0f28166665e8fd2f53ff6d268a14955c82269#94b0f28166665e8fd2f53ff6d268a14955c82269"
-dependencies = [
- "bitflags 2.13.1",
- "byteorder",
- "core-foundation 0.10.1",
- "core-graphics 0.24.0",
- "core-text",
- "dirs 6.0.0",
- "dwrote",
- "float-ord",
- "freetype-sys",
- "lazy_static",
- "libc",
- "log",
- "pathfinder_geometry",
- "pathfinder_simd",
- "walkdir",
- "winapi",
- "yeslogic-fontconfig-sys",
-]
-
-[[package]]
-name = "zed-scap"
-version = "0.0.8-zed"
-source = "git+https://github.com/zed-industries/scap?rev=4afea48c3b002197176fb19cd0f9b180dd36eaac#4afea48c3b002197176fb19cd0f9b180dd36eaac"
-dependencies = [
- "anyhow",
- "cocoa 0.25.0",
- "core-graphics-helmer-fork",
- "log",
- "objc",
- "rand 0.8.7",
- "screencapturekit",
- "screencapturekit-sys",
- "sysinfo",
- "tao-core-video-sys",
- "windows 0.61.3",
- "windows-capture",
- "x11",
- "xcb",
-]
-
-[[package]]
-name = "zed-sum-tree"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d490156d0d7311855564d6e1d6dccab992405a0c0e15e1c8ef18920c02177e35"
-dependencies = [
- "arrayvec",
- "log",
- "rayon",
- "workspace-hack",
-]
-
-[[package]]
-name = "zed-xim"
-version = "0.4.0-zed"
-source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8"
-dependencies = [
- "ahash",
- "hashbrown 0.14.5",
- "log",
- "x11rb 0.13.2",
- "xim-ctext",
- "xim-parser",
-]
-
-[[package]]
-name = "zeno"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524"
-
[[package]]
name = "zerocopy"
version = "0.8.56"
@@ -13598,7 +8840,7 @@ dependencies = [
[[package]]
name = "zeron"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"clap",
@@ -13617,13 +8859,13 @@ dependencies = [
"zeron-mcp",
"zeron-notify",
"zeron-rpc",
- "zeron-ui",
+ "zeron-sync",
"zeron-update",
]
[[package]]
name = "zeron-audio"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"base64 0.22.1",
"cpal 0.18.2",
@@ -13635,7 +8877,7 @@ dependencies = [
[[package]]
name = "zeron-cli"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"clap",
@@ -13651,7 +8893,7 @@ dependencies = [
[[package]]
name = "zeron-client"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"async-trait",
@@ -13682,7 +8924,7 @@ dependencies = [
[[package]]
name = "zeron-doc"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"chrono",
"loro",
@@ -13697,7 +8939,7 @@ dependencies = [
[[package]]
name = "zeron-engine"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"alacritty_terminal",
"anyhow",
@@ -13757,7 +8999,7 @@ dependencies = [
[[package]]
name = "zeron-harness"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"async-trait",
@@ -13791,7 +9033,7 @@ dependencies = [
[[package]]
name = "zeron-launch"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"libc",
"tempfile",
@@ -13800,20 +9042,24 @@ dependencies = [
[[package]]
name = "zeron-markdown"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"pulldown-cmark",
]
[[package]]
name = "zeron-mcp"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"async-trait",
"base64 0.22.1",
+ "bytes",
"chrono",
"futures",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
"serde",
"serde_json",
"tempfile",
@@ -13829,7 +9075,7 @@ dependencies = [
[[package]]
name = "zeron-mobile"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"async-trait",
"serde",
@@ -13856,14 +9102,14 @@ dependencies = [
[[package]]
name = "zeron-mobile-bindgen"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"uniffi",
]
[[package]]
name = "zeron-notify"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"objc",
"sha2",
@@ -13872,11 +9118,11 @@ dependencies = [
[[package]]
name = "zeron-orb"
-version = "0.3.4"
+version = "0.3.8"
[[package]]
name = "zeron-plugin-guard"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"serde_json",
"tempfile",
@@ -13884,7 +9130,7 @@ dependencies = [
[[package]]
name = "zeron-preview"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"async-trait",
@@ -13914,11 +9160,11 @@ dependencies = [
[[package]]
name = "zeron-preview-label"
-version = "0.3.4"
+version = "0.3.8"
[[package]]
name = "zeron-proto"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"chrono",
"pulldown-cmark",
@@ -13929,7 +9175,7 @@ dependencies = [
[[package]]
name = "zeron-rpc"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"async-trait",
@@ -13950,10 +9196,10 @@ dependencies = [
[[package]]
name = "zeron-sync"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"base64 0.22.1",
- "block2 0.6.2",
+ "block2",
"chrono",
"futures",
"loro",
@@ -13976,7 +9222,7 @@ dependencies = [
[[package]]
name = "zeron-syntax"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"thiserror 2.0.20",
"tree-sitter",
@@ -14011,14 +9257,14 @@ dependencies = [
[[package]]
name = "zeron-term"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"alacritty_terminal",
]
[[package]]
name = "zeron-term-link"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"async-trait",
@@ -14035,10 +9281,10 @@ dependencies = [
[[package]]
name = "zeron-text"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"core-foundation 0.10.1",
- "core-graphics 0.24.0",
+ "core-graphics",
"core-text",
"criterion",
"hashbrown 0.15.5",
@@ -14052,11 +9298,11 @@ dependencies = [
[[package]]
name = "zeron-theme"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"clap",
- "json5 0.4.1",
+ "json5",
"plist",
"serde",
"serde_json",
@@ -14065,92 +9311,9 @@ dependencies = [
"thiserror 2.0.20",
]
-[[package]]
-name = "zeron-ui"
-version = "0.3.4"
-dependencies = [
- "alacritty_terminal",
- "anyhow",
- "ashpd",
- "async-io",
- "async-trait",
- "atspi 0.30.0",
- "base64 0.22.1",
- "block",
- "block2 0.6.2",
- "chrono",
- "core-foundation 0.10.1",
- "core-graphics 0.24.0",
- "fontdb",
- "foreign-types 0.5.0",
- "futures",
- "gpui",
- "gpui-base",
- "gpui_platform",
- "gpui_tokio",
- "html5ever",
- "image",
- "libc",
- "mermaid-rs-renderer",
- "mimalloc",
- "objc",
- "objc2 0.6.4",
- "objc2-app-kit 0.3.2",
- "objc2-core-graphics",
- "objc2-foundation 0.3.2",
- "objc2-web-kit",
- "png 0.18.1",
- "pulldown-cmark",
- "raw-window-handle",
- "reqwest",
- "roxmltree 0.21.1",
- "rust-embed",
- "serde",
- "serde_json",
- "sha2",
- "similar",
- "tempfile",
- "thiserror 2.0.20",
- "tokio",
- "tokio-util",
- "tracing",
- "tracing-subscriber",
- "ttf-parser",
- "unicode-segmentation",
- "unicode-width",
- "url",
- "usvg",
- "uuid",
- "webview2-com",
- "windows 0.61.3",
- "windows-core 0.61.2",
- "windows-sys 0.61.2",
- "wry",
- "x11rb 0.14.0",
- "zatex",
- "zeron-doc",
- "zeron-engine",
- "zeron-harness",
- "zeron-markdown",
- "zeron-notify",
- "zeron-orb",
- "zeron-proto",
- "zeron-rpc",
- "zeron-syntax",
- "zeron-term",
- "zeron-theme",
- "zeron-update",
- "zeron-veil",
- "zeron-visual",
- "zeron-visual-gpu",
- "zeron-voice",
- "zeron-voice-media",
- "zeron-voice-session",
-]
-
[[package]]
name = "zeron-update"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"futures",
@@ -14167,11 +9330,11 @@ dependencies = [
[[package]]
name = "zeron-veil"
-version = "0.3.4"
+version = "0.3.8"
[[package]]
name = "zeron-visual"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"base64 0.22.1",
"gltf",
@@ -14183,10 +9346,10 @@ dependencies = [
[[package]]
name = "zeron-visual-gpu"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"image",
- "pollster 0.4.0",
+ "pollster",
"tracing",
"wgpu",
"zeron-visual",
@@ -14194,7 +9357,7 @@ dependencies = [
[[package]]
name = "zeron-voice"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"cpal 0.17.3",
@@ -14213,7 +9376,7 @@ dependencies = [
[[package]]
name = "zeron-voice-media"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"async-trait",
"semver",
@@ -14228,7 +9391,7 @@ dependencies = [
[[package]]
name = "zeron-voice-session"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"async-trait",
"futures",
@@ -14308,15 +9471,6 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b"
-[[package]]
-name = "zune-inflate"
-version = "0.2.54"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
-dependencies = [
- "simd-adler32",
-]
-
[[package]]
name = "zune-jpeg"
version = "0.5.15"
@@ -14325,45 +9479,3 @@ checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296"
dependencies = [
"zune-core",
]
-
-[[package]]
-name = "zvariant"
-version = "5.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e28c25bd8bb8da5a1f3e7065d0c156b9ee9a7973adf78b0e35eaefdf3b1b5c"
-dependencies = [
- "endi",
- "enumflags2",
- "serde",
- "serde_bytes",
- "winnow 1.0.4",
- "zcheapstr",
- "zvariant_derive",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zvariant_derive"
-version = "5.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d496a145685283b67e232bd9e47377f6b60ad9d51e3601b23867f77c42477f96"
-dependencies = [
- "proc-macro-crate 3.5.0",
- "proc-macro2",
- "quote",
- "syn 3.0.3",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zvariant_utils"
-version = "4.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "629d80ece222cad20fe0e8741be493c4ab166acf3b85341bdc2cdbcfd8f3c2d6"
-dependencies = [
- "proc-macro2",
- "quote",
- "serde",
- "syn 3.0.3",
- "winnow 1.0.4",
-]
diff --git a/Cargo.toml b/Cargo.toml
index a39b93125..810d395cc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,7 +21,6 @@ members = [
"crates/update",
"crates/cli",
"crates/launch",
- "crates/ui",
"crates/notify",
"crates/syntax",
"crates/markdown",
@@ -38,7 +37,7 @@ members = [
]
[workspace.package]
-version = "0.3.4"
+version = "0.3.8"
edition = "2024"
license = "MIT"
publish = false
@@ -62,7 +61,6 @@ zeron-rpc = { path = "crates/rpc" }
zeron-update = { path = "crates/update" }
zeron-cli = { path = "crates/cli" }
zeron-launch = { path = "crates/launch" }
-zeron-ui = { path = "crates/ui" }
zeron-notify = { path = "crates/notify" }
zeron-syntax = { path = "crates/syntax" }
zeron-markdown = { path = "crates/markdown" }
@@ -83,49 +81,6 @@ loro = "1.17"
# frames, cross-checked by its js_snapshots tests).
loro-protocol = "0.3"
-# gpui — zeronsh/zui, extracted from wingleeio/zed e2ddcc6 with identical
-# crate sources; adds bounded blur passes and shared Gaussian weights.
-# Removes GPL tracing crates and composites deferred GPUI content above native macOS views.
-# Preserved fork history: upstream f14fea9 + commits on
-# `comet/edge-fade-horizontal` (tip of `comet/line-wrap-closing-punctuation`
-# + 5d1f83d horizontal per-pixel EdgeFade for quads/images; rebase when bumping the
-# upstream rev): a6bf17c fixes BOTH wrap-rule copies (LineWrapper +
-# line_layout's shaped-text duplicate); 14baea0 adds the EdgeFade primitive
-# (Window::with_edge_fade — per-primitive scroll-edge fades for the glass
-# sidebar); a6c1ad5 adds BackdropBlur + horizontal EdgeFade + glass fixes;
-# 9b672fa bounds renderer GPU memory (region-sized backdrop blur scratch,
-# idle release of blur/path intermediates, instance pool shrink,
-# ZERON_GPU_STATS=1 diagnostics); b687328 adds ImageSource::evict (frees
-# sprite-atlas tiles — remove_asset alone leaked them, see
-# attachments::flush_evicted); ac135eb adds device memory to the stats line;
-# f596cde fixes destination alpha on transparent windows (Porter-Duff OVER,
-# not additive); 53518c0 merges the edge-fade line: per-edge fade bands +
-# per-pixel EdgeFade for quads/images (true fade-into-glass), and
-# object-fit Cover cropping via atlas-tile UVs so image corner radii hold;
-# 8a8954c switches the macOS blurred view to UnderWindowBackground (macOS 26
-# stopped vending CABackdropLayer for Selection — window blur went dead);
-# b68970e rasterizes BackdropBlur in the wgpu renderer (frosted floats on
-# Linux — the Metal path's snapshot/blur/composite, ported).
-# Paint-time rounded image masks (#9), bounded Windows backdrop blur and
-# translucent compositing, plus blur-aware scene batching (#10).
-# Per-pixel rounded clipping (`Window::with_rounded_clip`, 361ff20).
-# Drags need the button held and 4px of travel (0dc69aa).
-# Atlas tiles updated in place from pixels or imported dma-bufs, display-rate
-# frame callbacks in inactive windows, and Wayland frames that no longer stop
-# after a forced draw (b564a34, zeronsh/zui#18).
-# Dropped images stay in the atlas until the next draw, so presenting the last
-# frame again no longer aborts with "texture must exist" (15ee708,
-# zeronsh/zui#19; gpui-base cab50b0, zeronsh/gpui-component#7).
-gpui = { git = "https://github.com/zeronsh/zui", rev = "15ee7082c4f910618be306166436a6d9fe0451be" }
-gpui_platform = { git = "https://github.com/zeronsh/zui", rev = "15ee7082c4f910618be306166436a6d9fe0451be", features = [
- "wayland",
- "x11",
- "font-kit",
- "runtime_shaders",
-] }
-gpui_tokio = { git = "https://github.com/zeronsh/zui", rev = "15ee7082c4f910618be306166436a6d9fe0451be" }
-gpui-base = { git = "https://github.com/zeronsh/gpui-component", rev = "cab50b071497683a119ae0e4038880f195c0f23f" }
-
# diffs
similar = "2"
@@ -194,7 +149,7 @@ lto = "thin"
strip = "symbols"
[profile.dev]
-# gpui is slow unoptimized; match zed's approach for deps
+# Our own crates unoptimized for quick rebuilds; dependencies optimized below.
opt-level = 0
# Full DWARF was ~90% of every rlib (25 GB of target/debug/deps). Line tables
# keep file:line in panics and backtraces; for locals in lldb, build with
diff --git a/apps/android/app/build.gradle.kts b/apps/android/app/build.gradle.kts
index 0daa898bd..f408a374a 100644
--- a/apps/android/app/build.gradle.kts
+++ b/apps/android/app/build.gradle.kts
@@ -40,7 +40,7 @@ val genIcons by tasks.registering(Exec::class) {
description = "Rasterizes the shared transcript icons."
val out = iconsOut.get().asFile
inputs.dir(repoRoot.resolve("apps/ios/Zeron/Assets.xcassets"))
- inputs.dir(repoRoot.resolve("crates/ui/assets/icons"))
+ inputs.dir(repoRoot.resolve("assets/icons"))
inputs.dir(repoRoot.resolve("apps/android/icons"))
inputs.file(repoRoot.resolve("scripts/android/svg2vd.py"))
outputs.dir(out)
diff --git a/apps/android/app/src/main/java/sh/zeron/android/design/BrandMarks.kt b/apps/android/app/src/main/java/sh/zeron/android/design/BrandMarks.kt
index 38123468a..2ca3c368a 100644
--- a/apps/android/app/src/main/java/sh/zeron/android/design/BrandMarks.kt
+++ b/apps/android/app/src/main/java/sh/zeron/android/design/BrandMarks.kt
@@ -7,7 +7,7 @@ import androidx.compose.ui.graphics.drawscope.translate
/**
* Harness brand marks — the exact SVG path data the desktop bundles
- * (crates/ui/assets/icons, the `-mark.svg` files), shared with iOS BrandMarks.swift.
+ * (assets/icons, the `-mark.svg` files), shared with iOS BrandMarks.swift.
*/
enum class BrandMark(val width: Float, val height: Float, val evenOdd: Boolean, val pathData: String) {
CLAUDE(256f, 257f, false, "m50.228 170.321 50.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0 125.796l.583-3.759 5.12-3.434 7.324.648 16.202 1.101 24.304 1.685 17.629 1.037 26.118 2.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758 7-7.713 9.397.649 2.398.648 9.527 7.323 20.35 15.75L94.817 91.9l3.889 3.24 1.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42 0 82.05 1.426l4.472 3.888 6.61 15.101 10.694 23.786 16.591 32.34 4.861 9.592 2.592 8.879.973 2.722h1.685v-1.556l1.36-18.211 2.528-22.36 2.463-28.776.843-8.1 4.018-9.722 7.971-5.25 6.222 2.981 5.12 7.324-.713 4.73-3.046 19.768-5.962 30.98-3.889 20.739h2.268l2.593-2.593 10.499-13.934 17.628-22.036 7.778-8.749 9.073-9.657 5.833-4.601h11.018l8.1 12.055-3.628 12.443-11.342 14.388-9.398 12.184-13.48 18.147-8.426 14.518.778 1.166 2.01-.194 30.46-6.481 16.462-2.982 19.637-3.37 8.88 4.148.971 4.213-3.5 8.62-20.998 5.184-24.628 4.926-36.682 8.685-.454.324.519.648 16.526 1.555 7.065.389h17.304l32.21 2.398 8.426 5.574 5.055 6.805-.843 5.184-12.962 6.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666 11.406 21.387 19.314 26.767 24.887 1.36 6.157-3.434 4.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73 6.935 25.017 37.59 1.296 11.536-1.814 3.76-6.481 2.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194 77.448-3.37 3.953-7.778 2.981-6.48-4.925-3.436-7.972 3.435-15.749 4.148-20.544 3.37-16.333 3.046-20.285 1.815-6.74-.13-.454-1.49.194-15.295 20.999-23.267 31.433-18.406 19.702-4.407 1.75-7.648-3.954.713-7.064 4.277-6.286 25.47-32.405 15.36-20.092 9.917-11.6-.065-1.686h-.583L44.07 198.125l-12.055 1.555-5.185-4.86.648-7.972 2.463-2.593 20.35-13.999-.064.065Z"),
diff --git a/apps/android/app/src/main/java/sh/zeron/android/design/ZeronIcons.kt b/apps/android/app/src/main/java/sh/zeron/android/design/ZeronIcons.kt
index 9c16e2e3f..49e56a51d 100644
--- a/apps/android/app/src/main/java/sh/zeron/android/design/ZeronIcons.kt
+++ b/apps/android/app/src/main/java/sh/zeron/android/design/ZeronIcons.kt
@@ -10,7 +10,7 @@ import androidx.compose.ui.res.painterResource
import sh.zeron.android.R
/**
- * Zeron's icon set — the same glyphs the desktop (crates/ui/assets/icons,
+ * Zeron's icon set — the same glyphs the desktop (assets/icons,
* Solar Linear + Zeron's hand-drawn additions) and iOS draw, compiled to
* VectorDrawables at build time by scripts/android/svg2vd.py.
*/
diff --git a/apps/ios/Zeron/Design/BrandMarks.swift b/apps/ios/Zeron/Design/BrandMarks.swift
index b7e86697a..7a2406e1b 100644
--- a/apps/ios/Zeron/Design/BrandMarks.swift
+++ b/apps/ios/Zeron/Design/BrandMarks.swift
@@ -1,5 +1,5 @@
// Harness brand marks — the exact SVG path data the desktop bundles
-// (crates/ui/assets/icons/{claude,openai,cursor}-mark.svg), rendered natively
+// (assets/icons/{claude,openai,cursor}-mark.svg), rendered natively
// via a small SVG path-data parser → SwiftUI Path. Marks tint with the
// foreground style like any glyph; Claude keeps its brand orange (#D97757) at
// call sites, matching the desktop convention.
diff --git a/apps/ios/Zeron/Design/HermesMark.swift b/apps/ios/Zeron/Design/HermesMark.swift
index edd559de9..a1e6f5de3 100644
--- a/apps/ios/Zeron/Design/HermesMark.swift
+++ b/apps/ios/Zeron/Design/HermesMark.swift
@@ -1,5 +1,5 @@
// Hermes brand mark path data — extracted verbatim from the desktop asset
-// (crates/ui/assets/icons/hermes-mark.svg, 24x24 viewBox, even-odd fill; its
+// (assets/icons/hermes-mark.svg, 24x24 viewBox, even-odd fill; its
// three elements concatenate — each opens with an absolute M). Split
// out of BrandMarks.swift because the path constant dwarfs the enum.
diff --git a/apps/ios/Zeron/Session/NewSessionViewController.swift b/apps/ios/Zeron/Session/NewSessionViewController.swift
index 43eb48c35..ca1833e69 100644
--- a/apps/ios/Zeron/Session/NewSessionViewController.swift
+++ b/apps/ios/Zeron/Session/NewSessionViewController.swift
@@ -60,6 +60,7 @@ final class NewSessionViewController: UIViewController, UIGestureRecognizerDeleg
private let hero = UILabel()
private let wallpaper = WallpaperView()
private let mark = UIImageView()
+ private let heroStack = UIStackView()
private var draft: NewSessionDraft
private var models: [ModelChoice] = []
@@ -136,7 +137,8 @@ final class NewSessionViewController: UIViewController, UIGestureRecognizerDeleg
hero.font = Fonts.ui(.sansSemibold, 22)
hero.textColor = Palette.text
hero.textAlignment = .center
- let heroStack = UIStackView(arrangedSubviews: [mark, hero])
+ heroStack.addArrangedSubview(mark)
+ heroStack.addArrangedSubview(hero)
heroStack.axis = .vertical
heroStack.spacing = 14
heroStack.alignment = .center
@@ -284,6 +286,20 @@ final class NewSessionViewController: UIViewController, UIGestureRecognizerDeleg
// artwork softened behind the composer.
wallpaper.frame = CGRect(x: 0, y: 0, width: view.bounds.width, height: min(view.bounds.height * 0.72, 760))
wallpaper.cutout = composer.convert(composer.bounds, to: wallpaper)
+ fitHero()
+ }
+
+ /// Short on room above the composer (the keyboard up on a folded iPhone
+ /// Duo, a phone in landscape), the headline gives way whole instead of
+ /// squeezing the mark into the text: the mark goes first, then the line.
+ private func fitHero() {
+ let room = composer.frame.minY - 20 - view.safeAreaInsets.top
+ let width = max(0, view.safeAreaLayoutGuide.layoutFrame.width - 48)
+ let line = hero.sizeThatFits(CGSize(width: width, height: .greatestFiniteMagnitude)).height
+ let showMark = room >= line + heroStack.spacing + mark.intrinsicContentSize.height
+ if mark.isHidden == showMark { mark.isHidden = !showMark }
+ let alpha: CGFloat = room >= line ? 1 : 0
+ if heroStack.alpha != alpha { heroStack.alpha = alpha }
}
@objc private func dismissKeyboard() {
diff --git a/apps/ios/Zeron/Shell/SplitRootController.swift b/apps/ios/Zeron/Shell/SplitRootController.swift
index b2375ac1d..6bbc180aa 100644
--- a/apps/ios/Zeron/Shell/SplitRootController.swift
+++ b/apps/ios/Zeron/Shell/SplitRootController.swift
@@ -15,7 +15,7 @@ protocol AppRouter: AnyObject {
/// It shows when the window is regular in both directions (iPad, an unfolded
/// iPhone Duo); anything else (iPhone, the Duo folded, Slide Over, narrow
/// Split View) collapses to the iPhone tab shell.
-final class SplitRootController: UISplitViewController, UISplitViewControllerDelegate, AppRouter {
+final class SplitRootController: UISplitViewController, UISplitViewControllerDelegate, UINavigationControllerDelegate, AppRouter {
private let app: AppModel
private let sidebar: SidebarViewController
private let detail = UINavigationController()
@@ -47,11 +47,14 @@ final class SplitRootController: UISplitViewController, UISplitViewControllerDel
minimumPrimaryColumnWidth = 320
maximumPrimaryColumnWidth = 400
primaryBackgroundStyle = .none
- // No toggle button (the phone has none); ⌘B still hides the sidebar.
+ // Our own toggles instead of the system's: the sidebar's is in its
+ // header (the split's bar above it is hidden), and while it's hidden
+ // the main column offers it back beside New Session. ⌘B also works.
displayModeButtonVisibility = .never
setViewController(sidebar, for: .primary)
detail.navigationBar.titleTextAttributes = [.font: Fonts.ui(.sansSemibold, 17), .foregroundColor: Palette.text]
detail.navigationBar.tintColor = Palette.text
+ detail.delegate = self
setViewController(detail, for: .secondary)
inspector.navigationBar.titleTextAttributes = [.font: Fonts.ui(.sansSemibold, 17), .foregroundColor: Palette.text]
inspector.navigationBar.tintColor = Palette.text
@@ -107,11 +110,62 @@ final class SplitRootController: UISplitViewController, UISplitViewControllerDel
@objc private func newSessionCommand() { presentNewSession(prompt: nil) }
@objc private func searchCommand() { showSearch() }
@objc private func toggleSidebarCommand() {
+ setSidebarShown(displayMode == .secondaryOnly)
+ }
+
+ /// The sidebar in or out, by the user's hand (its header button, the
+ /// main column's, ⌘B). Their choice outlasts the companions panel's
+ /// stepping it aside.
+ func setSidebarShown(_ shown: Bool) {
+ modeBeforeInspector = nil
UIView.animate(withDuration: 0.3) {
- self.preferredDisplayMode = self.displayMode == .secondaryOnly ? .oneBesideSecondary : .secondaryOnly
+ self.preferredDisplayMode = shown ? .oneBesideSecondary : .secondaryOnly
}
}
+ // MARK: Main column chrome
+
+ /// With the sidebar hidden the main column carries what it would have
+ /// offered: a button to bring it back, and New Session (but not on the
+ /// new-session page itself).
+ private func syncDetailChrome(mode: UISplitViewController.DisplayMode? = nil, animated: Bool = false) {
+ guard let root = detail.viewControllers.first else { return }
+ let hidden = !isCollapsed && (mode ?? displayMode) == .secondaryOnly
+ var items: [UIBarButtonItem] = []
+ if hidden {
+ let show = UIBarButtonItem(image: UIImage(systemName: "sidebar.left"), primaryAction: UIAction { [weak self] _ in
+ self?.setSidebarShown(true)
+ })
+ show.accessibilityLabel = "Show Sidebar"
+ show.accessibilityIdentifier = "sidebar-show"
+ items.append(show)
+ if !(root is NewSessionViewController) {
+ let compose = UIBarButtonItem(image: UIImage(systemName: "square.and.pencil"), primaryAction: UIAction { [weak self] _ in
+ self?.presentNewSession(prompt: nil)
+ })
+ compose.accessibilityLabel = "New session"
+ compose.accessibilityIdentifier = "detail-new-session"
+ items.append(compose)
+ }
+ }
+ let current = root.navigationItem.leftBarButtonItems ?? []
+ guard current.map(\.accessibilityIdentifier) != items.map(\.accessibilityIdentifier) else { return }
+ root.navigationItem.leftItemsSupplementBackButton = true
+ root.navigationItem.setLeftBarButtonItems(items.isEmpty ? nil : items, animated: animated)
+ }
+
+ func splitViewController(_ svc: UISplitViewController, willChangeTo displayMode: UISplitViewController.DisplayMode) {
+ syncDetailChrome(mode: displayMode, animated: view.window != nil)
+ }
+
+ func splitViewControllerDidExpand(_ svc: UISplitViewController) {
+ syncDetailChrome()
+ }
+
+ func navigationController(_ nav: UINavigationController, willShow vc: UIViewController, animated: Bool) {
+ if nav === detail { syncDetailChrome() }
+ }
+
// MARK: AppRouter
func openSession(_ chatId: String) {
@@ -300,6 +354,8 @@ final class SplitRootController: UISplitViewController, UISplitViewControllerDel
modeBeforeInspector = nil
(inspector.viewControllers.first as? CompanionsViewController)?.showsClose = true
if let session = detail.viewControllers.first as? SessionViewController {
+ // The tab shell has its own way back; the column's buttons stay.
+ session.navigationItem.leftBarButtonItems = nil
session.relocating = true
detail.setViewControllers([], animated: false)
tabs.adoptSession(session)
@@ -420,6 +476,12 @@ final class SidebarViewController: UIViewController, UISearchResultsUpdating {
compose.accessibilityLabel = "New session"
compose.accessibilityIdentifier = "new-session"
list.navigationItem.rightBarButtonItem = nil
+ let hide = UIBarButtonItem(image: UIImage(systemName: "sidebar.left"), primaryAction: UIAction { [weak self] _ in
+ (self?.splitViewController as? SplitRootController)?.setSidebarShown(false)
+ })
+ hide.accessibilityLabel = "Hide Sidebar"
+ hide.accessibilityIdentifier = "sidebar-hide"
+ list.navigationItem.leftBarButtonItem = hide
toolbarProbe.isUserInteractionEnabled = false
let probe = UIBarButtonItem(customView: toolbarProbe)
probe.hidesSharedBackground = true
diff --git a/apps/ios/ZeronUITests/IPadLayoutTests.swift b/apps/ios/ZeronUITests/IPadLayoutTests.swift
index a1684eebe..48049f953 100644
--- a/apps/ios/ZeronUITests/IPadLayoutTests.swift
+++ b/apps/ios/ZeronUITests/IPadLayoutTests.swift
@@ -43,6 +43,28 @@ final class IPadLayoutTests: XCTestCase {
XCTAssertTrue(app.staticTexts.matching(NSPredicate(format: "label CONTAINS 'Wrangler deploy hygiene'")).firstMatch.waitForExistence(timeout: 5))
}
+ /// The sidebar closes from its header; while it's away the main column
+ /// brings it back and offers New Session.
+ func testSidebarHidesAndComesBack() {
+ XCUIDevice.shared.orientation = .portrait
+ let app = launch(["-route", "chat:chat-deploy"])
+ XCTAssertTrue(app.scrollViews["transcript"].waitForExistence(timeout: 10))
+ let row = app.cells["session-chat-deploy"]
+ XCTAssertTrue(row.waitForExistence(timeout: 5))
+ XCTAssertFalse(app.buttons["sidebar-show"].exists, "nothing to bring back while the sidebar shows")
+ app.buttons["sidebar-hide"].tap()
+ let show = app.buttons["sidebar-show"]
+ XCTAssertTrue(show.waitForExistence(timeout: 5))
+ XCTAssertTrue(row.waitForNonExistence(timeout: 5), "the sidebar is gone")
+ snapshot(app, "ipad-sidebar-hidden")
+ app.buttons["detail-new-session"].tap()
+ XCTAssertTrue(app.textViews["composer-input"].waitForExistence(timeout: 5))
+ XCTAssertFalse(app.buttons["detail-new-session"].exists, "no New Session on the new-session page")
+ show.tap()
+ XCTAssertTrue(row.waitForExistence(timeout: 5), "the sidebar is back")
+ XCTAssertTrue(show.waitForNonExistence(timeout: 5))
+ }
+
func testNewSessionFromSidebarAndSearch() {
XCUIDevice.shared.orientation = .landscapeLeft
let app = launch(["-route", "chat:chat-deploy"])
diff --git a/apps/landing/.gitignore b/apps/landing/.gitignore
new file mode 100644
index 000000000..ddce69b68
--- /dev/null
+++ b/apps/landing/.gitignore
@@ -0,0 +1,3 @@
+node_modules/
+dist/
+.astro/
diff --git a/apps/landing/README.md b/apps/landing/README.md
new file mode 100644
index 000000000..4c29b96ad
--- /dev/null
+++ b/apps/landing/README.md
@@ -0,0 +1,127 @@
+# zeron.sh
+
+The landing page, as an [Astro](https://astro.build) site. It is prerendered
+to static files and deployed as an assets-only Cloudflare Worker
+(`wrangler.jsonc`). `npx wrangler deploy` installs, type checks, builds and
+tests before it uploads; `.github/workflows/deploy.yml` runs it on every push
+to `main` that touches this folder. `-c wrangler.staging.jsonc` deploys the
+same build to https://site-staging.zeron.sh.
+
+```sh
+npm install
+npm run dev # http://localhost:4321
+npm run check # types, in .astro and .ts
+npm test # builds ./dist, then tests the scripts and the built pages
+```
+
+## Layout
+
+```
+src/
+ pages/ index (the landing page), privacy, 404
+ layouts/Base head, fonts, nav, footer
+ components/
+ ui/ Button, Mark, CopyCommand, agent and platform marks
+ site/ Nav, Footer, GitHubStars
+ app/ the session window, recreated in HTML (generated)
+ home/ one file per section of the landing page
+ data/ releases (every download), agents, voices, site links
+ lib/downloads which build a visitor is offered; tested, no DOM
+ scripts/ downloads.ts points the page's links at the latest release
+ styles/global the tokens, taken from the app's own dark theme
+public/
+ telemetry.js the page-view counter, served exactly as written
+tools/
+ recreate/ builds the app's windows from its layout tree, and diffs them
+```
+
+The site wears the app's design: `src/styles/global.css` copies its colours,
+radii and control sizes from `apps/zgx/ui/ds/themes/zeron-dark.json`, and the
+fonts are the app's (Geist, Geist Mono). Change a token there first.
+
+It is static today. When a route needs a server (sign-in, the plugin store),
+add `@astrojs/cloudflare` as the adapter and mark that route
+`export const prerender = false`; the rest stays prerendered.
+
+## The app on the page
+
+Nothing on the page is a screenshot. The app is recreated in HTML and CSS,
+and the recreation is held to the real app by a diff against native
+captures.
+
+- **The session window** (`src/components/app/SessionWindow.astro`): a
+ session with its panel open, in the app's dark and light themes. Whole, it
+ is the hero's tilted plane; with `crop`, one part of its 1320 × 840 stage
+ at any size (the pieces inside cards). Being HTML, a piece shown large
+ stays as sharp as the window.
+- **The themes window** (`ThemesWindow.astro`): the same session with its
+ panel closed, in six of the app's themes, with the window's frosted glass
+ kept: every surface carries the alpha the app drew, so the desktop behind
+ it shows through.
+- Both are generated by `tools/recreate` from the app's own layout tree:
+ `*.fragment.html`, `*.icons.css`, `*.vars.css`, `themes.themes.json` and
+ `zw.css` are outputs. Change the tools, not the files.
+- **The machine picker and the chart reply** (`WorkIn.astro`,
+ `ChartReply.astro`): HTML written by hand from the numbers of the canvas
+ drawing on the `zeron/landing-newchat-hero` branch
+ (`public/hero/chrome.js`), which that branch's rig checked against the
+ app. They are transcriptions of that code, not diffed again.
+
+### tools/recreate
+
+`reference/` holds what each window was built from: the layout tree of
+`apps/zgx` in one state (`tree.json`, `tree.txt`, from the app's inspector)
+and a native capture of that state in each theme, with alpha
+(`ref-.png`). `reference/artwork` is the sample projects' icons. The
+captures are the Linux build's; the title strip is laid out as macOS draws
+it (traffic lights, no caption buttons, ⌘ in the shortcuts) and is left out
+of the diff.
+
+Run from a scratch copy of `reference/session` or `reference/themes`, with
+the tools beside it:
+
+```sh
+# the session window (the defaults: THEMES=dark,light NAME=session)
+python3 stage_a.py # the text and image nodes the capture shows
+python3 fit.py # each text's font, by measuring it in the browser
+python3 gen.py # boxes, icons, text and code colours -> the fragment
+python3 check.py dark # render at 2x and diff against that theme's capture
+python3 tune.py # move each node by what the diff finds; repeat gen + check
+
+# the themes window
+export THEMES=zeron-dark,tokyo-night,catppuccin,dracula,gruvbox,github-light NAME=themes GLASS=1
+```
+
+What each does: boxes come from the tree; fills, edges, corner radii and
+hairlines from the reference's pixels; icons are matched against the app's
+own SVG set (`ui/ds/icon_svgs.luau`); fonts are the ones whose measured
+width fits the app's box; code is coloured cell by cell from the capture;
+avatars are `ui/ds/avatar.luau`'s waves; a project's tile is its
+repository's own artwork; the sidebar's branch lines and working rings are
+drawn from the tree's rows. Every colour is emitted once a theme
+(`--c0`, `--c1`, …), so all themes share one markup. With `GLASS=1` each
+surface's fill is solved back from the capture's alpha (source-over,
+undone), so the stage composites as the app's window does.
+
+Mean absolute error of 255 per channel, below the title strip, at 2x:
+session 0.79 dark, 0.93 light; themes 0.6 to 1.2 across the six (laid on
+each theme's own window colour). The transcript's prose is the worst part
+(1.8), where the browser and the app rasterize the same outlines
+differently.
+
+Needs Python with Pillow, numpy and cairosvg, and a Chromium (`CHROME`).
+To retake a reference, run the app with `--inspect` (`inspect.py` sends it
+commands) on a display that composites, and save the window's pixels.
+
+### The phone
+
+`src/components/app/PhoneSession.astro` is the iOS app's session screen, a
+402 × 874 point stage written by hand (`phone.fragment.html`, `phone.css`)
+against the app's own screenshot,
+`docs/screenshots/message-captions/ios-dark.png`.
+`python3 tools/recreate/phone_check.py --tune` renders it at 3x, diffs it,
+and prints how far each element sits from the reference. Mean absolute
+error of 255: 2.9 over the screen. The app's text is Geist, as here; its
+glyphs are SF Symbols, which a web page can't carry, so the back arrow, the
+stack, the dots and the status bar are drawn as plain shapes and differ
+from the app's by a little.
diff --git a/apps/landing/astro.config.mjs b/apps/landing/astro.config.mjs
new file mode 100644
index 000000000..5b7cd5193
--- /dev/null
+++ b/apps/landing/astro.config.mjs
@@ -0,0 +1,30 @@
+// @ts-check
+import { defineConfig, fontProviders } from "astro/config";
+
+// zeron.sh is prerendered and deployed as static assets (wrangler.jsonc).
+// When a route needs a server — sign-in, the plugin store — add
+// @astrojs/cloudflare as the adapter and mark that route `prerender = false`;
+// the rest of the site stays static.
+export default defineConfig({
+ site: "https://zeron.sh",
+ trailingSlash: "never",
+ // /privacy is served from privacy.html, the URL the app and stores link to.
+ build: { format: "file" },
+ devToolbar: { enabled: false },
+ fonts: [
+ {
+ provider: fontProviders.local(),
+ name: "Geist",
+ cssVariable: "--font-sans",
+ fallbacks: ["system-ui", "sans-serif"],
+ options: { variants: [{ src: ["./src/assets/fonts/geist.woff2"], weight: "100 900", style: "normal" }] },
+ },
+ {
+ provider: fontProviders.local(),
+ name: "Geist Mono",
+ cssVariable: "--font-mono",
+ fallbacks: ["ui-monospace", "monospace"],
+ options: { variants: [{ src: ["./src/assets/fonts/geist-mono.woff2"], weight: "100 900", style: "normal" }] },
+ },
+ ],
+});
diff --git a/apps/landing/downloads.test.mjs b/apps/landing/downloads.test.mjs
deleted file mode 100644
index 70f080fd8..000000000
--- a/apps/landing/downloads.test.mjs
+++ /dev/null
@@ -1,42 +0,0 @@
-import assert from 'node:assert/strict';
-import { readFileSync } from 'node:fs';
-import test from 'node:test';
-import { runInNewContext } from 'node:vm';
-const source = readFileSync(new URL('./public/downloads.js', import.meta.url), 'utf8');
-const html = readFileSync(new URL('./public/index.html', import.meta.url), 'utf8');
-async function load(navigator, version = '0.2.98', fail = false) {
- const links = Object.fromEntries(['nav-download', 'hero-download', 'closing-download'].map(id => [id, { href: '#downloads', setAttribute() {} }]));
- const choices = ['macos', 'windows', 'windows-portable', 'linux', 'linux-arm'].map(platformDownload => ({ dataset: { platformDownload } }));
- runInNewContext(source, { navigator, document: { getElementById: id => links[id], querySelectorAll: () => choices }, fetch: () => fail ? Promise.reject() : Promise.resolve({ ok: true, text: () => Promise.resolve(version) }) });
- await new Promise(resolve => setImmediate(resolve));
- return { links, choices };
-}
-for (const [platform, userAgent, file] of [
- ['MacIntel', 'Macintosh', 'macos-arm64.dmg'], ['Win32', 'Windows NT', 'windows-x86_64-setup.exe'],
- ['Linux x86_64', 'Linux', 'linux-x86_64.tar.gz'], ['Linux aarch64', 'Linux', 'linux-aarch64.tar.gz'],
-]) test(`desktop download: ${platform}`, async () => {
- const { links, choices } = await load({ platform, userAgent });
- for (const id of ['nav-download', 'hero-download', 'closing-download']) assert.equal(links[id].href, `https://zeron.sh/releases/zeron-0.2.98-${file}`);
- assert.equal(choices.length, 5);
- for (const choice of choices) assert.match(choice.href, /^https:\/\/zeron.sh\/releases\/zeron-0.2.98-/);
-});
-for (const navigator of [{ platform: 'Linux armv8l', userAgent: 'Mozilla/5.0 (Linux; Android 16; Pixel 9)' }, { platform: 'Linux', userAgent: 'Android' }]) test(`android download: ${JSON.stringify(navigator)}`, async () => {
- const { links, choices } = await load(navigator);
- for (const id of ['nav-download', 'hero-download', 'closing-download']) assert.equal(links[id].href, 'https://zeron.sh/releases/zeron-android-arm64.apk');
- // The desktop rows keep their own builds.
- for (const choice of choices) assert.match(choice.href, /^https:\/\/zeron.sh\/releases\/zeron-0.2.98-/);
-});
-for (const navigator of [{ platform: 'MacIntel', maxTouchPoints: 5 }, { platform: 'iPhone' }, {}]) test(`mobile/unknown stays at chooser: ${JSON.stringify(navigator)}`, async () => {
- const { links } = await load(navigator);
- assert.equal(links['hero-download'].href, '#downloads');
-});
-for (const [version, fail] of [['', false], ['0.2.96', false], ['', true]]) test(`safe fallback: ${version}`, async () => {
- const { links } = await load({ platform: 'Win32' }, version, fail);
- assert.equal(links['hero-download'].href, 'https://zeron.sh/releases/zeron-0.2.97-windows-x86_64-setup.exe');
-});
-test('HTML retains all five explicit downloads without JavaScript', () => {
- for (const file of ['macos-arm64.dmg', 'windows-x86_64-setup.exe', 'windows-x86_64.zip', 'linux-x86_64.tar.gz', 'linux-aarch64.tar.gz']) assert.ok(html.includes(`https://zeron.sh/releases/zeron-0.2.97-${file}`));
- assert.ok(html.includes('id="downloads"'));
- assert.ok(html.includes('href="https://zeron.sh/releases/zeron-android-arm64.apk"'));
- assert.ok(html.includes('href="#downloads">All downloads'));
-});
diff --git a/apps/landing/package-lock.json b/apps/landing/package-lock.json
new file mode 100644
index 000000000..1427b5775
--- /dev/null
+++ b/apps/landing/package-lock.json
@@ -0,0 +1,5059 @@
+{
+ "name": "zeron-landing",
+ "version": "0.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "zeron-landing",
+ "version": "0.0.0",
+ "dependencies": {
+ "astro": "^7.4.12"
+ },
+ "devDependencies": {
+ "@astrojs/check": "^0.9.12",
+ "@types/node": "^26.6.6",
+ "typescript": "^6.0.3",
+ "vitest": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=22.23.4"
+ }
+ },
+ "node_modules/@astrojs/astro2tsx": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/@astrojs/astro2tsx/-/astro2tsx-0.1.4.tgz",
+ "integrity": "sha512-5dJqY4i1AlXxcsSFHkaegnrgdVs9J4U93y/YF0xmvmSOcNYVQnf4db3IhvqHZ5v8biLPlPlFmlYsqHj0c4/ZSA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@emnapi/core": "1.11.3",
+ "@emnapi/runtime": "1.11.3",
+ "@napi-rs/wasm-runtime": "1.2.4"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/check": {
+ "version": "0.9.12",
+ "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.9.12.tgz",
+ "integrity": "sha512-hazpqxIfZWj2VhyPyR0pOEQ/IhFDM/2nIApL96zMXABdD8NrUKYDmhxTy7h+drTDl9MQG/Sd1ET/4amadVJUUA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@astrojs/language-server": "^2.17.3",
+ "chokidar": "^5.0.0",
+ "kleur": "^4.1.5",
+ "yargs": "^18.2.0"
+ },
+ "bin": {
+ "astro-check": "bin/astro-check.js"
+ },
+ "peerDependencies": {
+ "typescript": "^5.0.0 || ^6.0.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding/-/compiler-binding-0.5.3.tgz",
+ "integrity": "sha512-fHG6eWKvnSlV11dUMZSi4AynOGjVbNBgZZc704Hi9DW8WeKtbsS7fJQT3omz1Nba+5mccLQQGAWOQ65cnuNLtg==",
+ "license": "MIT",
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "optionalDependencies": {
+ "@astrojs/compiler-binding-android-arm64": "0.5.3",
+ "@astrojs/compiler-binding-darwin-arm64": "0.5.3",
+ "@astrojs/compiler-binding-darwin-x64": "0.5.3",
+ "@astrojs/compiler-binding-linux-arm64-gnu": "0.5.3",
+ "@astrojs/compiler-binding-linux-arm64-musl": "0.5.3",
+ "@astrojs/compiler-binding-linux-x64-gnu": "0.5.3",
+ "@astrojs/compiler-binding-linux-x64-musl": "0.5.3",
+ "@astrojs/compiler-binding-wasm32-wasi": "0.5.3",
+ "@astrojs/compiler-binding-win32-arm64-msvc": "0.5.3",
+ "@astrojs/compiler-binding-win32-x64-msvc": "0.5.3"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-android-arm64": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-android-arm64/-/compiler-binding-android-arm64-0.5.3.tgz",
+ "integrity": "sha512-ThyoCqtrdp6UwmMvScluDll4vvj4kXwUPKHYozLbXJKPH5zrJ8sr5xQJVOk0YvgBrCvGBA/lPVVLyEp1aLuBYg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-darwin-arm64": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-arm64/-/compiler-binding-darwin-arm64-0.5.3.tgz",
+ "integrity": "sha512-zMI4ndCVCd0Wsrm8sXVcIk6uviKsgndFLnxqNd6Qx26LINSkb0lQ7SL8gKyGcTu0hJRTBwl7Y1WcpMk37aeaKQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-darwin-x64": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-x64/-/compiler-binding-darwin-x64-0.5.3.tgz",
+ "integrity": "sha512-Ce51oGlDgBAwoVOy5Y4FeIqFkXbS/vJkIAPN5pXIYchn/3izF4c2t//KuUZJopwzD6Kblj46kKiqmxRUt/mAJg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-linux-arm64-gnu": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-gnu/-/compiler-binding-linux-arm64-gnu-0.5.3.tgz",
+ "integrity": "sha512-WCBGgpmUqbuWW3KAsNOKRXDeQIAeQLftZhZ+CNyl3eg4JtkfZRXHav2qItzVg6ODyzmS2e+QkpgsQuwMSInGgA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-linux-arm64-musl": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-musl/-/compiler-binding-linux-arm64-musl-0.5.3.tgz",
+ "integrity": "sha512-DRcjEOFWcMbaaTsbOEferYozr2zDUf/roDzcF6WxHSSto+rqZ1N87xxj/pjOpz0JtTBlZ3V59nZGONcNiQUSWw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-linux-x64-gnu": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-gnu/-/compiler-binding-linux-x64-gnu-0.5.3.tgz",
+ "integrity": "sha512-8rIMmEFtuVe5mMvwBR59uSHZL7CaJ/CPm5Hh3r3Bd5JLoSPkBbl1xk8kwUkNKJ0QSbGEFdWkUnx73JRZq46i2A==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-linux-x64-musl": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-musl/-/compiler-binding-linux-x64-musl-0.5.3.tgz",
+ "integrity": "sha512-+sZCsIXq/PQBiemALIr+GbERKQbQ82mHW2ibJUlCDtsjyFA/8Udm8WGZhS7AGjb2P9ekQ4j7Z8dbxb0f3E0oZw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-wasm32-wasi": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-wasm32-wasi/-/compiler-binding-wasm32-wasi-0.5.3.tgz",
+ "integrity": "sha512-cEhZ7XAoZYffJdNYb3MDWci1UKhSEjPN+DMaLEB8X1tKlhlYNw9eVWUyNZTe1gb3nr7JJBVXdXDioqE00dyVLQ==",
+ "cpu": [
+ "wasm32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "1.11.3",
+ "@emnapi/runtime": "1.11.3",
+ "@napi-rs/wasm-runtime": "^1.2.7"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.7.tgz",
+ "integrity": "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3",
+ "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-win32-arm64-msvc": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-arm64-msvc/-/compiler-binding-win32-arm64-msvc-0.5.3.tgz",
+ "integrity": "sha512-Vcg6+NlU2SOmVGweQEmufu40MHuDuRR80dp9xNLutBWGdJG1HP0XivjGWKGkx/2EK3HN5rwB2NwPgBNDkhKsnQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-binding-win32-x64-msvc": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-x64-msvc/-/compiler-binding-win32-x64-msvc-0.5.3.tgz",
+ "integrity": "sha512-Mt5bK4l5ZcUdNcVxJ7VVt2x5Ck46cXgxCmIhT8sVyUST04FBRYqcYTXQLvy1Py4ejglcWRxAS6z+jBVHs3LPfg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/compiler-rs": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/compiler-rs/-/compiler-rs-0.5.3.tgz",
+ "integrity": "sha512-rNSAYm5IcRJMpNm+cSMaaPNCmzCXIdiz67kcBwC1qN8eTmO48wEJ6hZdlGq60+0HIHwUlncfaMxti1Fk2uJu7w==",
+ "license": "MIT",
+ "dependencies": {
+ "@astrojs/compiler-binding": "0.5.3"
+ },
+ "engines": {
+ "node": ">=22.12.0"
+ }
+ },
+ "node_modules/@astrojs/internal-helpers": {
+ "version": "0.13.2",
+ "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.13.2.tgz",
+ "integrity": "sha512-SWiNS+OMrhwWYzJENTekHUyUCMKB+tdU6D4v1ZNIU1ZHh2mScQ8WIs0J6AJ8KPXkIrs9+EZU7Rm2CstfThyVnw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.5",
+ "@types/mdast": "^4.0.4",
+ "picomatch": "^4.0.7",
+ "retext-smartypants": "^6.2.0",
+ "shiki": "^4.6.0",
+ "smol-toml": "^1.9.1",
+ "unified": "^11.0.5",
+ "yaml": "^2.9.1"
+ }
+ },
+ "node_modules/@astrojs/language-server": {
+ "version": "2.17.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/language-server/-/language-server-2.17.3.tgz",
+ "integrity": "sha512-QIAFu1e/4quJMTPdmBOm+ZPXc5NDGZE4/YQjgR3EgjhGLl/tdidaWJDr5WmO2lesVc+BW1qN/xNBURmuePDG2A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@astrojs/astro2tsx": "^0.1.2",
+ "@astrojs/yaml2ts": "^0.2.4",
+ "@volar/kit": "~2.4.28",
+ "@volar/language-core": "~2.4.28",
+ "@volar/language-server": "~2.4.28",
+ "@volar/language-service": "~2.4.28",
+ "muggle-string": "^0.4.1",
+ "tinyglobby": "^0.2.17",
+ "volar-service-css": "0.0.71",
+ "volar-service-emmet": "0.0.71",
+ "volar-service-html": "0.0.71",
+ "volar-service-prettier": "0.0.71",
+ "volar-service-typescript": "0.0.71",
+ "volar-service-typescript-twoslash-queries": "0.0.71",
+ "volar-service-yaml": "0.0.71",
+ "vscode-html-languageservice": "^5.6.2",
+ "vscode-uri": "^3.2.0"
+ },
+ "bin": {
+ "astro-ls": "bin/nodeServer.js"
+ },
+ "peerDependencies": {
+ "prettier": "^3.0.0",
+ "prettier-plugin-astro": ">=0.11.0"
+ },
+ "peerDependenciesMeta": {
+ "prettier": {
+ "optional": true
+ },
+ "prettier-plugin-astro": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@astrojs/markdown-satteri": {
+ "version": "0.4.10",
+ "resolved": "https://registry.npmjs.org/@astrojs/markdown-satteri/-/markdown-satteri-0.4.10.tgz",
+ "integrity": "sha512-3h/wheVjZIcP/m295nkiUjOvCsCs6QpvZ3l4BfDU4ghNQcrcFrNVu1+K+I+YT61hH9tuCDQiGdF8QDzfDoG42w==",
+ "license": "MIT",
+ "dependencies": {
+ "@astrojs/internal-helpers": "^0.13.2",
+ "@astrojs/prism": "^4.1.2",
+ "github-slugger": "^2.0.0",
+ "satteri": "^0.11.6"
+ }
+ },
+ "node_modules/@astrojs/prism": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-4.1.2.tgz",
+ "integrity": "sha512-jMrUEpFDarDO1KWPvVc9eSa8DSfwBlwEOHwX+8zvZQpiqXRGDxFnOXHsYqV6DP7w+0qIgTr98gS1GdQlm8ypWg==",
+ "license": "MIT",
+ "dependencies": {
+ "prismjs": "^1.30.0"
+ },
+ "engines": {
+ "node": ">=22.23.4"
+ }
+ },
+ "node_modules/@astrojs/runtime": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@astrojs/runtime/-/runtime-0.1.1.tgz",
+ "integrity": "sha512-2Tr9IJ4aQBPDFzlSLq139eWS9OZnuhL0yU2al8cCpnTE/RszygSyGIP8piBmEio1zDUaItb/+YxxsrmldUCBmg==",
+ "license": "MIT",
+ "dependencies": {
+ "@oslojs/encoding": "^1.1.0",
+ "clsx": "^2.1.1"
+ }
+ },
+ "node_modules/@astrojs/telemetry": {
+ "version": "3.4.2",
+ "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.4.2.tgz",
+ "integrity": "sha512-2JOMRUxJrBSfiVDfeKLv1wBmvSIx1Y6u2YEO8awZ9qSq3u/rNAiUyFdOYi8dHv91kHrmYEQX7pRDw0J4xyj3UA==",
+ "license": "MIT",
+ "dependencies": {
+ "ci-info": "^4.4.0",
+ "dset": "^3.1.4",
+ "is-docker": "^4.0.0",
+ "package-manager-detector": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=22.23.4"
+ }
+ },
+ "node_modules/@astrojs/vite-plugin-astro": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@astrojs/vite-plugin-astro/-/vite-plugin-astro-0.1.3.tgz",
+ "integrity": "sha512-yj+xGnr3HeHUtIdra/tWizJuisBoxAuWlBTElMlf22FpSxinrTwTl/dqftG0D2BsQTcn4/shgCCUwcnkcZ8buA==",
+ "license": "MIT",
+ "dependencies": {
+ "@astrojs/compiler-rs": "^0.5.1",
+ "@astrojs/internal-helpers": "^0.13.2",
+ "@astrojs/runtime": "^0.1.1",
+ "common-ancestor-path": "^2.0.0",
+ "devalue": "^6.0.2",
+ "magic-string": "^1.4.2",
+ "rolldown": "~1.2.16",
+ "smol-toml": "^1.9.0",
+ "zod": "^4.6.5"
+ },
+ "peerDependencies": {
+ "vite": "^8.3.3"
+ }
+ },
+ "node_modules/@astrojs/yaml2ts": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/@astrojs/yaml2ts/-/yaml2ts-0.2.4.tgz",
+ "integrity": "sha512-8oddpOae35pJsXPQXhTkM0ypfKPskVsh2bCxRtbf7e+/Epw2nReakFYpLKjZMEr75CsoF203PMnCocpfz0s69A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "yaml": "^2.8.3"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.29.14",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz",
+ "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.29.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.29.14",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz",
+ "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.29.14"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.29.14",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz",
+ "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.29.14",
+ "@babel/helper-validator-identifier": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@bruits/satteri-android-arm64": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-android-arm64/-/satteri-android-arm64-0.11.7.tgz",
+ "integrity": "sha512-ej+1rIKs+yb6/OtcIe1SO22OXjJV0qqUopl5VNZF8Sqc/Pj4m1DXoqBQsPxW5OUYYiDUymIy6hnnn8M78VYk2w==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@bruits/satteri-darwin-arm64": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.11.7.tgz",
+ "integrity": "sha512-yllQOX1kVWrwqL7tamQlp4NP0loIb4KuadjuNrAe4JEOerHpgYISPRDb8DqLipgvP7Ks4e87LydZpdakMR1rhQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@bruits/satteri-darwin-x64": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.11.7.tgz",
+ "integrity": "sha512-RMQrKzEZRZSiYyLFifiSuk0nBH6uAY1TVMNR/h/aE4rr2OS6l82e4MJTpC6H/tqSMoE+3CwbkUKBQGLHIweYlg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@bruits/satteri-freebsd-x64": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-freebsd-x64/-/satteri-freebsd-x64-0.11.7.tgz",
+ "integrity": "sha512-EFlqw+RDRo3wYdy1ZSR/dNYhfWjuZL86PYwRcpLWWEZskjfpNnhIdxS13Xw2QJE1hSjTGVq4aZaVvlUjoj8p5A==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@bruits/satteri-linux-arm64-gnu": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.11.7.tgz",
+ "integrity": "sha512-aeH365GHaqv01wRSiHaGUlpL28U8e9UnV9LxjIF6BOyTj71/M5bop4HKomcis4VxFZjd68fDqNyU22yFkF/h7A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@bruits/satteri-linux-arm64-musl": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.11.7.tgz",
+ "integrity": "sha512-72WlBhuwOHm+2Nv4Qf1WzfS75PHOLz81sYkDJnmj0Rm2C4Xax5faSiTDt7vWo1IcK6rDlkuRDNnWIw8uIKWuVQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@bruits/satteri-linux-x64-gnu": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.11.7.tgz",
+ "integrity": "sha512-gDp4v1jjckeNCetLtrMUfDV4CKGYL6fayDPdoaQq09nkDCSrclxEFK7kAmRuHhoalgsao4bZMFqQr3HQtN2NEQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@bruits/satteri-linux-x64-musl": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.11.7.tgz",
+ "integrity": "sha512-zqzSpQLA6V3J/TO2Vjuc1VRQPIQQdoSYmzKKFL+3GwGlbXiFQP2ZUDSLw9xlm0tTKXkCM9ANr4jMiDASZ+JGUw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@bruits/satteri-wasm32-wasi": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.11.7.tgz",
+ "integrity": "sha512-L46f6rtlaBR4fsTWGCTFcXtbtka2GyM3l9TsmE0FgTxjXGq+sndYg5X3hzlhWDkNvJpRtCHCmgTRJ5+cIi4o3A==",
+ "cpu": [
+ "wasm32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "1.11.1",
+ "@emnapi/runtime": "1.11.1",
+ "@napi-rs/wasm-runtime": "^1.2.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@emnapi/core": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz",
+ "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.2.2",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@emnapi/runtime": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz",
+ "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
+ "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.7.tgz",
+ "integrity": "sha512-zJccwplOAbgfZju95IUHazLnx9RAPtPN2YGJXI6UbrgeaR9QfPjGrQL6ERkSAtnVCA4Q+83ApGyaX5zdpCaKkQ==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3",
+ "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2 || 2.0.0-beta.3"
+ }
+ },
+ "node_modules/@bruits/satteri-win32-arm64-msvc": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.11.7.tgz",
+ "integrity": "sha512-R2+o6EbJK4pqbd086H9BGUVYAyZ5F6FnShfoyRIu0Zu9DTE3H6EU/Z+ua7p9dmYf6JQQbE9DCwwavi4xiaGAhQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@bruits/satteri-win32-x64-msvc": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.11.7.tgz",
+ "integrity": "sha512-OIyBFJ35uMu5CH5RWnIR3bKsZwScKZ7vXmhCohZ+qonT1SkxmHCEf4H8YRWThRL2EXdVDjkjhfOsaiA4O24Vvw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@capsizecss/unpack": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@capsizecss/unpack/-/unpack-4.0.1.tgz",
+ "integrity": "sha512-CuNiSqg7+e1cO/GjffyMOm5Tt2jUF9CWHHnvQ/UkqvtkGfHdgwEC0wpmq7fkN3gxwpRnrAN0WzO3vREKmNolMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "fontkitten": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@clack/core": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.6.0.tgz",
+ "integrity": "sha512-4GZynIB2IIe431odxesswvWTCP6orvqd6e2b07b3VFWBQRqUqIHc/EPIZwFoKS692QBp+ooPuXKaJV8g4kXuYA==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-string-width": "^3.0.2",
+ "fast-wrap-ansi": "^0.2.0",
+ "sisteransi": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 20.12.0"
+ }
+ },
+ "node_modules/@clack/prompts": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.9.0.tgz",
+ "integrity": "sha512-tEj8X2No2A1c9NDnZECxiiJ8TP3vmFlN9tLlLeSaMqVW4tUmVG2R4qpv/eP4zymWxnymYLkLcIYVV0VcWj3RCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@clack/core": "1.6.0",
+ "fast-string-width": "^3.0.2",
+ "fast-wrap-ansi": "^0.2.0",
+ "sisteransi": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 20.12.0"
+ }
+ },
+ "node_modules/@emmetio/abbreviation": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz",
+ "integrity": "sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@emmetio/scanner": "^1.0.4"
+ }
+ },
+ "node_modules/@emmetio/css-abbreviation": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@emmetio/css-abbreviation/-/css-abbreviation-2.1.8.tgz",
+ "integrity": "sha512-s9yjhJ6saOO/uk1V74eifykk2CBYi01STTK3WlXWGOepyKa23ymJ053+DNQjpFcy1ingpaO7AxCcwLvHFY9tuw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@emmetio/scanner": "^1.0.4"
+ }
+ },
+ "node_modules/@emmetio/css-parser": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@emmetio/css-parser/-/css-parser-0.4.1.tgz",
+ "integrity": "sha512-2bC6m0MV/voF4CTZiAbG5MWKbq5EBmDPKu9Sb7s7nVcEzNQlrZP6mFFFlIaISM8X6514H9shWMme1fCm8cWAfQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@emmetio/stream-reader": "^2.2.0",
+ "@emmetio/stream-reader-utils": "^0.1.0"
+ }
+ },
+ "node_modules/@emmetio/html-matcher": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@emmetio/html-matcher/-/html-matcher-1.3.0.tgz",
+ "integrity": "sha512-NTbsvppE5eVyBMuyGfVu2CRrLvo7J4YHb6t9sBFLyY03WYhXET37qA4zOYUjBWFCRHO7pS1B9khERtY0f5JXPQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "@emmetio/scanner": "^1.0.0"
+ }
+ },
+ "node_modules/@emmetio/scanner": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@emmetio/scanner/-/scanner-1.0.4.tgz",
+ "integrity": "sha512-IqRuJtQff7YHHBk4G8YZ45uB9BaAGcwQeVzgj/zj8/UdOhtQpEIupUhSk8dys6spFIWVZVeK20CzGEnqR5SbqA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@emmetio/stream-reader": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz",
+ "integrity": "sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@emmetio/stream-reader-utils": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/@emmetio/stream-reader-utils/-/stream-reader-utils-0.1.0.tgz",
+ "integrity": "sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@emnapi/core": {
+ "version": "1.11.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz",
+ "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.2.3",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.11.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
+ "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/wasi-threads": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz",
+ "integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@img/colour": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
+ "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
+ "license": "MIT",
+ "optional": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz",
+ "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz",
+ "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-freebsd-wasm32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz",
+ "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==",
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "dependencies": {
+ "@img/sharp-wasm32": "0.35.5"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz",
+ "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz",
+ "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz",
+ "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz",
+ "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-ppc64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz",
+ "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-riscv64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz",
+ "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz",
+ "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz",
+ "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz",
+ "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz",
+ "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz",
+ "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz",
+ "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-ppc64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz",
+ "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-ppc64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-riscv64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz",
+ "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==",
+ "cpu": [
+ "riscv64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-riscv64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz",
+ "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz",
+ "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-x64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz",
+ "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz",
+ "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-x64": "1.3.4"
+ }
+ },
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz",
+ "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==",
+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/runtime": "^1.11.3"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-webcontainers-wasm32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz",
+ "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==",
+ "cpu": [
+ "wasm32"
+ ],
+ "license": "Apache-2.0",
+ "optional": true,
+ "dependencies": {
+ "@img/sharp-wasm32": "0.35.5"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-arm64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz",
+ "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz",
+ "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==",
+ "cpu": [
+ "ia32"
+ ],
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz",
+ "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz",
+ "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
+ "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.31",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.4.tgz",
+ "integrity": "sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4",
+ "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4"
+ }
+ },
+ "node_modules/@oslojs/encoding": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@oslojs/encoding/-/encoding-1.1.0.tgz",
+ "integrity": "sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==",
+ "license": "MIT"
+ },
+ "node_modules/@oxc-project/types": {
+ "version": "0.156.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz",
+ "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/oxc-project"
+ }
+ },
+ "node_modules/@rolldown/binding-android-arm-eabi": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.19.tgz",
+ "integrity": "sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-android-arm64": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.19.tgz",
+ "integrity": "sha512-hOombrTJ+szt2ciEzS7oCA78lMPBgF5UMQWCJIyNfnrI7GLl8HYoFqCnpL2gcPOaXMqryGCU5ExdQKyDDcC+yA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-arm64": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.19.tgz",
+ "integrity": "sha512-XoMA2pwCKGTQzUjPgtRwkedH4WmXhdIPKT6l6oOxd1PUbNodGI6DcBekgN7EC//+x3pfBYX/qL1gNmZAqivw5g==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-darwin-x64": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.19.tgz",
+ "integrity": "sha512-zo8EsSSwMZCY/e+fRnGaX02YGgvJD0yvhNi/9hpGPA2MJ9ZF8dPCw75UGfpI6OpQ/myR/dIYmogRvqiZD0TrXg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-freebsd-x64": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.19.tgz",
+ "integrity": "sha512-O8ISAOfI1nj7AuBPd30FSF47z7f7lzlk5poQVGgiikvQuGEBFYvW8ki+UEnT+YJPnNGjQzn304klt4O9FUE7mA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm-gnueabihf": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.19.tgz",
+ "integrity": "sha512-/lYCba5NO0yq4S0jGMH8QTBtkvQxoXjoQWzF5BcWp9MjB9jxVRD1GQDNofkVjcOj30DWyhLIN/4Oe60JKzaONw==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-gnu": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.19.tgz",
+ "integrity": "sha512-pm/apFMBnSbFb3O6nG5pHO1iqHhZrjGDFEjSm+ot9J17XXPvH9L90y5h+jgfHCE+Qdlsvy8qKEcU4VKxgjD+vA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-arm64-musl": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.19.tgz",
+ "integrity": "sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-ppc64-gnu": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.19.tgz",
+ "integrity": "sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-s390x-gnu": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.19.tgz",
+ "integrity": "sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw==",
+ "cpu": [
+ "s390x"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-gnu": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.19.tgz",
+ "integrity": "sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-linux-x64-musl": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.19.tgz",
+ "integrity": "sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-openharmony-arm64": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.19.tgz",
+ "integrity": "sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.2.19.tgz",
+ "integrity": "sha512-7EH+skOsl5qpWnK0vzamgJFhOv1cwxQpsxm8tI883K9fur5c27p8q87fzEO6BbBPabA2/+s/zR63/pLc137iOg==",
+ "cpu": [
+ "wasm32"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/core": "2.0.0-beta.2",
+ "@emnapi/runtime": "2.0.0-beta.2",
+ "@napi-rs/wasm-runtime": "1.2.6"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/core": {
+ "version": "2.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.2.tgz",
+ "integrity": "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/wasi-threads": "2.2.0",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/runtime": {
+ "version": "2.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.2.tgz",
+ "integrity": "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz",
+ "integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz",
+ "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==",
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "@tybys/wasm-util": "^0.10.3"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.13.0 || >=23.5.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/Brooooooklyn"
+ },
+ "peerDependencies": {
+ "@emnapi/core": "^1.7.1 || 2.0.0-beta.2",
+ "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-arm64-msvc": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.19.tgz",
+ "integrity": "sha512-3Q1Yg1Q7tEvBWoZf5rFvG/GKZQPgwfru+p4wBajDfJFBs0SHCpL++dfTjW9gyAKd1T7ZpIYvdaUax7Pa/IhFVQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/binding-win32-x64-msvc": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.19.tgz",
+ "integrity": "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz",
+ "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==",
+ "license": "MIT"
+ },
+ "node_modules/@shikijs/core": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.6.0.tgz",
+ "integrity": "sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/primitive": "4.6.0",
+ "@shikijs/types": "4.6.0",
+ "@shikijs/vscode-textmate": "^10.1.0",
+ "@types/hast": "^3.0.5",
+ "hast-util-to-html": "^9.0.6"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/engine-javascript": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.6.0.tgz",
+ "integrity": "sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.6.0",
+ "@shikijs/vscode-textmate": "^10.1.0",
+ "oniguruma-to-es": "^4.3.6"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/engine-oniguruma": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.6.0.tgz",
+ "integrity": "sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.6.0",
+ "@shikijs/vscode-textmate": "^10.1.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/langs": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.6.0.tgz",
+ "integrity": "sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.6.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/primitive": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.6.0.tgz",
+ "integrity": "sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.6.0",
+ "@shikijs/vscode-textmate": "^10.1.0",
+ "@types/hast": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/themes": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.6.0.tgz",
+ "integrity": "sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/types": "4.6.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/types": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.6.0.tgz",
+ "integrity": "sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/vscode-textmate": "^10.1.0",
+ "@types/hast": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@shikijs/vscode-textmate": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.1.0.tgz",
+ "integrity": "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==",
+ "license": "MIT"
+ },
+ "node_modules/@tybys/wasm-util": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.5.tgz",
+ "integrity": "sha512-dOGOPxlaNV+G046mZzN+9C0dAcQZeSKcXiVaM0TYy/LM4ttTmgSBDxYfovcYI8Em3+eAbiAYpvWLOv8+ZVRJKA==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@types/chai": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/deep-eql": "*",
+ "assertion-error": "^2.0.1"
+ }
+ },
+ "node_modules/@types/deep-eql": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz",
+ "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==",
+ "license": "MIT"
+ },
+ "node_modules/@types/estree-jsx": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz",
+ "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/hast": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz",
+ "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
+ "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/nlcst": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-2.0.3.tgz",
+ "integrity": "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "26.6.6",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
+ "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
+ "devOptional": true,
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~8.9.0"
+ }
+ },
+ "node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
+ "license": "MIT"
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz",
+ "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==",
+ "license": "ISC"
+ },
+ "node_modules/@vitest/mocker": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.0.tgz",
+ "integrity": "sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.31",
+ "@vitest/spy": "5.1.0",
+ "estree-walker": "^3.0.3",
+ "magic-string": "^1.4.3"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "msw": "^2.4.9 || ^3.0.0",
+ "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "msw": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@vitest/spy": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.0.tgz",
+ "integrity": "sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@volar/kit": {
+ "version": "2.4.31",
+ "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.31.tgz",
+ "integrity": "sha512-pQgvegC28dfdNcs/iDNZVHkMs+dG7rpD9Aj+sNU2hildv1QuH7/MIoff/cSJW/IR25AGOeHWbJXWWFKDXXWtVw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@volar/language-service": "2.4.31",
+ "@volar/typescript": "2.4.31",
+ "typesafe-path": "^0.2.2",
+ "vscode-languageserver-textdocument": "^1.0.11",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "typescript": "<7"
+ }
+ },
+ "node_modules/@volar/language-core": {
+ "version": "2.4.31",
+ "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.31.tgz",
+ "integrity": "sha512-OM+OZfynHa1/4WlC8klqvwTQVmhYUZuwpAKdfl/rlvK8jaIozMD5qwXsOkxcRJA2tC+TEFsG1K81lNP4s/IAzQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@volar/source-map": "2.4.31"
+ }
+ },
+ "node_modules/@volar/language-server": {
+ "version": "2.4.31",
+ "resolved": "https://registry.npmjs.org/@volar/language-server/-/language-server-2.4.31.tgz",
+ "integrity": "sha512-PI/3CLcoHzb3RUNuh3ecWEf3d3doGnJ7/dYTvvE+8Y9dnV2SjVXp6BP7G2S5mdq9L1yFYP5yhoEHXc1OIfmX0A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@volar/language-core": "2.4.31",
+ "@volar/language-service": "2.4.31",
+ "@volar/typescript": "2.4.31",
+ "path-browserify": "^1.0.1",
+ "request-light": "^0.7.0",
+ "vscode-languageserver": "^9.0.1",
+ "vscode-languageserver-protocol": "^3.17.5",
+ "vscode-languageserver-textdocument": "^1.0.11",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "typescript": "<7"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@volar/language-service": {
+ "version": "2.4.31",
+ "resolved": "https://registry.npmjs.org/@volar/language-service/-/language-service-2.4.31.tgz",
+ "integrity": "sha512-LM9HFsBVhHZ7RbFUZK9P23FvamK8XCDcN0kNgOTts02wVgnygo3ReLbmBmUZ3GuYnrYn6HHoQvqk/eHIzzTnrg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@volar/language-core": "2.4.31",
+ "vscode-languageserver-protocol": "^3.17.5",
+ "vscode-languageserver-textdocument": "^1.0.11",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "typescript": "<7"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@volar/source-map": {
+ "version": "2.4.31",
+ "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.31.tgz",
+ "integrity": "sha512-odi31S3mKm57aO7Pd5P624FmGIB49U4lUPnYRUKvCDa8WZy5N5Yb+GMp2WJNaeIr4+q0ijNpuHsJLrfEiWvHtA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@volar/typescript": {
+ "version": "2.4.31",
+ "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.31.tgz",
+ "integrity": "sha512-OBHLLAi03AmaRWqzytdFhgtW2B3HM+2/vXFkvnZAlEKltalUTyu+No7g9aZx7e9efrDLOtHsd/3PgCHSfgVJ/Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@volar/language-core": "2.4.31",
+ "@volar/language-service": "2.4.31",
+ "path-browserify": "^1.0.1",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "typescript": "<7"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@vscode/emmet-helper": {
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/@vscode/emmet-helper/-/emmet-helper-2.11.0.tgz",
+ "integrity": "sha512-QLxjQR3imPZPQltfbWRnHU6JecWTF1QSWhx3GAKQpslx7y3Dp6sIIXhKjiUJ/BR9FX8PVthjr9PD6pNwOJfAzw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "emmet": "^2.4.3",
+ "jsonc-parser": "^2.3.0",
+ "vscode-languageserver-textdocument": "^1.0.1",
+ "vscode-languageserver-types": "^3.15.1",
+ "vscode-uri": "^3.0.8"
+ }
+ },
+ "node_modules/@vscode/emmet-helper/node_modules/jsonc-parser": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.3.1.tgz",
+ "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@vscode/l10n": {
+ "version": "0.0.18",
+ "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz",
+ "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/ajv": {
+ "version": "8.20.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-draft-04": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz",
+ "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "ajv": "^8.5.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ajv-i18n": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/ajv-i18n/-/ajv-i18n-4.2.0.tgz",
+ "integrity": "sha512-v/ei2UkCEeuKNXh8RToiFsUclmU+G57LO1Oo22OagNMENIw+Yb8eMwvHu7Vn9fmkjJyv6XclhJ8TbuigSglPkg==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "ajv": "^8.0.0-beta.0"
+ }
+ },
+ "node_modules/am-i-vibing": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/am-i-vibing/-/am-i-vibing-0.5.0.tgz",
+ "integrity": "sha512-KLcsDhqf1XRrJmJr+9I/C0EX2K+sGrAGZFgkmd84c8TJO9zJBu+/kFInjazu1KfJWFhWDKdRWkpBzEs7s35DVA==",
+ "license": "MIT",
+ "dependencies": {
+ "process-ancestry": "^0.1.0"
+ },
+ "bin": {
+ "am-i-vibing": "dist/cli.mjs"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "6.6.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz",
+ "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "license": "ISC",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/anymatch/node_modules/picomatch": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/aria-query": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/assertion-error": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/astro": {
+ "version": "7.4.12",
+ "resolved": "https://registry.npmjs.org/astro/-/astro-7.4.12.tgz",
+ "integrity": "sha512-DKX+Ds0rqV49HrLwEB9JFrCyfvQeC16FCe1HrPK8S3osiJH/e2vQ22CHIDOpI48UaeiPbxPT26peXgGTy6w0ig==",
+ "license": "MIT",
+ "dependencies": {
+ "@astrojs/compiler-rs": "^0.5.2",
+ "@astrojs/internal-helpers": "^0.13.2",
+ "@astrojs/markdown-satteri": "^0.4.10",
+ "@astrojs/runtime": "^0.1.1",
+ "@astrojs/telemetry": "^3.4.2",
+ "@astrojs/vite-plugin-astro": "^0.1.3",
+ "@capsizecss/unpack": "^4.0.1",
+ "@clack/prompts": "^1.8.1",
+ "@oslojs/encoding": "^1.1.0",
+ "am-i-vibing": "^0.5.0",
+ "aria-query": "^5.3.2",
+ "axobject-query": "^4.1.0",
+ "ci-info": "^4.4.0",
+ "cookie": "^2.0.2",
+ "devalue": "^6.0.3",
+ "diff": "^9.0.0",
+ "dset": "^3.1.4",
+ "es-module-lexer": "^3.0.4",
+ "flattie": "^1.1.1",
+ "fontace": "~0.4.1",
+ "get-tsconfig": "5.0.0-beta.6",
+ "github-slugger": "^2.0.0",
+ "html-escaper": "3.0.3",
+ "http-cache-semantics": "^4.3.0",
+ "jsonc-parser": "^3.3.1",
+ "magic-string": "^1.4.5",
+ "magicast": "^0.5.5",
+ "mri": "^1.2.0",
+ "mrmime": "^2.0.1",
+ "neotraverse": "^1.0.1",
+ "obug": "^3.0.0",
+ "p-limit": "^7.3.3",
+ "p-queue": "^10.0.0",
+ "package-manager-detector": "^1.9.0",
+ "piccolore": "^0.1.3",
+ "picomatch": "^4.0.7",
+ "rolldown": "~1.2.16",
+ "shiki": "^4.6.0",
+ "smol-toml": "^1.9.1",
+ "svgo": "^4.1.0",
+ "tinyclip": "^1.0.3",
+ "tinyexec": "^1.3.1",
+ "tinyglobby": "^0.2.17",
+ "tinyps": "^0.5.1",
+ "ultrahtml": "^1.7.0",
+ "unifont": "^1.0.3",
+ "unstorage": "^1.17.6",
+ "verkit": "^0.5.0",
+ "vite": "^8.3.6",
+ "vitefu": "^1.1.3",
+ "xxhash-wasm": "^1.1.0",
+ "zod": "^4.6.7"
+ },
+ "bin": {
+ "astro": "bin/astro.mjs"
+ },
+ "engines": {
+ "node": ">=22.23.4",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/astrodotbuild"
+ },
+ "optionalDependencies": {
+ "sharp": "^0.35.4"
+ },
+ "peerDependencies": {
+ "@astrojs/markdown-remark": "^7.3.0"
+ },
+ "peerDependenciesMeta": {
+ "@astrojs/markdown-remark": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/axobject-query": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",
+ "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz",
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
+ "license": "ISC"
+ },
+ "node_modules/ccount": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz",
+ "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chai": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz",
+ "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/character-entities-html4": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
+ "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/character-entities-legacy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
+ "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz",
+ "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==",
+ "license": "MIT",
+ "dependencies": {
+ "readdirp": "^5.0.0"
+ },
+ "engines": {
+ "node": ">= 20.19.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/ci-info": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.5.0.tgz",
+ "integrity": "sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz",
+ "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^7.2.0",
+ "strip-ansi": "^7.1.0",
+ "wrap-ansi": "^9.0.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/cliui/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/comma-separated-tokens": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
+ "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/commander": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
+ "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/common-ancestor-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-2.0.0.tgz",
+ "integrity": "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-2.0.2.tgz",
+ "integrity": "sha512-SL0cVuEdETEp7pN0FuZb01toc3vnODEfVUCooxG1SJN0yIirh7JMb9X9bvfCFf0vzzbT68RdbKDHYTiWy7a7iw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=22"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/cookie-es": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.3.tgz",
+ "integrity": "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==",
+ "license": "MIT"
+ },
+ "node_modules/crossws": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.5.tgz",
+ "integrity": "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==",
+ "license": "MIT",
+ "dependencies": {
+ "uncrypto": "^0.1.3"
+ }
+ },
+ "node_modules/css-select": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-6.0.0.tgz",
+ "integrity": "sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "boolbase": "^1.0.0",
+ "css-what": "^7.0.0",
+ "domhandler": "^5.0.3",
+ "domutils": "^3.2.2",
+ "nth-check": "^2.1.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/css-tree": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz",
+ "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==",
+ "license": "MIT",
+ "dependencies": {
+ "mdn-data": "2.27.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
+ }
+ },
+ "node_modules/css-what": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-7.0.0.tgz",
+ "integrity": "sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">= 6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/csso": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz",
+ "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==",
+ "license": "MIT",
+ "dependencies": {
+ "css-tree": "~2.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/csso/node_modules/css-tree": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
+ "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==",
+ "license": "MIT",
+ "dependencies": {
+ "mdn-data": "2.0.28",
+ "source-map-js": "^1.0.1"
+ },
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/csso/node_modules/mdn-data": {
+ "version": "2.0.28",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz",
+ "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==",
+ "license": "CC0-1.0"
+ },
+ "node_modules/defu": {
+ "version": "6.1.7",
+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz",
+ "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==",
+ "license": "MIT"
+ },
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/destr": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",
+ "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==",
+ "license": "MIT"
+ },
+ "node_modules/detect-libc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/devalue": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/devalue/-/devalue-6.0.3.tgz",
+ "integrity": "sha512-3woMEITftG1wKeO/4d/QXH1DVKctTSZg3jNGPpjp9hNr5Hos8MCFF5McTML5ZtgKDObm2R591B0spRp2IVernA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/devlop": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
+ "license": "MIT",
+ "dependencies": {
+ "dequal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/diff": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-9.0.0.tgz",
+ "integrity": "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/dom-serializer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
+ "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
+ "license": "MIT",
+ "dependencies": {
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.2",
+ "entities": "^4.2.0"
+ },
+ "funding": {
+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
+ }
+ },
+ "node_modules/domelementtype": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ],
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "domelementtype": "^2.3.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/domutils": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
+ "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "dom-serializer": "^2.0.0",
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domutils?sponsor=1"
+ }
+ },
+ "node_modules/dset": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz",
+ "integrity": "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/emmet": {
+ "version": "2.4.11",
+ "resolved": "https://registry.npmjs.org/emmet/-/emmet-2.4.11.tgz",
+ "integrity": "sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==",
+ "dev": true,
+ "license": "MIT",
+ "workspaces": [
+ "./packages/scanner",
+ "./packages/abbreviation",
+ "./packages/css-abbreviation",
+ "./"
+ ],
+ "dependencies": {
+ "@emmetio/abbreviation": "^2.3.3",
+ "@emmetio/css-abbreviation": "^2.1.8"
+ }
+ },
+ "node_modules/emoji-regex": {
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
+ "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-3.0.5.tgz",
+ "integrity": "sha512-RNq2lKJw53c7z9QRHeiKeA6Ez0oikOqiBGdmxQhKDxEiOX1g5QJR4IoFVwicn8uCZcRWNrXC3NZaJihgK7aEbg==",
+ "license": "MIT"
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0"
+ }
+ },
+ "node_modules/expect-type": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz",
+ "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "license": "MIT"
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-string-truncated-width": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz",
+ "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==",
+ "license": "MIT"
+ },
+ "node_modules/fast-string-width": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz",
+ "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-string-truncated-width": "^3.0.2"
+ }
+ },
+ "node_modules/fast-uri": {
+ "version": "3.1.9",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
+ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/fast-wrap-ansi": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz",
+ "integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-string-width": "^3.0.2"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/flattie": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.1.tgz",
+ "integrity": "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fnv1a-64": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/fnv1a-64/-/fnv1a-64-0.1.2.tgz",
+ "integrity": "sha512-mJbcILTPybAR1jdOwt/lVv8N2cffeJFFP+gVbSAwLEx1ujXH27RpPd8Rokec/KX9c76UYIB6Co+H4lQzxPnJfA==",
+ "license": "MIT"
+ },
+ "node_modules/fontace": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/fontace/-/fontace-0.4.1.tgz",
+ "integrity": "sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw==",
+ "license": "MIT",
+ "dependencies": {
+ "fontkitten": "^1.0.2"
+ }
+ },
+ "node_modules/fontkitten": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/fontkitten/-/fontkitten-1.0.3.tgz",
+ "integrity": "sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==",
+ "license": "MIT",
+ "dependencies": {
+ "tiny-inflate": "^1.0.3"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-east-asian-width": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz",
+ "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "5.0.0-beta.6",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-5.0.0-beta.6.tgz",
+ "integrity": "sha512-X6fBC0pmImC70gvX2zm56go9hx0MyoGVdG0tUCkg/D+Xnh5TJsOZ7iDbOdI3PvmtrDxnu1YdDufpK2QJX1Meqw==",
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=20.20.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/github-slugger": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz",
+ "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==",
+ "license": "ISC"
+ },
+ "node_modules/h3": {
+ "version": "1.15.11",
+ "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.11.tgz",
+ "integrity": "sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==",
+ "license": "MIT",
+ "dependencies": {
+ "cookie-es": "^1.2.3",
+ "crossws": "^0.3.5",
+ "defu": "^6.1.6",
+ "destr": "^2.0.5",
+ "iron-webcrypto": "^1.2.1",
+ "node-mock-http": "^1.0.4",
+ "radix3": "^1.1.2",
+ "ufo": "^1.6.3",
+ "uncrypto": "^0.1.3"
+ }
+ },
+ "node_modules/hast-util-to-html": {
+ "version": "9.0.6",
+ "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.6.tgz",
+ "integrity": "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/unist": "^3.0.0",
+ "ccount": "^2.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "hast-util-whitespace": "^3.0.0",
+ "html-void-elements": "^3.0.0",
+ "mdast-util-to-hast": "^13.0.0",
+ "property-information": "^7.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "stringify-entities": "^4.0.0",
+ "zwitch": "^2.0.4"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/hast-util-whitespace": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
+ "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/html-escaper": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz",
+ "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==",
+ "license": "MIT"
+ },
+ "node_modules/html-void-elements": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz",
+ "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/http-cache-semantics": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz",
+ "integrity": "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/iron-webcrypto": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",
+ "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/brc-dd"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-4.0.0.tgz",
+ "integrity": "sha512-LHE+wROyG/Y/0ZnbktRCoTix2c1RhgWaZraMZ8o1Q7zCh0VSrICJQO5oqIIISrcSBtrXv0o233w1IYwsWCjTzA==",
+ "license": "MIT",
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/jsonc-parser": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz",
+ "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==",
+ "license": "MIT"
+ },
+ "node_modules/kleur": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/lightningcss": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
+ "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.33.0",
+ "lightningcss-darwin-arm64": "1.33.0",
+ "lightningcss-darwin-x64": "1.33.0",
+ "lightningcss-freebsd-x64": "1.33.0",
+ "lightningcss-linux-arm-gnueabihf": "1.33.0",
+ "lightningcss-linux-arm64-gnu": "1.33.0",
+ "lightningcss-linux-arm64-musl": "1.33.0",
+ "lightningcss-linux-x64-gnu": "1.33.0",
+ "lightningcss-linux-x64-musl": "1.33.0",
+ "lightningcss-win32-arm64-msvc": "1.33.0",
+ "lightningcss-win32-x64-msvc": "1.33.0"
+ }
+ },
+ "node_modules/lightningcss-android-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",
+ "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz",
+ "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-darwin-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz",
+ "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-freebsd-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz",
+ "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz",
+ "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==",
+ "cpu": [
+ "arm"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz",
+ "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz",
+ "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz",
+ "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz",
+ "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz",
+ "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz",
+ "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==",
+ "cpu": [
+ "x64"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "11.5.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
+ "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": "20 || >=22"
+ }
+ },
+ "node_modules/magic-string": {
+ "version": "1.4.5",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz",
+ "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.6.0"
+ }
+ },
+ "node_modules/magicast": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz",
+ "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.7",
+ "@babel/types": "^7.29.7",
+ "source-map-js": "^1.2.1"
+ }
+ },
+ "node_modules/mdast-util-to-hast": {
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.2.tgz",
+ "integrity": "sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^3.0.0",
+ "@types/mdast": "^4.0.0",
+ "@ungap/structured-clone": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "trim-lines": "^3.0.0",
+ "unist-util-position": "^5.0.0",
+ "unist-util-visit": "^5.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/mdn-data": {
+ "version": "2.27.1",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz",
+ "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==",
+ "license": "CC0-1.0"
+ },
+ "node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
+ },
+ "node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-util-types": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz",
+ "integrity": "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/mri": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mrmime": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz",
+ "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/muggle-string": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz",
+ "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.20",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
+ "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/neotraverse": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-1.0.2.tgz",
+ "integrity": "sha512-DLMUFnyCrRAncRJhDC2yNbSTcpEukp+nczID/na3XdIHQFokPveK69xel642cQHgUGszctsOSeCePqPpY25W6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/nlcst-to-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz",
+ "integrity": "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/nlcst": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/node-fetch-native": {
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz",
+ "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==",
+ "license": "MIT"
+ },
+ "node_modules/node-mock-http": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.5.tgz",
+ "integrity": "sha512-KQyt/wLjG3TAc7DOUhpqWzgd4ERxR80JOlTK5VE5R1S12IaPVN5qkj4klBce9HPG1Njuup4Sb5bljaT34lIyjw==",
+ "license": "MIT"
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/nth-check": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "boolbase": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/nth-check?sponsor=1"
+ }
+ },
+ "node_modules/obug": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz",
+ "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==",
+ "funding": [
+ "https://github.com/sponsors/sxzz",
+ "https://opencollective.com/debug"
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
+ "node_modules/ofetch": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.5.1.tgz",
+ "integrity": "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==",
+ "license": "MIT",
+ "dependencies": {
+ "destr": "^2.0.5",
+ "node-fetch-native": "^1.6.7",
+ "ufo": "^1.6.1"
+ }
+ },
+ "node_modules/oniguruma-parser": {
+ "version": "0.12.2",
+ "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz",
+ "integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==",
+ "license": "MIT"
+ },
+ "node_modules/oniguruma-to-es": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz",
+ "integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==",
+ "license": "MIT",
+ "dependencies": {
+ "oniguruma-parser": "^0.12.2",
+ "regex": "^6.1.0",
+ "regex-recursion": "^6.0.2"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "7.3.3",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.3.tgz",
+ "integrity": "sha512-SKgVvDU5TNIxQ4r30U75BNLC6a+6GOEjngrk/ysM5+Zu3oJuk1SC5ApzIzY/7PjCEjoVPMWJ0zho/4QUiEB7TQ==",
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^1.2.1"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-queue": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-10.0.0.tgz",
+ "integrity": "sha512-P2wrCri3bhGLPo3kX7qYVXbo/5GvaVATU0DpO24CbeT53Y4z35t8JUWku04ERpXHUYB5rPMi3TkWE3fmJgx5rA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/package-manager-detector": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.9.0.tgz",
+ "integrity": "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==",
+ "license": "MIT"
+ },
+ "node_modules/path-browserify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/piccolore": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/piccolore/-/piccolore-0.1.3.tgz",
+ "integrity": "sha512-o8bTeDWjE086iwKrROaDf31K0qC/BENdm15/uH9usSC/uZjJOKb2YGiVHfLY4GhwsERiPI1jmwI2XrA7ACOxVw==",
+ "license": "ISC"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.33",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz",
+ "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.20",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.10.1.tgz",
+ "integrity": "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/prismjs": {
+ "version": "1.30.0",
+ "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
+ "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/process-ancestry": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/process-ancestry/-/process-ancestry-0.1.0.tgz",
+ "integrity": "sha512-tGqJW/UnclpYASFcM6Xh8D8l/BMtaQ9+CSG0vlJSJTcdMM4lDRv4c6H0Pdcsfted+bVczdYSfk2fdukg2gQkZg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/property-information": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz",
+ "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/radix3": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",
+ "integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==",
+ "license": "MIT"
+ },
+ "node_modules/readdirp": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz",
+ "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 20.19.0"
+ },
+ "funding": {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/regex/-/regex-6.1.0.tgz",
+ "integrity": "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==",
+ "license": "MIT",
+ "dependencies": {
+ "regex-utilities": "^2.3.0"
+ }
+ },
+ "node_modules/regex-recursion": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz",
+ "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==",
+ "license": "MIT",
+ "dependencies": {
+ "regex-utilities": "^2.3.0"
+ }
+ },
+ "node_modules/regex-utilities": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz",
+ "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==",
+ "license": "MIT"
+ },
+ "node_modules/request-light": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.7.0.tgz",
+ "integrity": "sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/retext-smartypants": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-6.2.0.tgz",
+ "integrity": "sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/nlcst": "^2.0.0",
+ "nlcst-to-string": "^4.0.0",
+ "unist-util-visit": "^5.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/rolldown": {
+ "version": "1.2.19",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.19.tgz",
+ "integrity": "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA==",
+ "license": "MIT",
+ "dependencies": {
+ "@oxc-project/types": "=0.156.0",
+ "@rolldown/pluginutils": "^1.0.0"
+ },
+ "bin": {
+ "rolldown": "bin/cli.mjs"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "optionalDependencies": {
+ "@rolldown/binding-android-arm-eabi": "1.2.19",
+ "@rolldown/binding-android-arm64": "1.2.19",
+ "@rolldown/binding-darwin-arm64": "1.2.19",
+ "@rolldown/binding-darwin-x64": "1.2.19",
+ "@rolldown/binding-freebsd-x64": "1.2.19",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.2.19",
+ "@rolldown/binding-linux-arm64-gnu": "1.2.19",
+ "@rolldown/binding-linux-arm64-musl": "1.2.19",
+ "@rolldown/binding-linux-ppc64-gnu": "1.2.19",
+ "@rolldown/binding-linux-s390x-gnu": "1.2.19",
+ "@rolldown/binding-linux-x64-gnu": "1.2.19",
+ "@rolldown/binding-linux-x64-musl": "1.2.19",
+ "@rolldown/binding-openharmony-arm64": "1.2.19",
+ "@rolldown/binding-wasm32-wasi": "1.2.19",
+ "@rolldown/binding-win32-arm64-msvc": "1.2.19",
+ "@rolldown/binding-win32-x64-msvc": "1.2.19"
+ }
+ },
+ "node_modules/satteri": {
+ "version": "0.11.7",
+ "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.11.7.tgz",
+ "integrity": "sha512-xDOSxkc1ew3z3IovIjmsqJaVHRXTGYJkPvx0LL/U6o90km8kSU+pmrZVvnWd5creJeE0UnvMEienlkPuYQdJaA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree-jsx": "^1.0.5",
+ "@types/hast": "^3.0.5",
+ "@types/mdast": "^4.0.4",
+ "@types/unist": "^3.0.3"
+ },
+ "optionalDependencies": {
+ "@bruits/satteri-android-arm64": "0.11.7",
+ "@bruits/satteri-darwin-arm64": "0.11.7",
+ "@bruits/satteri-darwin-x64": "0.11.7",
+ "@bruits/satteri-freebsd-x64": "0.11.7",
+ "@bruits/satteri-linux-arm64-gnu": "0.11.7",
+ "@bruits/satteri-linux-arm64-musl": "0.11.7",
+ "@bruits/satteri-linux-x64-gnu": "0.11.7",
+ "@bruits/satteri-linux-x64-musl": "0.11.7",
+ "@bruits/satteri-wasm32-wasi": "0.11.7",
+ "@bruits/satteri-win32-arm64-msvc": "0.11.7",
+ "@bruits/satteri-win32-x64-msvc": "0.11.7"
+ }
+ },
+ "node_modules/sax": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz",
+ "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==",
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": ">=11.0.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.8.6",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",
+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",
+ "devOptional": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sharp": {
+ "version": "0.35.5",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz",
+ "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==",
+ "license": "Apache-2.0",
+ "optional": true,
+ "dependencies": {
+ "@img/colour": "^1.1.0",
+ "detect-libc": "^2.1.2",
+ "semver": "^7.8.5"
+ },
+ "engines": {
+ "node": ">=20.9.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.35.5",
+ "@img/sharp-darwin-x64": "0.35.5",
+ "@img/sharp-freebsd-wasm32": "0.35.5",
+ "@img/sharp-libvips-darwin-arm64": "1.3.4",
+ "@img/sharp-libvips-darwin-x64": "1.3.4",
+ "@img/sharp-libvips-linux-arm": "1.3.4",
+ "@img/sharp-libvips-linux-arm64": "1.3.4",
+ "@img/sharp-libvips-linux-ppc64": "1.3.4",
+ "@img/sharp-libvips-linux-riscv64": "1.3.4",
+ "@img/sharp-libvips-linux-s390x": "1.3.4",
+ "@img/sharp-libvips-linux-x64": "1.3.4",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.4",
+ "@img/sharp-libvips-linuxmusl-x64": "1.3.4",
+ "@img/sharp-linux-arm": "0.35.5",
+ "@img/sharp-linux-arm64": "0.35.5",
+ "@img/sharp-linux-ppc64": "0.35.5",
+ "@img/sharp-linux-riscv64": "0.35.5",
+ "@img/sharp-linux-s390x": "0.35.5",
+ "@img/sharp-linux-x64": "0.35.5",
+ "@img/sharp-linuxmusl-arm64": "0.35.5",
+ "@img/sharp-linuxmusl-x64": "0.35.5",
+ "@img/sharp-webcontainers-wasm32": "0.35.5",
+ "@img/sharp-win32-arm64": "0.35.5",
+ "@img/sharp-win32-ia32": "0.35.5",
+ "@img/sharp-win32-x64": "0.35.5"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/shiki": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.6.0.tgz",
+ "integrity": "sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA==",
+ "license": "MIT",
+ "dependencies": {
+ "@shikijs/core": "4.6.0",
+ "@shikijs/engine-javascript": "4.6.0",
+ "@shikijs/engine-oniguruma": "4.6.0",
+ "@shikijs/langs": "4.6.0",
+ "@shikijs/themes": "4.6.0",
+ "@shikijs/types": "4.6.0",
+ "@shikijs/vscode-textmate": "^10.1.0",
+ "@types/hast": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/sisteransi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-2.0.0.tgz",
+ "integrity": "sha512-2WCqLdt12eN6ehLI50S2/ZxoowXU3DD1KVPRyVP0WEsFahrGZZmCdq1K59qjJljMRIDTwx1D9YaRK+hDneBUMg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/smol-toml": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.1.tgz",
+ "integrity": "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/cyyynthia"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/space-separated-tokens": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
+ "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/std-env": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz",
+ "integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==",
+ "license": "MIT"
+ },
+ "node_modules/string-width": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz",
+ "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "get-east-asian-width": "^1.5.0",
+ "strip-ansi": "^7.1.2"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/stringify-entities": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
+ "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
+ "license": "MIT",
+ "dependencies": {
+ "character-entities-html4": "^2.0.0",
+ "character-entities-legacy": "^3.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
+ "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.2.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/svgo": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-4.1.0.tgz",
+ "integrity": "sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q==",
+ "license": "MIT",
+ "dependencies": {
+ "commander": "^11.1.0",
+ "css-select": "^6.0.0",
+ "css-tree": "^3.0.1",
+ "css-what": "^7.0.0",
+ "csso": "^5.0.5",
+ "picocolors": "^1.1.1",
+ "sax": "1.6.1"
+ },
+ "bin": {
+ "svgo": "bin/svgo.js"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/svgo"
+ }
+ },
+ "node_modules/tiny-inflate": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz",
+ "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==",
+ "license": "MIT"
+ },
+ "node_modules/tinybench": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.3.tgz",
+ "integrity": "sha512-Al01C2JIBnO2CXCAPbpAl6sUiOZHeThGtHYNTa51JRw9PyWOCdr+9Ong05R4qg/Sk3+H645E8ov1h2c58ityNw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/tinyclip": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/tinyclip/-/tinyclip-1.0.3.tgz",
+ "integrity": "sha512-nTv2raKFMzGG6JJp0lpNDsRPdfFE6UHlu2rVEjXo8vkx1ZS3LW2CVXqIaLu8xZlu+6tbFs9V58Qc/Jmk/Ii7wA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^16.14.0 || >= 17.3.0"
+ }
+ },
+ "node_modules/tinyexec": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz",
+ "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tinyps": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/tinyps/-/tinyps-0.5.2.tgz",
+ "integrity": "sha512-sYhvdbpuo2rGE7u/jPUMiZz4H2LCaOodUtRD9ot4DLNFQbr884g9zozoJnxLI+1r4hXqWkmdHUl8Yig2Rllxxw==",
+ "license": "MIT"
+ },
+ "node_modules/trim-lines": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
+ "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
+ "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
+ "devOptional": true,
+ "license": "0BSD"
+ },
+ "node_modules/typesafe-path": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/typesafe-path/-/typesafe-path-0.2.2.tgz",
+ "integrity": "sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/typescript": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
+ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/typescript-auto-import-cache": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/typescript-auto-import-cache/-/typescript-auto-import-cache-0.3.6.tgz",
+ "integrity": "sha512-RpuHXrknHdVdK7wv/8ug3Fr0WNsNi5l5aB8MYYuXhq2UH5lnEB1htJ1smhtD5VeCsGr2p8mUDtd83LCQDFVgjQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.3.8"
+ }
+ },
+ "node_modules/ufo": {
+ "version": "1.6.4",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz",
+ "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==",
+ "license": "MIT"
+ },
+ "node_modules/ultrahtml": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.7.0.tgz",
+ "integrity": "sha512-2xRd0VHoAQE4M+vF/DvFFB7pUV0ZxTW1TLi7lHQWnF/Sb5TPeEUV/l+hxcNnGO00ZXGnR0voCMmYRKQf+rvJ2g==",
+ "license": "MIT"
+ },
+ "node_modules/uncrypto": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz",
+ "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
+ "license": "MIT"
+ },
+ "node_modules/undici": {
+ "version": "8.12.4",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.4.tgz",
+ "integrity": "sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=22.19.0"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
+ "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
+ "devOptional": true,
+ "license": "MIT"
+ },
+ "node_modules/unified": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
+ "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "bail": "^2.0.0",
+ "devlop": "^1.0.0",
+ "extend": "^3.0.0",
+ "is-plain-obj": "^4.0.0",
+ "trough": "^2.0.0",
+ "vfile": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unifont": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/unifont/-/unifont-1.0.3.tgz",
+ "integrity": "sha512-XGnEwj5sWdCbiBX01mWLSBncS0yMRjnLygau3IfdOlfjMacNIQvTGW4VH7pWBq+gGWArfSef/CensMLjMmIr/A==",
+ "license": "MIT",
+ "dependencies": {
+ "css-tree": "^3.1.0",
+ "fnv1a-64": "^0.1.2",
+ "std-env": "^4.2.0",
+ "undici": "^8.0.0"
+ }
+ },
+ "node_modules/unist-util-is": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
+ "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-position": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz",
+ "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-stringify-position": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.2.0.tgz",
+ "integrity": "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unist-util-visit-parents": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.1.0.tgz",
+ "integrity": "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/unstorage": {
+ "version": "1.17.6",
+ "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.6.tgz",
+ "integrity": "sha512-gjKtcmn/KwZuJZO9o2sc0esAQnhmTw0LviDHwevTXbJMYs0dRTp8ZEEWXHU0vTpzbN3cA0yxlTeyXssMp3zDqw==",
+ "license": "MIT",
+ "dependencies": {
+ "anymatch": "^3.1.3",
+ "chokidar": "^5.0.0",
+ "destr": "^2.0.5",
+ "h3": "^1.15.11",
+ "lru-cache": "^11.5.3",
+ "node-fetch-native": "^1.6.7",
+ "ofetch": "^1.5.1",
+ "ufo": "^1.6.4"
+ },
+ "peerDependencies": {
+ "@azure/app-configuration": "^1.8.0",
+ "@azure/cosmos": "^4.2.0",
+ "@azure/data-tables": "^13.3.0",
+ "@azure/identity": "^4.6.0",
+ "@azure/keyvault-secrets": "^4.9.0",
+ "@azure/storage-blob": "^12.26.0",
+ "@capacitor/preferences": "^6 || ^7 || ^8",
+ "@deno/kv": ">=0.9.0",
+ "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 || ^11.0.0",
+ "@planetscale/database": "^1.19.0",
+ "@upstash/redis": "^1.34.3",
+ "@vercel/blob": ">=0.27.1",
+ "@vercel/functions": "^2.2.12 || ^3.0.0",
+ "@vercel/kv": "^1 || ^2 || ^3",
+ "aws4fetch": "^1.0.20",
+ "db0": ">=0.2.1",
+ "idb-keyval": "^6.2.1",
+ "ioredis": "^5.4.2",
+ "uploadthing": "^7.4.4"
+ },
+ "peerDependenciesMeta": {
+ "@azure/app-configuration": {
+ "optional": true
+ },
+ "@azure/cosmos": {
+ "optional": true
+ },
+ "@azure/data-tables": {
+ "optional": true
+ },
+ "@azure/identity": {
+ "optional": true
+ },
+ "@azure/keyvault-secrets": {
+ "optional": true
+ },
+ "@azure/storage-blob": {
+ "optional": true
+ },
+ "@capacitor/preferences": {
+ "optional": true
+ },
+ "@deno/kv": {
+ "optional": true
+ },
+ "@netlify/blobs": {
+ "optional": true
+ },
+ "@planetscale/database": {
+ "optional": true
+ },
+ "@upstash/redis": {
+ "optional": true
+ },
+ "@vercel/blob": {
+ "optional": true
+ },
+ "@vercel/functions": {
+ "optional": true
+ },
+ "@vercel/kv": {
+ "optional": true
+ },
+ "aws4fetch": {
+ "optional": true
+ },
+ "db0": {
+ "optional": true
+ },
+ "idb-keyval": {
+ "optional": true
+ },
+ "ioredis": {
+ "optional": true
+ },
+ "uploadthing": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/verkit": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.5.0.tgz",
+ "integrity": "sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sxzz"
+ }
+ },
+ "node_modules/vfile": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
+ "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "vfile-message": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/vfile-message": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.4.tgz",
+ "integrity": "sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-stringify-position": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
+ }
+ },
+ "node_modules/vite": {
+ "version": "8.3.8",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.8.tgz",
+ "integrity": "sha512-LzOn3h9rG/0vhLdXrV4yJ4QFA9eEoqCl+Yx+kGJd7aB9w6nfNgVHKSYwLPZUHrz4ZGa+t+kXjV9itvcHDLQouA==",
+ "license": "MIT",
+ "dependencies": {
+ "lightningcss": "^1.33.0",
+ "picomatch": "^4.0.7",
+ "postcss": "^8.5.32",
+ "rolldown": "~1.2.18",
+ "tinyglobby": "^0.2.17"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "@vitejs/devtools": "^0.7.1 || ^0.8.0",
+ "esbuild": "^0.27.0 || ^0.28.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "@vitejs/devtools": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vitefu": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz",
+ "integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==",
+ "license": "MIT",
+ "workspaces": [
+ "tests/deps/*",
+ "tests/projects/*",
+ "tests/projects/workspace/packages/*"
+ ],
+ "peerDependencies": {
+ "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "vite": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vitest": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.0.tgz",
+ "integrity": "sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/chai": "^5.2.2",
+ "@vitest/mocker": "5.1.0",
+ "chai": "^6.3.0",
+ "es-module-lexer": "^2.3.2",
+ "expect-type": "^1.4.0",
+ "magic-string": "^1.4.3",
+ "obug": "^3.0.0",
+ "picomatch": "^4.0.7",
+ "std-env": "^4.3.0",
+ "tinybench": "^6.2.2",
+ "tinyexec": "^1.3.1",
+ "tinyglobby": "^0.2.17",
+ "why-is-node-running": "3.2.1"
+ },
+ "bin": {
+ "vitest": "vitest.mjs"
+ },
+ "engines": {
+ "node": "^22.12.0 || ^24.0.0 || >=26.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "@edge-runtime/vm": "*",
+ "@opentelemetry/api": "^1.9.0",
+ "@types/node": "^22.0.0 || >=24.0.0",
+ "@vitest/browser-playwright": "5.1.0",
+ "@vitest/browser-preview": "5.1.0",
+ "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0",
+ "@vitest/coverage-istanbul": "5.1.0",
+ "@vitest/coverage-v8": "5.1.0",
+ "@vitest/ui": "5.1.0",
+ "happy-dom": "*",
+ "jsdom": "*",
+ "vite": "^6.4.0 || ^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@edge-runtime/vm": {
+ "optional": true
+ },
+ "@opentelemetry/api": {
+ "optional": true
+ },
+ "@types/node": {
+ "optional": true
+ },
+ "@vitest/browser-playwright": {
+ "optional": true
+ },
+ "@vitest/browser-preview": {
+ "optional": true
+ },
+ "@vitest/browser-webdriverio": {
+ "optional": true
+ },
+ "@vitest/coverage-istanbul": {
+ "optional": true
+ },
+ "@vitest/coverage-v8": {
+ "optional": true
+ },
+ "@vitest/ui": {
+ "optional": true
+ },
+ "happy-dom": {
+ "optional": true
+ },
+ "jsdom": {
+ "optional": true
+ },
+ "vite": {
+ "optional": false
+ }
+ }
+ },
+ "node_modules/vitest/node_modules/es-module-lexer": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz",
+ "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/volar-service-css": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-css/-/volar-service-css-0.0.71.tgz",
+ "integrity": "sha512-wRRFt9BpjMKCazcgOh67MSjUjiWUCAh99DyYSDIOTuxaRjEtDC7PpB0k1Y1wbJIW/pVtMUSVbpPo3UGSm0Byxw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-css-languageservice": "^6.3.0",
+ "vscode-languageserver-textdocument": "^1.0.11",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/volar-service-emmet": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-emmet/-/volar-service-emmet-0.0.71.tgz",
+ "integrity": "sha512-zqjzt6bN95e3CUstBm0PBFAJnrfz0ZAARka87fart46/gNCLLuP3Vujy8V/J8HEziTFLnfkgIASLFYPUhonJcA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@emmetio/css-parser": "^0.4.1",
+ "@emmetio/html-matcher": "^1.3.0",
+ "@vscode/emmet-helper": "^2.9.3",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/volar-service-html": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-html/-/volar-service-html-0.0.71.tgz",
+ "integrity": "sha512-e8tHPhgQ7ooLfudAEIku+kgd9pWkq3SSz8RbnQDI1+Eb8wbenkLGHqoirLqz5ORLV6wIMr2Iv08RWBG5eOcgpw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-html-languageservice": "^5.3.0",
+ "vscode-languageserver-textdocument": "^1.0.11",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/volar-service-prettier": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-prettier/-/volar-service-prettier-0.0.71.tgz",
+ "integrity": "sha512-Rz7JVH3qD108UCdmIEiZvOBNljMt2nLFdbN8AXcDfn7xD9F5I2aCIsDVqBbXw21PsnxG0b7MfwtNF+zPS/NKUg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0",
+ "prettier": "^2.2 || ^3.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ },
+ "prettier": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/volar-service-typescript": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-typescript/-/volar-service-typescript-0.0.71.tgz",
+ "integrity": "sha512-yTtM/BVT6hoyEYnDtaCyAtNhdNeS/mhTTABlBOdw3NNiRBUin3IznFJpgfjer4c6RYopiPjjQjc9VFhxVl1mLw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "path-browserify": "^1.0.1",
+ "semver": "^7.6.2",
+ "typescript-auto-import-cache": "^0.3.5",
+ "vscode-languageserver-textdocument": "^1.0.11",
+ "vscode-nls": "^5.2.0",
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/volar-service-typescript-twoslash-queries": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-typescript-twoslash-queries/-/volar-service-typescript-twoslash-queries-0.0.71.tgz",
+ "integrity": "sha512-9K2k72s4n7rV9s4bX0MyjbX9iBribvKZbBJKuEmTCZfeWJXs6Yh7bGpY4eoc7UufAjvpheBqwyZCOIPBvxCv0A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-uri": "^3.0.8"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/volar-service-yaml": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/volar-service-yaml/-/volar-service-yaml-0.0.71.tgz",
+ "integrity": "sha512-qYGWGuVpUTnZGu5P/CR4KLK4aIR8RrcVnmfZ2eRcj9q/I8VZCoC5yy9FtEvfNvnDp4MU17yhdJcvpQPIqhJS2Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-uri": "^3.0.8",
+ "yaml-language-server": "~1.23.0"
+ },
+ "peerDependencies": {
+ "@volar/language-service": "~2.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@volar/language-service": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vscode-css-languageservice": {
+ "version": "6.3.10",
+ "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-6.3.10.tgz",
+ "integrity": "sha512-eq5N9Er3fC4vA9zd9EFhyBG90wtCCuXgRSpAndaOgXMh1Wgep5lBgRIeDgjZBW9pa+332yC9+49cZMW8jcL3MA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vscode/l10n": "^0.0.18",
+ "vscode-languageserver-textdocument": "^1.0.12",
+ "vscode-languageserver-types": "3.17.5",
+ "vscode-uri": "^3.1.0"
+ }
+ },
+ "node_modules/vscode-css-languageservice/node_modules/vscode-languageserver-types": {
+ "version": "3.17.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz",
+ "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/vscode-html-languageservice": {
+ "version": "5.6.2",
+ "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.6.2.tgz",
+ "integrity": "sha512-ulCrSnFnfQ16YzvwnYUgEbUEl/ZG7u2eV27YhvLObSHKkb8fw1Z9cgsnUwjTEeDIdJDoTDTDpxuhQwoenoLNMg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vscode/l10n": "^0.0.18",
+ "vscode-languageserver-textdocument": "^1.0.12",
+ "vscode-languageserver-types": "^3.17.5",
+ "vscode-uri": "^3.1.0"
+ }
+ },
+ "node_modules/vscode-json-languageservice": {
+ "version": "4.1.8",
+ "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.1.8.tgz",
+ "integrity": "sha512-0vSpg6Xd9hfV+eZAaYN63xVVMOTmJ4GgHxXnkLCh+9RsQBkWKIghzLhW2B9ebfG+LQQg8uLtsQ2aUKjTgE+QOg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "jsonc-parser": "^3.0.0",
+ "vscode-languageserver-textdocument": "^1.0.1",
+ "vscode-languageserver-types": "^3.16.0",
+ "vscode-nls": "^5.0.0",
+ "vscode-uri": "^3.0.2"
+ },
+ "engines": {
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/vscode-jsonrpc": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-10.0.0.tgz",
+ "integrity": "sha512-USSfxg0vDIpTQqlQBGxF3mBARyoS8cU7LHLpbYNh6dOJt32dlskxPWB0Irrh5TllTmyf7oNLAvqDqzklbwwnpA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.17.0"
+ }
+ },
+ "node_modules/vscode-languageserver": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz",
+ "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-languageserver-protocol": "3.17.5"
+ },
+ "bin": {
+ "installServerIntoExtension": "bin/installServerIntoExtension"
+ }
+ },
+ "node_modules/vscode-languageserver-protocol": {
+ "version": "3.18.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.18.5.tgz",
+ "integrity": "sha512-FW4fBMzZ99N8xeob4py0l050wgCoRgTpEq5Xcsb9lM1bc29UKGR/wSV+4knaqFxssFHajy7OzNiKP/m3U1ZEuA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-jsonrpc": "10.0.0",
+ "vscode-languageserver-types": "3.18.5"
+ }
+ },
+ "node_modules/vscode-languageserver-textdocument": {
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.16.tgz",
+ "integrity": "sha512-qeNEuOi9a3qkqRf7Gfez2WL2VwlBTLCNekHBGO9kxPVUp9XuY15yfTJ9jwvOwKI0I2MhUUfZq95NSp+LK1CLQg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/vscode-languageserver-types": {
+ "version": "3.18.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.18.5.tgz",
+ "integrity": "sha512-kPd6+JQNz3HMJvjKlqUxERSlZHAntl/aGpsk7ImwIh0ewDKDcjgAEyVSYciPiOJD3ftbK9IrfiqUeTZLSbCizw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/vscode-languageserver/node_modules/vscode-jsonrpc": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz",
+ "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol": {
+ "version": "3.17.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz",
+ "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "vscode-jsonrpc": "8.2.0",
+ "vscode-languageserver-types": "3.17.5"
+ }
+ },
+ "node_modules/vscode-languageserver/node_modules/vscode-languageserver-types": {
+ "version": "3.17.5",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz",
+ "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/vscode-nls": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz",
+ "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/vscode-uri": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.2.0.tgz",
+ "integrity": "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/why-is-node-running": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz",
+ "integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "why-is-node-running": "cli.js"
+ },
+ "engines": {
+ "node": ">=20.11"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
+ "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^6.2.1",
+ "string-width": "^7.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/xxhash-wasm": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.1.0.tgz",
+ "integrity": "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==",
+ "license": "MIT"
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yaml": {
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
+ "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
+ "license": "ISC",
+ "bin": {
+ "yaml": "bin.mjs"
+ },
+ "engines": {
+ "node": ">= 14.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/eemeli"
+ }
+ },
+ "node_modules/yaml-language-server": {
+ "version": "1.23.0",
+ "resolved": "https://registry.npmjs.org/yaml-language-server/-/yaml-language-server-1.23.0.tgz",
+ "integrity": "sha512-3qVyCOexLCWw06PQa5kRPwvMWMZ/eZeCRWUvgD6a0OkqL/4iCnxy2WumbWifa937Uo5xhyWJ0uxlU39ljhNh7A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vscode/l10n": "^0.0.18",
+ "ajv": "^8.17.1",
+ "ajv-draft-04": "^1.0.0",
+ "ajv-i18n": "^4.2.0",
+ "prettier": "^3.8.1",
+ "request-light": "^0.5.7",
+ "vscode-json-languageservice": "4.1.8",
+ "vscode-languageserver": "^9.0.0",
+ "vscode-languageserver-textdocument": "^1.0.1",
+ "vscode-languageserver-types": "^3.16.0",
+ "vscode-uri": "^3.0.2",
+ "yaml": "2.8.3"
+ },
+ "bin": {
+ "yaml-language-server": "bin/yaml-language-server"
+ }
+ },
+ "node_modules/yaml-language-server/node_modules/request-light": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.5.8.tgz",
+ "integrity": "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/yaml-language-server/node_modules/yaml": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
+ "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "yaml": "bin.mjs"
+ },
+ "engines": {
+ "node": ">= 14.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/eemeli"
+ }
+ },
+ "node_modules/yargs": {
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz",
+ "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^9.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "string-width": "^8.2.1",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^22.0.0"
+ },
+ "engines": {
+ "node": "^20.19.0 || ^22.12.0 || >=23"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "22.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz",
+ "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": "^20.19.0 || ^22.12.0 || >=23"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz",
+ "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/zod": {
+ "version": "4.6.7",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
+ "node_modules/zwitch": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
+ "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ }
+ }
+}
diff --git a/apps/landing/package.json b/apps/landing/package.json
new file mode 100644
index 000000000..0f5ff6e70
--- /dev/null
+++ b/apps/landing/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "zeron-landing",
+ "private": true,
+ "type": "module",
+ "version": "0.0.0",
+ "engines": {
+ "node": ">=22.23.4"
+ },
+ "scripts": {
+ "dev": "astro dev",
+ "build": "astro build",
+ "preview": "astro preview",
+ "check": "astro check",
+ "test": "astro build && vitest run"
+ },
+ "dependencies": {
+ "astro": "^7.4.12"
+ },
+ "devDependencies": {
+ "@astrojs/check": "^0.9.12",
+ "@types/node": "^26.6.6",
+ "typescript": "^6.0.3",
+ "vitest": "^5.1.0"
+ }
+}
diff --git a/apps/landing/public/assets/app-screenshot.jpg b/apps/landing/public/assets/app-screenshot.jpg
deleted file mode 100644
index f5da197f1..000000000
Binary files a/apps/landing/public/assets/app-screenshot.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/art/mist.webp b/apps/landing/public/assets/art/mist.webp
deleted file mode 100644
index 06b8820e8..000000000
Binary files a/apps/landing/public/assets/art/mist.webp and /dev/null differ
diff --git a/apps/landing/public/assets/art/terraces.webp b/apps/landing/public/assets/art/terraces.webp
deleted file mode 100644
index 30f10d692..000000000
Binary files a/apps/landing/public/assets/art/terraces.webp and /dev/null differ
diff --git a/apps/landing/public/assets/icons/brand/claude-mark.svg b/apps/landing/public/assets/icons/brand/claude-mark.svg
deleted file mode 100644
index 401b698a1..000000000
--- a/apps/landing/public/assets/icons/brand/claude-mark.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/apps/landing/public/assets/icons/brand/cursor-mark.svg b/apps/landing/public/assets/icons/brand/cursor-mark.svg
deleted file mode 100644
index e242f6c5f..000000000
--- a/apps/landing/public/assets/icons/brand/cursor-mark.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/apps/landing/public/assets/icons/brand/devin-mark.svg b/apps/landing/public/assets/icons/brand/devin-mark.svg
deleted file mode 100644
index 639711912..000000000
--- a/apps/landing/public/assets/icons/brand/devin-mark.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/apps/landing/public/assets/icons/brand/grok-mark.svg b/apps/landing/public/assets/icons/brand/grok-mark.svg
deleted file mode 100644
index b8ded7d5e..000000000
--- a/apps/landing/public/assets/icons/brand/grok-mark.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/apps/landing/public/assets/icons/brand/hermes-mark-dark.svg b/apps/landing/public/assets/icons/brand/hermes-mark-dark.svg
deleted file mode 100644
index 27fa29248..000000000
--- a/apps/landing/public/assets/icons/brand/hermes-mark-dark.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/apps/landing/public/assets/icons/brand/openai-mark.svg b/apps/landing/public/assets/icons/brand/openai-mark.svg
deleted file mode 100644
index 8ec74d4f3..000000000
--- a/apps/landing/public/assets/icons/brand/openai-mark.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/apps/landing/public/assets/icons/brand/opencode-mark-dark.svg b/apps/landing/public/assets/icons/brand/opencode-mark-dark.svg
deleted file mode 100644
index 495d02d2c..000000000
--- a/apps/landing/public/assets/icons/brand/opencode-mark-dark.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/landing/public/assets/icons/brand/pi-mark.svg b/apps/landing/public/assets/icons/brand/pi-mark.svg
deleted file mode 100644
index e28516853..000000000
--- a/apps/landing/public/assets/icons/brand/pi-mark.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/apps/landing/public/assets/icons/zeron-mark-solid-ivory.svg b/apps/landing/public/assets/icons/zeron-mark-solid-ivory.svg
deleted file mode 100644
index bbb44f42a..000000000
--- a/apps/landing/public/assets/icons/zeron-mark-solid-ivory.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/apps/landing/public/assets/instrument-serif-latin.woff2 b/apps/landing/public/assets/instrument-serif-latin.woff2
deleted file mode 100644
index 0ad69719c..000000000
Binary files a/apps/landing/public/assets/instrument-serif-latin.woff2 and /dev/null differ
diff --git a/apps/landing/public/assets/logos/unsloth.png b/apps/landing/public/assets/logos/unsloth.png
deleted file mode 100644
index e9ac371c9..000000000
Binary files a/apps/landing/public/assets/logos/unsloth.png and /dev/null differ
diff --git a/apps/landing/public/assets/og.png b/apps/landing/public/assets/og.png
new file mode 100644
index 000000000..55756e057
Binary files /dev/null and b/apps/landing/public/assets/og.png differ
diff --git a/apps/landing/public/assets/shots/diff.png b/apps/landing/public/assets/shots/diff.png
deleted file mode 100644
index 86f8b0e6d..000000000
Binary files a/apps/landing/public/assets/shots/diff.png and /dev/null differ
diff --git a/apps/landing/public/assets/shots/history.png b/apps/landing/public/assets/shots/history.png
deleted file mode 100644
index ce9e6ffbb..000000000
Binary files a/apps/landing/public/assets/shots/history.png and /dev/null differ
diff --git a/apps/landing/public/assets/shots/sessions.png b/apps/landing/public/assets/shots/sessions.png
deleted file mode 100644
index 51fa2e452..000000000
Binary files a/apps/landing/public/assets/shots/sessions.png and /dev/null differ
diff --git a/apps/landing/public/assets/shots/showcase.webp b/apps/landing/public/assets/shots/showcase.webp
deleted file mode 100644
index 863456a9d..000000000
Binary files a/apps/landing/public/assets/shots/showcase.webp and /dev/null differ
diff --git a/apps/landing/public/assets/sponsors/the-context-company.png b/apps/landing/public/assets/sponsors/the-context-company.png
deleted file mode 100644
index 4d6bbe914..000000000
Binary files a/apps/landing/public/assets/sponsors/the-context-company.png and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/0xwthw.jpg b/apps/landing/public/assets/tweets/0xwthw.jpg
deleted file mode 100644
index 0d48bbb40..000000000
Binary files a/apps/landing/public/assets/tweets/0xwthw.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/ahmadaccino.jpg b/apps/landing/public/assets/tweets/ahmadaccino.jpg
deleted file mode 100644
index 4f2ebec39..000000000
Binary files a/apps/landing/public/assets/tweets/ahmadaccino.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/dipxsyy.jpg b/apps/landing/public/assets/tweets/dipxsyy.jpg
deleted file mode 100644
index e66300fe1..000000000
Binary files a/apps/landing/public/assets/tweets/dipxsyy.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/dwhitedesign.jpg b/apps/landing/public/assets/tweets/dwhitedesign.jpg
deleted file mode 100644
index 1a42fa516..000000000
Binary files a/apps/landing/public/assets/tweets/dwhitedesign.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/emanueledpt.jpg b/apps/landing/public/assets/tweets/emanueledpt.jpg
deleted file mode 100644
index 8923bae7d..000000000
Binary files a/apps/landing/public/assets/tweets/emanueledpt.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/hhamud_.jpg b/apps/landing/public/assets/tweets/hhamud_.jpg
deleted file mode 100644
index ab3552bf9..000000000
Binary files a/apps/landing/public/assets/tweets/hhamud_.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/joelmoss.jpg b/apps/landing/public/assets/tweets/joelmoss.jpg
deleted file mode 100644
index 0fd706557..000000000
Binary files a/apps/landing/public/assets/tweets/joelmoss.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/jv_nguyen518.jpg b/apps/landing/public/assets/tweets/jv_nguyen518.jpg
deleted file mode 100644
index 048c17d67..000000000
Binary files a/apps/landing/public/assets/tweets/jv_nguyen518.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/lik_ai_.jpg b/apps/landing/public/assets/tweets/lik_ai_.jpg
deleted file mode 100644
index 5efc730dd..000000000
Binary files a/apps/landing/public/assets/tweets/lik_ai_.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/localhost_5173.jpg b/apps/landing/public/assets/tweets/localhost_5173.jpg
deleted file mode 100644
index 6dcac2423..000000000
Binary files a/apps/landing/public/assets/tweets/localhost_5173.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/maxktz.jpg b/apps/landing/public/assets/tweets/maxktz.jpg
deleted file mode 100644
index 083e2beb5..000000000
Binary files a/apps/landing/public/assets/tweets/maxktz.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/mrbye32.jpg b/apps/landing/public/assets/tweets/mrbye32.jpg
deleted file mode 100644
index 49856ac08..000000000
Binary files a/apps/landing/public/assets/tweets/mrbye32.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/mrlemoos.jpg b/apps/landing/public/assets/tweets/mrlemoos.jpg
deleted file mode 100644
index 3443af118..000000000
Binary files a/apps/landing/public/assets/tweets/mrlemoos.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/n3o773.jpg b/apps/landing/public/assets/tweets/n3o773.jpg
deleted file mode 100644
index 2b5989b93..000000000
Binary files a/apps/landing/public/assets/tweets/n3o773.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/netflixoriginl.jpg b/apps/landing/public/assets/tweets/netflixoriginl.jpg
deleted file mode 100644
index 05bcc64e8..000000000
Binary files a/apps/landing/public/assets/tweets/netflixoriginl.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/purple_orca7.jpg b/apps/landing/public/assets/tweets/purple_orca7.jpg
deleted file mode 100644
index 0685e75cc..000000000
Binary files a/apps/landing/public/assets/tweets/purple_orca7.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/ravthemann.jpg b/apps/landing/public/assets/tweets/ravthemann.jpg
deleted file mode 100644
index 79facf164..000000000
Binary files a/apps/landing/public/assets/tweets/ravthemann.jpg and /dev/null differ
diff --git a/apps/landing/public/assets/tweets/zebassembly.jpg b/apps/landing/public/assets/tweets/zebassembly.jpg
deleted file mode 100644
index 611866537..000000000
Binary files a/apps/landing/public/assets/tweets/zebassembly.jpg and /dev/null differ
diff --git a/apps/landing/public/downloads.js b/apps/landing/public/downloads.js
deleted file mode 100644
index 964eb74bd..000000000
--- a/apps/landing/public/downloads.js
+++ /dev/null
@@ -1,62 +0,0 @@
-(() => {
- const base = "https://zeron.sh/releases/";
- // Android builds publish on every change under one stable name.
- const android = `${base}zeron-android-arm64.apk`;
- const releases = {
- macos: ["macos-arm64.dmg", "Download for macOS", "Apple silicon"],
- windows: ["windows-x86_64-setup.exe", "Download for Windows", "Windows x64 · Installer"],
- "windows-portable": ["windows-x86_64.zip", "Download for Windows", "Windows x64 · Portable ZIP"],
- linux: ["linux-x86_64.tar.gz", "Download for Linux", "Linux x64"],
- "linux-arm": ["linux-aarch64.tar.gz", "Download for Linux", "Linux ARM64"],
- };
- const ua = navigator.userAgent || "";
- const platform = navigator.userAgentData?.platform || navigator.platform || "";
- const mobile = /Android|iPhone|iPad|iPod/i.test(ua) || navigator.userAgentData?.mobile
- || (/Mac/i.test(platform) && navigator.maxTouchPoints > 1);
- const onAndroid = /Android/i.test(ua) || /Android/i.test(platform);
- const os = mobile ? null : /Win/i.test(platform) ? "windows"
- : /Mac/i.test(platform) ? "macos" : /Linux/i.test(platform)
- ? (/aarch64|arm64/i.test(`${platform} ${ua}`) ? "linux-arm" : "linux") : null;
- // On an Android phone the buttons offer the APK (no version to wait for).
- if (onAndroid) {
- for (const id of ["nav-download", "hero-download", "closing-download"]) {
- const link = document.getElementById(id);
- if (!link) continue;
- link.href = android;
- link.textContent = id === "nav-download" ? "Download" : "Download for Android";
- link.setAttribute("data-download-os", "android");
- link.setAttribute("aria-label", "Download for Android (arm64 APK)");
- link.title = "arm64 APK";
- }
- }
- const apply = (version) => {
- for (const link of document.querySelectorAll("[data-platform-download]")) {
- const release = releases[link.dataset.platformDownload];
- if (release) link.href = `${base}zeron-${version}-${release[0]}`;
- }
- for (const id of ["nav-download", "hero-download", "closing-download"]) {
- const link = document.getElementById(id);
- if (!link || !os) continue;
- const [file, label, detail] = releases[os];
- link.href = `${base}zeron-${version}-${file}`;
- link.textContent = id === "nav-download" ? "Download" : label;
- link.setAttribute("data-download-os", os);
- link.setAttribute("aria-label", `${label} (${detail})`);
- link.title = detail;
- }
- };
- // A published fallback keeps downloads usable without the version endpoint.
- // 0.2.97 is the first release with the Windows installer.
- const fallback = "0.2.97";
- apply(fallback);
- fetch(`${base}latest.txt`, { credentials: "omit" })
- .then((r) => r.ok ? r.text() : Promise.reject())
- .then((text) => {
- const version = text.trim();
- if (!/^\d+\.\d+\.\d+$/.test(version)) return;
- const a = version.split(".").map(Number), b = fallback.split(".").map(Number);
- const first = a.findIndex((value, i) => value !== b[i]);
- if (first !== -1 && a[first] < b[first]) return;
- apply(version);
- }).catch(() => {});
-})();
diff --git a/apps/landing/public/glyph-field.js b/apps/landing/public/glyph-field.js
deleted file mode 100644
index b764f0c72..000000000
--- a/apps/landing/public/glyph-field.js
+++ /dev/null
@@ -1,303 +0,0 @@
-// Zeron glyph field: the hero's background, a grid of glyphs set in engraved stone.
-//
-// Text is agent traces and zero-math, glyphs sit barely above the obsidian, a slow
-// violet light shaft sweeps through them (the canyon beam), the pointer leaves a
-// violet afterglow, and the grid scrolls with a gentle parallax.
-//
-// Cells are scattered by a hash, and fade to `clearOpacity` behind the
-// text and elements they're told to keep legible, so copy sits on clean ground.
-//
-// mountGlyphField(host, opts) → { destroy }
-
-const DEFAULT_LINES = [
- 'zeron run --harness claude',
- 'lim n→∞ 1/n = 0',
- 'git worktree add ../quiet-aperture',
- 'codex › plan → edit → test',
- '0 errors 0 warnings',
- 'spawn(agent) for agent in [claude, codex, opencode, cursor, pi]',
- 'x · 0 = 0',
- 'diff --git a/engine b/engine',
- '✓ 312 passed',
- 'e^(iπ) + 1 = 0',
- 'await turn.complete()',
- 'Σ tokens → ∅',
- 'opencode › reasoning',
- 'ssh zeron@threshold',
- 'f(0) = 0',
- 'claude › subagent › explore',
- 'git merge --ff-only',
- 'origin = (0, 0, 0)',
-];
-
-export function mountGlyphField(host, opts = {}) {
- const o = {
- lines: DEFAULT_LINES,
- cellW: 7,
- cellH: 13,
- font: '11px "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',
- // base glyph color as [r,g,b] and alpha range
- base: [196, 188, 226],
- baseAlpha: [0.028, 0.07],
- glow: [167, 139, 250], // #a78bfa
- glowAlpha: 0.75,
- // which fraction of cells are kept (lower = more gaps)
- density: 0.62,
- parallax: 0.88,
- // light shaft: angle in degrees, width as fraction of the diagonal, sweep seconds (0 = static)
- beam: { angle: -38, width: 0.14, sweep: 26, alpha: 0.22, offset: 0.5 },
- // clear hole (ellipse, fractions of the field) thinning the cells under it
- clear: null, // e.g. { x: 0.5, y: 0.45, rx: 0.3, ry: 0.18 }
- // elements whose box, and text elements whose rendered lines, keep glyphs
- // at `clearOpacity`, feathered out over `clearFeather` px
- clearElements: null,
- clearTextElements: null,
- clearPadding: 4,
- clearFeather: 24,
- clearOpacity: 0.2,
- // end the field partway down this element instead of at the host's bottom
- endElement: null,
- endFraction: 1,
- pointerTarget: window,
- ...opts,
- };
- const BEAM = { angle: -38, width: 0.14, sweep: 26, alpha: 0.22, offset: 0.5 };
- o.beam = opts.beam === null || opts.beam === false ? null : { ...BEAM, ...opts.beam };
- const clearEls = o.clearElements || [];
- const clearTextEls = o.clearTextElements || [];
- const text = o.lines.join(' ') + ' ';
- const coarse = matchMedia('(hover: none), (max-width: 767px)').matches;
- const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;
-
- const wrap = document.createElement('div');
- wrap.className = 'glyph-field';
- wrap.setAttribute('aria-hidden', 'true');
- Object.assign(wrap.style, {
- position: 'absolute', inset: '0', overflow: 'hidden', pointerEvents: 'none', zIndex: 0,
- maskImage: 'linear-gradient(to bottom, transparent 0%, #000 8%, #000 80%, transparent 100%)',
- WebkitMaskImage: 'linear-gradient(to bottom, transparent 0%, #000 8%, #000 80%, transparent 100%)',
- });
- if (o.endElement) wrap.style.bottom = 'auto';
- const inner = document.createElement('div');
- Object.assign(inner.style, { position: 'absolute', left: 0, top: 0, width: '100%', willChange: 'transform' });
- const base = document.createElement('canvas');
- const lit = document.createElement('canvas');
- for (const c of [base, lit]) Object.assign(c.style, { position: 'absolute', left: 0, top: 0 });
- inner.append(base, lit);
- wrap.append(inner);
- host.prepend(wrap);
- const bx = base.getContext('2d');
- const lx = lit.getContext('2d');
-
- let cols = 0, rows = 0, W = 0, H = 0, extra = 0;
- let clears = [];
- let heat = new Float32Array(0);
- let hot = new Set();
- const trail = [];
- const charAt = (r, c) => text[((r * 41) % text.length + c) % text.length];
-
- // 0.3..0.7 intensity of a kept cell, or -1 if it's a gap
- const field = (r, c) => {
- let h = Math.imul(r + 1, 374761393) ^ Math.imul(c + 1, 668265263);
- h = Math.imul(h ^ (h >>> 13), 1274126177);
- h = (h ^ (h >>> 16)) >>> 0;
- let v = h / 4294967296;
- if (o.clear) {
- const x = c / cols, y = (r * o.cellH - extra) / (H - 2 * extra || 1);
- const d = Math.hypot((x - o.clear.x) / o.clear.rx, (y - o.clear.y) / o.clear.ry);
- v -= Math.max(0, 1 - d) * 0.6;
- }
- if (v <= 1 - o.density) return -1;
- return 0.3 + 0.4 * ((h >>> 8) % 256) / 255;
- };
-
- // 1 away from cleared text/elements, easing down to clearOpacity inside them
- const clearFactor = (r, c) => {
- if (!clears.length) return 1;
- const x = (c + 0.5) * o.cellW, y = (r + 0.5) * o.cellH - extra;
- let a = 1;
- for (const b of clears) {
- const dx = Math.max(b.left - x, 0, x - b.right), dy = Math.max(b.top - y, 0, y - b.bottom);
- const s = Math.min(1, Math.hypot(dx, dy) / o.clearFeather);
- a = Math.min(a, o.clearOpacity + (1 - o.clearOpacity) * s * s * (3 - 2 * s));
- }
- return a;
- };
-
- const rgba = (rgb, a) => `rgba(${rgb[0]},${rgb[1]},${rgb[2]},${a.toFixed(3)})`;
-
- let cache = new Float32Array(0);
- const drawCell = (r, c) => {
- bx.clearRect(c * o.cellW, r * o.cellH, o.cellW, o.cellH);
- const ch = charAt(r, c);
- if (ch === ' ') return;
- const f = cache[r * cols + c];
- const h = heat[r * cols + c];
- const k = clearFactor(r, c);
- if ((f < 0 && h <= 0) || k < 0.001) return;
- const a = f < 0 ? 0 : o.baseAlpha[0] + (o.baseAlpha[1] - o.baseAlpha[0]) * f;
- if (h > 0) {
- // mix toward glow
- const col = o.base.map((v, i) => Math.round(v + (o.glow[i] - v) * h));
- bx.fillStyle = rgba(col, (a + (o.glowAlpha - a) * h) * k);
- } else bx.fillStyle = rgba(o.base, a * k);
- bx.fillText(ch, c * o.cellW, r * o.cellH);
- };
-
- const setup = () => {
- const dpr = Math.min(devicePixelRatio || 1, 2);
- if (o.endElement) {
- const hr = host.getBoundingClientRect(), er = o.endElement.getBoundingClientRect();
- wrap.style.height = `${Math.max(0, er.top - hr.top + er.height * o.endFraction)}px`;
- }
- W = host.clientWidth;
- extra = 60;
- H = wrap.clientHeight + extra * 2;
- // cleared boxes, in field coordinates
- const hr = host.getBoundingClientRect();
- const local = (b) => ({
- left: b.left - hr.left - o.clearPadding, right: b.right - hr.left + o.clearPadding,
- top: b.top - hr.top - o.clearPadding, bottom: b.bottom - hr.top + o.clearPadding,
- });
- clears = clearEls.map((el) => local(el.getBoundingClientRect()));
- for (const el of clearTextEls) {
- const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT);
- for (let node; (node = walker.nextNode());) {
- if (!node.textContent.trim()) continue;
- const range = document.createRange();
- range.selectNodeContents(node);
- for (const b of range.getClientRects()) if (b.width && b.height) clears.push(local(b));
- }
- }
- inner.style.top = `${-extra}px`;
- inner.style.height = `${H}px`;
- cols = Math.ceil(W / o.cellW) + 1;
- rows = Math.ceil(H / o.cellH) + 1;
- trail.length = 0;
- heat = new Float32Array(cols * rows);
- cache = new Float32Array(cols * rows);
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) cache[r * cols + c] = field(r, c);
- hot = new Set();
- for (const [cv, cx] of [[base, bx], [lit, lx]]) {
- cv.width = Math.floor(W * dpr); cv.height = Math.floor(H * dpr);
- cv.style.width = `${W}px`; cv.style.height = `${H}px`;
- cx.setTransform(dpr, 0, 0, dpr, 0, 0);
- cx.font = o.font; cx.textBaseline = 'top';
- }
- bx.clearRect(0, 0, W, H);
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) drawCell(r, c);
- // lit layer: every glyph (gaps included, faintly), revealed only inside the beam mask
- lx.clearRect(0, 0, W, H);
- for (let r = 0; r < rows; r++) for (let c = 0; c < cols; c++) {
- const ch = charAt(r, c);
- if (ch === ' ') continue;
- const f = cache[r * cols + c], k = clearFactor(r, c);
- if (k < 0.001) continue;
- lx.fillStyle = rgba(o.glow, (f < 0 ? 0.05 : 0.18 + 0.5 * f) * k);
- lx.fillText(ch, c * o.cellW, r * o.cellH);
- }
- applyBeam(performance.now());
- };
-
- // beam = a soft band mask on the lit canvas
- const applyBeam = (now) => {
- if (!o.beam) { lit.style.display = 'none'; return; }
- const b = o.beam;
- const p = b.sweep && !reduced ? ((now / 1000) / b.sweep) % 1 : 0;
- const center = b.sweep && !reduced ? -0.2 + 1.4 * (0.5 - 0.5 * Math.cos(p * Math.PI * 2)) : b.offset;
- const w = b.width * 100, c = center * 100;
- const g = `linear-gradient(${b.angle + 90}deg, transparent ${c - w}%, rgba(0,0,0,${b.alpha * 0.4}) ${c - w * 0.45}%, rgba(0,0,0,${b.alpha}) ${c}%, rgba(0,0,0,${b.alpha * 0.4}) ${c + w * 0.45}%, transparent ${c + w}%)`;
- lit.style.maskImage = g; lit.style.webkitMaskImage = g;
- };
-
- // scroll parallax
- let sraf = 0;
- const applyScroll = () => {
- sraf = 0;
- const y = window.scrollY * (1 - o.parallax);
- inner.style.transform = `translate3d(0, ${y.toFixed(2)}px, 0)`;
- };
- const onScroll = () => { sraf ||= requestAnimationFrame(applyScroll); };
-
- // pointer afterglow
- const LIFE = 650, SPACING = 12;
- let lx0 = -1e9, ly0 = -1e9, traf = 0;
- const loop = () => {
- const now = performance.now();
- while (trail.length && now - trail[0].born > LIFE) trail.shift();
- for (const i of hot) heat[i] = 0;
- const next = new Set();
- for (const p of trail) {
- const life = 1 - (now - p.born) / LIFE;
- if (life <= 0) continue;
- const rad = 10 + 48 * life, r2 = rad * rad;
- const c0 = Math.max(0, Math.floor((p.x - rad) / o.cellW)), c1 = Math.min(cols - 1, Math.ceil((p.x + rad) / o.cellW));
- const r0 = Math.max(0, Math.floor((p.y - rad) / o.cellH)), r1 = Math.min(rows - 1, Math.ceil((p.y + rad) / o.cellH));
- for (let r = r0; r <= r1; r++) for (let c = c0; c <= c1; c++) {
- const dx = c * o.cellW + o.cellW / 2 - p.x, dy = r * o.cellH + o.cellH / 2 - p.y, d2 = dx * dx + dy * dy;
- if (d2 >= r2) continue;
- const d = 1 - Math.sqrt(d2) / rad;
- const v = d * d * (3 - 2 * d) * life * life;
- const i = r * cols + c;
- if (v > heat[i]) heat[i] = v;
- next.add(i);
- }
- }
- for (const i of hot) if (!next.has(i)) { const r = (i / cols) | 0; drawCell(r, i - r * cols); }
- for (const i of next) { const r = (i / cols) | 0; drawCell(r, i - r * cols); }
- hot = next;
- traf = trail.length ? requestAnimationFrame(loop) : 0;
- };
- const onMove = (e) => {
- const rect = base.getBoundingClientRect();
- const x = e.clientX - rect.left, y = e.clientY - rect.top, now = performance.now();
- if (x < 0 || x > W || y < 0 || y > H) { lx0 = ly0 = -1e9; return; }
- if (lx0 < -9000) { lx0 = x; ly0 = y; }
- let dx = x - lx0, dy = y - ly0, d = Math.hypot(dx, dy);
- while (d >= SPACING) {
- const k = SPACING / d; lx0 += dx * k; ly0 += dy * k;
- trail.push({ x: lx0, y: ly0, born: now });
- dx = x - lx0; dy = y - ly0; d = Math.hypot(dx, dy);
- }
- trail.push({ x, y, born: now });
- while (trail.length > 70) trail.shift();
- lx0 = x; ly0 = y;
- traf ||= requestAnimationFrame(loop);
- };
- const onLeave = () => { lx0 = ly0 = -1e9; };
-
- let braf = 0;
- const beamLoop = (t) => { applyBeam(t); braf = requestAnimationFrame(beamLoop); };
-
- document.fonts.ready.then(() => { setup(); applyScroll(); });
- setup();
- if (!coarse && !reduced) {
- o.pointerTarget.addEventListener('pointermove', onMove, { passive: true });
- o.pointerTarget.addEventListener('pointerleave', onLeave);
- }
- if (!reduced && o.parallax !== 1) addEventListener('scroll', onScroll, { passive: true });
- if (o.beam && o.beam.sweep && !reduced) braf = requestAnimationFrame(beamLoop);
- // re-lay out when the host, the end element or anything cleared resizes
- let sizes = '';
- const ro = new ResizeObserver(() => {
- const hr = host.getBoundingClientRect();
- const endTop = o.endElement ? o.endElement.getBoundingClientRect().top - hr.top : 0;
- const next = [host.clientWidth, host.clientHeight,
- ...(o.endElement ? [endTop, o.endElement.clientHeight] : []),
- ...[...clearEls, ...clearTextEls].flatMap((el) => [el.clientWidth, el.clientHeight])].join('/');
- if (next !== sizes) { sizes = next; setup(); }
- });
- ro.observe(host);
- if (o.endElement) ro.observe(o.endElement);
- for (const el of [...clearEls, ...clearTextEls]) ro.observe(el);
-
- return {
- destroy() {
- cancelAnimationFrame(traf); cancelAnimationFrame(sraf); cancelAnimationFrame(braf);
- o.pointerTarget.removeEventListener('pointerleave', onLeave);
- o.pointerTarget.removeEventListener('pointermove', onMove);
- removeEventListener('scroll', onScroll);
- ro.disconnect(); wrap.remove();
- },
- };
-}
diff --git a/apps/landing/public/index.html b/apps/landing/public/index.html
deleted file mode 100644
index d20f2b42e..000000000
--- a/apps/landing/public/index.html
+++ /dev/null
@@ -1,1577 +0,0 @@
-
-
-
-
-
-Zeron — control your coding agents from any device
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The open source workspace for your coding agents. Zeron runs
- Claude Code,
- Codex,
- OpenCode,
- Cursor,
- Antigravity,
- and more on your machines.
-
-
-
-
Used by developers from
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Claude Code
-
-
- Codex
-
-
- Cursor
-
-
- Pi
-
-
- Hermes
-
-
- Grok
-
-
-
-
-
Runs what you already use
-
Zeron is not a new harness. It drives Claude Code, Codex, Cursor,
- Grok, Hermes and Pi — the same sessions and tools you use each day,
- in one fast native window on every device.
-
-
-
-
-
-
- Every machine's sessions, one list
-
-
-
- Branch diffs, live as agents work
-
-
-
- Commit history for every workspace
-
-
-
-
-
Three screens, one session
-
Sessions live on your machines, every device you own can pilot
- them. Start Claude Code at your desk, watch it from your phone,
- approve the diff from the couch. Nothing to hand off, nothing
- to re-open.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Claude Code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Download Zeron.
-
Available for macOS, Windows, Linux, Android and iOS.
-
-
-
-
-
Zeron for desktop.
-
macOS, Windows and Linux.
-
-
-
-
-
-
Zeron for mobile.
-
Android, iPhone and iPad.
-
-
-
-
-
-
-
-
-
-
-
-
Bring your agents together.
-
One window for every machine you own. Zeron is open source and MIT licensed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/landing/public/assets/icons/brand/antigravity-mark.svg b/apps/landing/src/assets/agents/antigravity.svg
similarity index 100%
rename from apps/landing/public/assets/icons/brand/antigravity-mark.svg
rename to apps/landing/src/assets/agents/antigravity.svg
diff --git a/apps/landing/public/assets/icons/claude-mark.svg b/apps/landing/src/assets/agents/claude.svg
similarity index 100%
rename from apps/landing/public/assets/icons/claude-mark.svg
rename to apps/landing/src/assets/agents/claude.svg
diff --git a/apps/landing/public/assets/icons/cursor-mark.svg b/apps/landing/src/assets/agents/cursor.svg
similarity index 100%
rename from apps/landing/public/assets/icons/cursor-mark.svg
rename to apps/landing/src/assets/agents/cursor.svg
diff --git a/apps/landing/public/assets/icons/devin-mark.svg b/apps/landing/src/assets/agents/devin.svg
similarity index 100%
rename from apps/landing/public/assets/icons/devin-mark.svg
rename to apps/landing/src/assets/agents/devin.svg
diff --git a/apps/landing/public/assets/icons/grok-mark.svg b/apps/landing/src/assets/agents/grok.svg
similarity index 100%
rename from apps/landing/public/assets/icons/grok-mark.svg
rename to apps/landing/src/assets/agents/grok.svg
diff --git a/apps/landing/public/assets/icons/hermes-mark.svg b/apps/landing/src/assets/agents/hermes.svg
similarity index 100%
rename from apps/landing/public/assets/icons/hermes-mark.svg
rename to apps/landing/src/assets/agents/hermes.svg
diff --git a/apps/landing/public/assets/icons/openai-mark.svg b/apps/landing/src/assets/agents/openai.svg
similarity index 100%
rename from apps/landing/public/assets/icons/openai-mark.svg
rename to apps/landing/src/assets/agents/openai.svg
diff --git a/apps/landing/public/assets/icons/opencode-mark.svg b/apps/landing/src/assets/agents/opencode.svg
similarity index 100%
rename from apps/landing/public/assets/icons/opencode-mark.svg
rename to apps/landing/src/assets/agents/opencode.svg
diff --git a/apps/landing/public/assets/icons/pi-mark.svg b/apps/landing/src/assets/agents/pi.svg
similarity index 100%
rename from apps/landing/public/assets/icons/pi-mark.svg
rename to apps/landing/src/assets/agents/pi.svg
diff --git a/apps/landing/src/assets/desktop.webp b/apps/landing/src/assets/desktop.webp
new file mode 100644
index 000000000..e4af690eb
Binary files /dev/null and b/apps/landing/src/assets/desktop.webp differ
diff --git a/apps/landing/public/assets/geist-mono-latin.woff2 b/apps/landing/src/assets/fonts/geist-mono.woff2
similarity index 100%
rename from apps/landing/public/assets/geist-mono-latin.woff2
rename to apps/landing/src/assets/fonts/geist-mono.woff2
diff --git a/apps/landing/public/assets/geist-latin.woff2 b/apps/landing/src/assets/fonts/geist.woff2
similarity index 100%
rename from apps/landing/public/assets/geist-latin.woff2
rename to apps/landing/src/assets/fonts/geist.woff2
diff --git a/apps/landing/public/assets/logos/cursor.svg b/apps/landing/src/assets/logos/cursor.svg
similarity index 100%
rename from apps/landing/public/assets/logos/cursor.svg
rename to apps/landing/src/assets/logos/cursor.svg
diff --git a/apps/landing/public/assets/logos/thecontextcompany.png b/apps/landing/src/assets/logos/the-context-company.png
similarity index 100%
rename from apps/landing/public/assets/logos/thecontextcompany.png
rename to apps/landing/src/assets/logos/the-context-company.png
diff --git a/apps/landing/public/assets/logos/unsloth-mask.png b/apps/landing/src/assets/logos/unsloth.png
similarity index 100%
rename from apps/landing/public/assets/logos/unsloth-mask.png
rename to apps/landing/src/assets/logos/unsloth.png
diff --git a/apps/landing/public/assets/icons/native/android.svg b/apps/landing/src/assets/platforms/android.svg
similarity index 100%
rename from apps/landing/public/assets/icons/native/android.svg
rename to apps/landing/src/assets/platforms/android.svg
diff --git a/apps/landing/public/assets/icons/native/apple.svg b/apps/landing/src/assets/platforms/apple.svg
similarity index 100%
rename from apps/landing/public/assets/icons/native/apple.svg
rename to apps/landing/src/assets/platforms/apple.svg
diff --git a/apps/landing/public/assets/icons/native/linux.svg b/apps/landing/src/assets/platforms/linux.svg
similarity index 100%
rename from apps/landing/public/assets/icons/native/linux.svg
rename to apps/landing/src/assets/platforms/linux.svg
diff --git a/apps/landing/public/assets/icons/native/windows.svg b/apps/landing/src/assets/platforms/windows.svg
similarity index 100%
rename from apps/landing/public/assets/icons/native/windows.svg
rename to apps/landing/src/assets/platforms/windows.svg
diff --git a/apps/landing/public/assets/tweets/afortunado124.jpg b/apps/landing/src/assets/voices/afortunado124.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/afortunado124.jpg
rename to apps/landing/src/assets/voices/afortunado124.jpg
diff --git a/apps/landing/public/assets/tweets/dev_shekhawat.jpg b/apps/landing/src/assets/voices/dev_shekhawat.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/dev_shekhawat.jpg
rename to apps/landing/src/assets/voices/dev_shekhawat.jpg
diff --git a/apps/landing/public/assets/tweets/francoe114696.jpg b/apps/landing/src/assets/voices/francoe114696.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/francoe114696.jpg
rename to apps/landing/src/assets/voices/francoe114696.jpg
diff --git a/apps/landing/public/assets/tweets/leanderriefel.jpg b/apps/landing/src/assets/voices/leanderriefel.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/leanderriefel.jpg
rename to apps/landing/src/assets/voices/leanderriefel.jpg
diff --git a/apps/landing/public/assets/tweets/sahilcodex.jpg b/apps/landing/src/assets/voices/sahilcodex.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/sahilcodex.jpg
rename to apps/landing/src/assets/voices/sahilcodex.jpg
diff --git a/apps/landing/public/assets/tweets/stlaurentgod.jpg b/apps/landing/src/assets/voices/stlaurentgod.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/stlaurentgod.jpg
rename to apps/landing/src/assets/voices/stlaurentgod.jpg
diff --git a/apps/landing/public/assets/tweets/thecto.jpg b/apps/landing/src/assets/voices/thecto.jpg
similarity index 100%
rename from apps/landing/public/assets/tweets/thecto.jpg
rename to apps/landing/src/assets/voices/thecto.jpg
diff --git a/apps/landing/src/components/app/ChartReply.astro b/apps/landing/src/components/app/ChartReply.astro
new file mode 100644
index 000000000..42c0089b3
--- /dev/null
+++ b/apps/landing/src/components/app/ChartReply.astro
@@ -0,0 +1,51 @@
+---
+// A reply with a visual, as a session's transcript draws it, in HTML: the
+// same paragraph, title, legend and grouped bar chart, to the point, that
+// public/hero/chrome.js `drawReply` draws (and tools/native checked against
+// the app). The chart's labels are the system's face, as in the app.
+import Stage from "./Stage.astro";
+
+const SERIES = [
+ { name: "Compile", colour: "#9277b0", values: [42, 38, 51, 47, 33, 29] },
+ { name: "Link", colour: "#58c2b2", values: [12, 14, 11, 16, 9, 8] },
+ { name: "Test", colour: "#e9a64b", values: [20, 22, 19, 25, 18, 21] },
+];
+const MONTHS = ["Jun", "Jul", "Aug", "Sep", "Oct", "Nov"];
+const lines = ["Compile is still the biggest share, but it has dropped since August,", "when the workspace was split. Here are the last six months, by", "step:"];
+
+// The column's left, the title's top, the visual's width (the app's numbers).
+const X = 24, Y = 108, CW = 464;
+const top = Y + 72, left = X + 32.93, pw = CW - 32.93 - 6, ph = 120;
+const vy = (v: number) => top + ph - (v / 60) * ph;
+const band = pw / 6, group = band * 0.68, per = group / 3, gap = Math.min(2, per * 0.15), bw = per - gap;
+const ticks = [0, 10, 20, 30, 40, 50, 60];
+const bars = MONTHS.flatMap((_, i) => SERIES.map((series, si) => ({ x: left + i * band + (band - group) / 2 + si * per + gap / 2, y: vy(series.values[i]!), h: vy(0) - vy(series.values[i]!), colour: series.colour })));
+const px = (n: number) => `${Math.round(n * 100) / 100}px`;
+const label = "A reply in Zeron: a sentence about build times, then a grouped bar chart titled Where the build's time goes, with compile, link and test time for June to November.";
+---
+
+
+ {lines.map((line, i) => {line}
)}
+ Where the build's time goes
+
+ {SERIES.map((series) => {series.name} )}
+
+ {ticks.map((t) => )}
+ {ticks.map((t) => {t} s )}
+ {bars.map((bar) => )}
+ {MONTHS.map((month, i) => {month} )}
+
+
+
diff --git a/apps/landing/src/components/app/PhoneSession.astro b/apps/landing/src/components/app/PhoneSession.astro
new file mode 100644
index 000000000..90a5fad0c
--- /dev/null
+++ b/apps/landing/src/components/app/PhoneSession.astro
@@ -0,0 +1,16 @@
+---
+// The iOS app's session screen, recreated in HTML against the app's own
+// screenshot (tools/recreate/phone_check.py diffs it). A 402 × 874 point
+// stage that scales to the box it is put in.
+import fragment from "./phone.fragment.html?raw";
+import "./phone.css";
+
+interface Props {
+ class?: string;
+}
+const label = "Zeron on an iPhone: a side chat with Claude Code about a streaming animation, with a message from another agent's chat.";
+---
+
+
diff --git a/apps/landing/src/components/app/SessionWindow.astro b/apps/landing/src/components/app/SessionWindow.astro
new file mode 100644
index 000000000..113d2f4c9
--- /dev/null
+++ b/apps/landing/src/components/app/SessionWindow.astro
@@ -0,0 +1,32 @@
+---
+// A Zeron session with its panel open, recreated in HTML from the app
+// itself: every box, word and icon is placed where the app's layout tree
+// places it, in the app's own colours, and diffed against a native capture
+// (tools/recreate). The markup, masks and theme values are generated;
+// don't edit them by hand.
+//
+// Whole, it is the window. With `crop` it is a piece of it: that part of
+// the 1320 × 840 stage, as wide as the box it is put in. Being HTML, a
+// piece shown large is as sharp as the window itself.
+import fragment from "./session.fragment.html?raw";
+import "./session.icons.css";
+import "./session.vars.css";
+import "./zw.css";
+
+interface Props {
+ theme?: "dark" | "light";
+ /** x, y, width, height, in the stage's points. */
+ crop?: [number, number, number, number];
+ /** Not for readers: a second copy on a page, or a piece used as a picture. */
+ decorative?: boolean;
+ class?: string;
+}
+const { theme = "dark", crop = [0, 0, 1320, 840], decorative = false, class: className } = Astro.props;
+const [x, y, w, h] = crop;
+const label =
+ "Zeron with a session open. The sidebar groups eight sessions under four projects, run by Claude Code, Codex and Grok; two are still working. In the open one, Claude Code explains and fixes a rate limiter bug, and the Changes panel beside it shows the diff of window.ts.";
+---
+
+
diff --git a/apps/landing/src/components/app/Stage.astro b/apps/landing/src/components/app/Stage.astro
new file mode 100644
index 000000000..ee0581313
--- /dev/null
+++ b/apps/landing/src/components/app/Stage.astro
@@ -0,0 +1,23 @@
+---
+// A fixed stage of the app's points that scales to the box it is put in
+// (a point is 1/width of the box), for pieces of the app written in HTML.
+interface Props {
+ width: number;
+ height: number;
+ class?: string;
+ label?: string;
+}
+const { width, height, class: className, label } = Astro.props;
+---
+
+
+
+
diff --git a/apps/landing/src/components/app/ThemesWindow.astro b/apps/landing/src/components/app/ThemesWindow.astro
new file mode 100644
index 000000000..fb82710fd
--- /dev/null
+++ b/apps/landing/src/components/app/ThemesWindow.astro
@@ -0,0 +1,24 @@
+---
+// The same session with its panel closed, in each theme the app was
+// captured in (themes.themes.json), with the window's frosted glass kept:
+// every surface carries the alpha the app drew, so what is behind the
+// window shows through it. Generated by tools/recreate, as SessionWindow.
+// The stage's class (t0, t1, …) picks the theme.
+import fragment from "./themes.fragment.html?raw";
+import "./themes.icons.css";
+import "./themes.vars.css";
+import "./zw.css";
+
+interface Props {
+ id?: string;
+ crop?: [number, number, number, number];
+ class?: string;
+}
+const { id, crop = [0, 0, 1320, 840], class: className } = Astro.props;
+const [x, y, w, h] = crop;
+const label = "Zeron with its frosted glass window: the sidebar's projects and sessions, and a conversation with Claude Code, in the chosen theme.";
+---
+
+
diff --git a/apps/landing/src/components/app/WorkIn.astro b/apps/landing/src/components/app/WorkIn.astro
new file mode 100644
index 000000000..6e00200e2
--- /dev/null
+++ b/apps/landing/src/components/app/WorkIn.astro
@@ -0,0 +1,118 @@
+---
+// The message box of a new chat with its "Work in" picker open on the list
+// of machines, in HTML: the composer's foot, its chips, and the two menus
+// that hang from the place chip, laid out to the point as the app lays
+// them (the numbers are those of the canvas drawing the earlier landing
+// page checked against the app: zeron/landing-newchat-hero,
+// public/hero/chrome.js `drawOver` and `drawPopups`). Not diffed again here.
+import api from "../../../tools/recreate/reference/artwork/api.svg?raw";
+import AgentMark from "../ui/AgentMark.astro";
+import Icon from "../ui/Icon.astro";
+import Stage from "./Stage.astro";
+
+type Row = { y: number; icon?: string; art?: boolean; label: string; tag?: string; chevron?: boolean; state?: "hover" | "selected" };
+const workIn: Row[] = [
+ { y: 29, icon: "monitor", label: "MacBook Pro", chevron: true, state: "hover" },
+ { y: 57, art: true, label: "api", chevron: true },
+ { y: 85, icon: "worktree", label: "Worktree", chevron: true },
+ { y: 159, icon: "git-branch", label: "main", tag: "Current", state: "selected" },
+ { y: 189, icon: "git-branch", label: "fix/retry-after" },
+ { y: 219, icon: "git-branch", label: "feat/sweep-idle-keys" },
+];
+const devices: Row[] = [
+ { y: 42, icon: "monitor", label: "MacBook Pro", tag: "You", state: "selected" },
+ { y: 72, icon: "monitor", label: "devbox" },
+ { y: 156, icon: "cloud", label: "Cloud" },
+];
+const art = `data:image/svg+xml,${encodeURIComponent(api)}`;
+const label = "Zeron's message box with its Work in menu open: the machine, project and branch a new session will run on, and the list of machines: this MacBook Pro, a Linux devbox, a Mac mini that is offline, and Cloud.";
+---
+
+
+
+
+
+
+
+
+ Full access
+
+ MacBook Pro api main
+
+ Opus 5.5High
+
+
+
+
+
+
diff --git a/apps/landing/src/components/app/phone.css b/apps/landing/src/components/app/phone.css
new file mode 100644
index 000000000..9e24af3af
--- /dev/null
+++ b/apps/landing/src/components/app/phone.css
@@ -0,0 +1,18 @@
+/* The iOS app's session screen, recreated: a fixed 402 × 874 point stage
+ (an iPhone 17 Pro), placed by hand against the app's own screenshot
+ (docs/screenshots/message-captions/ios-dark.png; tools/recreate/phone_check.py
+ diffs it). The app's text is Geist, as here; its glyphs are SF Symbols,
+ which a web page can't carry, so those are drawn here as plain shapes. */
+.zp { position: relative; width: 402px; height: 874px; overflow: hidden; background: #060606; color: #f2f2f4; font-family: var(--font-sans); font-size: 16.5px; line-height: 25px; text-align: left; -webkit-font-smoothing: antialiased; font-synthesis: none; }
+.zp > * { position: absolute; margin: 0; }
+.zp .glass { background: #1b1b1b; border-radius: 22px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09); }
+.zp .bubble { background: #19191c; border-radius: 22px; }
+.zp .dim { color: rgb(242 242 244 / 0.6); }
+.zp .faint { color: rgb(242 242 244 / 0.42); }
+.zp svg { position: absolute; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
+.zp .solid { fill: currentColor; stroke: none; }
+.zp .caption { display: flex; align-items: center; gap: 6px; font-size: 13.5px; line-height: 18px; white-space: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
+.zp .caption b { font-weight: 550; color: rgb(242 242 244 / 0.78); }
+.zp .caption i { flex: none; width: 14px; height: 14px; background: rgb(242 242 244 / 0.7); -webkit-mask: url("../../assets/agents/openai.svg") center / contain no-repeat; mask: url("../../assets/agents/openai.svg") center / contain no-repeat; }
+.zp-fit { container-type: inline-size; aspect-ratio: 402 / 874; overflow: hidden; }
+.zp-fit > .zp { transform-origin: 0 0; scale: tan(atan2(100cqw, 402px)); }
diff --git a/apps/landing/src/components/app/phone.fragment.html b/apps/landing/src/components/app/phone.fragment.html
new file mode 100644
index 000000000..9e9f361f2
--- /dev/null
+++ b/apps/landing/src/components/app/phone.fragment.html
@@ -0,0 +1,22 @@
+9:41
+
+
+
+Side chat
+Streaming veil on transcript rows
+
+
+
+
+What EMA window does the veil use?
+α = 0.2 over inter-append gaps, seeded from the first two chunks.
+Message from Spring vs. power curve for the veil
+
+Keeping the power curve for the veil. Which EMA window should the fade track so the cadence stays steady?
+Track α = 0.2: it settles within five appends and ignores a single slow chunk. I've replied to your chat with the numbers.
+
+
+
+Message Claude Code
+
+
diff --git a/apps/landing/src/components/app/session.fragment.html b/apps/landing/src/components/app/session.fragment.html
new file mode 100644
index 000000000..bbd868c44
--- /dev/null
+++ b/apps/landing/src/components/app/session.fragment.html
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+New chat
+⌘N
+Search
+⌘K
+Pull requests
+Projects
+api
+Fix burst at the rate limit boundary
+now
+Return a real Retry-After
+Sweep idle keys without a timer
+web
+Speed up the dashboard's first paint
+Add dark mode to settings
+uptime
+Page only when two regions agree
+Why Frankfurt flapped overnight
+docs
+Write up the October incident
+Local
+Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it.
+Thought process · ran 1 command · read 2 files
+Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after.
+Ran 1 command · edited 2 files
+Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary.
+test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls
+5 of 5 tests pass
+This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet.
+Ask anything, @ to mention…
+Full access
+studio
+api
+main
+Opus 5.5
+High
+Changes
+Working tree
+main
+2 files in 2 folders
++12
+−1
+Filter files
+src
+1
+M
+window.ts
++3
+−1
+@@ -20,7 +20,9 @@
+export class SlidingWindow {
+20
+ estimate ( now = Date . now ()) : number {
+21
+ this . roll ( now );
+22
+ const into = ( now - this . start ) / this . windowMs ;
+23
+-
+ return this . current + this . previous * Math . floor ( 1 - i n
+23
++
+ // The previous window counts for the part of it that s
+24
++
+ // last `windowMs `. Rounding that share down dropped it
+25
++
+ return this . current + this . previous * ( 1 - into );
+26
+ }
+27
+28
+ /** Counts one request, or refuses it when the window is
+test
+1
+M
+window.test.ts
++9
+−0
+What changed, and why
+0/50
+Mara Okafor
+Fix burst at the rate limit boundary
+
+
+Commit
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/landing/src/components/app/session.icons.css b/apps/landing/src/components/app/session.icons.css
new file mode 100644
index 000000000..337ce6816
--- /dev/null
+++ b/apps/landing/src/components/app/session.icons.css
@@ -0,0 +1,24 @@
+.zw .i-access-full{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M4.75%2011.75C4.75%2010.6454%205.64543%209.75%206.75%209.75H17.25C18.3546%209.75%2019.25%2010.6454%2019.25%2011.75V19.25C19.25%2020.3546%2018.3546%2021.25%2017.25%2021.25H6.75C5.64543%2021.25%204.75%2020.3546%204.75%2019.25V11.75Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M12%2014V17%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M7.75%209.75V7C7.75%204.65279%209.65279%202.75%2012%202.75C14.0926%202.75%2015.832%204.26237%2016.1847%206.25371%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E")}
+.zw .i-alt-arrow-down{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M17.5%209.25%2012%2014.75%206.5%209.25%22/%3E%3C/svg%3E")}
+.zw .i-alt-arrow-right{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M9%205L15%2012L9%2019%22/%3E%3C/svg%3E")}
+.zw .i-alt-arrow-right-bold{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.25%22%20d%3D%22M9%205L15%2012L9%2019%22/%3E%3C/svg%3E")}
+.zw .i-arrow-left{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%2012H5m5.5-5.5L5%2012l5.5%205.5%22/%3E%3C/svg%3E")}
+.zw .i-arrow-right{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012h14m-5.5-5.5L19%2012l-5.5%205.5%22/%3E%3C/svg%3E")}
+.zw .i-arrow-up{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M12%2020V4m0%200l6%206m-6-6l-6%206%22/%3E%3C/svg%3E")}
+.zw .i-expand-arrows{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%204H4v5m0-5%206%206m5%2010h5v-5m0%205-6-6%22/%3E%3C/svg%3E")}
+.zw .i-file-diff{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cg%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%2010c0-3.771%200-5.657%201.172-6.828S8.229%202%2012%202s5.657%200%206.828%201.172S20%206.229%2020%2010v4c0%203.771%200%205.657-1.172%206.828S15.771%2022%2012%2022s-5.657%200-6.828-1.172S4%2017.771%204%2014z%22/%3E%3Cpath%20d%3D%22M12%206.5v6M9%209.5h6M9%2017h6%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-folder{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207a3%203%200%200%201%203-3h2.6a2%202%200%200%201%201.6.8L12%207h6a3%203%200%200%201%203%203v7a3%203%200%200%201-3%203H6a3%203%200%200%201-3-3Z%22/%3E%3C/svg%3E")}
+.zw .i-git-branch{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208.5v7M6%2012h10a2%202%200%200%200%202-2V8.5%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3C/svg%3E")}
+.zw .i-mark-claude{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20257%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z%22/%3E%3C/svg%3E%20")}
+.zw .i-mark-grok{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%20%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20d%3D%22M0.58392448%2C14.9254204%20L0.8326%2C14.66295%20C2.004465%2C13.42985%203.1678%2C12.2082%202.45814%2C10.48105%20C1.50813%2C8.1701%202.061355%2C5.4619%203.820575%2C3.70057%20C5.6495%2C1.8709%208.3431%2C1.40957%2010.59295%2C2.336505%20C11.0907%2C2.52161%2011.5245%2C2.785025%2011.86295%2C3.02993%20L9.98425%2C3.89849%20C8.235%2C3.163775%206.23115%2C3.66355%205.0081%2C4.88809%20C3.354105%2C6.5426%203.019895%2C9.4117%204.95835%2C11.2656%20L-0.335%2C15.99995%20C-0.066496%2C15.62975%200.2538896%2C15.275934%200.58392448%2C14.9254204%20Z%20M14.0391%2C2.288155%20L16.33165%2C2.57749377e-12%20L16.20795%2C0.172288%20C14.4658%2C2.574355%2013.6153%2C3.749045%2014.29795%2C6.6879%20C14.76445%2C8.68415%2014.261%2C10.90255%2012.63545%2C12.53005%20C10.5861%2C14.58325%207.3066%2C15.0403%204.6059%2C13.19215%20L6.48885%2C12.3193%20C8.2125%2C12.99705%2010.0983%2C12.69945%2011.4536%2C11.34255%20C12.80895%2C9.9856%2013.1133%2C8.00925%2012.4321%2C6.3647%20C12.30265%2C6.05285%2011.9144%2C5.97455%2011.64275%2C6.1753%20L6.102%2C10.27035%20L14.0391%2C2.288155%20Z%22/%3E%20%3C/svg%3E%20")}
+.zw .i-mark-openai{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20260%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M239.184%20106.203a64.716%2064.716%200%200%200-5.576-53.103C219.452%2028.459%20191%2015.784%20163.213%2021.74A65.586%2065.586%200%200%200%2052.096%2045.22a64.716%2064.716%200%200%200-43.23%2031.36c-14.31%2024.602-11.061%2055.634%208.033%2076.74a64.665%2064.665%200%200%200%205.525%2053.102c14.174%2024.65%2042.644%2037.324%2070.446%2031.36a64.72%2064.72%200%200%200%2048.754%2021.744c28.481.025%2053.714-18.361%2062.414-45.481a64.767%2064.767%200%200%200%2043.229-31.36c14.137-24.558%2010.875-55.423-8.083-76.483Zm-97.56%20136.338a48.397%2048.397%200%200%201-31.105-11.255l1.535-.87%2051.67-29.825a8.595%208.595%200%200%200%204.247-7.367v-72.85l21.845%2012.636c.218.111.37.32.409.563v60.367c-.056%2026.818-21.783%2048.545-48.601%2048.601Zm-104.466-44.61a48.345%2048.345%200%200%201-5.781-32.589l1.534.921%2051.722%2029.826a8.339%208.339%200%200%200%208.441%200l63.181-36.425v25.221a.87.87%200%200%201-.358.665l-52.335%2030.184c-23.257%2013.398-52.97%205.431-66.404-17.803ZM23.549%2085.38a48.499%2048.499%200%200%201%2025.58-21.333v61.39a8.288%208.288%200%200%200%204.195%207.316l62.874%2036.272-21.845%2012.636a.819.819%200%200%201-.767%200L41.353%20151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466%2041.695-63.08-36.63L161.73%2077.86a.819.819%200%200%201%20.768%200l52.233%2030.184a48.6%2048.6%200%200%201-7.316%2087.635v-61.391a8.544%208.544%200%200%200-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39%208.39%200%200%200-8.492%200L99.98%2099.808V74.587a.716.716%200%200%201%20.307-.665l52.233-30.133a48.652%2048.652%200%200%201%2072.236%2050.391v.205ZM88.061%20139.097l-21.845-12.585a.87.87%200%200%201-.41-.614V65.685a48.652%2048.652%200%200%201%2079.757-37.346l-1.535.87-51.67%2029.825a8.595%208.595%200%200%200-4.246%207.367l-.051%2072.697Zm11.868-25.58%2028.138-16.217%2028.188%2016.218v32.434l-28.086%2016.218-28.188-16.218-.052-32.434Z%22/%3E%3C/svg%3E%20")}
+.zw .i-microphone{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Crect%20width%3D%227%22%20height%3D%2212.5%22%20x%3D%228.5%22%20y%3D%222.25%22%20rx%3D%223.5%22/%3E%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M5%2011a7%207%200%200%200%2014%200M12%2018v3.75M9%2021.75h6%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-more-horizontal{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cg%20fill%3D%22black%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%223.75%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3Ccircle%20cx%3D%2220.25%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-pen{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20d%3D%22m14.36%204.079l.927-.927a3.932%203.932%200%200%201%205.561%205.561l-.927.927m-5.56-5.561s.115%201.97%201.853%203.707C17.952%209.524%2019.92%209.64%2019.92%209.64m-5.56-5.561l-8.522%208.52c-.577.578-.866.867-1.114%201.185a6.6%206.6%200%200%200-.749%201.211c-.173.364-.302.752-.56%201.526l-1.094%203.281m17.6-10.162L11.4%2018.16c-.577.577-.866.866-1.184%201.114a6.6%206.6%200%200%201-1.211.749c-.364.173-.751.302-1.526.56l-3.281%201.094m0%200l-.802.268a1.06%201.06%200%200%201-1.342-1.342l.268-.802m1.876%201.876l-1.876-1.876%22/%3E%3C/svg%3E")}
+.zw .i-plus{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22/%3E%3C/svg%3E")}
+.zw .i-pull-request{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208.5v7M18%2015.5V8.25a2%202%200%200%200-2-2h-3.5m2.25-2.25L12.5%206.25l2.25%202.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3C/svg%3E")}
+.zw .i-search{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20r%3D%226.5%22/%3E%3Cpath%20d%3D%22m15.5%2015.5%204.5%204.5%22/%3E%3C/svg%3E")}
+.zw .i-settings{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%20%20%20%3Cg%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%3Cpath%20d%3D%22M7.878%205.21415L7.17474%205.05186C6.58003%204.91462%205.95657%205.09343%205.525%205.525C5.09343%205.95657%204.91462%206.58003%205.05186%207.17474L5.21415%207.878C5.40122%208.6886%205.06696%209.53036%204.37477%209.99182L3.51965%2010.5619C3.03881%2010.8825%202.75%2011.4221%202.75%2012C2.75%2012.5779%203.03881%2013.1175%203.51965%2013.4381L4.37477%2014.0082C5.06696%2014.4696%205.40122%2015.3114%205.21415%2016.122L5.05186%2016.8253C4.91462%2017.42%205.09343%2018.0434%205.525%2018.475C5.95657%2018.9066%206.58003%2019.0854%207.17474%2018.9481L7.878%2018.7858C8.6886%2018.5988%209.53036%2018.933%209.99182%2019.6252L10.5619%2020.4804C10.8825%2020.9612%2011.4221%2021.25%2012%2021.25C12.5779%2021.25%2013.1175%2020.9612%2013.4381%2020.4804L14.0082%2019.6252C14.4696%2018.933%2015.3114%2018.5988%2016.122%2018.7858L16.8253%2018.9481C17.42%2019.0854%2018.0434%2018.9066%2018.475%2018.475C18.9066%2018.0434%2019.0854%2017.42%2018.9481%2016.8253L18.7858%2016.122C18.5988%2015.3114%2018.933%2014.4696%2019.6252%2014.0082L20.4804%2013.4381C20.9612%2013.1175%2021.25%2012.5779%2021.25%2012C21.25%2011.4221%2020.9612%2010.8825%2020.4804%2010.5619L19.6252%209.99182C18.933%209.53036%2018.5988%208.6886%2018.7858%207.878L18.9481%207.17473C19.0854%206.58003%2018.9066%205.95657%2018.475%205.525C18.0434%205.09343%2017.42%204.91462%2016.8253%205.05186L16.122%205.21415C15.3114%205.40122%2014.4696%205.06696%2014.0082%204.37477L13.4381%203.51965C13.1175%203.03881%2012.5779%202.75%2012%202.75C11.4221%202.75%2010.8825%203.03881%2010.5619%203.51965L9.99182%204.37477C9.53036%205.06696%208.6886%205.40122%207.878%205.21415Z%22/%3E%20%20%20%20%20%3Cpath%20d%3D%22M14.75%2012C14.75%2013.5188%2013.5188%2014.75%2012%2014.75C10.4812%2014.75%209.25%2013.5188%209.25%2012C9.25%2010.4812%2010.4812%209.25%2012%209.25C13.5188%209.25%2014.75%2010.4812%2014.75%2012Z%22/%3E%20%20%20%3C/g%3E%20%3C/svg%3E")}
+.zw .i-split-columns{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M2%2011c0-3.771%200-5.657%201.172-6.828S6.229%203%2010%203h4c3.771%200%205.657%200%206.828%201.172S22%207.229%2022%2011v2c0%203.771%200%205.657-1.172%206.828S17.771%2021%2014%2021h-4c-3.771%200-5.657%200-6.828-1.172S2%2016.771%202%2013z%22/%3E%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M12%2021V3%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-status-done{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22/%3E%3Cpath%20d%3D%22m9%2012%202%202%204-4%22/%3E%3C/svg%3E")}
+.zw .i-wrap-text{--m:url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%20%20%20%3Cpath%20d%3D%22M4%206H20%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22/%3E%20%20%20%3Cpath%20d%3D%22M4%2010H17C18.6569%2010%2020%2011.3431%2020%2013C20%2014.6569%2018.6569%2016%2017%2016H9%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%20%20%20%3Cpath%20d%3D%22M12%2013L9%2016L12%2019%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%20%20%20%3Cpath%20d%3D%22M4%2020H7%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22/%3E%20%3C/svg%3E")}
\ No newline at end of file
diff --git a/apps/landing/src/components/app/session.vars.css b/apps/landing/src/components/app/session.vars.css
new file mode 100644
index 000000000..b91edeb92
--- /dev/null
+++ b/apps/landing/src/components/app/session.vars.css
@@ -0,0 +1,2 @@
+.zw-session.t0{--zw-window:#0e0e10;--zw-code:#9277b0;--zw-wash:#231f27;--zw-text:#ededef}
+.zw-session.t1{--zw-window:#eeeef0;--zw-code:#7a55c4;--zw-wash:#e5e0ef;--zw-text:#1b1b1d}
diff --git a/apps/landing/src/components/app/themes.fragment.html b/apps/landing/src/components/app/themes.fragment.html
new file mode 100644
index 000000000..98104996c
--- /dev/null
+++ b/apps/landing/src/components/app/themes.fragment.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+New chat
+⌘N
+Search
+⌘K
+Pull requests
+Projects
+web
+Speed up the dashboard's first paint
+Add dark mode to settings
+api
+Sweep idle keys without a timer
+Fix burst at the rate limit boundary
+30m
+Return a real Retry-After
+uptime
+Page only when two regions agree
+Why Frankfurt flapped overnight
+docs
+Write up the October incident
+Local
+Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it.
+Thought process · ran 1 command · read 2 files
+Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after.
+Ran 1 command · edited 2 files
+Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary.
+test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls
+5 of 5 tests pass
+This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet.
+Nov 17, 9:15 AM
+Ask anything, @ to mention…
+Full access
+studio
+api
+main
+Opus 5.5
+High
+Fix burst at the rate limit boundary
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/landing/src/components/app/themes.icons.css b/apps/landing/src/components/app/themes.icons.css
new file mode 100644
index 000000000..763d0cfd3
--- /dev/null
+++ b/apps/landing/src/components/app/themes.icons.css
@@ -0,0 +1,17 @@
+.zw .i-access-full{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M4.75%2011.75C4.75%2010.6454%205.64543%209.75%206.75%209.75H17.25C18.3546%209.75%2019.25%2010.6454%2019.25%2011.75V19.25C19.25%2020.3546%2018.3546%2021.25%2017.25%2021.25H6.75C5.64543%2021.25%204.75%2020.3546%204.75%2019.25V11.75Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M12%2014V17%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M7.75%209.75V7C7.75%204.65279%209.65279%202.75%2012%202.75C14.0926%202.75%2015.832%204.26237%2016.1847%206.25371%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E")}
+.zw .i-alt-arrow-right-bold{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.25%22%20d%3D%22M9%205L15%2012L9%2019%22/%3E%3C/svg%3E")}
+.zw .i-arrow-left{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%2012H5m5.5-5.5L5%2012l5.5%205.5%22/%3E%3C/svg%3E")}
+.zw .i-arrow-right{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012h14m-5.5-5.5L19%2012l-5.5%205.5%22/%3E%3C/svg%3E")}
+.zw .i-arrow-up{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M12%2020V4m0%200l6%206m-6-6l-6%206%22/%3E%3C/svg%3E")}
+.zw .i-copy{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M6.6%2011.4c0-2.263%200-3.394.703-4.097C8.006%206.6%209.137%206.6%2011.4%206.6h4.8c2.263%200%203.394%200%204.097.703c.703.703.703%201.834.703%204.097v4.8c0%202.263%200%203.394-.703%204.097c-.703.703-1.834.703-4.097.703h-4.8c-2.263%200-3.394%200-4.097-.703C6.6%2019.594%206.6%2018.463%206.6%2016.2z%22/%3E%3Cpath%20d%3D%22M17.396%206.6c-.005-1.774-.05-2.707-.657-3.314C16.036%202.583%2014.905%202.583%2012.642%202.583h-3.6c-2.263%200-3.394%200-4.097.703c-.703.703-.703%201.834-.703%204.097v3.6c0%202.263%200%203.394.703%204.097c.433.433.996.587%201.655.635%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-folder{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207a3%203%200%200%201%203-3h2.6a2%202%200%200%201%201.6.8L12%207h6a3%203%200%200%201%203%203v7a3%203%200%200%201-3%203H6a3%203%200%200%201-3-3Z%22/%3E%3C/svg%3E")}
+.zw .i-mark-claude{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20257%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z%22/%3E%3C/svg%3E%20")}
+.zw .i-mark-grok{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%20%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20d%3D%22M0.58392448%2C14.9254204%20L0.8326%2C14.66295%20C2.004465%2C13.42985%203.1678%2C12.2082%202.45814%2C10.48105%20C1.50813%2C8.1701%202.061355%2C5.4619%203.820575%2C3.70057%20C5.6495%2C1.8709%208.3431%2C1.40957%2010.59295%2C2.336505%20C11.0907%2C2.52161%2011.5245%2C2.785025%2011.86295%2C3.02993%20L9.98425%2C3.89849%20C8.235%2C3.163775%206.23115%2C3.66355%205.0081%2C4.88809%20C3.354105%2C6.5426%203.019895%2C9.4117%204.95835%2C11.2656%20L-0.335%2C15.99995%20C-0.066496%2C15.62975%200.2538896%2C15.275934%200.58392448%2C14.9254204%20Z%20M14.0391%2C2.288155%20L16.33165%2C2.57749377e-12%20L16.20795%2C0.172288%20C14.4658%2C2.574355%2013.6153%2C3.749045%2014.29795%2C6.6879%20C14.76445%2C8.68415%2014.261%2C10.90255%2012.63545%2C12.53005%20C10.5861%2C14.58325%207.3066%2C15.0403%204.6059%2C13.19215%20L6.48885%2C12.3193%20C8.2125%2C12.99705%2010.0983%2C12.69945%2011.4536%2C11.34255%20C12.80895%2C9.9856%2013.1133%2C8.00925%2012.4321%2C6.3647%20C12.30265%2C6.05285%2011.9144%2C5.97455%2011.64275%2C6.1753%20L6.102%2C10.27035%20L14.0391%2C2.288155%20Z%22/%3E%20%3C/svg%3E%20")}
+.zw .i-mark-openai{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20260%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M239.184%20106.203a64.716%2064.716%200%200%200-5.576-53.103C219.452%2028.459%20191%2015.784%20163.213%2021.74A65.586%2065.586%200%200%200%2052.096%2045.22a64.716%2064.716%200%200%200-43.23%2031.36c-14.31%2024.602-11.061%2055.634%208.033%2076.74a64.665%2064.665%200%200%200%205.525%2053.102c14.174%2024.65%2042.644%2037.324%2070.446%2031.36a64.72%2064.72%200%200%200%2048.754%2021.744c28.481.025%2053.714-18.361%2062.414-45.481a64.767%2064.767%200%200%200%2043.229-31.36c14.137-24.558%2010.875-55.423-8.083-76.483Zm-97.56%20136.338a48.397%2048.397%200%200%201-31.105-11.255l1.535-.87%2051.67-29.825a8.595%208.595%200%200%200%204.247-7.367v-72.85l21.845%2012.636c.218.111.37.32.409.563v60.367c-.056%2026.818-21.783%2048.545-48.601%2048.601Zm-104.466-44.61a48.345%2048.345%200%200%201-5.781-32.589l1.534.921%2051.722%2029.826a8.339%208.339%200%200%200%208.441%200l63.181-36.425v25.221a.87.87%200%200%201-.358.665l-52.335%2030.184c-23.257%2013.398-52.97%205.431-66.404-17.803ZM23.549%2085.38a48.499%2048.499%200%200%201%2025.58-21.333v61.39a8.288%208.288%200%200%200%204.195%207.316l62.874%2036.272-21.845%2012.636a.819.819%200%200%201-.767%200L41.353%20151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466%2041.695-63.08-36.63L161.73%2077.86a.819.819%200%200%201%20.768%200l52.233%2030.184a48.6%2048.6%200%200%201-7.316%2087.635v-61.391a8.544%208.544%200%200%200-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39%208.39%200%200%200-8.492%200L99.98%2099.808V74.587a.716.716%200%200%201%20.307-.665l52.233-30.133a48.652%2048.652%200%200%201%2072.236%2050.391v.205ZM88.061%20139.097l-21.845-12.585a.87.87%200%200%201-.41-.614V65.685a48.652%2048.652%200%200%201%2079.757-37.346l-1.535.87-51.67%2029.825a8.595%208.595%200%200%200-4.246%207.367l-.051%2072.697Zm11.868-25.58%2028.138-16.217%2028.188%2016.218v32.434l-28.086%2016.218-28.188-16.218-.052-32.434Z%22/%3E%3C/svg%3E%20")}
+.zw .i-microphone{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Crect%20width%3D%227%22%20height%3D%2212.5%22%20x%3D%228.5%22%20y%3D%222.25%22%20rx%3D%223.5%22/%3E%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M5%2011a7%207%200%200%200%2014%200M12%2018v3.75M9%2021.75h6%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-more-horizontal{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cg%20fill%3D%22black%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%223.75%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3Ccircle%20cx%3D%2220.25%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3C/g%3E%3C/svg%3E")}
+.zw .i-plus{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22/%3E%3C/svg%3E")}
+.zw .i-pull-request{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208.5v7M18%2015.5V8.25a2%202%200%200%200-2-2h-3.5m2.25-2.25L12.5%206.25l2.25%202.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3C/svg%3E")}
+.zw .i-search{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20r%3D%226.5%22/%3E%3Cpath%20d%3D%22m15.5%2015.5%204.5%204.5%22/%3E%3C/svg%3E")}
+.zw .i-settings{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%20%20%20%3Cg%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%3Cpath%20d%3D%22M7.878%205.21415L7.17474%205.05186C6.58003%204.91462%205.95657%205.09343%205.525%205.525C5.09343%205.95657%204.91462%206.58003%205.05186%207.17474L5.21415%207.878C5.40122%208.6886%205.06696%209.53036%204.37477%209.99182L3.51965%2010.5619C3.03881%2010.8825%202.75%2011.4221%202.75%2012C2.75%2012.5779%203.03881%2013.1175%203.51965%2013.4381L4.37477%2014.0082C5.06696%2014.4696%205.40122%2015.3114%205.21415%2016.122L5.05186%2016.8253C4.91462%2017.42%205.09343%2018.0434%205.525%2018.475C5.95657%2018.9066%206.58003%2019.0854%207.17474%2018.9481L7.878%2018.7858C8.6886%2018.5988%209.53036%2018.933%209.99182%2019.6252L10.5619%2020.4804C10.8825%2020.9612%2011.4221%2021.25%2012%2021.25C12.5779%2021.25%2013.1175%2020.9612%2013.4381%2020.4804L14.0082%2019.6252C14.4696%2018.933%2015.3114%2018.5988%2016.122%2018.7858L16.8253%2018.9481C17.42%2019.0854%2018.0434%2018.9066%2018.475%2018.475C18.9066%2018.0434%2019.0854%2017.42%2018.9481%2016.8253L18.7858%2016.122C18.5988%2015.3114%2018.933%2014.4696%2019.6252%2014.0082L20.4804%2013.4381C20.9612%2013.1175%2021.25%2012.5779%2021.25%2012C21.25%2011.4221%2020.9612%2010.8825%2020.4804%2010.5619L19.6252%209.99182C18.933%209.53036%2018.5988%208.6886%2018.7858%207.878L18.9481%207.17473C19.0854%206.58003%2018.9066%205.95657%2018.475%205.525C18.0434%205.09343%2017.42%204.91462%2016.8253%205.05186L16.122%205.21415C15.3114%205.40122%2014.4696%205.06696%2014.0082%204.37477L13.4381%203.51965C13.1175%203.03881%2012.5779%202.75%2012%202.75C11.4221%202.75%2010.8825%203.03881%2010.5619%203.51965L9.99182%204.37477C9.53036%205.06696%208.6886%205.40122%207.878%205.21415Z%22/%3E%20%20%20%20%20%3Cpath%20d%3D%22M14.75%2012C14.75%2013.5188%2013.5188%2014.75%2012%2014.75C10.4812%2014.75%209.25%2013.5188%209.25%2012C9.25%2010.4812%2010.4812%209.25%2012%209.25C13.5188%209.25%2014.75%2010.4812%2014.75%2012Z%22/%3E%20%20%20%3C/g%3E%20%3C/svg%3E")}
+.zw .i-status-done{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22/%3E%3Cpath%20d%3D%22m9%2012%202%202%204-4%22/%3E%3C/svg%3E")}
\ No newline at end of file
diff --git a/apps/landing/src/components/app/themes.themes.json b/apps/landing/src/components/app/themes.themes.json
new file mode 100644
index 000000000..9328c4055
--- /dev/null
+++ b/apps/landing/src/components/app/themes.themes.json
@@ -0,0 +1,38 @@
+[
+ {
+ "id": "zeron-dark",
+ "window": "#0b0b0c",
+ "accent": "#9277b0",
+ "text": "#ededef"
+ },
+ {
+ "id": "tokyo-night",
+ "window": "#1a1b25",
+ "accent": "#7aa2f7",
+ "text": "#c0caf5"
+ },
+ {
+ "id": "catppuccin",
+ "window": "#1e1e2e",
+ "accent": "#cba6f7",
+ "text": "#cdd6f4"
+ },
+ {
+ "id": "dracula",
+ "window": "#282a35",
+ "accent": "#bd93f9",
+ "text": "#f8f8f2"
+ },
+ {
+ "id": "gruvbox",
+ "window": "#282828",
+ "accent": "#8ec07c",
+ "text": "#ebdbb2"
+ },
+ {
+ "id": "github-light",
+ "window": "#f5f5f6",
+ "accent": "#7a55c4",
+ "text": "#1b1b1d"
+ }
+]
\ No newline at end of file
diff --git a/apps/landing/src/components/app/themes.vars.css b/apps/landing/src/components/app/themes.vars.css
new file mode 100644
index 000000000..0d9eee5a6
--- /dev/null
+++ b/apps/landing/src/components/app/themes.vars.css
@@ -0,0 +1,6 @@
+.zw-themes.t0{--zw-window:rgb(11 11 12 / 0.800);--zw-code:#9277b0;--zw-wash:#221e27;--zw-text:#ededef}
+.zw-themes.t1{--zw-window:rgb(26 27 37 / 0.800);--zw-code:#7aa2f7;--zw-wash:#2b3145;--zw-text:#c0caf5}
+.zw-themes.t2{--zw-window:rgb(30 30 46 / 0.800);--zw-code:#cba6f7;--zw-wash:#38344e;--zw-text:#cdd6f4}
+.zw-themes.t3{--zw-window:rgb(40 42 53 / 0.800);--zw-code:#bd93f9;--zw-wash:#403e53;--zw-text:#f8f8f2}
+.zw-themes.t4{--zw-window:rgb(40 40 40 / 0.800);--zw-code:#8ec07c;--zw-wash:#393f36;--zw-text:#ebdbb2}
+.zw-themes.t5{--zw-window:rgb(245 245 246 / 0.722);--zw-code:#7a55c4;--zw-wash:#e6e1f0;--zw-text:#1b1b1d}
diff --git a/apps/landing/src/components/app/zw.css b/apps/landing/src/components/app/zw.css
new file mode 100644
index 000000000..f993fa467
--- /dev/null
+++ b/apps/landing/src/components/app/zw.css
@@ -0,0 +1,60 @@
+/* The recreated window: a fixed 1320 × 840 point stage. Every element is
+ placed by tools/recreate from the app's layout tree; each colour comes
+ once a theme captured (--c0, --c1, …), and the window's class (t0, t1, …)
+ says which the stage wears. Written by tools/recreate; don't edit. */
+.zw { position: relative; width: 1320px; height: 840px; overflow: hidden; background: var(--zw-window); font-family: var(--font-sans); font-size: 13px; text-align: left; -webkit-font-smoothing: antialiased; font-synthesis: none; }
+.zw > * { position: absolute; margin: 0; padding: 0; font-style: normal; }
+.zw .dot { border-radius: 50%; }
+.zw .i { -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; }
+.zw .t { white-space: nowrap; font-weight: 400; }
+.zw .m { font-family: var(--font-mono); }
+.zw .t b { font-weight: inherit; }
+.zw .p { font-size: 15px; line-height: 24px; white-space: normal; }
+.zw .p code { font-family: var(--font-mono); font-size: 13.5px; padding: 0 4px; border-radius: 4px; color: var(--zw-code); background: var(--zw-wash); }
+.zw .g svg { display: block; width: 100%; height: 100%; }
+.zw .branches { fill: none; stroke-width: 1; }
+/* A session at work: the app's dashed ring, turning. */
+.zw .working circle { fill: none; stroke-width: 1.5; stroke-dasharray: 6.4 3.6; transform-origin: 8px 8px; animation: zw-turn 2.4s linear infinite; }
+@keyframes zw-turn { to { rotate: 1turn; } }
+@media (prefers-reduced-motion: reduce) { .zw .working circle { animation: none; } }
+.zw .tl { width: 14px; height: 14px; border-radius: 50%; }
+.zw .b { background: var(--f0); }
+.zw .b.e { box-shadow: inset 0 0 0 1px var(--e0); }
+.zw .dot { background: var(--f0); }
+.zw .i { background-color: var(--c0); }
+.zw .t, .zw .t b, .zw .g { color: var(--c0); }
+.zw .branches, .zw .working circle { stroke: var(--c0); }
+.zw.t1 .b { background: var(--f1); }
+.zw.t1 .b.e { box-shadow: inset 0 0 0 1px var(--e1); }
+.zw.t1 .dot { background: var(--f1); }
+.zw.t1 .i { background-color: var(--c1); }
+.zw.t1 .t, .zw.t1 .t b, .zw.t1 .g { color: var(--c1); }
+.zw.t1 .branches, .zw.t1 .working circle { stroke: var(--c1); }
+.zw.t2 .b { background: var(--f2); }
+.zw.t2 .b.e { box-shadow: inset 0 0 0 1px var(--e2); }
+.zw.t2 .dot { background: var(--f2); }
+.zw.t2 .i { background-color: var(--c2); }
+.zw.t2 .t, .zw.t2 .t b, .zw.t2 .g { color: var(--c2); }
+.zw.t2 .branches, .zw.t2 .working circle { stroke: var(--c2); }
+.zw.t3 .b { background: var(--f3); }
+.zw.t3 .b.e { box-shadow: inset 0 0 0 1px var(--e3); }
+.zw.t3 .dot { background: var(--f3); }
+.zw.t3 .i { background-color: var(--c3); }
+.zw.t3 .t, .zw.t3 .t b, .zw.t3 .g { color: var(--c3); }
+.zw.t3 .branches, .zw.t3 .working circle { stroke: var(--c3); }
+.zw.t4 .b { background: var(--f4); }
+.zw.t4 .b.e { box-shadow: inset 0 0 0 1px var(--e4); }
+.zw.t4 .dot { background: var(--f4); }
+.zw.t4 .i { background-color: var(--c4); }
+.zw.t4 .t, .zw.t4 .t b, .zw.t4 .g { color: var(--c4); }
+.zw.t4 .branches, .zw.t4 .working circle { stroke: var(--c4); }
+.zw.t5 .b { background: var(--f5); }
+.zw.t5 .b.e { box-shadow: inset 0 0 0 1px var(--e5); }
+.zw.t5 .dot { background: var(--f5); }
+.zw.t5 .i { background-color: var(--c5); }
+.zw.t5 .t, .zw.t5 .t b, .zw.t5 .g { color: var(--c5); }
+.zw.t5 .branches, .zw.t5 .working circle { stroke: var(--c5); }
+/* The stage scales to the box it is put in. --zx, --zy, --zw, --zh name the
+ part of it shown (the whole window by default): that part fills the box. */
+.zw-fit { container-type: inline-size; aspect-ratio: var(--zw, 1320) / var(--zh, 840); overflow: hidden; }
+.zw-fit > .zw { transform-origin: 0 0; scale: tan(atan2(100cqw, var(--zw, 1320) * 1px)); transform: translate(calc(var(--zx, 0) * -1px), calc(var(--zy, 0) * -1px)); }
diff --git a/apps/landing/src/components/home/Agents.astro b/apps/landing/src/components/home/Agents.astro
new file mode 100644
index 000000000..12f7eae3b
--- /dev/null
+++ b/apps/landing/src/components/home/Agents.astro
@@ -0,0 +1,53 @@
+---
+import { AGENTS } from "../../data/agents.ts";
+import SessionWindow from "../app/SessionWindow.astro";
+import AgentMark from "../ui/AgentMark.astro";
+---
+
+
+
+
Every agent you run, in one window. Zeron works with the coding agents you already use and puts their sessions side by side.
+
+
+
+
Keep track of every session
+
See which agents have finished, which are still working and which need an answer from you, across all your projects.
+
+
+
+
+
+
Works with the agents you already use
+
Zeron runs each agent with the account and configuration it already has on your machine.
+
+
+ {AGENTS.map((agent) => {agent.name} )}
+
+
+
+
+
+
+
diff --git a/apps/landing/src/components/home/Downloads.astro b/apps/landing/src/components/home/Downloads.astro
new file mode 100644
index 000000000..4152c1835
--- /dev/null
+++ b/apps/landing/src/components/home/Downloads.astro
@@ -0,0 +1,99 @@
+---
+import { ANDROID_APK, APP_STORE, DESKTOP_BUILDS, FALLBACK_VERSION, INSTALL_COMMAND, RELEASE_NOTES_URL, type BuildId } from "../../data/releases.ts";
+import { buildUrl } from "../../lib/downloads.ts";
+import Button from "../ui/Button.astro";
+import CopyCommand from "../ui/CopyCommand.astro";
+import PlatformMark from "../ui/PlatformMark.astro";
+
+const builds = Object.entries(DESKTOP_BUILDS) as [BuildId, (typeof DESKTOP_BUILDS)[BuildId]][];
+---
+
+
+
+
+
+
Download Zeron. Free and open source for macOS, Windows, Linux, iOS and Android.
+
The latest release is .
+
+
Download
+
+
+
+
Desktop
+
+ {
+ builds.map(([id, build]) => (
+
+
+ {build.name}
+ {build.detail}
+ Download
+
+ ))
+ }
+
+
Mobile
+
+
+
+ iOS
+ iPhone · iPad
+ App Store
+
+
+
+ Android
+ arm64 · apk
+ Download
+
+
+
Server
+
+
+
Installs the headless engine on a Linux server and runs it as a background service.
+
+
+
Release notes and checksums
+
+
+
+
+
+
diff --git a/apps/landing/src/components/home/Hero.astro b/apps/landing/src/components/home/Hero.astro
new file mode 100644
index 000000000..afba141ce
--- /dev/null
+++ b/apps/landing/src/components/home/Hero.astro
@@ -0,0 +1,86 @@
+---
+import { RELEASE_NOTES_URL } from "../../data/releases.ts";
+import { SITE } from "../../data/site.ts";
+import SessionWindow from "../app/SessionWindow.astro";
+import GitHubStars from "../site/GitHubStars.astro";
+import Button from "../ui/Button.astro";
+import Icon from "../ui/Icon.astro";
+---
+
+
+
+
What’s new in Zeron
+
The agent workspace that can become anything
+
+ Zeron runs Claude Code, Codex, Cursor and your other coding agents on
+ your own machines, in one native, open source app.
+
+
+
+
+
+
+
+
diff --git a/apps/landing/src/components/home/Logos.astro b/apps/landing/src/components/home/Logos.astro
new file mode 100644
index 000000000..f997424cf
--- /dev/null
+++ b/apps/landing/src/components/home/Logos.astro
@@ -0,0 +1,24 @@
+
+
+
Used by developers from
+
+
+
+
+
diff --git a/apps/landing/src/components/home/Machines.astro b/apps/landing/src/components/home/Machines.astro
new file mode 100644
index 000000000..74b5e7386
--- /dev/null
+++ b/apps/landing/src/components/home/Machines.astro
@@ -0,0 +1,66 @@
+---
+import { INSTALL_COMMAND } from "../../data/releases.ts";
+import PhoneSession from "../app/PhoneSession.astro";
+import CopyCommand from "../ui/CopyCommand.astro";
+import Icon from "../ui/Icon.astro";
+import WorkIn from "../app/WorkIn.astro";
+---
+
+
+
+
Run agents on any of your machines. Start a session on your laptop, on a server or in the cloud, and follow it from every device you own.
+
+
+
+
Choose where each session runs
+
Start a session on this computer, on a server you have set up, or on a Zeron Cloud machine created for it.
+
+
+
+
+
+
Follow along from your phone
+
Open any running session on iOS or Android to read its progress, answer its questions and send new instructions.
+
+
+
+
+
+
+
+
+
+ Local by default
+ Zeron needs no account and no network connection. Your sessions stay on your computer unless you turn on sync.
+
+
+
+ Runs on a server
+ Install the headless engine on a Linux server to keep agents running after you close your laptop.
+
+
+
+
+ Zeron Cloud
+ Give a session its own hosted machine, which sleeps while the session is idle.
+
+
+
+
+
+
diff --git a/apps/landing/src/components/home/Review.astro b/apps/landing/src/components/home/Review.astro
new file mode 100644
index 000000000..cc8193985
--- /dev/null
+++ b/apps/landing/src/components/home/Review.astro
@@ -0,0 +1,34 @@
+---
+import ChartReply from "../app/ChartReply.astro";
+import SessionWindow from "../app/SessionWindow.astro";
+---
+
+
+
+
Review the work without leaving the conversation. See what an agent changed and what it found, and commit from the same window.
+
+
+
+
Review changes as they are made
+
Read the diff of every file an agent touches, stage the changes you want and commit them from the session.
+
+
+
+
+
+
Get answers as charts and tables
+
Agents can reply with charts, tables and diagrams, which Zeron draws natively in your theme.
+
+
+
+
+
+
+
+
diff --git a/apps/landing/src/components/home/Voices.astro b/apps/landing/src/components/home/Voices.astro
new file mode 100644
index 000000000..aae438a52
--- /dev/null
+++ b/apps/landing/src/components/home/Voices.astro
@@ -0,0 +1,73 @@
+---
+import { Image } from "astro:assets";
+import { LEAD_VOICE, VOICES } from "../../data/voices.ts";
+---
+
+
+
+
diff --git a/apps/landing/src/components/home/Yours.astro b/apps/landing/src/components/home/Yours.astro
new file mode 100644
index 000000000..7e32cf572
--- /dev/null
+++ b/apps/landing/src/components/home/Yours.astro
@@ -0,0 +1,111 @@
+---
+// The app in each of its themes, with its frosted glass window over a
+// desktop. The window is the generated recreation (ThemesWindow); the list
+// beside it is what tools/recreate captured (themes.themes.json).
+import desktop from "../../assets/desktop.webp";
+import ThemesWindow from "../app/ThemesWindow.astro";
+import themes from "../app/themes.themes.json";
+import Icon from "../ui/Icon.astro";
+
+const NAMES: Record = { "zeron-dark": "Zeron", "tokyo-night": "Tokyo Night", catppuccin: "Catppuccin", dracula: "Dracula", gruvbox: "Gruvbox", "github-light": "GitHub Light" };
+---
+
+
+
+
Make it your own. Change how Zeron looks with themes, and what it can do with plugins.
+
+
+
+
+
Pick a theme
+
Zeron comes with themes for light and dark, and its window is frosted glass, so your desktop shows through it.
+
+
+ {
+ themes.map((theme, index) => (
+
+
+ {NAMES[theme.id] ?? theme.id}
+
+ ))
+ }
+
+
+
+
+
+
+
+
+
+
+ Plugins
+ Add panels, commands and status lines to Zeron, or ask an agent to write a plugin for you.
+
+
+
+ VS Code themes
+ Import any VS Code theme, including its syntax and terminal colours.
+
+
+
+ Scenes
+ Put artwork behind new chats that moves with your pointer.
+
+
+
+
+
+
+
+
diff --git a/apps/landing/src/components/site/Footer.astro b/apps/landing/src/components/site/Footer.astro
new file mode 100644
index 000000000..6fb6f590c
--- /dev/null
+++ b/apps/landing/src/components/site/Footer.astro
@@ -0,0 +1,49 @@
+---
+import { RELEASE_NOTES_URL } from "../../data/releases.ts";
+import { SITE } from "../../data/site.ts";
+import Mark from "../ui/Mark.astro";
+
+const columns = [
+ { name: "Product", links: [["Release notes", RELEASE_NOTES_URL], ["Architecture", "https://github.com/zeronsh/zeron/blob/main/ARCHITECTURE.md"]] },
+ { name: "Community", links: [["GitHub", SITE.github], ["Discord", SITE.discord], ["Sponsor", SITE.sponsor]] },
+ { name: "Legal", links: [["Privacy", "/privacy"], ["MIT License", SITE.license]] },
+];
+---
+
+
+
+
diff --git a/apps/landing/src/components/site/GitHubStars.astro b/apps/landing/src/components/site/GitHubStars.astro
new file mode 100644
index 000000000..6d5450c78
--- /dev/null
+++ b/apps/landing/src/components/site/GitHubStars.astro
@@ -0,0 +1,43 @@
+---
+// The repository's star count, filled in by the browser and cached for an
+// hour so repeat visits stay under GitHub's unauthenticated rate limit.
+import { SITE } from "../../data/site.ts";
+---
+
+
+
+
+
+
diff --git a/apps/landing/src/components/site/Nav.astro b/apps/landing/src/components/site/Nav.astro
new file mode 100644
index 000000000..99adaf978
--- /dev/null
+++ b/apps/landing/src/components/site/Nav.astro
@@ -0,0 +1,50 @@
+---
+import { SITE } from "../../data/site.ts";
+import Button from "../ui/Button.astro";
+import Mark from "../ui/Mark.astro";
+import GitHubStars from "./GitHubStars.astro";
+
+interface Props {
+ /** Where "Download" goes before the script points it at a build. */
+ downloads?: string;
+}
+const { downloads = "#downloads" } = Astro.props;
+---
+
+
+
+
diff --git a/apps/landing/src/components/ui/AgentMark.astro b/apps/landing/src/components/ui/AgentMark.astro
new file mode 100644
index 000000000..a8a94bf8b
--- /dev/null
+++ b/apps/landing/src/components/ui/AgentMark.astro
@@ -0,0 +1,30 @@
+---
+import type { AgentMark } from "../../data/agents.ts";
+
+interface Props {
+ mark: AgentMark;
+}
+---
+
+
+
+
diff --git a/apps/landing/src/components/ui/Button.astro b/apps/landing/src/components/ui/Button.astro
new file mode 100644
index 000000000..33db5f974
--- /dev/null
+++ b/apps/landing/src/components/ui/Button.astro
@@ -0,0 +1,55 @@
+---
+// The app's buttons (apps/zgx/ui/ds/button.luau): the same tones, heights
+// and corners, as links.
+import type { HTMLAttributes } from "astro/types";
+
+interface Props extends HTMLAttributes<"a"> {
+ tone?: "primary" | "secondary" | "ghost";
+ size?: "sm" | "md" | "lg";
+}
+const { tone = "primary", size = "md", class: className, ...rest } = Astro.props;
+---
+
+
+
+
diff --git a/apps/landing/src/components/ui/CopyCommand.astro b/apps/landing/src/components/ui/CopyCommand.astro
new file mode 100644
index 000000000..87105dd60
--- /dev/null
+++ b/apps/landing/src/components/ui/CopyCommand.astro
@@ -0,0 +1,68 @@
+---
+// A shell command with a button that copies it.
+interface Props {
+ command: string;
+}
+const { command } = Astro.props;
+---
+
+
+
$ {command}
+
+
+ Copy
+
+
+
+
+
+
diff --git a/apps/landing/src/components/ui/Icon.astro b/apps/landing/src/components/ui/Icon.astro
new file mode 100644
index 000000000..4a1ea2aca
--- /dev/null
+++ b/apps/landing/src/components/ui/Icon.astro
@@ -0,0 +1,18 @@
+---
+// One of the app's own icons (apps/zgx/ui/ds/icon_svgs.luau; the ones the
+// site uses are copied to src/data/icons.json), in the text's colour.
+import icons from "../../data/icons.json";
+
+interface Props {
+ name: keyof typeof icons;
+ size?: number;
+}
+const { name, size = 16 } = Astro.props;
+---
+
+
+
+
diff --git a/apps/landing/src/components/ui/Mark.astro b/apps/landing/src/components/ui/Mark.astro
new file mode 100644
index 000000000..b4d4936df
--- /dev/null
+++ b/apps/landing/src/components/ui/Mark.astro
@@ -0,0 +1,25 @@
+---
+// Zeron's mark: twelve cells of a 5 × 3 grid. Drawn from rects so it takes
+// the colour of the text around it.
+interface Props {
+ class?: string;
+}
+const cells = [
+ [0, 0], [1, 0], [2, 0], [4, 0],
+ [0, 1], [1, 1], [3, 1], [4, 1],
+ [0, 2], [2, 2], [3, 2], [4, 2],
+];
+---
+
+
+ {cells.map(([x, y]) => )}
+
+
+
diff --git a/apps/landing/src/components/ui/PlatformMark.astro b/apps/landing/src/components/ui/PlatformMark.astro
new file mode 100644
index 000000000..245335b32
--- /dev/null
+++ b/apps/landing/src/components/ui/PlatformMark.astro
@@ -0,0 +1,25 @@
+---
+import type { Platform } from "../../data/releases.ts";
+
+interface Props {
+ platform: Platform;
+}
+---
+
+
+
+
diff --git a/apps/landing/src/data/agents.ts b/apps/landing/src/data/agents.ts
new file mode 100644
index 000000000..8084d2f05
--- /dev/null
+++ b/apps/landing/src/data/agents.ts
@@ -0,0 +1,15 @@
+// The agents Zeron runs. `mark` names a file in src/assets/agents, drawn as
+// a mask so it takes the colour of the text around it.
+export const AGENTS = [
+ { mark: "claude", name: "Claude Code" },
+ { mark: "openai", name: "Codex" },
+ { mark: "cursor", name: "Cursor" },
+ { mark: "opencode", name: "OpenCode" },
+ { mark: "antigravity", name: "Antigravity" },
+ { mark: "devin", name: "Devin" },
+ { mark: "grok", name: "Grok" },
+ { mark: "hermes", name: "Hermes" },
+ { mark: "pi", name: "Pi" },
+] as const;
+
+export type AgentMark = (typeof AGENTS)[number]["mark"];
diff --git a/apps/landing/src/data/icons.json b/apps/landing/src/data/icons.json
new file mode 100644
index 000000000..e8c337032
--- /dev/null
+++ b/apps/landing/src/data/icons.json
@@ -0,0 +1,33 @@
+{
+ "file-diff": " ",
+ "terminal": " ",
+ "git-commit": " ",
+ "folder-with-files": " ",
+ "global": " ",
+ "side-chat": " ",
+ "laptop": " ",
+ "remote-server": " ",
+ "cloud": " ",
+ "smartphone": " ",
+ "palette": " ",
+ "plug-circle": " ",
+ "monitor": " ",
+ "lock-keyhole-unlocked": " ",
+ "shield-check": " ",
+ "arrow-up-right": " ",
+ "alt-arrow-right": " ",
+ "download": " ",
+ "star": " ",
+ "copy": " ",
+ "check": " ",
+ "git-branch": " ",
+ "wifi-off": " ",
+ "worktree": " ",
+ "search": " ",
+ "access-full": " ",
+ "microphone": " ",
+ "plus": " ",
+ "arrow-up": " ",
+ "alt-arrow-right-bold": " ",
+ "gallery": " "
+}
diff --git a/apps/landing/src/data/releases.ts b/apps/landing/src/data/releases.ts
new file mode 100644
index 000000000..629e4c6f9
--- /dev/null
+++ b/apps/landing/src/data/releases.ts
@@ -0,0 +1,39 @@
+// Where Zeron is downloaded from. One list feeds the downloads table, the
+// download buttons and the script that points them at the latest release.
+
+export const RELEASES_URL = "https://zeron.sh/releases/";
+export const RELEASE_NOTES_URL = "https://github.com/zeronsh/zeron/releases/latest";
+export const INSTALL_COMMAND = "curl -fsSL https://zeron.sh/install.sh | sh";
+
+/** Links use this version until `latest.txt` answers, and when it can't.
+ * 0.2.97 is the first release with the Windows installer. */
+export const FALLBACK_VERSION = "0.2.97";
+
+export type Platform = "macos" | "windows" | "linux" | "ios" | "android";
+
+export interface DesktopBuild {
+ platform: Platform;
+ name: string;
+ /** What the downloads table says beside the name. */
+ detail: string;
+ /** The file name after `zeron--`. */
+ file: string;
+ /** The main button's words when this build is the visitor's. */
+ label: string;
+ /** Its tooltip and accessible detail. */
+ hint: string;
+}
+
+export const DESKTOP_BUILDS = {
+ macos: { platform: "macos", name: "macOS", detail: "Apple silicon · dmg", file: "macos-arm64.dmg", label: "Download for macOS", hint: "Apple silicon" },
+ windows: { platform: "windows", name: "Windows", detail: "x64 · installer", file: "windows-x86_64-setup.exe", label: "Download for Windows", hint: "Windows x64 · Installer" },
+ "windows-portable": { platform: "windows", name: "Windows", detail: "x64 · portable zip", file: "windows-x86_64.zip", label: "Download for Windows", hint: "Windows x64 · Portable ZIP" },
+ linux: { platform: "linux", name: "Linux", detail: "x64 · tar.gz", file: "linux-x86_64.tar.gz", label: "Download for Linux", hint: "Linux x64" },
+ "linux-arm": { platform: "linux", name: "Linux", detail: "arm64 · tar.gz", file: "linux-aarch64.tar.gz", label: "Download for Linux", hint: "Linux ARM64" },
+} as const satisfies Record;
+
+export type BuildId = keyof typeof DESKTOP_BUILDS;
+
+/** Android builds publish on every change under one stable name. */
+export const ANDROID_APK = `${RELEASES_URL}zeron-android-arm64.apk`;
+export const APP_STORE = "https://apps.apple.com/us/app/zeron-coding-agents/id6803187897";
diff --git a/apps/landing/src/data/site.ts b/apps/landing/src/data/site.ts
new file mode 100644
index 000000000..3c94536d9
--- /dev/null
+++ b/apps/landing/src/data/site.ts
@@ -0,0 +1,12 @@
+export const SITE = {
+ name: "Zeron",
+ title: "Zeron: the open source workspace for your coding agents",
+ description:
+ "Zeron runs Claude Code, Codex, Cursor and other coding agents on your own machines, in one native app you can pick up from any device.",
+ github: "https://github.com/zeronsh/zeron",
+ githubApi: "https://api.github.com/repos/zeronsh/zeron",
+ discord: "https://discord.gg/rnynTdgZ24",
+ sponsor: "https://github.com/sponsors/zeronsh",
+ license: "https://github.com/zeronsh/zeron/blob/main/LICENSE",
+ company: "1499487 B.C. LTD.",
+} as const;
diff --git a/apps/landing/src/data/voices.ts b/apps/landing/src/data/voices.ts
new file mode 100644
index 000000000..9ace81cdb
--- /dev/null
+++ b/apps/landing/src/data/voices.ts
@@ -0,0 +1,70 @@
+// What people have posted about Zeron, in their own words and spelling.
+import type { ImageMetadata } from "astro";
+import afortunado from "../assets/voices/afortunado124.jpg";
+import dev from "../assets/voices/dev_shekhawat.jpg";
+import franco from "../assets/voices/francoe114696.jpg";
+import leander from "../assets/voices/leanderriefel.jpg";
+import sahil from "../assets/voices/sahilcodex.jpg";
+import seis from "../assets/voices/stlaurentgod.jpg";
+import adam from "../assets/voices/thecto.jpg";
+
+export interface Voice {
+ text: string;
+ name: string;
+ handle: string;
+ url: string;
+ avatar: ImageMetadata;
+}
+
+export const LEAD_VOICE: Voice = {
+ text: "Oh man, this is the best UI I’ve ever tried! For real. It feels really smooth. Typing, reading, everything. Really fast. Right now it’s my main UI for coding.",
+ name: "Fran Escob",
+ handle: "@FrancoE114696",
+ url: "https://x.com/FrancoE114696/status/2102551301871501508",
+ avatar: franco,
+};
+
+export const VOICES: Voice[] = [
+ {
+ text: "I’m getting emotional seeing a UI so buttery smooth in performance after using the Codex App on Windows all day.",
+ name: "Leander",
+ handle: "@leanderriefel",
+ url: "https://x.com/leanderriefel/status/2088396806396809544",
+ avatar: leander,
+ },
+ {
+ text: "bro i tested it all night, and it feels so good, congratulations i have a new daily driver, excelent taste",
+ name: "af0r",
+ handle: "@afOrtunado124",
+ url: "https://x.com/afOrtunado124/status/2102727775991869480",
+ avatar: afortunado,
+ },
+ {
+ text: "if Zed & Cursor had a baby",
+ name: "adam",
+ handle: "@theCTO",
+ url: "https://x.com/theCTO/status/2088337024868889064",
+ avatar: adam,
+ },
+ {
+ text: "best thing to happen to my agents this past week ✨",
+ name: "seis dios ☽",
+ handle: "@stlaurentgod",
+ url: "https://x.com/stlaurentgod/status/2102509074097258904",
+ avatar: seis,
+ },
+ {
+ text: "This feels refreshing! already loving it",
+ name: "Dev",
+ handle: "@dev_shekhawat",
+ url: "https://x.com/dev_shekhawat/status/2102533565590462728",
+ avatar: dev,
+ },
+ {
+ text: "one of the best app i have ever used",
+ name: "丂ムんノレ",
+ handle: "@sahilcodex",
+ url: "https://x.com/sahilcodex/status/2102602368512860598",
+ avatar: sahil,
+ },
+];
diff --git a/apps/landing/src/layouts/Base.astro b/apps/landing/src/layouts/Base.astro
new file mode 100644
index 000000000..287b69851
--- /dev/null
+++ b/apps/landing/src/layouts/Base.astro
@@ -0,0 +1,67 @@
+---
+import { Font } from "astro:assets";
+import Footer from "../components/site/Footer.astro";
+import Nav from "../components/site/Nav.astro";
+import { SITE } from "../data/site.ts";
+import "../styles/global.css";
+
+interface Props {
+ title?: string;
+ description?: string;
+ /** Where the nav's Download goes on this page. */
+ downloads?: string;
+ /** The landing page counts its own views (public/telemetry.js). */
+ telemetry?: boolean;
+}
+const { title = SITE.title, description = SITE.description, downloads, telemetry = false } = Astro.props;
+const canonical = new URL(Astro.url.pathname, Astro.site);
+const image = new URL("/assets/og.png", Astro.site);
+---
+
+
+
+
+
+
+ {title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {telemetry && }
+
+
+
+
+
+
+
+
diff --git a/apps/landing/src/lib/downloads.test.ts b/apps/landing/src/lib/downloads.test.ts
new file mode 100644
index 000000000..007920498
--- /dev/null
+++ b/apps/landing/src/lib/downloads.test.ts
@@ -0,0 +1,51 @@
+import { describe, expect, test } from "vitest";
+import { ANDROID_APK } from "../data/releases.ts";
+import { acceptVersion, buildUrl, detectTarget, targetUrl } from "./downloads.ts";
+
+describe("detectTarget", () => {
+ test.each([
+ [{ platform: "MacIntel", userAgent: "Macintosh" }, "macos"],
+ [{ platform: "Win32", userAgent: "Windows NT" }, "windows"],
+ [{ platform: "Linux x86_64", userAgent: "Linux" }, "linux"],
+ [{ platform: "Linux aarch64", userAgent: "Linux" }, "linux-arm"],
+ [{ userAgentData: { platform: "macOS" } }, "macos"],
+ ])("desktop %j", (client, build) => {
+ expect(detectTarget(client)).toEqual({ kind: "desktop", build });
+ });
+
+ test.each([
+ [{ platform: "Linux armv8l", userAgent: "Mozilla/5.0 (Linux; Android 16; Pixel 9)" }],
+ [{ platform: "Linux", userAgent: "Android" }],
+ ])("android %j", (client) => {
+ expect(detectTarget(client)).toEqual({ kind: "android" });
+ });
+
+ test.each([[{ platform: "MacIntel", maxTouchPoints: 5 }], [{ platform: "iPhone" }], [{ userAgent: "Mozilla/5.0 (iPad)" }], [{}]])(
+ "a phone, a tablet or an unknown system keeps the table: %j",
+ (client) => {
+ expect(detectTarget(client)).toEqual({ kind: "table" });
+ },
+ );
+});
+
+describe("urls", () => {
+ test("a desktop build's file under the release", () => {
+ expect(buildUrl("0.2.98", "windows")).toBe("https://zeron.sh/releases/zeron-0.2.98-windows-x86_64-setup.exe");
+ expect(targetUrl({ kind: "desktop", build: "linux-arm" }, "1.0.0")).toBe("https://zeron.sh/releases/zeron-1.0.0-linux-aarch64.tar.gz");
+ });
+ test("android has one stable file; the table has none", () => {
+ expect(targetUrl({ kind: "android" }, "0.2.98")).toBe(ANDROID_APK);
+ expect(targetUrl({ kind: "table" }, "0.2.98")).toBeNull();
+ });
+});
+
+describe("acceptVersion", () => {
+ test("takes a newer or equal release", () => {
+ expect(acceptVersion("0.3.7\n", "0.2.97")).toBe("0.3.7");
+ expect(acceptVersion("0.2.97", "0.2.97")).toBe("0.2.97");
+ expect(acceptVersion("1.0.0", "0.9.99")).toBe("1.0.0");
+ });
+ test.each(["", "0.2.96", "", "0.3", "v0.3.7", "0.3.7-beta"])("refuses %j", (text) => {
+ expect(acceptVersion(text, "0.2.97")).toBeNull();
+ });
+});
diff --git a/apps/landing/src/lib/downloads.ts b/apps/landing/src/lib/downloads.ts
new file mode 100644
index 000000000..6c5e974b7
--- /dev/null
+++ b/apps/landing/src/lib/downloads.ts
@@ -0,0 +1,54 @@
+// Which build a visitor should be offered, and where it lives. No DOM here:
+// src/scripts/downloads.ts applies these to the page.
+
+import { ANDROID_APK, DESKTOP_BUILDS, FALLBACK_VERSION, RELEASES_URL, type BuildId } from "../data/releases.ts";
+
+/** The parts of `navigator` that say what a visitor is running. */
+export interface Client {
+ userAgent?: string;
+ platform?: string;
+ maxTouchPoints?: number;
+ userAgentData?: { platform?: string; mobile?: boolean };
+}
+
+export type Target =
+ | { kind: "desktop"; build: BuildId }
+ | { kind: "android" }
+ /** A phone or tablet with no direct download, or a system we can't name:
+ * the buttons keep pointing at the downloads table. */
+ | { kind: "table" };
+
+export function detectTarget(client: Client): Target {
+ const ua = client.userAgent ?? "";
+ const platform = client.userAgentData?.platform || client.platform || "";
+ if (/Android/i.test(ua) || /Android/i.test(platform)) return { kind: "android" };
+ // An iPad reports itself as a Mac with a touch screen.
+ const mobile = /iPhone|iPad|iPod/i.test(ua) || client.userAgentData?.mobile === true || (/Mac/i.test(platform) && (client.maxTouchPoints ?? 0) > 1);
+ if (mobile) return { kind: "table" };
+ if (/Win/i.test(platform)) return { kind: "desktop", build: "windows" };
+ if (/Mac/i.test(platform)) return { kind: "desktop", build: "macos" };
+ if (/Linux/i.test(platform)) return { kind: "desktop", build: /aarch64|arm64/i.test(`${platform} ${ua}`) ? "linux-arm" : "linux" };
+ return { kind: "table" };
+}
+
+export function buildUrl(version: string, build: BuildId): string {
+ return `${RELEASES_URL}zeron-${version}-${DESKTOP_BUILDS[build].file}`;
+}
+
+export function targetUrl(target: Target, version: string): string | null {
+ if (target.kind === "desktop") return buildUrl(version, target.build);
+ return target.kind === "android" ? ANDROID_APK : null;
+}
+
+/** `latest.txt`'s answer as a version to link to, or null when it isn't one
+ * or is older than the fallback (a stale cache must not roll links back). */
+export function acceptVersion(text: string, floor: string = FALLBACK_VERSION): string | null {
+ const version = text.trim();
+ if (!/^\d+\.\d+\.\d+$/.test(version)) return null;
+ const a = version.split(".").map(Number);
+ const b = floor.split(".").map(Number);
+ for (let i = 0; i < 3; i++) {
+ if (a[i]! !== b[i]!) return a[i]! > b[i]! ? version : null;
+ }
+ return version;
+}
diff --git a/apps/landing/src/pages/404.astro b/apps/landing/src/pages/404.astro
new file mode 100644
index 000000000..b39960afe
--- /dev/null
+++ b/apps/landing/src/pages/404.astro
@@ -0,0 +1,18 @@
+---
+import Button from "../components/ui/Button.astro";
+import Base from "../layouts/Base.astro";
+---
+
+
+
+
There is no page here
+
The link may be old, or the address mistyped.
+
Back to zeron.sh
+
+
+
+
diff --git a/apps/landing/src/pages/index.astro b/apps/landing/src/pages/index.astro
new file mode 100644
index 000000000..e32c821e6
--- /dev/null
+++ b/apps/landing/src/pages/index.astro
@@ -0,0 +1,22 @@
+---
+import Agents from "../components/home/Agents.astro";
+import Downloads from "../components/home/Downloads.astro";
+import Hero from "../components/home/Hero.astro";
+import Logos from "../components/home/Logos.astro";
+import Machines from "../components/home/Machines.astro";
+import Review from "../components/home/Review.astro";
+import Voices from "../components/home/Voices.astro";
+import Yours from "../components/home/Yours.astro";
+import Base from "../layouts/Base.astro";
+---
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/landing/public/privacy.html b/apps/landing/src/pages/privacy.astro
similarity index 68%
rename from apps/landing/public/privacy.html
rename to apps/landing/src/pages/privacy.astro
index 856776218..65755ab38 100644
--- a/apps/landing/public/privacy.html
+++ b/apps/landing/src/pages/privacy.astro
@@ -1,109 +1,9 @@
-
-
-
-
-
-Privacy Policy — Zeron
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
Privacy Policy
Effective October 26, 2026
@@ -300,14 +200,5 @@
1499487 B.C. LTD., British Columbia, Canada
sina@zeron.sh
-
-
-
-
-
-
+
+
diff --git a/apps/landing/src/scripts/downloads.ts b/apps/landing/src/scripts/downloads.ts
new file mode 100644
index 000000000..dd571e27d
--- /dev/null
+++ b/apps/landing/src/scripts/downloads.ts
@@ -0,0 +1,47 @@
+// Points the page's download links at the latest release, and its main
+// buttons at the visitor's own build. The HTML already links every build at
+// the fallback version, so nothing here is needed for a download to work.
+//
+// [data-build=""] a row of the downloads table
+// [data-download] a main button; "long" takes the build's label
+// [data-release-version] shows the latest version once it is known
+
+import { DESKTOP_BUILDS, FALLBACK_VERSION, RELEASES_URL, type BuildId } from "../data/releases.ts";
+import { acceptVersion, buildUrl, detectTarget, targetUrl } from "../lib/downloads.ts";
+
+const target = detectTarget(navigator);
+
+function apply(version: string): void {
+ for (const link of document.querySelectorAll("[data-build]")) {
+ const id = link.dataset.build as BuildId;
+ if (id in DESKTOP_BUILDS) link.href = buildUrl(version, id);
+ }
+ const url = targetUrl(target, version);
+ if (!url) return;
+ const words =
+ target.kind === "desktop"
+ ? { os: target.build, label: DESKTOP_BUILDS[target.build].label, hint: DESKTOP_BUILDS[target.build].hint }
+ : { os: "android", label: "Download for Android", hint: "arm64 APK" };
+ for (const link of document.querySelectorAll("[data-download]")) {
+ link.href = url;
+ link.dataset.os = words.os;
+ link.title = words.hint;
+ link.setAttribute("aria-label", `${words.label} (${words.hint})`);
+ const text = link.querySelector("[data-download-label]");
+ if (text && link.dataset.download === "long") text.textContent = words.label;
+ }
+}
+
+apply(FALLBACK_VERSION);
+fetch(`${RELEASES_URL}latest.txt`, { credentials: "omit" })
+ .then((response) => (response.ok ? response.text() : Promise.reject()))
+ .then((text) => {
+ const version = acceptVersion(text);
+ if (!version) return;
+ apply(version);
+ for (const el of document.querySelectorAll("[data-release-version]")) {
+ el.textContent = version;
+ el.hidden = false;
+ }
+ })
+ .catch(() => {});
diff --git a/apps/landing/src/styles/global.css b/apps/landing/src/styles/global.css
new file mode 100644
index 000000000..9600c229c
--- /dev/null
+++ b/apps/landing/src/styles/global.css
@@ -0,0 +1,241 @@
+/* zeron.sh wears the app's own dark theme. Every colour, radius and control
+ size here is a token from apps/zgx/ui/ds/themes/zeron-dark.json, so the
+ site and the window pictured on it are one design. Change them there
+ first. Fonts come from astro.config.mjs (Geist and Geist Mono, the app's). */
+
+:root {
+ color-scheme: dark;
+
+ --window: #0e0e10;
+ /* The page sits a step under the app's window, so a window on it reads as lifted. */
+ --page-bg: #08080a;
+ --glass-tint: #0d0d0dcc;
+ --surface: #ffffff08;
+ --surface-raised: #ffffff0f;
+ --text: #ededef;
+ /* Muted text is the primary at less opacity, as in the app: it takes the
+ colour of whatever is behind it. */
+ --text-2: rgb(237 237 239 / 0.64);
+ --text-3: rgb(237 237 239 / 0.46);
+ --border: #ffffff12;
+ --border-subtle: #ffffff0a;
+ --border-strong: #ffffff2e;
+ --line: rgb(255 255 255 / 0.08);
+ --line-strong: rgb(255 255 255 / 0.16);
+ --accent: #9277b0;
+ --accent-soft: #b9a3d2;
+ --hover: #ffffff0d;
+ --selected: #ffffff1a;
+ --success: #34d399;
+
+ --primary-bg: #ececee;
+ --primary-hover: #ffffff;
+ --primary-active: #d2d2d7;
+ --primary-text: #0b0b0c;
+ --secondary-bg: #ffffff14;
+ --secondary-hover: #ffffff1f;
+ --secondary-active: #ffffff29;
+
+ --radius-sm: 4px;
+ --radius-md: 6px;
+ --radius-lg: 8px;
+ --radius-xl: 12px;
+
+ --sans: var(--font-sans);
+ --mono: var(--font-mono);
+
+ --gutter: clamp(20px, 4vw, 40px);
+ --page: 1200px;
+ --nav-height: 60px;
+ --section: clamp(88px, 11vw, 152px);
+}
+
+*, *::before, *::after { box-sizing: border-box; }
+* { margin: 0; padding: 0; }
+html {
+ background: var(--page-bg);
+ scroll-behavior: smooth;
+ scroll-padding-top: 32px;
+ -webkit-text-size-adjust: 100%;
+ text-size-adjust: 100%;
+}
+body {
+ min-height: 100vh;
+ font-family: var(--sans);
+ font-size: 16px;
+ line-height: 1.6;
+ color: var(--text);
+ background: var(--page-bg);
+ font-synthesis: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ overflow-x: clip;
+}
+::selection { background: color-mix(in srgb, var(--accent) 60%, transparent); color: #fff; }
+a { color: inherit; text-decoration: none; }
+img, svg, picture { display: block; max-width: 100%; }
+img { height: auto; }
+ul, ol { list-style: none; }
+button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
+code, pre, kbd { font-family: var(--mono); }
+:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 3px; border-radius: var(--radius-sm); }
+@media (prefers-reduced-motion: reduce) {
+ html { scroll-behavior: auto; }
+}
+
+.wrap {
+ width: 100%;
+ max-width: calc(var(--page) + 2 * var(--gutter));
+ margin-inline: auto;
+ padding-inline: var(--gutter);
+}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ overflow: hidden;
+ clip-path: inset(50%);
+ white-space: nowrap;
+}
+
+/* Type: the app's styles, at a page's sizes. */
+h1, h2, h3 { font-weight: 600; text-wrap: balance; }
+h2 {
+ font-size: clamp(28px, 3.2vw, 40px);
+ line-height: 1.12;
+ letter-spacing: -0.025em;
+}
+h3 { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
+.lead {
+ font-size: clamp(17px, 1.45vw, 19px);
+ line-height: 1.55;
+ color: var(--text-2);
+ text-wrap: pretty;
+}
+.muted { color: var(--text-2); }
+.faint { color: var(--text-3); }
+
+.section { padding-top: var(--section); }
+
+/* A section opens with a statement: its first sentence in ink, the rest quiet. */
+.statement {
+ max-width: 21em;
+ font-size: clamp(24px, 2.9vw, 38px);
+ font-weight: 550;
+ line-height: 1.18;
+ letter-spacing: -0.028em;
+ color: var(--text-3);
+ text-wrap: pretty;
+}
+.statement b { font-weight: inherit; color: var(--text); }
+
+/* Cards. One line colour for everything inside the page: a card's ring and
+ every divider in it are --line, and the ring is drawn above the card's
+ content, so nothing a card holds can paint over its edge or its corners. */
+.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: clamp(36px, 5vw, 64px); }
+.bento + .also { margin-top: 40px; }
+/* Under a section's cards, what else there is to say: three columns under one rule, without boxes. */
+.also { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; padding-top: 36px; border-top: 1px solid var(--line); }
+.also li { color: var(--text-2); }
+.also h3 { margin-top: 14px; font-size: 16px; font-weight: 550; color: var(--text); }
+.also p { margin: 6px 0 0; max-width: 26em; font-size: 15px; line-height: 1.5; text-wrap: pretty; }
+.also .command { margin-top: 16px; }
+.also .command code { font-size: 12px; }
+@media (max-width: 800px) {
+ .also { grid-template-columns: minmax(0, 1fr); }
+}
+.card {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ isolation: isolate;
+ background: linear-gradient(180deg, #111113 0%, #0b0b0d 100%);
+ border-radius: 16px;
+}
+.card::after {
+ content: "";
+ position: absolute;
+ inset: 0;
+ z-index: 5;
+ border-radius: inherit;
+ box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 0 rgb(255 255 255 / 0.03);
+ pointer-events: none;
+ transition: box-shadow 0.25s;
+}
+.card:hover::after { box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 0 0 rgb(255 255 255 / 0.03); }
+.card-copy { padding: 28px 28px 0; }
+.card-copy h3 { font-size: 18px; font-weight: 550; letter-spacing: -0.02em; }
+.card-copy p { margin-top: 6px; max-width: 29em; font-size: 15px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
+/* What a card shows sits at its foot, under the words. */
+.card-visual { margin-top: auto; padding-top: 28px; }
+.card-visual.flush > * { border-top: 1px solid var(--line); }
+.span-12 { grid-column: span 12; }
+.span-7 { grid-column: span 7; }
+.span-6 { grid-column: span 6; }
+.span-5 { grid-column: span 5; }
+.span-4 { grid-column: span 4; }
+@media (max-width: 900px) {
+ .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
+}
+/* A piece of the app inside a card: set in from the left under the words,
+ running off the card to the right and below, dissolving before the edge.
+ It leans out a little under the pointer. */
+.piece {
+ margin-left: 28px;
+ border-radius: 10px 0 0 0;
+ overflow: hidden;
+ box-shadow: 0 0 0 1px var(--line);
+ -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 99%), linear-gradient(to right, #000 80%, transparent 99.5%);
+ mask-image: linear-gradient(to bottom, #000 60%, transparent 99%), linear-gradient(to right, #000 80%, transparent 99.5%);
+ -webkit-mask-composite: source-in;
+ mask-composite: intersect;
+ transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
+}
+/* A piece that isn't faded: it is cut by the card's own edge (one with a light theme in it, which a fade would turn to a glow). */
+.piece.plain { -webkit-mask-image: none; mask-image: none; }
+/* A piece shown whole: set in on every side, all four corners. */
+.piece.whole { margin: 0 28px 28px; border-radius: 12px; -webkit-mask-image: none; mask-image: none; }
+@media (hover: hover) and (prefers-reduced-motion: no-preference) {
+ .card:hover .piece { translate: -6px -6px; }
+}
+
+/* Parts of the page rise in as they are reached (the script in Base arms this). */
+@media (prefers-reduced-motion: no-preference) {
+ .js [data-reveal] { opacity: 0; translate: 0 20px; filter: blur(6px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.8s; transition-delay: calc(var(--i, 0) * 90ms); }
+ .js [data-reveal].is-in { opacity: 1; translate: none; filter: none; }
+ .bento > :nth-child(2) { --i: 1; }
+ .bento > :nth-child(3) { --i: 2; }
+}
+
+/* The page arrives in order: each part rises out of a blur, a beat after the last. */
+@media (prefers-reduced-motion: no-preference) {
+ .rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
+ @keyframes rise {
+ from { opacity: 0; filter: blur(8px); translate: 0 14px; }
+ to { opacity: 1; filter: none; translate: none; }
+ }
+}
+
+/* Prose pages (the privacy policy). */
+.prose { max-width: 720px; padding-block: clamp(48px, 7vw, 88px) clamp(72px, 9vw, 120px); }
+.prose h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; }
+.prose .updated { margin-top: 12px; font-size: 14px; color: var(--text-3); }
+.prose .lede { margin-top: 28px; font-size: 17px; color: var(--text); }
+.prose h2 { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); font-size: 22px; letter-spacing: -0.02em; }
+.prose h3 { margin-top: 28px; font-size: 16px; }
+.prose p, .prose li { font-size: 15.5px; line-height: 1.7; color: var(--text-2); }
+.prose p { margin-top: 14px; }
+.prose ul { margin-top: 12px; padding-left: 20px; list-style: disc; }
+.prose li + li { margin-top: 6px; }
+.prose li::marker { color: var(--text-3); }
+.prose strong { font-weight: 500; color: var(--text); }
+.prose a { color: var(--accent-soft); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
+.prose a:hover { text-decoration-color: var(--accent-soft); }
+.prose code { font-size: 0.9em; color: var(--text); }
+.prose .table-scroll { margin-top: 16px; overflow-x: auto; }
+.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
+.prose th, .prose td { padding: 10px 14px 10px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
+.prose th { font-weight: 500; color: var(--text); white-space: nowrap; }
+.prose td { color: var(--text-2); }
+.prose thead th { border-top: 0; font-size: 13px; font-weight: 400; color: var(--text-3); }
diff --git a/apps/landing/tests/site.test.ts b/apps/landing/tests/site.test.ts
new file mode 100644
index 000000000..1ccc8110a
--- /dev/null
+++ b/apps/landing/tests/site.test.ts
@@ -0,0 +1,49 @@
+// What the built pages must hold whatever a redesign does to them: every
+// download reachable without script, and the ids telemetry.js and
+// downloads.ts look for.
+import { readFileSync } from "node:fs";
+import { describe, expect, test } from "vitest";
+import { ANDROID_APK, APP_STORE, DESKTOP_BUILDS, FALLBACK_VERSION, RELEASES_URL } from "../src/data/releases.ts";
+
+const page = (name: string) => readFileSync(new URL(`../dist/${name}`, import.meta.url), "utf8");
+const home = page("index.html");
+
+describe("the landing page, built", () => {
+ test("links every desktop build at the fallback version without script", () => {
+ for (const [id, build] of Object.entries(DESKTOP_BUILDS)) {
+ const href = `${RELEASES_URL}zeron-${FALLBACK_VERSION}-${build.file}`;
+ expect(home, id).toContain(`href="${href}"`);
+ expect(home, id).toContain(`data-build="${id}"`);
+ }
+ });
+
+ test("links the mobile apps and the downloads table", () => {
+ expect(home).toContain(`href="${ANDROID_APK}"`);
+ expect(home).toContain(`href="${APP_STORE}"`);
+ expect(home).toContain('id="downloads"');
+ expect(home).toMatch(/href="\/?#downloads"/);
+ });
+
+ test("has the three download buttons telemetry.js counts, pointing at the table", () => {
+ for (const id of ["nav-download", "hero-download", "closing-download"]) {
+ expect(home, id).toMatch(new RegExp(`id="${id}" href="#downloads"[^>]*data-download=`));
+ }
+ });
+
+ test("loads the tracker once, deferred, and only on the landing page", () => {
+ expect(home.match(/"""
+open("fit.html", "w").write(page)
+dom = subprocess.run([CHROME, "--headless=new", "--no-sandbox", "--disable-gpu", "--allow-file-access-from-files", "--virtual-time-budget=4000", "--dump-dom", "file://" + __import__("os").path.abspath("fit.html")], capture_output=True, text=True).stdout
+fits = json.loads(html.unescape(re.search(r'(.*?) ', dom, re.S).group(1)))
+json.dump(fits, open("fits.json", "w"))
+for n in nodes:
+ if n["box"][3] > 24: continue
+ a, b = fits[str(n["n"])][0], fits[str(n["n"])][1]
+ print(f'{n["text"][:26]:26} box {n["box"][2]}x{n["box"][3]} -> {a[1]} {a[2]} {a[3]}px err {a[0]:.2f} (w {a[4]}) next {b[1]} {b[2]} {b[3]} err {b[0]:.2f}')
diff --git a/apps/landing/tools/recreate/gen.py b/apps/landing/tools/recreate/gen.py
new file mode 100644
index 000000000..e3cd627dd
--- /dev/null
+++ b/apps/landing/tools/recreate/gen.py
@@ -0,0 +1,439 @@
+"""Build the session window's HTML from the app's layout tree and its two
+native references (dark, light). Everything placed here is placed where the
+app placed it; colours are the app's own pixels."""
+import os, pathlib
+ROOT = pathlib.Path(__file__).resolve().parents[3]
+CHROME = os.environ.get("CHROME", "chromium")
+import io, json, re, sys, html, urllib.parse
+import numpy as np
+import cairosvg
+from PIL import Image
+from lib import *
+
+nodes = json.load(open("nodes.json"))
+fits = json.load(open("fits.json"))
+ICONS = json.load(open("icons.json"))
+LANDING = f"{ROOT}/apps/landing"
+for mark in ("claude", "openai", "grok", "cursor", "opencode"):
+ ICONS["mark-" + mark] = open(f"{LANDING}/src/assets/agents/{mark}.svg").read()
+
+STRIP = 40 # the title strip's height
+LEFT_SHIFT = 78 # macOS: the strip's left controls start past the traffic lights
+RIGHT_SHIFT = 104 # and its right controls reach the edge (no caption buttons)
+
+def strip_x(x, y):
+ """A strip node's place on macOS, or None for what macOS doesn't draw."""
+ if y >= STRIP - 4: return x
+ if x >= 1206: return None
+ return x + (RIGHT_SHIFT if x >= 1000 else LEFT_SHIFT)
+
+def every(fn):
+ """What a function finds in each theme's capture."""
+ return [fn(t) for t in THEMES]
+
+def colour_vars(values, prefix="c"):
+ """One colour a theme, as custom properties (--c0, --c1, …) the stylesheet picks from by the window's theme."""
+ return ";".join(f"--{prefix}{i}:{v if isinstance(v, str) else hexc(v)}" for i, v in enumerate(values))
+
+out = [] # (layer, html)
+import os
+OFFSETS = json.load(open("offsets.json")) if os.path.exists("offsets.json") else {}
+layout = []
+def placed(n, x, y, w, h):
+ """Where a node goes: the app's box, moved by what the diff against the reference found (tune.py)."""
+ dx, dy = OFFSETS.get(str(n), (0, 0))
+ layout.append({"n": n, "box": [x, y, w, h]})
+ return x + dx, y + dy
+
+css_icons = {}
+
+# ---------------------------------------------------------------- boxes
+tree = json.load(open("tree.json"))
+by_id = {n["id"]: n["box"] for n in tree if n.get("id")}
+by_n = {n["n"]: n["box"] for n in tree}
+_hidden = {int(m.group(1)) for m in re.finditer(r"@(\d+)[^\n]* hidden\s*$", open("tree.txt").read(), re.M)}
+def box_of(role, text, where=lambda b: True):
+ """The box of the visible node with this role and exact text."""
+ for n in tree:
+ if n.get("role") == role and n.get("text") == text and n["n"] not in _hidden and where(n["box"]):
+ return n["box"]
+ raise KeyError((role, text))
+OPEN = next(n["text"] for n in tree if n.get("role") == "tab" and str(n.get("id", "")).startswith("session-tab-"))
+
+emitted = []
+ROOT_SEED = [2, 200] # a point of the window that no surface covers
+
+def emit_box(name, r):
+ x, y, w, h = r["box"]
+ nx = strip_x(x, y)
+ if nx is None: return
+ sx, sy = r["seed"]
+ edge_at = (x + 0.25, y + h / 2)
+ if GLASS:
+ # Each theme's fill as what must be painted over what lies under it (the box it sits in, else the window).
+ under = min((b for b in emitted if b["box"][0] <= sx <= b["box"][0] + b["box"][2] and b["box"][1] <= sy <= b["box"][1] + b["box"][3] and b["box"][2] * b["box"][3] > w * h), key=lambda b: b["box"][2] * b["box"][3], default={"seed": ROOT_SEED})
+ fills = [css_rgba(*own(raw_at(t, sx, sy), raw_at(t, *under["seed"]))) for t in THEMES]
+ edges = [css_rgba(*own(raw_at(t, *edge_at), raw_at(t, sx, sy))) for t in THEMES]
+ else:
+ fills = [at(t, sx, sy) for t in THEMES]
+ edges = [at(t, *edge_at) for t in THEMES]
+ emitted.append({"box": [x, y, w, h], "seed": [sx, sy]})
+ style = f"left:{nx:g}px;top:{y:g}px;width:{w:g}px;height:{h:g}px;border-radius:{r['radius']:g}px;{colour_vars(fills, 'f')}"
+ if r["edge"] is not None:
+ style += ";" + colour_vars(edges, "e")
+ out.append((-w * h, f' '))
+ print(f"{name:13} {x:7.1f},{y:6.1f} {w:6.1f}x{h:5.1f} r{r['radius']:g} fill {hexc(r['fill'])} edge {hexc(r['edge']) if r['edge'] is not None else '-'}", file=sys.stderr)
+
+def known(name, box, radius, seed, edge=True):
+ """A box the tree places: its fill from the reference, and its edge if its rim is another colour."""
+ x, y, w, h = box
+ fill = at(P, *seed).copy()
+ ring, outside = at(P, x + 0.25, y + h / 2), at(P, x - 1.5, y + h / 2)
+ has_edge = edge and not near(ring, fill, 6) and not near(ring, outside, 3)
+ emit_box(name, {"box": list(box), "radius": radius, "fill": fill, "edge": ring.copy() if has_edge else None, "seed": list(seed)})
+
+def found(name, seed, radii=None):
+ """A box only the pixels place."""
+ r = find_rect(seed)
+ if radii: r = refine(r, radii)
+ emit_box(name, r)
+ return r
+
+composer = by_id["chat-composer"]
+known("sidebar", by_id["sidebar-content"], 12, (9, 400))
+known("page", by_id["shell-page-card"], 12, (286, 300))
+PANEL = any(n.get("id") == "panel-tab-chosen" and n["n"] not in _hidden and n["box"][2] > 0 for n in tree) # the side panel, open
+if PANEL:
+ known("panel", by_id["panel"], 12, (804.5, 600))
+ known("changes", [809, 131, 497, 584], 12, (815, 650))
+ changes = {"box": [809, 131, 497, 584]}
+ found("commit-field", (814, 757), (6, 8, 10))
+ found("commit", (1240, 806), (5, 6, 7, 8))
+known("tab", by_id["session-tab-chosen"], 8, (340, 21))
+if PANEL: known("panel-tab", by_id["panel-tab-chosen"], 8, (900, 63))
+row = box_of("button", OPEN, lambda b: b[0] < 280)
+known("row", row, 8, (row[0] + 4, row[1] + 3))
+ask = next(n["box"] for n in tree if n.get("role") == "text" and str(n.get("text", "")).startswith("Clients can send"))
+found("bubble", (ask[0] - 8, ask[1] + 12), (12, 14, 16, 18, 20))
+known("composer", [composer[0], composer[1] + 0.5, composer[2], 48], 24, (composer[0] + 190, composer[1] + 5))
+attach = box_of("button", "Attach")
+found("attach", (attach[0] + 3.5, attach[1] + 14), (14,))
+send = box_of("button", "Send message")
+found("send", (send[0] + 3.5, send[1] + 14), (14,))
+if PANEL:
+ known("hunk", [810, 276, 495, 24], 0, (1290, 288), edge=False)
+ known("minus", [810, 366, 495, 22], 0, (813, 377), edge=False)
+ known("plus", [810, 388, 495, 66], 0, (813, 410), edge=False)
+ for name, seed in (("check-all", (824, 146)), ("check-1", (824, 255)), ("check-2", (824, 565))):
+ r = find_rect(seed); r["radius"] = 4; emit_box(name, r)
+ # Hairlines across the panel and its changes card.
+ for name, box, seed in (("changes", changes["box"], (815, 650)), ("panel", by_id["panel"], (804.5, 600))):
+ for y, h in hlines(box, seed):
+ if name == "panel" and changes["box"][1] - 2 <= y <= changes["box"][1] + changes["box"][3] + 2: continue
+ x, w = box[0] + 1, box[2] - 2
+ out.append((0, f' '))
+
+# ---------------------------------------------------------------- icons
+_raster = {}
+def raster(name, w, h):
+ key = (name, w, h)
+ if key not in _raster:
+ svg = ICONS[name].replace("currentColor", "#ffffff")
+ try:
+ png = cairosvg.svg2png(bytestring=svg.encode(), output_width=w, output_height=h)
+ _raster[key] = np.asarray(Image.open(io.BytesIO(png)).convert("RGBA"))[:, :, 3].astype(np.float32) / 255
+ except Exception:
+ _raster[key] = np.zeros((h, w), np.float32)
+ return _raster[key]
+
+ARTWORK = {name: open(f"../artwork/{name}.svg").read() for name in ("api", "web", "uptime", "docs")}
+def artwork(box):
+ """The project whose artwork fills this tile, by its ground colour; None for a glyph."""
+ c = crop(P, box).reshape(-1, 3)
+ vals, counts = np.unique(c, axis=0, return_counts=True)
+ ground = vals[counts.argmax()]
+ if np.ptp(ground) < 40: return None
+ best = min(ARTWORK, key=lambda name: np.abs(np.array([int(re.search(r'fill="#([0-9a-f]{6})"', ARTWORK[name]).group(1)[i:i + 2], 16) for i in (0, 2, 4)]) - ground).sum())
+ return best
+
+def match_icon(box):
+ c = crop(P, box).astype(np.float32)
+ ground, ink = ink_of(P, box)
+ span = np.abs(ink - ground).sum() or 1
+ shape = np.clip(np.abs(c - ground).sum(axis=2) / span, 0, 1)
+ best = (-1, None)
+ for name in ICONS:
+ r = raster(name, shape.shape[1], shape.shape[0])
+ if r.shape != shape.shape or r.sum() == 0: continue
+ score = float((r * shape).sum() / (np.sqrt((r * r).sum() * (shape * shape).sum()) + 1e-6))
+ if score > best[0]: best = (score, name)
+ return best
+
+for n in nodes:
+ if n["kind"] != "img": continue
+ x, y, w, h = n["box"]
+ nx = strip_x(x, y)
+ if nx is None: continue
+ project = artwork(n["box"])
+ if project:
+ nx, y = placed(n["n"], nx, y, w, h)
+ uri = "data:image/svg+xml," + urllib.parse.quote(ARTWORK[project])
+ out.append((1, f' '))
+ print(f"artwork @{n['n']} {x},{y} {w}x{h} -> {project}", file=sys.stderr)
+ continue
+ score, name = match_icon(n["box"])
+ inks = every(lambda t: ink_of(t, n["box"])[1])
+ print(f"icon @{n['n']:5} {x:6},{y:5} {w}x{h} -> {name} ({score:.2f}) {hexc(inks[0])}", file=sys.stderr)
+ if score < 0.55: continue
+ css_icons[name] = ICONS[name]
+ nx, y = placed(n["n"], nx, y, w, h)
+ out.append((1, f' '))
+
+# ---------------------------------------------------------------- text
+# Each theme's primary text colour (a label that wears it), and the opacities its other tones are.
+PRIMARY = {t: ink_of(t, box_of("text", "New chat"))[1] for t in THEMES}
+ALPHAS = {t: (1, 0.6, 0.42, 0.28) for t in THEMES}
+
+def text_colour(theme, box):
+ """A node's ink: one of the theme's four text tones where it is grey, as sampled where it has a hue."""
+ ground, ink = ink_of(theme, box)
+ d = (ink - ground).astype(float)
+ full = (PRIMARY[theme] - ground).astype(float)
+ if np.ptp(d / np.where(np.abs(full) < 1, 1, full)) < 0.12 and np.abs(full).sum() > 30:
+ est = float((d / np.where(np.abs(full) < 1, 1, full)).mean())
+ alpha = min((a for a in ALPHAS[theme] if a >= est - 0.06), default=1)
+ return ground + full * alpha
+ return ink
+
+from PIL import ImageFont
+_fonts = {}
+def measure(text, fam, weight, size):
+ name = {("G", 400): "Geist.ttf", ("G", 500): "Geist-Medium.ttf", ("G", 600): "Geist-SemiBold.ttf", ("M", 400): "GeistMono.ttf", ("M", 500): "GeistMono-Medium.ttf"}[(fam, weight)]
+ key = (name, size)
+ if key not in _fonts: _fonts[key] = ImageFont.truetype(f"{ROOT}/apps/zgx/fonts/{name}", size * 8)
+ return _fonts[key].getlength(text) / 8
+NATURAL = {14: 10, 16: 11, 17: 12, 19: 13, 20: 14, 21: 15, 22: 15, 24: 17}
+FORCE = {"+3": ("M", 400, 11), "+9": ("M", 400, 11), "−0": ("M", 400, 11), "−1": ("M", 400, 11), "+12": ("M", 400, 11),
+ "Changes": ("G", 500, 12), "M": ("M", 500, 12), "0/50": ("G", 400, 10)}
+COLUMN = next(n["box"][2] for n in tree if n.get("role") == "article" and n.get("text") == "Reply") # the reply's column
+RICH = {
+ "Clients can send": ("bubble", "Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it."),
+ "Found it.": ("column", "Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after."),
+ "Fixed in": ("column", "Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary."),
+ "test/window.test.ts": ("item", "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"),
+ "This matches": ("column", "This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet."),
+}
+CODE_X = 886
+ADVANCE = 7.2 # Geist Mono at 12: 0.6 em
+
+def code_line(n, px, py):
+ """A line of code: its characters grouped into runs of one ink (the app's syntax colours), sampled cell by cell."""
+ x, y, w, h = n["box"]
+ text = n["text"]
+ def ink(theme, cx):
+ cell = crop(theme, [cx, y + 1, ADVANCE, h - 2]).reshape(-1, 3)
+ ground = at(theme, cx + 0.1, y + 0.6)
+ return ground, cell[np.abs(cell - ground).sum(axis=1).argmax()]
+ def kind(c, g):
+ """A hue, or for greys how strong: text 0.9, operators 0.66, punctuation and comments about 0.5."""
+ v = (c - g).astype(float)
+ if np.ptp(v) > 14: return tuple(np.round(v / (np.abs(v).max() or 1) * 5).astype(int))
+ strength = float(v.mean()) / float((PRIMARY[P] - g).mean())
+ return "text" if strength > 0.76 else "operator" if strength > 0.57 else "quiet"
+ spans, gap = [], ""
+ for i, ch in enumerate(text):
+ cx = x + i * ADVANCE
+ if cx + ADVANCE > 1305 + ADVANCE: break
+ if ch == " ":
+ gap += ch
+ continue
+ seen = every(lambda t: ink(t, cx)) # (ground, ink) a theme
+ k = kind(seen[0][1], seen[0][0])
+ if spans and spans[-1]["k"] == k and "`" not in ch:
+ s = spans[-1]
+ s["t"] += gap + ch
+ # (A thin glyph's best pixel is dimmed by coverage: each theme keeps the strongest ink the run shows.)
+ s["seen"] = [new if np.abs(new[1] - new[0]).sum() > np.abs(old[1] - old[0]).sum() else old for new, old in zip(seen, s["seen"])]
+ else:
+ spans.append({"t": gap + ch, "k": k, "seen": seen})
+ gap = ""
+ body = "".join(f'{html.escape(s["t"])} ' for s in spans)
+ return f'{body} '
+
+for n in nodes:
+ if n["kind"] != "text": continue
+ x, y, w, h = n["box"]
+ nx = strip_x(x, y)
+ if nx is None: continue
+ text = n["text"]
+ inks = every(lambda t: text_colour(t, n["box"]))
+ mac = {"Ctrl+N": "⌘N", "Ctrl+K": "⌘K"}.get(text)
+ rich = next((k for k in RICH if text.startswith(k) and h > 24), None)
+ if rich:
+ kind_, body = RICH[rich]
+ # As wide as the app set it: the message in its bubble, a list item a marker in from the column, the rest the column.
+ width = {"bubble": w + 2, "item": COLUMN - 24, "column": COLUMN}[kind_]
+ x, y = placed(n["n"], x, y, w, h)
+ out.append((2, f'{body}
'))
+ continue
+ if PANEL and x >= CODE_X and 290 < y < 520 and h == 17:
+ out.append((2, code_line(n, *placed(n["n"], x, y, min(w, 1305 - x), h))))
+ continue
+ err, fam, weight, size, measured = fits[str(n["n"])][0]
+ align = "left"
+ if text in FORCE:
+ fam, weight, size = FORCE[text]
+ if err > 2 or (text in FORCE and abs(measured - w) > 2) or len(text) <= 2:
+ # A box of a set width: the size its line height gives, the text where its ink lies.
+ size = NATURAL.get(h, size)
+ first, last = ink_span(P, n["box"])
+ if h not in NATURAL or len(text) > 8:
+ size = min(range(10, 18), key=lambda s: abs(measure(text, "G", 400, s) - (last - first) - 1))
+ if text not in FORCE:
+ fam, weight = ("M", 400) if re.fullmatch(r"[\d+\-−]+", text) else ("G", 600 if re.fullmatch(r"[A-Z]", text) else 400)
+ first, last = ink_span(P, n["box"])
+ if w - (last - first) > 3:
+ align = "left" if first < 2.5 else "right" if w - last < 2.5 else "center"
+ nx, y = placed(n["n"], nx, y, w, h)
+ fixed = err > 2
+ first, last = ink_span(P, n["box"], gap=7)
+ if align == "left" and not fixed and fam == "G" and (x < 280 or y < STRIP) and measured - last > 5 and len(text) > 12:
+ # (FadeText: the row ends before the words do.)
+ w = round(last + 1)
+ style_fade = f"overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 {w - 20}px,transparent {w}px);mask-image:linear-gradient(90deg,#000 {w - 20}px,transparent {w}px);"
+ else:
+ style_fade = ""
+ if mac: text, align = mac, "right"
+ style = style_fade + f"left:{nx:g}px;top:{y:g}px;width:{w:g}px;height:{h}px;line-height:{h}px;font-size:{size}px;font-weight:{weight};text-align:{align};{colour_vars(inks)}"
+ out.append((2, f'{html.escape(text)} '))
+
+# ---------------------------------------------------------------- the sidebar's branches, and work under way
+headers = [n for n in tree if n.get("role") == "button" and n["n"] not in _hidden and n["box"][0] == 13 and n["box"][2] == 256 and n["box"][3] == 30 and n["box"][1] > 170]
+groups, current = [], None
+for n in headers:
+ # (A project's row holds an 18-point tile; a session's a 14-point mark.)
+ i = tree.index(n)
+ tile = next((m for m in tree[i + 1:i + 6] if m.get("role") == "img"), None)
+ if tile and tile["box"][2] == 18:
+ current = []; groups.append(current)
+ elif current is not None:
+ current.append(n["box"][1] + 15)
+def alpha_ink(theme, x, y, gx, gy):
+ """A hairline's ink as white or black at an opacity, from one pixel of it and one of its ground."""
+ line, ground = at(theme, x, y).astype(float), at(theme, gx, gy).astype(float)
+ target = 255.0 if line.mean() > ground.mean() else 0.0
+ return f"rgb({int(target)} {int(target)} {int(target)} / {abs(line.mean() - ground.mean()) / max(abs(target - ground.mean()), 1):.3f})"
+paths = []
+for centres in groups:
+ if not centres: continue
+ top = centres[0] - 15
+ paths.append(f"M28 {top}V{centres[-1] - 5}" + "".join(f"M28 {c - 5}q0 5 5 5h5" for c in centres))
+if paths:
+ probe = groups[0][0] + 20 if len(groups[0]) > 1 else groups[0][0] - 12
+ inks = every(lambda t: alpha_ink(t, 28, probe, 32, probe))
+ out.append((1, f' '))
+ print("branches", len(paths), inks, file=sys.stderr)
+for n in tree:
+ if n.get("role") == "group" and n.get("text") == "Working" and n["n"] not in _hidden and n["box"][2] == 16:
+ x, y, w, h = n["box"]
+ # (The theme's accent: #9277b0 dark, #7a55c4 light.)
+ out.append((1, f' '))
+
+# ---------------------------------------------------------------- avatars
+import base64
+PALETTE = {hue: dict(re.findall(r'\["(\d+)"\] = "(#[0-9a-f]{6})"', body)) for hue, body in re.findall(r"^\t(\w+) = \{(.*)\},?$", open(f"{ROOT}/apps/zgx/ui/ds/palette.luau").read(), re.M)}
+WHEEL = ["red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]
+
+def avatar(seed, size, scale=3):
+ """ds/avatar.luau's waves for a seed, as a picture."""
+ state = 2166136261
+ for ch in seed.encode():
+ state ^= ch
+ state = ((state << 24) + state * 403) % 4294967296
+ def nxt():
+ nonlocal state
+ state = (state * 1664525 + 1013904223) % 4294967296
+ return state / 4294967296
+ base = int(nxt() * len(WHEEL))
+ cols = [np.array([int(PALETTE[WHEEL[(base + off) % len(WHEEL)]][step][i:i + 2], 16) for i in (1, 3, 5)], float) for off, step in ((0, "300"), (1, "500"), (-1, "600"))]
+ P = [nxt(), nxt(), nxt(), nxt()]
+ n = size * scale
+ py, px = (np.mgrid[0:n, 0:n] + 0.5) / scale
+ ux, uy = px / size - 0.5, py / size - 0.5
+ tau = 2 * np.pi
+ ang = P[0] * tau
+ rx, ry = np.cos(ang) * ux - np.sin(ang) * uy, np.sin(ang) * ux + np.cos(ang) * uy
+ k = 2.2 + P[1] * 2.4
+ sm = lambda lo, hi, v: (lambda t: t * t * (3 - 2 * t))(np.clip((v - lo) / (hi - lo), 0, 1))
+ t1 = 0.5 + 0.5 * np.sin(rx * k + P[2] * tau + 1.6 * np.sin(ry * k * 1.3 + P[3] * tau))
+ t2 = 0.5 + 0.5 * np.sin(ry * k * 0.9 - P[3] * tau + 1.3 * np.sin(rx * k * 1.1 + P[2] * tau))
+ m1, m2 = sm(0.15, 0.85, t1)[..., None], (0.65 * sm(0.3, 0.95, t2))[..., None]
+ v = cols[0] + (cols[1] - cols[0]) * m1
+ rgb = v + (cols[2] - v) * m2
+ d = np.hypot(px - size / 2, py - size / 2) - size / 2
+ alpha = np.clip(0.5 - d * scale, 0, 1)[..., None] * 255
+ buf = io.BytesIO()
+ Image.fromarray(np.concatenate([rgb, alpha], axis=2).round().astype(np.uint8), "RGBA").save(buf, "PNG", optimize=True)
+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode(), rgb.reshape(-1, 3).mean(axis=0)
+
+for box, seeds in [(box_of("group", "Local"), ["Local"])] + ([(box_of("group", "Mara Okafor"), ["git-author-Mara Okafor"])] if PANEL else []):
+ x, y, w, h = box
+ seen = crop(P, [x + w * 0.25, y + h * 0.25, w * 0.5, h * 0.5]).reshape(-1, 3).mean(axis=0)
+ uri, _ = avatar(seeds[0], w)
+ out.append((2, f' '))
+ print("avatar", box, [f"{s}: {float(np.abs(avatar(s, w)[1] - seen).sum()):.0f}" for s in seeds], file=sys.stderr)
+
+# The Commit button's word (the tree names the button, not its text).
+if PANEL:
+ cx, cy, cw, ch = box_of("button", "Commit")
+ inks = every(lambda t: ink_of(t, [cx + 6, cy + 4, cw - 12, ch - 8])[1])
+ out.append((2, f'Commit '))
+
+# ---------------------------------------------------------------- bullets, lights
+for item in (n for n in tree if n.get("role") == "listitem" and n["n"] not in _hidden):
+ box = [item["box"][0], item["box"][1], 24, 24] # the marker's place, before the item's words
+ c = crop(P, box); ground, ink = ink_of(P, box)
+ ys, xs = np.where(np.abs(c - ground).sum(axis=2) > 30)
+ bx, by, bw = box[0] + xs.min() / S, box[1] + ys.min() / S, (xs.max() - xs.min() + 1) / S
+ out.append((2, f' '))
+for i, (fill, edge) in enumerate([("#ff5f57", "#e0443e"), ("#febc2e", "#dea123"), ("#28c840", "#1aab29")]):
+ out.append((3, f' '))
+
+BAR_INK = every(lambda t: ink_of(t, box_of("button", "Toggle sidebar"))[1]) # the title strip's glyphs
+def side_glyph(x, y, side, opened):
+ bar = 1.1667 + (2.5 if opened else 0)
+ bx = 4.3333 if side == "left" else 16 - 4.3333 - bar
+ svg = f' '
+ return f'{svg} '
+out.append((3, side_glyph(92, 12, "left", True)))
+out.append((3, side_glyph(1320 - 30, 12, "right", PANEL)))
+out.sort(key=lambda o: o[0])
+masks = "\n".join(f'.zw .i-{name}{{--m:url("data:image/svg+xml,{urllib.parse.quote(re.sub(chr(10), " ", svg).replace("currentColor", "#000"))}")}}' for name, svg in sorted(css_icons.items()))
+fragment = "\n".join(o[1] for o in out)
+open(f"{NAME}.fragment.html", "w").write(fragment)
+json.dump(layout, open("layout.json", "w"))
+open(f"{NAME}.icons.css", "w").write(masks)
+
+# ---------------------------------------------------------------- each theme's own values
+def chip(theme):
+ """Inline code in a theme: its wash and its ink, read from the reply's first line."""
+ box = next(n["box"] for n in tree if n.get("role") == "text" and str(n.get("text", "")).startswith("Found it."))
+ band = crop(theme, [box[0], box[1], box[2], 24])
+ vals, counts = np.unique(band.reshape(-1, 3), axis=0, return_counts=True)
+ wash = vals[counts.argsort()[::-1][1]]
+ on = np.abs(band - wash).sum(axis=2) <= 4
+ cols = np.where(on.sum(axis=0) >= 8)[0]
+ # (The first chip alone: its columns up to the first gap wider than a glyph.)
+ end = next((a for a, b in zip(cols, cols[1:]) if b - a > 14 * S), cols[-1])
+ inside = band[:, cols[0]:end + 1].reshape(-1, 3)
+ return wash, inside[np.abs(inside - wash).sum(axis=1).argmax()]
+rules = []
+for i, t in enumerate(THEMES):
+ window = css_rgba(*raw_at(t, *ROOT_SEED)) if GLASS else hexc(GROUND[t])
+ wash, ink = chip(t)
+ rules.append(f".zw-{NAME}.t{i}{{--zw-window:{window};--zw-code:{hexc(ink)};--zw-wash:{hexc(wash)};--zw-text:{hexc(PRIMARY[t])}}}")
+ print(t, rules[-1], file=sys.stderr)
+open(f"{NAME}.vars.css", "w").write("\n".join(rules) + "\n")
+# What a page needs to offer the themes: each one's name here, and the three colours that stand for it.
+json.dump([{"id": t, "window": hexc(GROUND[t]), "accent": hexc(chip(t)[1]), "text": hexc(PRIMARY[t])} for t in THEMES], open(f"{NAME}.themes.json", "w"), indent=1)
+print(len(out), "elements,", len(css_icons), "icons", file=sys.stderr)
diff --git a/apps/landing/tools/recreate/inspect.py b/apps/landing/tools/recreate/inspect.py
new file mode 100644
index 000000000..d89c4860d
--- /dev/null
+++ b/apps/landing/tools/recreate/inspect.py
@@ -0,0 +1,14 @@
+"""Send one command to the staged app's inspector: zi.py '' [out-file-for-data]"""
+import glob, json, socket, sys
+path = sorted(glob.glob(f"/tmp/zgx-inspect-{__import__('os').getuid()}/*.sock"))[-1]
+s = socket.socket(socket.AF_UNIX); s.settimeout(60); s.connect(path)
+s.sendall((sys.argv[1] + "\n").encode())
+buf = b""
+while not buf.endswith(b"\n"):
+ d = s.recv(1 << 22)
+ if not d: break
+ buf += d
+r = json.loads(buf)
+if len(sys.argv) > 2:
+ json.dump(r.get("data"), open(sys.argv[2], "w"))
+print(r.get("text") if r.get("ok") else r)
diff --git a/apps/landing/tools/recreate/lib.py b/apps/landing/tools/recreate/lib.py
new file mode 100644
index 000000000..68297ebc9
--- /dev/null
+++ b/apps/landing/tools/recreate/lib.py
@@ -0,0 +1,204 @@
+"""Shared by the recreation tools: the two native references, sampling,
+and finding the shapes the app drew (filled boxes, their corners and edges)."""
+import io, json, math
+import numpy as np
+from PIL import Image
+
+import os
+W, H, S = 1320, 840, 2
+# The themes captured (ref-.png), the first the one shapes are read from;
+# NAME, what is being built; GLASS, whether its surfaces keep the alpha the app drew.
+THEMES = os.environ.get("THEMES", "dark,light").split(",")
+P = THEMES[0]
+NAME = os.environ.get("NAME", "session")
+GLASS = os.environ.get("GLASS") == "1"
+
+def raw(path):
+ """A capture as the app drew it: colour (0..255) and alpha (0..1), un-premultiplied."""
+ a = np.asarray(Image.open(path).convert("RGBA")).astype(np.float64)
+ return a[:, :, :3], a[:, :, 3] / 255
+
+RAW = {t: raw(f"ref-{t}.png") for t in THEMES}
+# What a capture is laid on to be read: the window's own colour, opaque (the app's opaque look).
+GROUND = {"dark": (14, 14, 16), "light": (238, 238, 240)}
+for t in THEMES:
+ GROUND.setdefault(t, tuple(int(round(v)) for v in RAW[t][0][400, 4]))
+
+def load(path, ground):
+ im = Image.open(path).convert("RGBA")
+ return np.asarray(Image.alpha_composite(Image.new("RGBA", im.size, tuple(ground) + (255,)), im).convert("RGB")).astype(np.int16)
+
+REFS = {t: load(f"ref-{t}.png", GROUND[t]) for t in THEMES}
+
+def raw_at(theme, x, y):
+ rgb, alpha = RAW[theme]
+ i, j = min(max(int(y * S), 0), rgb.shape[0] - 1), min(max(int(x * S), 0), rgb.shape[1] - 1)
+ return rgb[i, j], float(alpha[i, j])
+
+def own(target, parent):
+ """The colour and alpha a surface must be painted in to show as `target` over `parent`
+ (each a colour and an alpha): source-over, undone. Where the alpha it needs is too
+ little to carry the colour, the least alpha that can."""
+ (ct, at_), (cp, ap) = target, parent
+ if ap >= 0.999: return ct, 1.0
+ least = min(max((at_ - ap) / (1 - ap), 0.0), 1.0)
+ if least < 0.002 and np.abs(ct * at_ - cp * ap).max() < 1.0: return ct, 0.0
+ for a in [least] + [v / 200 for v in range(1, 201)]:
+ if a < least or a <= 0: continue
+ c = (ct * at_ - cp * ap * (1 - a)) / a
+ if (c >= -1.5).all() and (c <= 256.5).all(): return np.clip(c, 0, 255), a
+ return ct, 1.0
+
+def css_rgba(colour, alpha):
+ r, g, b = (int(round(float(v))) for v in colour)
+ return hexc(colour) if alpha >= 0.999 else f"rgb({r} {g} {b} / {alpha:.3f})"
+
+def at(theme, x, y):
+ a = REFS[theme]
+ return a[min(max(int(y * S), 0), a.shape[0] - 1), min(max(int(x * S), 0), a.shape[1] - 1)]
+
+def crop(theme, box):
+ x, y, w, h = box
+ return REFS[theme][int(round(y * S)):int(round((y + h) * S)), int(round(x * S)):int(round((x + w) * S))]
+
+def hexc(c):
+ return "#%02x%02x%02x" % tuple(int(min(max(round(float(v)), 0), 255)) for v in c)
+
+def near(a, b, tol=7):
+ return int(np.abs(np.asarray(a) - np.asarray(b)).sum()) <= tol
+
+def ink_of(theme, box):
+ """The ground under a node (the commonest colour of its box) and its ink (the pixel farthest from it)."""
+ p = crop(theme, box).reshape(-1, 3)
+ vals, counts = np.unique(p, axis=0, return_counts=True)
+ ground = vals[counts.argmax()]
+ return ground, p[np.abs(p - ground).sum(axis=1).argmax()]
+
+def ink_span(theme, box, gap=None):
+ """Where the ink lies across a node's box, in points from its left edge: (first, last). Rows that are
+ ink all the way across (a hairline through the box) don't count. With `gap`, the ink ends at the
+ first empty stretch that wide (a title cut short before what follows it on its row)."""
+ c = crop(theme, box)
+ ground, _ = ink_of(theme, box)
+ on = np.abs(c - ground).sum(axis=2) > 24
+ on = on[on.mean(axis=1) < 0.8]
+ cols = np.where(on.any(axis=0))[0]
+ if not len(cols): return (0, box[2])
+ first, last = cols[0], cols[-1]
+ if gap:
+ for a, b in zip(cols, cols[1:]):
+ if b - a > gap * S:
+ last = a
+ break
+ return (first / S, (last + 1) / S)
+
+def find_rect(seed, theme=P, tol=7):
+ """The filled box around a point: its bounds in points, corner radius, fill, and 1-point edge if it has one.
+ Text and icons inside block single scan lines, so each side is the farthest any line reaches."""
+ a = REFS[theme]
+ sx, sy = int(seed[0] * S), int(seed[1] * S)
+ fill = a[sy, sx].copy()
+ same = np.abs(a - fill).sum(axis=2) <= tol
+ def reach(line, start):
+ """How far a line of the mask runs each way from a start index (inclusive bounds)."""
+ before = np.where(~line[:start][::-1])[0]
+ after = np.where(~line[start + 1:])[0]
+ return start - (before[0] if len(before) else start), start + (after[0] if len(after) else len(line) - 1 - start)
+ t, b = reach(same[:, sx], sy)
+ l, r = sx, sx
+ for _ in range(3):
+ spans = [reach(same[y], sx) for y in range(t, b + 1)]
+ l, r = min(s[0] for s in spans), max(s[1] for s in spans)
+ cols = [reach(same[:, x], sy) for x in range(l, r + 1)]
+ t, b = min(c[0] for c in cols), max(c[1] for c in cols)
+ # The corner: the radius whose quarter circle best covers what the top-left block shows.
+ n = int(min(26 * S, (r - l + 1) // 2, (b - t + 1) // 2))
+ radius = 0.0
+ if n >= 2:
+ block = same[t:t + n, l:l + n]
+ yy, xx = np.mgrid[0:n, 0:n] + 0.5
+ best = (1e9, 0.0)
+ for R in [v * S for v in (0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24)] + [n]:
+ inside = ((xx >= R) | (yy >= R) | ((xx - R) ** 2 + (yy - R) ** 2 <= R * R))
+ miss = float((inside != block)[: int(R) + 2, : int(R) + 2].mean()) if R else float((~block[:4, :4]).mean())
+ if miss < best[0] - 1e-9: best = (miss, R / S)
+ radius = best[1]
+ box = [l / S, t / S, (r - l + 1) / S, (b - t + 1) / S]
+ # An edge: a ring a point wide of one other colour just outside the fill, on rows that reach the left side.
+ edge = None
+ rows = [y for y in range(t, b + 1) if same[y, l]][:: max((b - t) // 7, 1)]
+ if l - S - 3 >= 0 and len(rows) >= 3:
+ rings = [a[y, l - 1] for y in rows]
+ beyond = [a[y, l - S - 2] for y in rows]
+ if all(near(q, rings[0], 5) for q in rings) and not near(rings[0], fill, tol) and not near(rings[0], beyond[0], 4):
+ edge = rings[0].copy()
+ box = [box[0] - 1, box[1] - 1, box[2] + 2, box[3] + 2]
+ radius = radius + 1 if radius else 0
+ return {"box": box, "radius": radius, "fill": fill, "edge": edge, "seed": list(seed)}
+
+def sample_rect(rect, theme):
+ """The same box's fill and edge in another reference."""
+ fill = at(theme, *rect["seed"])
+ edge = None
+ if rect["edge"] is not None:
+ x, y, w, h = rect["box"]
+ edge = at(theme, x + 0.25, y + h / 2)
+ return fill, edge
+
+def cover(box, radius, x0, y0, nx, ny):
+ """A rounded box's coverage of each device pixel in a patch (the app's antialiasing: half a pixel either side of the edge)."""
+ x, y, w, h = (v * S for v in box)
+ r = min(radius * S, w / 2, h / 2)
+ px, py = x0 + np.arange(nx) + 0.5, y0 + np.arange(ny) + 0.5
+ qx = np.abs(px[None, :] - (x + w / 2)) - (w / 2 - r)
+ qy = np.abs(py[:, None] - (y + h / 2)) - (h / 2 - r)
+ d = np.hypot(np.maximum(qx, 0), np.maximum(qy, 0)) + np.minimum(np.maximum(qx, qy), 0) - r
+ return np.clip(0.5 - d, 0, 1)
+
+def refine(rect, radii, theme=P):
+ """Settle a small box to the half point and its radius: the shape whose painted rim best matches the reference's."""
+ a = REFS[theme]
+ box, fill = list(rect["box"]), rect["fill"].astype(float)
+ m = 3
+ x0, y0 = int((box[0] - m) * S), int((box[1] - m) * S)
+ nx, ny = int((box[2] + 2 * m) * S), int((box[3] + 2 * m) * S)
+ patch = a[y0:y0 + ny, x0:x0 + nx].astype(float)
+ ground = np.median(np.concatenate([patch[0], patch[-1], patch[:, 0], patch[:, -1]]), axis=0)
+ def err(b, r):
+ c = cover(b, r, x0, y0, nx, ny)
+ grown = cover([b[0] - 2, b[1] - 2, b[2] + 4, b[3] + 4], r + 2, x0, y0, nx, ny)
+ shrunk = cover([b[0] + 2.5, b[1] + 2.5, max(b[2] - 5, 0), max(b[3] - 5, 0)], max(r - 2.5, 0), x0, y0, nx, ny)
+ rim = (grown - shrunk) > 0.5
+ pred = ground + (fill - ground) * c[:, :, None]
+ return float(np.abs(pred - patch).sum(axis=2)[rim].mean())
+ best = (err(box, rect["radius"]), box, rect["radius"])
+ for _ in range(2):
+ for axis in (0, 1):
+ for d0 in (-1, -0.5, 0, 0.5, 1):
+ for d1 in (-1, -0.5, 0, 0.5, 1):
+ for r in radii:
+ b = list(best[1])
+ b[axis] += d0; b[axis + 2] += d1 - d0
+ e = err(b, r)
+ if e < best[0] - 1e-6: best = (e, b, r)
+ rect["box"], rect["radius"] = best[1], best[2]
+ return rect
+
+def hlines(box, seed, theme=P):
+ """Hairlines across a box: rows that are one other colour nearly all the way across, a pixel or two tall."""
+ a = REFS[theme]
+ x, y, w, h = box
+ fill = at(theme, *seed)
+ block = a[int(y * S):int((y + h) * S), int((x + 1) * S):int((x + w - 1) * S)]
+ off = (np.abs(block - fill).sum(axis=2) > 5).mean(axis=1)
+ lines, r = [], 0
+ while r < len(off):
+ if off[r] > 0.93:
+ e = r
+ while e + 1 < len(off) and off[e + 1] > 0.93: e += 1
+ if e - r + 1 <= 2 and (r < 3 or off[r - 3] < 0.6) and (e + 3 >= len(off) or off[e + 3] < 0.6):
+ lines.append((y + r / S, (e - r + 1) / S))
+ r = e + 1
+ else:
+ r += 1
+ return lines
diff --git a/apps/landing/tools/recreate/phone_check.py b/apps/landing/tools/recreate/phone_check.py
new file mode 100644
index 000000000..b510b92f9
--- /dev/null
+++ b/apps/landing/tools/recreate/phone_check.py
@@ -0,0 +1,38 @@
+"""Render the phone recreation at 3x and diff it against the iOS app's screenshot.
+phone_check.py [--tune] prints, per element, the shift (in points) that best meets the reference."""
+import os, re, subprocess, sys, pathlib
+import numpy as np
+from PIL import Image
+ROOT = pathlib.Path(__file__).resolve().parents[3]
+CHROME = os.environ.get("CHROME", "chromium")
+here = pathlib.Path(os.environ.get("PHONE_SRC", ROOT / "apps/landing/src/components/app"))
+FONTS = ROOT / "apps/landing/src/assets/fonts"
+css = (here / "phone.css").read_text().replace("../../assets", f"file://{ROOT}/apps/landing/src/assets")
+frag = (here / "phone.fragment.html").read_text()
+page = f"""{frag}
"""
+open("phone-test.html", "w").write(page)
+subprocess.run([CHROME, "--headless=new", "--no-sandbox", "--disable-gpu", "--disable-lcd-text", "--hide-scrollbars", "--allow-file-access-from-files", "--force-device-scale-factor=3", "--window-size=402,874", "--virtual-time-budget=3000", "--screenshot=" + os.path.abspath("phone-web.png"), "file://" + os.path.abspath("phone-test.html")], capture_output=True)
+web = np.asarray(Image.open("phone-web.png").convert("RGB")).astype(np.int16)
+ref = np.asarray(Image.open(os.environ.get("PHONE_REF", ROOT / "docs/screenshots/message-captions/ios-dark.png")).convert("RGB")).astype(np.int16)
+S = 3
+d = np.abs(web - ref)
+for name, (y0, y1) in {"screen": (0, 874), "header": (56, 112), "conversation": (120, 480), "composer": (776, 838)}.items():
+ r = d[y0 * S:y1 * S]
+ print(f"{name:13} mae {r.mean():5.2f} >32: {100 * (r.max(axis=2) > 32).mean():4.1f}%")
+Image.fromarray(np.concatenate([ref, web, np.clip(d * 4, 0, 255)], axis=1).astype(np.uint8)).save("phone-side.png")
+if "--tune" in sys.argv:
+ for m in re.finditer(r'data-n="([\w-]+)"[^>]*style="left:([\d.]+)px;top:([\d.]+)px(?:;width:([\d.]+)px)?(?:;height:([\d.]+)px)?', frag):
+ name, x, y = m.group(1), float(m.group(2)), float(m.group(3))
+ w = float(m.group(4) or 300); h = float(m.group(5) or 26)
+ x0, y0, x1, y1 = int(x * S) - 3, int(y * S) - 3, min(int((x + w) * S) + 3, 1206 - 12), int((y + h) * S) + 3
+ best = (1e18, 0, 0)
+ for dy in range(-12, 13):
+ for dx in range(-12, 13):
+ a = web[y0:y1, x0:x1]; b = ref[y0 + dy:y1 + dy, x0 + dx:x1 + dx]
+ if a.shape != b.shape or not a.size: continue
+ e = float(np.abs(a - b).sum()) * (1 + 0.003 * (abs(dx) + abs(dy)))
+ if e < best[0]: best = (e, dx, dy)
+ if best[1] or best[2]: print(f" {name:12} move {best[1] / S:+.2f}, {best[2] / S:+.2f}")
diff --git a/apps/landing/tools/recreate/reference/artwork/api.svg b/apps/landing/tools/recreate/reference/artwork/api.svg
new file mode 100644
index 000000000..a68d60755
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/artwork/api.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/artwork/docs.svg b/apps/landing/tools/recreate/reference/artwork/docs.svg
new file mode 100644
index 000000000..8d9ae710e
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/artwork/docs.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/artwork/uptime.svg b/apps/landing/tools/recreate/reference/artwork/uptime.svg
new file mode 100644
index 000000000..912ee15a7
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/artwork/uptime.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/artwork/web.svg b/apps/landing/tools/recreate/reference/artwork/web.svg
new file mode 100644
index 000000000..9197c657c
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/artwork/web.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/session/offsets.json b/apps/landing/tools/recreate/reference/session/offsets.json
new file mode 100644
index 000000000..3db208f6e
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/session/offsets.json
@@ -0,0 +1 @@
+{"480": [0.0, -0.5], "494": [0.0, -0.5], "695": [0.0, -0.5], "2617": [0.0, -0.5], "2763": [0.0, -0.5], "2766": [0.0, -0.5], "2769": [0.0, -0.5], "2663": [0.0, -0.5], "2772": [0.0, -0.5], "2775": [0.0, -0.5], "2698": [0.0, -0.5], "2778": [0.0, -0.5], "2781": [0.0, -0.5], "2734": [0.0, -0.5], "2784": [0.0, -0.5], "290": [-0.5, -0.5], "717": [-0.5, -0.5], "719": [-0.5, -0.5], "868": [-0.5, 0.0], "782": [-0.5, 0.0], "311": [0.0, -0.5], "486": [0.0, -0.5], "500": [0.0, -0.5], "618": [0.0, -0.5], "1271": [0.0, -0.5], "2627": [0.0, -0.5], "2629": [-0.5, 0.0], "2638": [0.0, -0.5], "2653": [0.0, -0.5], "2328": [0.0, -0.5], "2673": [0.0, -0.5], "2687": [0.0, -0.5], "2445": [0.0, -0.5], "2708": [0.0, -0.5], "2723": [0.0, -0.5], "2562": [0.5, -0.5], "2744": [0.0, -0.5], "531": [0.0, -0.5], "963": [-0.5, 0.5], "962": [0.0, -0.5], "2142": [0.0, 0.5], "2136": [0.0, 0.5], "176": [-0.5, -0.5], "784": [0.5, 0.0], "814": [0.0, -5.5], "1008": [0.5, 0.0], "1007": [0.5, 0.0], "2091": [0.0, -0.5], "2085": [-0.5, 0.0], "2106": [0.0, -0.5], "1001": [0.0, -0.5], "1137": [0.0, -0.5], "1039": [-0.5, 0.0], "1036": [0.5, 0.0], "966": [0.0, -0.5], "992": [-0.5, 0.0], "1156": [0.5, 0.0]}
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/session/ref-dark.png b/apps/landing/tools/recreate/reference/session/ref-dark.png
new file mode 100644
index 000000000..aa84a4daf
Binary files /dev/null and b/apps/landing/tools/recreate/reference/session/ref-dark.png differ
diff --git a/apps/landing/tools/recreate/reference/session/ref-light.png b/apps/landing/tools/recreate/reference/session/ref-light.png
new file mode 100644
index 000000000..57a180ac7
Binary files /dev/null and b/apps/landing/tools/recreate/reference/session/ref-light.png differ
diff --git a/apps/landing/tools/recreate/reference/session/tree.json b/apps/landing/tools/recreate/reference/session/tree.json
new file mode 100644
index 000000000..149b098c3
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/session/tree.json
@@ -0,0 +1 @@
+[{"box": [0, 0, 1320, 840], "depth": 5, "n": 6, "role": "dialog", "text": "Zeron"}, {"box": [1304, 824, 0, 0], "depth": 6, "id": "host-toasts", "n": 7}, {"box": [0, 0, 1320, 840], "depth": 3, "id": "shell", "n": 409}, {"box": [0, 0, 1320, 840], "depth": 4, "id": "shell-chats", "n": 410}, {"box": [0, 0, 277, 840], "depth": 8, "id": "shell-sidebar", "n": 468}, {"box": [5, 42, 272, 793], "depth": 12, "id": "sidebar-content", "n": 473}, {"box": [13, 50, 256, 94], "depth": 13, "id": "sidebar-actions", "n": 474}, {"box": [13, 50, 256, 30], "depth": 15, "n": 476, "role": "button", "text": "New chat"}, {"box": [20, 57, 16, 16], "depth": 19, "n": 480, "role": "img"}, {"box": [43, 56, 57, 19], "depth": 21, "n": 486, "role": "text", "text": "New chat"}, {"box": [228, 57, 33, 16], "depth": 19, "n": 487, "role": "text", "text": "Ctrl+N"}, {"box": [13, 82, 256, 30], "depth": 15, "n": 490, "role": "button", "text": "Search"}, {"box": [20, 89, 16, 16], "depth": 19, "n": 494, "role": "img"}, {"box": [43, 88, 42, 19], "depth": 21, "n": 500, "role": "text", "text": "Search"}, {"box": [229, 89, 32, 16], "depth": 19, "n": 501, "role": "text", "text": "Ctrl+K"}, {"box": [13, 114, 256, 30], "depth": 17, "n": 609, "role": "button", "text": "Pull requests"}, {"box": [20, 121, 16, 16], "depth": 23, "n": 695, "role": "img"}, {"box": [43, 120, 77, 19], "depth": 23, "n": 618, "role": "text", "text": "Pull requests"}, {"box": [13, 160, 256, 627], "depth": 13, "id": "sidebar", "n": 507}, {"box": [13, 160, 256, 627], "depth": 17, "n": 1287, "role": "scroll"}, {"box": [13, 160, 256, 24], "depth": 23, "n": 1292, "role": "button", "text": "Projects"}, {"box": [21, 164, 43, 16], "depth": 26, "n": 1289, "role": "text", "text": "Projects"}, {"box": [13, 186, 256, 30], "depth": 25, "n": 1282, "role": "button", "text": "api"}, {"box": [19, 192, 18, 18], "depth": 35, "n": 2617, "role": "img"}, {"box": [43, 192, 18, 19], "depth": 31, "n": 1271, "role": "text", "text": "api"}, {"box": [13, 218, 256, 30], "depth": 26, "n": 1343, "role": "button", "text": "Fix burst at the rate limit boundary"}, {"box": [42, 226, 14, 14], "depth": 37, "n": 2763, "role": "img"}, {"box": [64, 224, 209, 19], "depth": 36, "n": 2627, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [232, 233, 0, 0], "depth": 31, "n": 1244, "role": "group"}, {"box": [240, 225, 21, 16], "depth": 35, "n": 2629, "role": "text", "text": "now"}, {"box": [64, 244, 11, 11], "depth": 34, "n": 2631, "role": "img"}, {"box": [79, 241, 63, 16], "depth": 34, "n": 1231, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 250, 256, 30], "depth": 26, "n": 1218, "role": "button", "text": "Return a real Retry-After"}, {"box": [42, 258, 14, 14], "depth": 37, "n": 2766, "role": "img"}, {"box": [64, 256, 150, 19], "depth": 36, "n": 2638, "role": "text", "text": "Return a real Retry-After"}, {"box": [237, 265, 0, 0], "depth": 31, "n": 1206, "role": "group"}, {"box": [245, 257, 16, 16], "depth": 36, "n": 2641, "role": "group", "text": "Completed"}, {"box": [246, 258, 14, 14], "depth": 38, "n": 2643, "role": "img"}, {"box": [64, 276, 11, 11], "depth": 34, "n": 2646, "role": "img"}, {"box": [79, 273, 63, 16], "depth": 34, "n": 1194, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 282, 256, 30], "depth": 26, "n": 1182, "role": "button", "text": "Sweep idle keys without a timer"}, {"box": [42, 290, 14, 14], "depth": 37, "n": 2769, "role": "img"}, {"box": [64, 288, 193, 19], "depth": 36, "n": 2653, "role": "text", "text": "Sweep idle keys without a timer"}, {"box": [237, 297, 0, 0], "depth": 31, "n": 398, "role": "group"}, {"box": [245, 289, 16, 16], "depth": 36, "n": 2656, "role": "group", "text": "Working"}, {"box": [64, 308, 11, 11], "depth": 34, "n": 2660, "role": "img"}, {"box": [79, 305, 63, 16], "depth": 34, "n": 2300, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 314, 256, 30], "depth": 25, "n": 2313, "role": "button", "text": "web"}, {"box": [19, 320, 18, 18], "depth": 35, "n": 2663, "role": "img"}, {"box": [43, 320, 26, 19], "depth": 31, "n": 2328, "role": "text", "text": "web"}, {"box": [13, 346, 256, 30], "depth": 26, "n": 2345, "role": "button", "text": "Speed up the dashboard's first paint"}, {"box": [42, 354, 14, 14], "depth": 37, "n": 2772, "role": "img"}, {"box": [64, 352, 220, 19], "depth": 36, "n": 2673, "role": "text", "text": "Speed up the dashboard's first paint"}, {"box": [237, 361, 0, 0], "depth": 31, "n": 2361, "role": "group"}, {"box": [245, 353, 16, 16], "depth": 36, "n": 2676, "role": "group", "text": "Working"}, {"box": [64, 372, 11, 11], "depth": 34, "n": 2680, "role": "img"}, {"box": [79, 369, 63, 16], "depth": 34, "n": 2374, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 378, 256, 30], "depth": 26, "n": 2388, "role": "button", "text": "Add dark mode to settings"}, {"box": [42, 386, 14, 14], "depth": 37, "n": 2775, "role": "img"}, {"box": [64, 384, 161, 19], "depth": 36, "n": 2687, "role": "text", "text": "Add dark mode to settings"}, {"box": [237, 393, 0, 0], "depth": 31, "n": 2404, "role": "group"}, {"box": [245, 385, 16, 16], "depth": 36, "n": 2690, "role": "group", "text": "Completed"}, {"box": [246, 386, 14, 14], "depth": 38, "n": 2692, "role": "img"}, {"box": [64, 404, 11, 11], "depth": 34, "n": 2695, "role": "img"}, {"box": [79, 401, 63, 16], "depth": 34, "n": 2417, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 410, 256, 30], "depth": 25, "n": 2430, "role": "button", "text": "uptime"}, {"box": [19, 416, 18, 18], "depth": 35, "n": 2698, "role": "img"}, {"box": [43, 416, 43, 19], "depth": 31, "n": 2445, "role": "text", "text": "uptime"}, {"box": [13, 442, 256, 30], "depth": 26, "n": 2462, "role": "button", "text": "Page only when two regions agree"}, {"box": [42, 450, 14, 14], "depth": 37, "n": 2778, "role": "img"}, {"box": [64, 448, 208, 19], "depth": 36, "n": 2708, "role": "text", "text": "Page only when two regions agree"}, {"box": [237, 457, 0, 0], "depth": 31, "n": 2478, "role": "group"}, {"box": [245, 449, 16, 16], "depth": 36, "n": 2711, "role": "group", "text": "Completed"}, {"box": [246, 450, 14, 14], "depth": 38, "n": 2713, "role": "img"}, {"box": [64, 468, 11, 11], "depth": 34, "n": 2716, "role": "img"}, {"box": [79, 465, 63, 16], "depth": 34, "n": 2491, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 474, 256, 30], "depth": 26, "n": 2505, "role": "button", "text": "Why Frankfurt flapped overnight"}, {"box": [42, 482, 14, 14], "depth": 37, "n": 2781, "role": "img"}, {"box": [64, 480, 197, 19], "depth": 36, "n": 2723, "role": "text", "text": "Why Frankfurt flapped overnight"}, {"box": [237, 489, 0, 0], "depth": 31, "n": 2521, "role": "group"}, {"box": [245, 481, 16, 16], "depth": 36, "n": 2726, "role": "group", "text": "Completed"}, {"box": [246, 482, 14, 14], "depth": 38, "n": 2728, "role": "img"}, {"box": [64, 500, 11, 11], "depth": 34, "n": 2731, "role": "img"}, {"box": [79, 497, 63, 16], "depth": 34, "n": 2534, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 506, 256, 30], "depth": 25, "n": 2547, "role": "button", "text": "docs"}, {"box": [19, 512, 18, 18], "depth": 35, "n": 2734, "role": "img"}, {"box": [43, 512, 29, 19], "depth": 31, "n": 2562, "role": "text", "text": "docs"}, {"box": [13, 538, 256, 30], "depth": 26, "n": 2579, "role": "button", "text": "Write up the October incident"}, {"box": [42, 546, 14, 14], "depth": 37, "n": 2784, "role": "img"}, {"box": [64, 544, 179, 19], "depth": 36, "n": 2744, "role": "text", "text": "Write up the October incident"}, {"box": [237, 553, 0, 0], "depth": 31, "n": 2595, "role": "group"}, {"box": [245, 545, 16, 16], "depth": 36, "n": 2747, "role": "group", "text": "Completed"}, {"box": [246, 546, 14, 14], "depth": 38, "n": 2749, "role": "img"}, {"box": [64, 564, 11, 11], "depth": 34, "n": 2752, "role": "img"}, {"box": [79, 561, 63, 16], "depth": 34, "n": 2608, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 797, 224, 30], "depth": 17, "focused": true, "n": 522, "role": "button", "text": "Local"}, {"box": [18, 802, 20, 20], "depth": 26, "n": 698, "role": "group", "text": "Local"}, {"box": [43, 803, 33, 19], "depth": 23, "n": 531, "role": "text", "text": "Local"}, {"box": [239, 797, 30, 30], "checked": false, "depth": 17, "n": 534, "role": "checkbox", "text": "Settings"}, {"box": [246, 804, 16, 16], "depth": 18, "n": 535, "role": "img"}, {"box": [5, 0, 272, 42], "depth": 11, "id": "sidebar-drag", "n": 537}, {"box": [94, 9, 24, 24], "depth": 14, "n": 541, "role": "button", "text": "Sidebar view options"}, {"box": [98, 13, 16, 16], "depth": 15, "n": 542, "role": "img"}, {"box": [38, -28, 137, 31], "depth": 16, "n": 395, "role": "dialog", "text": "Tooltip"}, {"box": [49, -21, 115, 17], "depth": 19, "n": 762, "role": "text", "text": "Sidebar view options"}, {"box": [94, 37, 232, 642], "depth": 15, "n": 801, "role": "dialog", "text": "Sidebar view options"}, {"box": [99, 42, 222, 28], "checked": false, "depth": 20, "n": 1109, "role": "checkbox", "text": "Activity"}, {"box": [108, 48, 16, 16], "depth": 22, "n": 2151, "role": "img"}, {"box": [133, 47, 45, 19], "depth": 23, "n": 2108, "role": "text", "text": "Activity"}, {"box": [99, 72, 222, 28], "depth": 20, "n": 838, "role": "button", "text": "Activity settings\u2026"}, {"box": [108, 78, 16, 16], "depth": 22, "n": 350, "role": "img"}, {"box": [133, 77, 103, 19], "depth": 23, "n": 949, "role": "text", "text": "Activity settings\u2026"}, {"box": [95, 104, 230, 1], "depth": 19, "n": 184, "role": "group"}, {"box": [95, 105, 230, 118], "depth": 19, "n": 40, "role": "group", "text": "Organize"}, {"box": [99, 109, 222, 20], "depth": 20, "n": 809, "role": "group"}, {"box": [107, 109, 46, 16], "depth": 21, "n": 1103, "role": "text", "text": "Organize"}, {"box": [99, 131, 222, 28], "checked": true, "depth": 22, "n": 797, "role": "checkbox", "text": "By project"}, {"box": [108, 137, 16, 16], "depth": 24, "n": 1323, "role": "img"}, {"box": [133, 136, 60, 19], "depth": 25, "n": 1324, "role": "text", "text": "By project"}, {"box": [299, 138, 14, 14], "depth": 25, "n": 1301, "role": "img"}, {"box": [99, 161, 222, 28], "checked": false, "depth": 22, "n": 1321, "role": "checkbox", "text": "By device"}, {"box": [108, 167, 16, 16], "depth": 24, "n": 1318, "role": "img"}, {"box": [133, 166, 57, 19], "depth": 25, "n": 1314, "role": "text", "text": "By device"}, {"box": [99, 191, 222, 28], "checked": false, "depth": 20, "n": 64, "role": "checkbox", "text": "None"}, {"box": [108, 197, 16, 16], "depth": 22, "n": 833, "role": "img"}, {"box": [133, 196, 32, 19], "depth": 23, "n": 42, "role": "text", "text": "None"}, {"box": [95, 223, 230, 1], "depth": 19, "n": 1102, "role": "group"}, {"box": [95, 224, 230, 88], "depth": 19, "n": 2112, "role": "group", "text": "Sort"}, {"box": [99, 228, 222, 20], "depth": 20, "n": 63, "role": "group"}, {"box": [107, 228, 22, 16], "depth": 21, "n": 2069, "role": "text", "text": "Sort"}, {"box": [99, 250, 222, 28], "checked": true, "depth": 20, "n": 832, "role": "checkbox", "text": "Last updated"}, {"box": [108, 256, 16, 16], "depth": 22, "n": 1015, "role": "img"}, {"box": [133, 255, 78, 19], "depth": 23, "n": 1088, "role": "text", "text": "Last updated"}, {"box": [299, 257, 14, 14], "depth": 23, "n": 1312, "role": "img"}, {"box": [99, 280, 222, 28], "checked": false, "depth": 20, "n": 62, "role": "checkbox", "text": "Created"}, {"box": [108, 286, 16, 16], "depth": 22, "n": 831, "role": "img"}, {"box": [133, 285, 47, 19], "depth": 23, "n": 53, "role": "text", "text": "Created"}, {"box": [95, 312, 230, 1], "depth": 19, "n": 1100, "role": "group"}, {"box": [95, 313, 230, 298], "depth": 19, "n": 2110, "role": "group", "text": "Show"}, {"box": [99, 317, 222, 20], "depth": 20, "n": 61, "role": "group"}, {"box": [107, 317, 29, 16], "depth": 21, "n": 2067, "role": "text", "text": "Show"}, {"box": [99, 339, 222, 28], "checked": true, "depth": 20, "n": 830, "role": "checkbox", "text": "Branch"}, {"box": [108, 345, 16, 16], "depth": 22, "n": 1013, "role": "img"}, {"box": [133, 344, 42, 19], "depth": 23, "n": 624, "role": "text", "text": "Branch"}, {"box": [299, 346, 14, 14], "depth": 23, "n": 1309, "role": "img"}, {"box": [99, 369, 222, 28], "checked": true, "depth": 20, "n": 2205, "role": "checkbox", "text": "Pull request"}, {"box": [108, 375, 16, 16], "depth": 22, "n": 2207, "role": "img"}, {"box": [133, 374, 71, 19], "depth": 23, "n": 2211, "role": "text", "text": "Pull request"}, {"box": [299, 376, 14, 14], "depth": 23, "n": 1311, "role": "img"}, {"box": [99, 399, 222, 28], "checked": true, "depth": 20, "n": 2214, "role": "checkbox", "text": "Harness"}, {"box": [108, 405, 16, 16], "depth": 22, "n": 2216, "role": "img"}, {"box": [133, 404, 49, 19], "depth": 23, "n": 2220, "role": "text", "text": "Harness"}, {"box": [299, 406, 14, 14], "depth": 23, "n": 1307, "role": "img"}, {"box": [99, 429, 222, 28], "checked": true, "depth": 20, "n": 2223, "role": "checkbox", "text": "Project icon"}, {"box": [108, 435, 16, 16], "depth": 22, "n": 2225, "role": "img"}, {"box": [133, 434, 70, 19], "depth": 23, "n": 2229, "role": "text", "text": "Project icon"}, {"box": [299, 436, 14, 14], "depth": 23, "n": 1296, "role": "img"}, {"box": [99, 459, 222, 28], "checked": true, "depth": 20, "n": 2232, "role": "checkbox", "text": "Location"}, {"box": [108, 465, 16, 16], "depth": 22, "n": 2234, "role": "img"}, {"box": [133, 464, 51, 19], "depth": 23, "n": 2238, "role": "text", "text": "Location"}, {"box": [299, 466, 14, 14], "depth": 23, "n": 1304, "role": "img"}, {"box": [99, 489, 222, 28], "checked": true, "depth": 20, "n": 2241, "role": "checkbox", "text": "Active when collapsed"}, {"box": [108, 495, 16, 16], "depth": 22, "n": 2243, "role": "img"}, {"box": [133, 494, 134, 19], "depth": 23, "n": 2247, "role": "text", "text": "Active when collapsed"}, {"box": [299, 496, 14, 14], "depth": 23, "n": 1351, "role": "img"}, {"box": [99, 519, 222, 28], "checked": false, "depth": 20, "n": 2250, "role": "checkbox", "text": "Project filter"}, {"box": [108, 525, 16, 16], "depth": 22, "n": 2252, "role": "img"}, {"box": [133, 524, 73, 19], "depth": 23, "n": 2256, "role": "text", "text": "Project filter"}, {"box": [99, 549, 222, 28], "checked": false, "depth": 20, "n": 2259, "role": "checkbox", "text": "Archived"}, {"box": [108, 555, 16, 16], "depth": 22, "n": 2261, "role": "img"}, {"box": [133, 554, 52, 19], "depth": 23, "n": 2265, "role": "text", "text": "Archived"}, {"box": [99, 579, 222, 28], "checked": false, "depth": 20, "n": 2268, "role": "checkbox", "text": "Empty projects"}, {"box": [108, 585, 16, 16], "depth": 22, "n": 2270, "role": "img"}, {"box": [133, 584, 90, 19], "depth": 23, "n": 2274, "role": "text", "text": "Empty projects"}, {"box": [95, 611, 230, 1], "depth": 19, "n": 2277, "role": "group"}, {"box": [99, 616, 222, 28], "depth": 20, "n": 2279, "role": "group", "text": "Compact"}, {"box": [133, 621, 54, 19], "depth": 23, "n": 2283, "role": "text", "text": "Compact"}, {"box": [273, 618, 40, 24], "checked": true, "depth": 21, "n": 2284, "role": "switch", "text": "Compact"}, {"box": [292, 621, 18, 18], "depth": 22, "id": "switch-knob", "n": 2285}, {"box": [99, 646, 222, 28], "depth": 20, "n": 2286, "role": "menuitem", "text": "Create section"}, {"box": [108, 652, 16, 16], "depth": 22, "n": 2288, "role": "img"}, {"box": [133, 651, 86, 19], "depth": 23, "n": 2292, "role": "text", "text": "Create section"}, {"box": [269, 42, 12, 793], "depth": 10, "n": 545, "role": "group", "text": "Resize sidebar"}, {"box": [277, 0, 1043, 38], "depth": 7, "id": "shell-drag", "n": 221}, {"box": [281, 42, 515, 793], "depth": 8, "id": "shell-page-room", "n": 243}, {"box": [281, 42, 515, 793], "depth": 12, "id": "split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 2198}, {"box": [281, 42, 515, 793], "depth": 9, "id": "shell-page", "n": 408}, {"box": [281, 42, 515, 793], "depth": 10, "id": "shell-page-card", "n": 426}, {"box": [282, 43, 513, 791], "depth": 16, "id": "chat-session", "n": 381}, {"box": [282, 43, 513, 751], "depth": 26, "n": 675, "role": "document"}, {"box": [282, 43, 513, 751], "depth": 27, "id": "transcript", "n": 431, "role": "scroll", "text": "Conversation"}, {"box": [302, 59, 473, 92], "depth": 34, "id": "585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9", "n": 2163, "role": "article", "text": "You"}, {"box": [413, 69, 343, 72], "depth": 45, "n": 963, "role": "text", "text": "Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it."}, {"box": [302, 199, 473, 470], "depth": 33, "n": 740, "role": "article", "text": "Reply"}, {"box": [302, 199, 473, 26], "depth": 37, "n": 88, "role": "button", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [302, 204, 251, 17], "depth": 42, "n": 417, "role": "text", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [302, 237, 459, 120], "depth": 44, "n": 962, "role": "text", "text": "Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after."}, {"box": [302, 369, 473, 26], "depth": 37, "n": 2087, "role": "button", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [302, 374, 166, 17], "depth": 42, "n": 734, "role": "text", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [302, 407, 453, 48], "depth": 44, "n": 1042, "role": "text", "text": "Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary."}, {"box": [302, 471, 473, 78], "depth": 43, "n": 1034, "role": "list"}, {"box": [302, 471, 473, 48], "depth": 44, "n": 1060, "role": "listitem", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [302, 471, 24, 24], "depth": 45, "n": 1133, "role": "group"}, {"box": [326, 471, 410, 48], "depth": 47, "n": 1126, "role": "text", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [302, 525, 473, 24], "depth": 44, "n": 1123, "role": "listitem", "text": "5 of 5 tests pass"}, {"box": [302, 525, 24, 24], "depth": 45, "n": 1119, "role": "group"}, {"box": [326, 525, 115, 24], "depth": 47, "n": 2142, "role": "text", "text": "5 of 5 tests pass"}, {"box": [302, 565, 462, 72], "depth": 44, "n": 2136, "role": "text", "text": "This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet."}, {"box": [785, 43, 10, 751], "depth": 25, "id": "transcript-rail", "n": 885, "role": "group"}, {"box": [790, 47, 3, 0], "depth": 26, "n": 425, "role": "group"}, {"box": [282, 745, 513, 81], "depth": 11, "id": "chat-composer-dock", "n": 242}, {"box": [314, 745, 449, 81], "depth": 12, "id": "chat-composer", "n": 239}, {"box": [314, 745, 0, 0], "depth": 22, "n": 122, "role": "tablist"}, {"box": [314, 745, 0, 0], "depth": 22, "n": 153, "role": "button"}, {"box": [314, 745, 0, 0], "depth": 22, "n": 154, "role": "button", "text": "Fold what's waiting"}, {"box": [314, 745, 0, 0], "depth": 23, "n": 155, "role": "img"}, {"box": [314, 745, 0, 0], "depth": 20, "n": 158, "role": "scroll"}, {"box": [314, 745, 0, 0], "depth": 19, "n": 163, "role": "group"}, {"box": [361, 759, 320, 22], "depth": 20, "n": 172, "role": "textbox", "text": "Message", "value": ""}, {"box": [361, 759, 320, 22], "depth": 22, "n": 176, "text": "Ask anything, @ to mention\u2026"}, {"box": [325, 756, 28, 28], "depth": 22, "n": 289, "role": "button", "text": "Attach"}, {"box": [330, 761, 18, 18], "depth": 23, "n": 290, "role": "img"}, {"box": [689, 756, 28, 28], "depth": 22, "id": "dictation-microphone", "n": 718, "role": "button", "text": "Hold to dictate"}, {"box": [694, 761, 18, 18], "depth": 23, "n": 717, "role": "img"}, {"box": [725, 756, 28, 28], "depth": 24, "disabled": true, "n": 729, "role": "button", "text": "Send message"}, {"box": [732, 763, 14, 14], "depth": 25, "n": 719, "role": "img"}, {"box": [314, 802, 449, 24], "depth": 17, "id": "composer-toolbar", "n": 190}, {"box": [324, 802, 93, 24], "depth": 21, "n": 247, "role": "button", "text": "Access"}, {"box": [330, 808, 12, 12], "depth": 25, "n": 293, "role": "img"}, {"box": [348, 805, 63, 17], "depth": 27, "n": 296, "role": "text", "text": "Full access"}, {"box": [421, 802, 150, 24], "depth": 21, "n": 786, "role": "group", "text": "Branch main"}, {"box": [314, 802, 17, 17], "depth": 22, "n": 787, "role": "group"}, {"box": [314, 802, 17, 17], "depth": 23, "n": 1071, "role": "text", "text": "api"}, {"box": [314, 802, 27, 17], "depth": 22, "n": 1068, "role": "group"}, {"box": [314, 802, 27, 17], "depth": 23, "n": 1064, "role": "text", "text": "main"}, {"box": [314, 802, 35, 17], "depth": 22, "n": 1079, "role": "group"}, {"box": [314, 802, 35, 17], "depth": 23, "n": 1135, "role": "text", "text": "studio"}, {"box": [427, 808, 12, 12], "depth": 22, "id": "composer-place-lead", "n": 1160}, {"box": [427, 808, 12, 12], "depth": 26, "n": 911, "role": "img"}, {"box": [445, 805, 35, 17], "depth": 24, "id": "composer-place-device", "n": 303}, {"box": [445, 805, 35, 17], "depth": 25, "id": "composer-place-device", "n": 322}, {"box": [445, 805, 35, 17], "depth": 28, "id": "composer-place-device", "n": 700, "text": "studio"}, {"box": [484, 809, 10, 10], "depth": 24, "n": 384, "role": "group"}, {"box": [484, 809, 10, 10], "depth": 25, "n": 385, "role": "img"}, {"box": [500, 805, 17, 17], "depth": 23, "id": "composer-place-project", "n": 886}, {"box": [500, 805, 17, 17], "depth": 24, "id": "composer-place-project", "n": 676}, {"box": [500, 805, 17, 17], "depth": 27, "id": "composer-place-project", "n": 701, "text": "api"}, {"box": [523, 809, 10, 10], "depth": 25, "n": 2145, "role": "group"}, {"box": [523, 809, 10, 10], "depth": 26, "n": 2187, "role": "img"}, {"box": [537, 805, 28, 17], "depth": 24, "id": "composer-place-branch", "n": 918}, {"box": [537, 805, 27, 17], "depth": 25, "id": "composer-place-branch", "n": 69}, {"box": [537, 805, 27, 17], "depth": 28, "id": "composer-place-branch", "n": 2174, "text": "main"}, {"box": [641, 802, 112, 24], "depth": 23, "n": 874, "role": "button", "text": "Model"}, {"box": [647, 808, 12, 12], "depth": 28, "n": 285, "role": "img"}, {"box": [665, 805, 50, 17], "depth": 30, "n": 773, "role": "text", "text": "Opus 5.5"}, {"box": [721, 805, 26, 17], "depth": 29, "n": 784, "role": "text", "text": "High"}, {"box": [281, 42, 0, 0], "depth": 13, "n": 821, "role": "img"}, {"box": [298, 43, 329, 40], "depth": 11, "id": "session-header", "n": 1083}, {"box": [298, 43, 0, 0], "depth": 12, "id": "page-title", "n": 1165}, {"box": [298, 43, 0, 0], "depth": 15, "n": 2192, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [800, 42, 515, 793], "depth": 7, "id": "shell-files", "n": 234}, {"box": [800, 42, 515, 793], "depth": 10, "id": "panel", "n": 556}, {"box": [801, 43, 513, 791], "depth": 12, "id": "shell-files-content", "n": 558}, {"box": [801, 43, 513, 40], "depth": 14, "id": "panel-strip", "n": 560, "role": "tablist", "text": "Panel tabs"}, {"box": [807, 49, 501, 28], "depth": 16, "n": 562, "role": "scroll"}, {"box": [807, 49, 110, 28], "depth": 23, "id": "panel-tab-chosen", "n": 1161}, {"box": [807, 49, 110, 28], "depth": 22, "id": "panel-tab-tab1", "n": 2095, "role": "tab", "text": "Changes"}, {"box": [814, 56, 14, 14], "depth": 24, "n": 870, "role": "img"}, {"box": [837, 55, 50, 17], "depth": 25, "n": 83, "role": "text", "text": "Changes"}, {"box": [919, 49, 28, 28], "depth": 22, "n": 2086, "role": "button", "text": "New Tab"}, {"box": [926, 56, 14, 14], "depth": 23, "n": 868, "role": "img"}, {"box": [807, 49, 0, 0], "depth": 16, "id": "panel-tab-lifted", "n": 571}, {"box": [801, 83, 513, 751], "depth": 18, "n": 95, "role": "group"}, {"box": [801, 83, 513, 751], "depth": 19, "id": "git-tab", "n": 118}, {"box": [809, 83, 497, 40], "depth": 21, "id": "git-head", "n": 645}, {"box": [809, 91, 399, 24], "depth": 22, "id": "git-scope-group", "n": 646}, {"box": [809, 91, 102, 24], "depth": 23, "id": "git-scope", "n": 1084}, {"box": [809, 91, 102, 24], "depth": 25, "n": 1065, "role": "button", "text": "What changed"}, {"box": [815, 97, 12, 12], "depth": 26, "n": 1069, "role": "img"}, {"box": [833, 94, 72, 17], "depth": 30, "n": 736, "role": "text", "text": "Working tree"}, {"box": [1212, 91, 85, 24], "depth": 22, "id": "git-head-controls", "n": 959}, {"box": [1212, 91, 57, 24], "depth": 23, "id": "git-branch", "n": 1026}, {"box": [1212, 91, 57, 24], "depth": 25, "n": 785, "role": "button", "text": "Branch"}, {"box": [1218, 97, 12, 12], "depth": 26, "n": 782, "role": "img"}, {"box": [1236, 94, 27, 17], "depth": 30, "n": 739, "role": "text", "text": "main"}, {"box": [1273, 91, 24, 24], "depth": 25, "id": "git-more", "n": 2162, "role": "button", "text": "More"}, {"box": [1277, 95, 16, 16], "depth": 26, "n": 2158, "role": "img"}, {"box": [809, 131, 497, 695], "depth": 23, "id": "git-changes", "n": 2176}, {"box": [822, 144, 16, 16], "checked": false, "depth": 29, "n": 109, "role": "checkbox", "text": "Stage all"}, {"box": [824, 146, 12, 12], "depth": 33, "n": 1900, "role": "img"}, {"box": [846, 144, 100, 17], "depth": 31, "n": 881, "role": "text", "text": "2 files in 2 folders"}, {"box": [1198, 144, 39, 16], "depth": 32, "n": 988, "role": "group", "text": "12 added, 1 removed"}, {"box": [1198, 144, 20, 16], "depth": 33, "n": 1027, "role": "text", "text": "+12"}, {"box": [1224, 144, 13, 16], "depth": 33, "n": 935, "role": "text", "text": "\u22121"}, {"box": [1245, 140, 52, 24], "depth": 29, "id": "diff-view", "n": 269}, {"box": [1245, 140, 24, 24], "checked": false, "depth": 31, "n": 455, "role": "checkbox", "text": "Side by side"}, {"box": [1249, 144, 16, 16], "depth": 32, "n": 916, "role": "img"}, {"box": [1273, 140, 24, 24], "checked": false, "depth": 31, "n": 275, "role": "checkbox", "text": "Wrap long lines"}, {"box": [1277, 144, 16, 16], "depth": 32, "n": 915, "role": "img"}, {"box": [810, 172, 495, 1], "depth": 28, "n": 307, "role": "group"}, {"box": [814, 177, 487, 28], "depth": 30, "n": 2195, "role": "group"}, {"box": [822, 184, 14, 14], "depth": 31, "n": 319, "role": "group"}, {"box": [822, 184, 14, 14], "depth": 32, "n": 311, "role": "img"}, {"box": [844, 177, 453, 28], "depth": 31, "n": 298, "role": "textbox", "text": "Search", "value": ""}, {"box": [844, 183, 455, 28], "depth": 33, "n": 814, "text": "Filter files"}, {"box": [810, 209, 495, 1], "depth": 28, "n": 1024, "role": "group"}, {"box": [810, 210, 495, 504], "depth": 28, "id": "git-changes-list", "n": 361}, {"box": [810, 210, 495, 504], "depth": 30, "n": 970, "role": "scroll"}, {"box": [810, 210, 495, 36], "depth": 34, "n": 1047, "role": "button", "text": "src, 1 files"}, {"box": [822, 221, 14, 14], "depth": 36, "n": 1043, "role": "img"}, {"box": [844, 220, 17, 17], "depth": 37, "n": 1008, "role": "text", "text": "src"}, {"box": [1286, 220, 7, 16], "depth": 35, "n": 1007, "role": "text", "text": "1"}, {"box": [810, 246, 495, 30], "depth": 35, "n": 1124, "role": "button", "text": "src/window.ts"}, {"box": [822, 253, 16, 16], "checked": false, "depth": 42, "n": 2132, "role": "checkbox", "text": "src/window.ts"}, {"box": [824, 255, 12, 12], "depth": 46, "n": 94, "role": "img"}, {"box": [846, 253, 14, 17], "depth": 43, "n": 50, "role": "text", "text": "M"}, {"box": [868, 252, 60, 19], "depth": 44, "n": 2091, "role": "text", "text": "window.ts"}, {"box": [1205, 253, 32, 16], "depth": 42, "n": 2089, "role": "group", "text": "3 added, 1 removed"}, {"box": [1205, 253, 13, 16], "depth": 43, "n": 2085, "role": "text", "text": "+3"}, {"box": [1224, 253, 13, 16], "depth": 43, "n": 2079, "role": "text", "text": "\u22121"}, {"box": [1249, 250, 22, 22], "depth": 42, "n": 864, "role": "button", "text": "Discard changes"}, {"box": [1253, 254, 14, 14], "depth": 43, "n": 859, "role": "img"}, {"box": [1279, 254, 14, 14], "depth": 40, "n": 379, "role": "img"}, {"box": [810, 276, 495, 24], "depth": 34, "n": 2125, "role": "group", "text": "@@ -20,7 +20,9 @@ export class SlidingWindow {"}, {"box": [822, 280, 112, 16], "depth": 35, "n": 2119, "role": "text", "text": "@@ -20,7 +20,9 @@"}, {"box": [946, 280, 185, 16], "depth": 35, "n": 2118, "role": "text", "text": "export class SlidingWindow {"}, {"box": [810, 300, 495, 22], "depth": 34, "n": 67, "role": "group", "text": " estimate(now = Date.now()): number {"}, {"box": [834, 303, 36, 16], "depth": 35, "n": 2076, "role": "text", "text": "20"}, {"box": [886, 303, 274, 17], "depth": 36, "n": 837, "role": "text", "text": " estimate(now = Date.now()): number {"}, {"box": [810, 300, 495, 22], "depth": 35, "n": 836, "role": "group"}, {"box": [810, 322, 495, 22], "depth": 34, "n": 348, "role": "group", "text": " this.roll(now);"}, {"box": [834, 325, 36, 16], "depth": 35, "n": 1019, "role": "text", "text": "21"}, {"box": [886, 325, 137, 17], "depth": 36, "n": 1000, "role": "text", "text": " this.roll(now);"}, {"box": [810, 322, 495, 22], "depth": 35, "n": 1140, "role": "group"}, {"box": [810, 344, 495, 22], "depth": 34, "n": 2117, "role": "group", "text": " const into = (now - this.start) / this.windowMs;"}, {"box": [834, 347, 36, 16], "depth": 35, "n": 2107, "role": "text", "text": "22"}, {"box": [886, 347, 374, 17], "depth": 36, "n": 835, "role": "text", "text": " const into = (now - this.start) / this.windowMs;"}, {"box": [810, 344, 495, 22], "depth": 35, "n": 731, "role": "group"}, {"box": [810, 366, 495, 22], "depth": 34, "n": 1018, "role": "group", "text": "- return this.current + this.previous * Math.floor(1 - into);"}, {"box": [834, 369, 36, 16], "depth": 35, "n": 907, "role": "text", "text": "23"}, {"box": [870, 369, 16, 17], "depth": 35, "n": 803, "role": "text", "text": "-"}, {"box": [886, 369, 454, 17], "depth": 36, "n": 1136, "role": "text", "text": " return this.current + this.previous * Math.floor(1 - into);"}, {"box": [810, 366, 495, 22], "depth": 35, "n": 1106, "role": "group"}, {"box": [810, 388, 495, 22], "depth": 34, "n": 2116, "role": "group", "text": "+ // The previous window counts for the part of it that still overlaps the"}, {"box": [834, 391, 36, 16], "depth": 35, "n": 72, "role": "text", "text": "23"}, {"box": [870, 391, 16, 17], "depth": 35, "n": 2106, "role": "text", "text": "+"}, {"box": [886, 391, 547, 17], "depth": 36, "n": 2073, "role": "text", "text": " // The previous window counts for the part of it that still overlaps the"}, {"box": [810, 388, 495, 22], "depth": 35, "n": 894, "role": "group"}, {"box": [810, 410, 495, 22], "depth": 34, "n": 730, "role": "group", "text": "+ // last `windowMs`. Rounding that share down dropped it at every roll."}, {"box": [834, 413, 36, 16], "depth": 35, "n": 953, "role": "text", "text": "24"}, {"box": [870, 413, 16, 17], "depth": 35, "n": 1001, "role": "text", "text": "+"}, {"box": [886, 413, 533, 17], "depth": 36, "n": 1054, "role": "text", "text": " // last `windowMs`. Rounding that share down dropped it at every roll."}, {"box": [810, 410, 495, 22], "depth": 35, "n": 1051, "role": "group"}, {"box": [810, 432, 495, 22], "depth": 34, "n": 805, "role": "group", "text": "+ return this.current + this.previous * (1 - into);"}, {"box": [834, 435, 36, 16], "depth": 35, "n": 1138, "role": "text", "text": "25"}, {"box": [870, 435, 16, 17], "depth": 35, "n": 1137, "role": "text", "text": "+"}, {"box": [886, 435, 382, 17], "depth": 36, "n": 2152, "role": "text", "text": " return this.current + this.previous * (1 - into);"}, {"box": [810, 432, 495, 22], "depth": 35, "n": 2148, "role": "group"}, {"box": [810, 454, 495, 22], "depth": 34, "n": 145, "role": "group", "text": " }"}, {"box": [834, 457, 36, 16], "depth": 35, "n": 70, "role": "text", "text": "26"}, {"box": [886, 457, 22, 17], "depth": 36, "n": 2104, "role": "text", "text": " }"}, {"box": [810, 454, 495, 22], "depth": 35, "n": 2072, "role": "group"}, {"box": [810, 476, 495, 22], "depth": 34, "n": 892, "role": "group", "text": " "}, {"box": [834, 479, 36, 16], "depth": 35, "n": 727, "role": "text", "text": "27"}, {"box": [810, 476, 495, 22], "depth": 35, "n": 1003, "role": "group"}, {"box": [810, 498, 495, 22], "depth": 34, "n": 1059, "role": "group", "text": " /** Counts one request, or refuses it when the window is full. */"}, {"box": [834, 501, 36, 16], "depth": 35, "n": 944, "role": "text", "text": "28"}, {"box": [886, 501, 482, 17], "depth": 36, "n": 806, "role": "text", "text": " /** Counts one request, or refuses it when the window is full. */"}, {"box": [810, 498, 495, 22], "depth": 35, "n": 1141, "role": "group"}, {"box": [810, 520, 495, 36], "depth": 34, "n": 940, "role": "button", "text": "test, 1 files"}, {"box": [822, 531, 14, 14], "depth": 36, "n": 980, "role": "img"}, {"box": [844, 530, 23, 17], "depth": 37, "n": 1039, "role": "text", "text": "test"}, {"box": [1286, 530, 7, 16], "depth": 35, "n": 1036, "role": "text", "text": "1"}, {"box": [810, 556, 495, 30], "depth": 35, "n": 1130, "role": "button", "text": "test/window.test.ts"}, {"box": [822, 563, 16, 16], "checked": false, "depth": 42, "n": 81, "role": "checkbox", "text": "test/window.test.ts"}, {"box": [824, 565, 12, 12], "depth": 46, "n": 2078, "role": "img"}, {"box": [846, 563, 14, 17], "depth": 43, "n": 404, "role": "text", "text": "M"}, {"box": [868, 562, 86, 19], "depth": 44, "n": 966, "role": "text", "text": "window.test.ts"}, {"box": [1205, 563, 32, 16], "depth": 42, "n": 978, "role": "group", "text": "9 added, 0 removed"}, {"box": [1205, 563, 13, 16], "depth": 43, "n": 992, "role": "text", "text": "+9"}, {"box": [1224, 563, 13, 16], "depth": 43, "n": 1045, "role": "text", "text": "\u22120"}, {"box": [1249, 560, 22, 22], "depth": 42, "n": 1116, "role": "button", "text": "Discard changes"}, {"box": [1253, 564, 14, 14], "depth": 43, "n": 1110, "role": "img"}, {"box": [1279, 564, 14, 14], "depth": 40, "n": 35, "role": "img"}, {"box": [1295, 210, 10, 504], "depth": 29, "id": "git-changes-list-rail", "n": 973, "role": "group"}, {"box": [1300, 214, 3, 0], "depth": 30, "n": 938, "role": "group"}, {"box": [809, 740, 497, 34], "depth": 31, "n": 904, "role": "group"}, {"box": [820, 747, 475, 20], "depth": 32, "n": 2159, "role": "textbox", "text": "Commit message", "value": ""}, {"box": [820, 747, 475, 20], "depth": 34, "n": 297, "text": "What changed, and why"}, {"box": [820, 741, 475, 20], "depth": 32, "n": 2184, "role": "group"}, {"box": [820, 741, 475, 20], "depth": 33, "n": 2177, "role": "text", "text": "\u200b"}, {"box": [1281, 780, 25, 14], "depth": 33, "n": 1156, "role": "text", "text": "0/50"}, {"box": [809, 802, 497, 24], "depth": 30, "id": "git-dock-foot", "n": 1074}, {"box": [809, 805, 18, 18], "depth": 35, "n": 430, "role": "group", "text": "Mara Okafor"}, {"box": [835, 806, 70, 17], "depth": 37, "n": 126, "role": "text", "text": "Mara Okafor"}, {"box": [1225, 802, 81, 24], "depth": 31, "id": "git-commit", "n": 878}, {"box": [1229, 802, 56, 24], "depth": 33, "disabled": true, "n": 818, "role": "button", "text": "Commit"}, {"box": [1286, 802, 20, 24], "depth": 34, "disabled": true, "n": 347, "role": "button", "text": "More options"}, {"box": [1289, 807, 14, 14], "depth": 36, "n": 852, "role": "img"}, {"box": [788, 42, 20, 793], "depth": 7, "n": 236, "role": "slider", "text": "Resize files", "value": "515 points wide"}, {"box": [132, 4, 1188, 34], "depth": 8, "id": "session-tabs", "n": 223, "role": "tablist", "text": "Open chats"}, {"box": [132, 7, 921, 28], "depth": 10, "id": "session-tabs-scroll", "n": 225, "role": "scroll"}, {"box": [132, 7, 220, 28], "depth": 17, "id": "session-tab-chosen", "n": 1078}, {"box": [132, 7, 220, 28], "depth": 16, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 817, "role": "tab", "text": "Fix burst at the rate limit boundary"}, {"box": [136, 11, 20, 20], "depth": 18, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1", "n": 2196}, {"box": [136, 11, 20, 20], "depth": 26, "n": 2175, "role": "img"}, {"box": [162, 13, 193, 17], "depth": 19, "n": 928, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [132, 7, 0, 0], "depth": 10, "id": "session-tab-lifted", "n": 219}, {"box": [1061, 7, 81, 28], "depth": 11, "id": "updates-button", "n": 586, "role": "button", "text": "3 updates"}, {"box": [1095, 11, 20, 20], "depth": 14, "id": "updates-mark-3", "n": 677}, {"box": [1095, 11, 20, 20], "depth": 15, "n": 678, "role": "img"}, {"box": [1095, 11, 20, 20], "depth": 15, "id": "updates-mark-3-glyph", "n": 680}, {"box": [1100, 16, 11, 11], "depth": 18, "n": 703, "role": "img"}, {"box": [1080, 11, 20, 20], "depth": 14, "id": "updates-mark-2", "n": 682}, {"box": [1080, 11, 20, 20], "depth": 15, "n": 683, "role": "img"}, {"box": [1080, 11, 20, 20], "depth": 15, "id": "updates-mark-2-glyph", "n": 685}, {"box": [1085, 16, 11, 11], "depth": 18, "n": 706, "role": "img"}, {"box": [1065, 11, 20, 20], "depth": 14, "id": "updates-mark-1", "n": 687}, {"box": [1065, 11, 20, 20], "depth": 15, "id": "updates-mark-1-glyph", "n": 689}, {"box": [1070, 16, 11, 11], "depth": 18, "n": 709, "role": "img"}, {"box": [1120, 13, 16, 16], "depth": 15, "n": 692, "role": "img"}, {"box": [1150, 9, 24, 24], "depth": 12, "id": "panel-expand", "n": 399, "role": "button", "text": "Expand panel"}, {"box": [1155, 14, 14, 14], "depth": 13, "n": 396, "role": "img"}, {"box": [0, 0, 1320, 0], "depth": 5, "id": "titlebar", "n": 216}, {"box": [6, 7, 90, 28], "depth": 7, "id": "titlebar-island", "n": 218}, {"box": [10, 9, 24, 24], "depth": 9, "n": 200, "role": "button", "text": "Toggle sidebar"}, {"box": [42, 9, 24, 24], "depth": 9, "n": 207, "role": "button", "text": "Back"}, {"box": [44, 11, 21, 21], "depth": 10, "n": 206, "role": "img"}, {"box": [68, 9, 24, 24], "depth": 9, "disabled": true, "n": 196, "role": "button", "text": "Forward"}, {"box": [70, 11, 21, 21], "depth": 10, "n": 193, "role": "img"}, {"box": [1178, 0, 142, 40], "depth": 7, "id": "titlebar-actions-island", "n": 326}, {"box": [1182, 9, 24, 24], "depth": 8, "id": "titlebar-actions", "n": 321}, {"box": [1182, 9, 24, 24], "depth": 11, "n": 595, "role": "button", "text": "Panel"}, {"box": [1147, 39, 94, 31], "depth": 13, "n": 1903, "role": "dialog", "text": "Tooltip"}, {"box": [1158, 46, 72, 17], "depth": 16, "n": 2093, "role": "text", "text": "Panel Ctrl+R"}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-palette", "n": 603}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-add-project", "n": 605}, {"box": [340, 88, 640, 172], "depth": 10, "n": 14, "role": "dialog", "text": "Command palette"}, {"box": [340, 88, 640, 172], "depth": 13, "id": "command-palette", "n": 18}, {"box": [354, 107, 16, 16], "depth": 17, "n": 1011, "role": "img"}, {"box": [379, 103, 98, 24], "depth": 19, "n": 1017, "role": "button", "text": "Back from New project"}, {"box": [385, 109, 12, 12], "depth": 21, "n": 265, "role": "img"}, {"box": [401, 107, 68, 17], "depth": 20, "n": 111, "role": "text", "text": "New project"}, {"box": [481, 103, 65, 24], "depth": 19, "n": 359, "role": "button", "text": "Back from studio"}, {"box": [487, 109, 12, 12], "depth": 21, "n": 113, "role": "img"}, {"box": [503, 107, 35, 17], "depth": 20, "n": 120, "role": "text", "text": "studio"}, {"box": [550, 103, 63, 24], "depth": 19, "n": 819, "role": "button", "text": "Back from Home"}, {"box": [556, 109, 12, 12], "depth": 21, "n": 147, "role": "img"}, {"box": [572, 107, 33, 17], "depth": 20, "n": 873, "role": "text", "text": "Home"}, {"box": [617, 103, 58, 24], "depth": 19, "n": 121, "role": "button", "text": "Back from code"}, {"box": [623, 109, 12, 12], "depth": 21, "n": 97, "role": "img"}, {"box": [639, 107, 28, 17], "depth": 20, "n": 847, "role": "text", "text": "code"}, {"box": [682, 101, 285, 28], "depth": 15, "id": "palette-search", "n": 25, "role": "textbox", "text": "Search", "value": "api"}, {"box": [682, 105, 287, 21], "depth": 17, "n": 29, "text": "api"}, {"box": [341, 141, 638, 1], "depth": 14, "n": 32, "role": "group"}, {"box": [341, 142, 638, 76], "depth": 15, "id": "palette-list", "n": 17, "role": "scroll"}, {"box": [353, 154, 614, 14], "depth": 20, "n": 851, "role": "text", "text": "Folders"}, {"box": [345, 174, 630, 36], "depth": 20, "n": 1037, "role": "option", "text": "api"}, {"box": [354, 184, 16, 16], "depth": 22, "n": 860, "role": "img"}, {"box": [379, 183, 18, 19], "depth": 26, "n": 849, "role": "text", "text": "api"}, {"box": [953, 185, 14, 14], "depth": 22, "n": 1012, "role": "img"}, {"box": [341, 218, 638, 1], "depth": 14, "n": 41, "role": "group"}, {"box": [353, 230, 36, 18], "depth": 17, "n": 267, "role": "img", "text": "Enter"}, {"box": [353, 230, 36, 18], "depth": 18, "n": 1029, "role": "group"}, {"box": [357, 231, 28, 16], "depth": 19, "n": 309, "role": "text", "text": "Enter"}, {"box": [395, 231, 27, 16], "depth": 17, "n": 39, "role": "text", "text": "Open"}, {"box": [438, 230, 65, 18], "depth": 17, "n": 1028, "role": "img", "text": "Ctrl Enter"}, {"box": [438, 230, 27, 18], "depth": 18, "n": 146, "role": "group"}, {"box": [442, 231, 19, 16], "depth": 19, "n": 305, "role": "text", "text": "Ctrl"}, {"box": [467, 230, 36, 18], "depth": 18, "n": 116, "role": "group"}, {"box": [471, 231, 28, 16], "depth": 19, "n": 117, "role": "text", "text": "Enter"}, {"box": [509, 231, 58, 16], "depth": 17, "n": 112, "role": "text", "text": "Add project"}, {"box": [908, 230, 26, 18], "depth": 16, "n": 54, "role": "img", "text": "esc"}, {"box": [908, 230, 26, 18], "depth": 17, "n": 55, "role": "group"}, {"box": [912, 231, 18, 16], "depth": 18, "n": 56, "role": "text", "text": "esc"}, {"box": [940, 231, 27, 16], "depth": 16, "n": 57, "role": "text", "text": "Clear"}]
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/session/tree.txt b/apps/landing/tools/recreate/reference/session/tree.txt
new file mode 100644
index 000000000..59672d7d5
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/session/tree.txt
@@ -0,0 +1,477 @@
+ @6 dialog "Zeron" 0,0 1320x840
+ @7 #host-toasts 1304,824 0x0
+ @409 #shell 0,0 1320x840
+ @410 #shell-chats 0,0 1320x840
+ @468 #shell-sidebar 0,0 277x840
+ @473 #sidebar-content 5,42 272x793
+ @474 #sidebar-actions 13,50 256x94
+ @476 button "New chat" 13,50 256x30
+ @480 img 20,57 16x16
+ @486 text "New chat" 43,56 57x19
+ @487 text "Ctrl+N" 228,57 33x16
+ @490 button "Search" 13,82 256x30
+ @494 img 20,89 16x16
+ @500 text "Search" 43,88 42x19
+ @501 text "Ctrl+K" 229,89 32x16
+ @609 button "Pull requests" 13,114 256x30
+ @695 img 20,121 16x16
+ @618 text "Pull requests" 43,120 77x19
+ @507 #sidebar 13,160 256x627
+ @1287 scroll 13,160 256x627
+ @1292 button "Projects" 13,160 256x24
+ @1289 text "Projects" 21,164 43x16
+ @1282 button "api" 13,186 256x30
+ @2617 img 19,192 18x18
+ @1271 text "api" 43,192 18x19
+ @1343 button "Fix burst at the rate limit boundary" 13,218 256x30
+ @2763 img 42,226 14x14
+ @2627 text "Fix burst at the rate limit boundary" 64,224 209x19
+ @1244 group 232,233 0x0
+ @2629 text "now" 240,225 21x16
+ @2631 img 64,244 11x11 hidden
+ @1231 text "studio · main" 79,241 63x16 hidden
+ @1218 button "Return a real Retry-After" 13,250 256x30
+ @2766 img 42,258 14x14
+ @2638 text "Return a real Retry-After" 64,256 150x19
+ @1206 group 237,265 0x0
+ @2641 group "Completed" 245,257 16x16
+ @2643 img 246,258 14x14
+ @2646 img 64,276 11x11 hidden
+ @1194 text "studio · main" 79,273 63x16 hidden
+ @1182 button "Sweep idle keys without a timer" 13,282 256x30
+ @2769 img 42,290 14x14
+ @2653 text "Sweep idle keys without a timer" 64,288 193x19
+ @398 group 237,297 0x0
+ @2656 group "Working" 245,289 16x16
+ @2660 img 64,308 11x11 hidden
+ @2300 text "studio · main" 79,305 63x16 hidden
+ @2313 button "web" 13,314 256x30
+ @2663 img 19,320 18x18
+ @2328 text "web" 43,320 26x19
+ @2345 button "Speed up the dashboard's first paint" 13,346 256x30
+ @2772 img 42,354 14x14
+ @2673 text "Speed up the dashboard's first paint" 64,352 220x19
+ @2361 group 237,361 0x0
+ @2676 group "Working" 245,353 16x16
+ @2680 img 64,372 11x11 hidden
+ @2374 text "studio · main" 79,369 63x16 hidden
+ @2388 button "Add dark mode to settings" 13,378 256x30
+ @2775 img 42,386 14x14
+ @2687 text "Add dark mode to settings" 64,384 161x19
+ @2404 group 237,393 0x0
+ @2690 group "Completed" 245,385 16x16
+ @2692 img 246,386 14x14
+ @2695 img 64,404 11x11 hidden
+ @2417 text "studio · main" 79,401 63x16 hidden
+ @2430 button "uptime" 13,410 256x30
+ @2698 img 19,416 18x18
+ @2445 text "uptime" 43,416 43x19
+ @2462 button "Page only when two regions agree" 13,442 256x30
+ @2778 img 42,450 14x14
+ @2708 text "Page only when two regions agree" 64,448 208x19
+ @2478 group 237,457 0x0
+ @2711 group "Completed" 245,449 16x16
+ @2713 img 246,450 14x14
+ @2716 img 64,468 11x11 hidden
+ @2491 text "studio · main" 79,465 63x16 hidden
+ @2505 button "Why Frankfurt flapped overnight" 13,474 256x30
+ @2781 img 42,482 14x14
+ @2723 text "Why Frankfurt flapped overnight" 64,480 197x19
+ @2521 group 237,489 0x0
+ @2726 group "Completed" 245,481 16x16
+ @2728 img 246,482 14x14
+ @2731 img 64,500 11x11 hidden
+ @2534 text "studio · main" 79,497 63x16 hidden
+ @2547 button "docs" 13,506 256x30
+ @2734 img 19,512 18x18
+ @2562 text "docs" 43,512 29x19
+ @2579 button "Write up the October incident" 13,538 256x30
+ @2784 img 42,546 14x14
+ @2744 text "Write up the October incident" 64,544 179x19
+ @2595 group 237,553 0x0
+ @2747 group "Completed" 245,545 16x16
+ @2749 img 246,546 14x14
+ @2752 img 64,564 11x11 hidden
+ @2608 text "studio · main" 79,561 63x16 hidden
+ @522 button "Local" 13,797 224x30 focused
+ @698 group "Local" 18,802 20x20
+ @531 text "Local" 43,803 33x19
+ @534 checkbox "Settings" 239,797 30x30 unchecked
+ @535 img 246,804 16x16
+ @537 #sidebar-drag 5,0 272x42
+ @541 button "Sidebar view options" 94,9 24x24
+ @542 img 98,13 16x16
+ @395 dialog "Tooltip" 38,-28 137x31 hidden
+ @762 text "Sidebar view options" 49,-21 115x17 hidden
+ @801 dialog "Sidebar view options" 94,37 232x642 hidden
+ @1109 checkbox "Activity" 99,42 222x28 hidden unchecked
+ @2151 img 108,48 16x16 hidden
+ @2108 text "Activity" 133,47 45x19 hidden
+ @838 button "Activity settings…" 99,72 222x28 hidden
+ @350 img 108,78 16x16 hidden
+ @949 text "Activity settings…" 133,77 103x19 hidden
+ @184 group 95,104 230x1 hidden
+ @40 group "Organize" 95,105 230x118 hidden
+ @809 group 99,109 222x20 hidden
+ @1103 text "Organize" 107,109 46x16 hidden
+ @797 checkbox "By project" 99,131 222x28 hidden checked
+ @1323 img 108,137 16x16 hidden
+ @1324 text "By project" 133,136 60x19 hidden
+ @1301 img 299,138 14x14 hidden
+ @1321 checkbox "By device" 99,161 222x28 hidden unchecked
+ @1318 img 108,167 16x16 hidden
+ @1314 text "By device" 133,166 57x19 hidden
+ @64 checkbox "None" 99,191 222x28 hidden unchecked
+ @833 img 108,197 16x16 hidden
+ @42 text "None" 133,196 32x19 hidden
+ @1102 group 95,223 230x1 hidden
+ @2112 group "Sort" 95,224 230x88 hidden
+ @63 group 99,228 222x20 hidden
+ @2069 text "Sort" 107,228 22x16 hidden
+ @832 checkbox "Last updated" 99,250 222x28 hidden checked
+ @1015 img 108,256 16x16 hidden
+ @1088 text "Last updated" 133,255 78x19 hidden
+ @1312 img 299,257 14x14 hidden
+ @62 checkbox "Created" 99,280 222x28 hidden unchecked
+ @831 img 108,286 16x16 hidden
+ @53 text "Created" 133,285 47x19 hidden
+ @1100 group 95,312 230x1 hidden
+ @2110 group "Show" 95,313 230x298 hidden
+ @61 group 99,317 222x20 hidden
+ @2067 text "Show" 107,317 29x16 hidden
+ @830 checkbox "Branch" 99,339 222x28 hidden checked
+ @1013 img 108,345 16x16 hidden
+ @624 text "Branch" 133,344 42x19 hidden
+ @1309 img 299,346 14x14 hidden
+ @2205 checkbox "Pull request" 99,369 222x28 hidden checked
+ @2207 img 108,375 16x16 hidden
+ @2211 text "Pull request" 133,374 71x19 hidden
+ @1311 img 299,376 14x14 hidden
+ @2214 checkbox "Harness" 99,399 222x28 hidden checked
+ @2216 img 108,405 16x16 hidden
+ @2220 text "Harness" 133,404 49x19 hidden
+ @1307 img 299,406 14x14 hidden
+ @2223 checkbox "Project icon" 99,429 222x28 hidden checked
+ @2225 img 108,435 16x16 hidden
+ @2229 text "Project icon" 133,434 70x19 hidden
+ @1296 img 299,436 14x14 hidden
+ @2232 checkbox "Location" 99,459 222x28 hidden checked
+ @2234 img 108,465 16x16 hidden
+ @2238 text "Location" 133,464 51x19 hidden
+ @1304 img 299,466 14x14 hidden
+ @2241 checkbox "Active when collapsed" 99,489 222x28 hidden checked
+ @2243 img 108,495 16x16 hidden
+ @2247 text "Active when collapsed" 133,494 134x19 hidden
+ @1351 img 299,496 14x14 hidden
+ @2250 checkbox "Project filter" 99,519 222x28 hidden unchecked
+ @2252 img 108,525 16x16 hidden
+ @2256 text "Project filter" 133,524 73x19 hidden
+ @2259 checkbox "Archived" 99,549 222x28 hidden unchecked
+ @2261 img 108,555 16x16 hidden
+ @2265 text "Archived" 133,554 52x19 hidden
+ @2268 checkbox "Empty projects" 99,579 222x28 hidden unchecked
+ @2270 img 108,585 16x16 hidden
+ @2274 text "Empty projects" 133,584 90x19 hidden
+ @2277 group 95,611 230x1 hidden
+ @2279 group "Compact" 99,616 222x28 hidden
+ @2283 text "Compact" 133,621 54x19 hidden
+ @2284 switch "Compact" 273,618 40x24 hidden checked
+ @2285 #switch-knob 292,621 18x18 hidden
+ @2286 menuitem "Create section" 99,646 222x28 hidden
+ @2288 img 108,652 16x16 hidden
+ @2292 text "Create section" 133,651 86x19 hidden
+ @545 group "Resize sidebar" 269,42 12x793
+ @221 #shell-drag 277,0 1043x38
+ @243 #shell-page-room 281,42 515x793
+ @2198 #split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8 281,42 515x793
+ @408 #shell-page 281,42 515x793
+ @426 #shell-page-card 281,42 515x793
+ @381 #chat-session 282,43 513x791
+ @675 document 282,43 513x751
+ @431 #transcript scroll "Conversation" 282,43 513x751
+ @2163 #585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9 article "You" 302,59 473x92
+ @963 text "Clients can send about twice the limit if they time it aroun…" 413,69 343x72
+ @740 article "Reply" 302,199 473x470
+ @88 button "Thought process · ran 1 command · read 2 files" 302,199 473x26
+ @417 text "Thought process · ran 1 command · read 2 files" 302,204 251x17
+ @962 text "Found it. estimate() weights the previous window by Math.flo…" 302,237 459x120
+ @2087 button "Ran 1 command · edited 2 files" 302,369 473x26
+ @734 text "Ran 1 command · edited 2 files" 302,374 166x17
+ @1042 text "Fixed in src/window.ts: the previous window now counts for t…" 302,407 453x48
+ @1034 list 302,471 473x78
+ @1060 listitem "test/window.test.ts fills a window in its last 10 ms, then c…" 302,471 473x48
+ @1133 group 302,471 24x24
+ @1126 text "test/window.test.ts fills a window in its last 10 ms, then c…" 326,471 410x48
+ @1123 listitem "5 of 5 tests pass" 302,525 473x24
+ @1119 group 302,525 24x24
+ @2142 text "5 of 5 tests pass" 326,525 115x24
+ @2136 text "This matches the October incident: a client at the limit got…" 302,565 462x72
+ @885 #transcript-rail group 785,43 10x751 hidden
+ @425 group 790,47 3x0 hidden
+ @242 #chat-composer-dock 282,745 513x81
+ @239 #chat-composer 314,745 449x81
+ @122 tablist 314,745 0x0 hidden
+ @153 button 314,745 0x0 hidden
+ @154 button "Fold what's waiting" 314,745 0x0 hidden
+ @155 img 314,745 0x0 hidden
+ @158 scroll 314,745 0x0 hidden
+ @163 group 314,745 0x0 hidden
+ @172 textbox "Message" ="" 361,759 320x22
+ @176 "Ask anything, @ to mention…" 361,759 320x22
+ @289 button "Attach" 325,756 28x28
+ @290 img 330,761 18x18
+ @718 #dictation-microphone button "Hold to dictate" 689,756 28x28
+ @717 img 694,761 18x18
+ @729 button "Send message" 725,756 28x28 disabled
+ @719 img 732,763 14x14
+ @190 #composer-toolbar 314,802 449x24
+ @247 button "Access" 324,802 93x24
+ @293 img 330,808 12x12
+ @296 text "Full access" 348,805 63x17
+ @786 group "Branch main" 421,802 150x24
+ @787 group 314,802 17x17 hidden
+ @1071 text "api" 314,802 17x17 hidden
+ @1068 group 314,802 27x17 hidden
+ @1064 text "main" 314,802 27x17 hidden
+ @1079 group 314,802 35x17 hidden
+ @1135 text "studio" 314,802 35x17 hidden
+ @1160 #composer-place-lead 427,808 12x12
+ @911 img 427,808 12x12
+ @303 #composer-place-device 445,805 35x17
+ @322 #composer-place-device 445,805 35x17
+ @700 #composer-place-device "studio" 445,805 35x17
+ @384 group 484,809 10x10
+ @385 img 484,809 10x10
+ @886 #composer-place-project 500,805 17x17
+ @676 #composer-place-project 500,805 17x17
+ @701 #composer-place-project "api" 500,805 17x17
+ @2145 group 523,809 10x10
+ @2187 img 523,809 10x10
+ @918 #composer-place-branch 537,805 28x17
+ @69 #composer-place-branch 537,805 27x17
+ @2174 #composer-place-branch "main" 537,805 27x17
+ @874 button "Model" 641,802 112x24
+ @285 img 647,808 12x12
+ @773 text "Opus 5.5" 665,805 50x17
+ @784 text "High" 721,805 26x17
+ @821 img 281,42 0x0 hidden
+ @1083 #session-header 298,43 329x40
+ @1165 #page-title 298,43 0x0 hidden
+ @2192 text "Fix burst at the rate limit boundary" 298,43 0x0 hidden
+ @234 #shell-files 800,42 515x793
+ @556 #panel 800,42 515x793
+ @558 #shell-files-content 801,43 513x791
+ @560 #panel-strip tablist "Panel tabs" 801,43 513x40
+ @562 scroll 807,49 501x28
+ @1161 #panel-tab-chosen 807,49 110x28
+ @2095 #panel-tab-tab1 tab "Changes" 807,49 110x28
+ @870 img 814,56 14x14
+ @83 text "Changes" 837,55 50x17
+ @2086 button "New Tab" 919,49 28x28
+ @868 img 926,56 14x14
+ @571 #panel-tab-lifted 807,49 0x0 hidden
+ @95 group 801,83 513x751
+ @118 #git-tab 801,83 513x751
+ @645 #git-head 809,83 497x40
+ @646 #git-scope-group 809,91 399x24
+ @1084 #git-scope 809,91 102x24
+ @1065 button "What changed" 809,91 102x24
+ @1069 img 815,97 12x12
+ @736 text "Working tree" 833,94 72x17
+ @959 #git-head-controls 1212,91 85x24
+ @1026 #git-branch 1212,91 57x24
+ @785 button "Branch" 1212,91 57x24
+ @782 img 1218,97 12x12
+ @739 text "main" 1236,94 27x17
+ @2162 #git-more button "More" 1273,91 24x24
+ @2158 img 1277,95 16x16
+ @2176 #git-changes 809,131 497x695
+ @109 checkbox "Stage all" 822,144 16x16 unchecked
+ @1900 img 824,146 12x12 hidden
+ @881 text "2 files in 2 folders" 846,144 100x17
+ @988 group "12 added, 1 removed" 1198,144 39x16
+ @1027 text "+12" 1198,144 20x16
+ @935 text "−1" 1224,144 13x16
+ @269 #diff-view 1245,140 52x24
+ @455 checkbox "Side by side" 1245,140 24x24 unchecked
+ @916 img 1249,144 16x16
+ @275 checkbox "Wrap long lines" 1273,140 24x24 unchecked
+ @915 img 1277,144 16x16
+ @307 group 810,172 495x1
+ @2195 group 814,177 487x28
+ @319 group 822,184 14x14
+ @311 img 822,184 14x14
+ @298 textbox "Search" ="" 844,177 453x28
+ @814 "Filter files" 844,183 455x28
+ @1024 group 810,209 495x1
+ @361 #git-changes-list 810,210 495x504
+ @970 scroll 810,210 495x504
+ @1047 button "src, 1 files" 810,210 495x36
+ @1043 img 822,221 14x14
+ @1008 text "src" 844,220 17x17
+ @1007 text "1" 1286,220 7x16
+ @1124 button "src/window.ts" 810,246 495x30
+ @2132 checkbox "src/window.ts" 822,253 16x16 unchecked
+ @94 img 824,255 12x12 hidden
+ @50 text "M" 846,253 14x17
+ @2091 text "window.ts" 868,252 60x19
+ @2089 group "3 added, 1 removed" 1205,253 32x16
+ @2085 text "+3" 1205,253 13x16
+ @2079 text "−1" 1224,253 13x16
+ @864 button "Discard changes" 1249,250 22x22 hidden
+ @859 img 1253,254 14x14 hidden
+ @379 img 1279,254 14x14
+ @2125 group "@@ -20,7 +20,9 @@ export class SlidingWindow {" 810,276 495x24
+ @2119 text "@@ -20,7 +20,9 @@" 822,280 112x16
+ @2118 text "export class SlidingWindow {" 946,280 185x16
+ @67 group " estimate(now = Date.now()): number {" 810,300 495x22
+ @2076 text "20" 834,303 36x16
+ @837 text " estimate(now = Date.now()): number {" 886,303 274x17
+ @836 group 810,300 495x22 hidden
+ @348 group " this.roll(now);" 810,322 495x22
+ @1019 text "21" 834,325 36x16
+ @1000 text " this.roll(now);" 886,325 137x17
+ @1140 group 810,322 495x22 hidden
+ @2117 group " const into = (now - this.start) / this.windowMs;" 810,344 495x22
+ @2107 text "22" 834,347 36x16
+ @835 text " const into = (now - this.start) / this.windowMs;" 886,347 374x17
+ @731 group 810,344 495x22 hidden
+ @1018 group "- return this.current + this.previous * Math.floor(1 - in…" 810,366 495x22
+ @907 text "23" 834,369 36x16
+ @803 text "-" 870,369 16x17
+ @1136 text " return this.current + this.previous * Math.floor(1 - int…" 886,369 454x17
+ @1106 group 810,366 495x22 hidden
+ @2116 group "+ // The previous window counts for the part of it that s…" 810,388 495x22
+ @72 text "23" 834,391 36x16
+ @2106 text "+" 870,391 16x17
+ @2073 text " // The previous window counts for the part of it that st…" 886,391 547x17
+ @894 group 810,388 495x22 hidden
+ @730 group "+ // last `windowMs`. Rounding that share down dropped it…" 810,410 495x22
+ @953 text "24" 834,413 36x16
+ @1001 text "+" 870,413 16x17
+ @1054 text " // last `windowMs`. Rounding that share down dropped it …" 886,413 533x17
+ @1051 group 810,410 495x22 hidden
+ @805 group "+ return this.current + this.previous * (1 - into);" 810,432 495x22
+ @1138 text "25" 834,435 36x16
+ @1137 text "+" 870,435 16x17
+ @2152 text " return this.current + this.previous * (1 - into);" 886,435 382x17
+ @2148 group 810,432 495x22 hidden
+ @145 group " }" 810,454 495x22
+ @70 text "26" 834,457 36x16
+ @2104 text " }" 886,457 22x17
+ @2072 group 810,454 495x22 hidden
+ @892 group " " 810,476 495x22
+ @727 text "27" 834,479 36x16
+ @1003 group 810,476 495x22 hidden
+ @1059 group " /** Counts one request, or refuses it when the window is …" 810,498 495x22
+ @944 text "28" 834,501 36x16
+ @806 text " /** Counts one request, or refuses it when the window is f…" 886,501 482x17
+ @1141 group 810,498 495x22 hidden
+ @940 button "test, 1 files" 810,520 495x36
+ @980 img 822,531 14x14
+ @1039 text "test" 844,530 23x17
+ @1036 text "1" 1286,530 7x16
+ @1130 button "test/window.test.ts" 810,556 495x30
+ @81 checkbox "test/window.test.ts" 822,563 16x16 unchecked
+ @2078 img 824,565 12x12 hidden
+ @404 text "M" 846,563 14x17
+ @966 text "window.test.ts" 868,562 86x19
+ @978 group "9 added, 0 removed" 1205,563 32x16
+ @992 text "+9" 1205,563 13x16
+ @1045 text "−0" 1224,563 13x16
+ @1116 button "Discard changes" 1249,560 22x22 hidden
+ @1110 img 1253,564 14x14 hidden
+ @35 img 1279,564 14x14
+ @973 #git-changes-list-rail group 1295,210 10x504 hidden
+ @938 group 1300,214 3x0 hidden
+ @904 group 809,740 497x34
+ @2159 textbox "Commit message" ="" 820,747 475x20
+ @297 "What changed, and why" 820,747 475x20
+ @2184 group 820,741 475x20 hidden
+ @2177 text "\u{200b}" 820,741 475x20 hidden
+ @1156 text "0/50" 1281,780 25x14
+ @1074 #git-dock-foot 809,802 497x24
+ @430 group "Mara Okafor" 809,805 18x18
+ @126 text "Mara Okafor" 835,806 70x17
+ @878 #git-commit 1225,802 81x24
+ @818 button "Commit" 1229,802 56x24 disabled
+ @347 button "More options" 1286,802 20x24 disabled
+ @852 img 1289,807 14x14
+ @236 slider "Resize files" ="515 points wide" 788,42 20x793
+ @223 #session-tabs tablist "Open chats" 132,4 1188x34
+ @225 #session-tabs-scroll scroll 132,7 921x28
+ @1078 #session-tab-chosen 132,7 220x28
+ @817 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8 tab "Fix burst at the rate limit boundary" 132,7 220x28
+ @2196 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1 136,11 20x20
+ @2175 img 136,11 20x20
+ @928 text "Fix burst at the rate limit boundary" 162,13 193x17
+ @219 #session-tab-lifted 132,7 0x0 hidden
+ @586 #updates-button button "3 updates" 1061,7 81x28
+ @677 #updates-mark-3 1095,11 20x20
+ @678 img 1095,11 20x20
+ @680 #updates-mark-3-glyph 1095,11 20x20
+ @703 img 1100,16 11x11
+ @682 #updates-mark-2 1080,11 20x20
+ @683 img 1080,11 20x20
+ @685 #updates-mark-2-glyph 1080,11 20x20
+ @706 img 1085,16 11x11
+ @687 #updates-mark-1 1065,11 20x20
+ @689 #updates-mark-1-glyph 1065,11 20x20
+ @709 img 1070,16 11x11
+ @692 img 1120,13 16x16
+ @399 #panel-expand button "Expand panel" 1150,9 24x24
+ @396 img 1155,14 14x14
+ @216 #titlebar 0,0 1320x0
+ @218 #titlebar-island 6,7 90x28 hidden
+ @200 button "Toggle sidebar" 10,9 24x24
+ @207 button "Back" 42,9 24x24
+ @206 img 44,11 21x21
+ @196 button "Forward" 68,9 24x24 disabled
+ @193 img 70,11 21x21
+ @326 #titlebar-actions-island 1178,0 142x40 hidden
+ @321 #titlebar-actions 1182,9 24x24
+ @595 button "Panel" 1182,9 24x24
+ @1903 dialog "Tooltip" 1147,39 94x31 hidden
+ @2093 text "Panel Ctrl+R" 1158,46 72x17 hidden
+ @603 #shell-palette 0,0 0x0
+ @605 #shell-add-project 0,0 0x0
+ @14 dialog "Command palette" 340,88 640x172 hidden
+ @18 #command-palette 340,88 640x172 hidden
+ @1011 img 354,107 16x16 hidden
+ @1017 button "Back from New project" 379,103 98x24 hidden
+ @265 img 385,109 12x12 hidden
+ @111 text "New project" 401,107 68x17 hidden
+ @359 button "Back from studio" 481,103 65x24 hidden
+ @113 img 487,109 12x12 hidden
+ @120 text "studio" 503,107 35x17 hidden
+ @819 button "Back from Home" 550,103 63x24 hidden
+ @147 img 556,109 12x12 hidden
+ @873 text "Home" 572,107 33x17 hidden
+ @121 button "Back from code" 617,103 58x24 hidden
+ @97 img 623,109 12x12 hidden
+ @847 text "code" 639,107 28x17 hidden
+ @25 #palette-search textbox "Search" ="api" 682,101 285x28 hidden
+ @29 "api" 682,105 287x21 hidden
+ @32 group 341,141 638x1 hidden
+ @17 #palette-list scroll 341,142 638x76 hidden
+ @851 text "Folders" 353,154 614x14 hidden
+ @1037 option "api" 345,174 630x36 hidden
+ @860 img 354,184 16x16 hidden
+ @849 text "api" 379,183 18x19 hidden
+ @1012 img 953,185 14x14 hidden
+ @41 group 341,218 638x1 hidden
+ @267 img "Enter" 353,230 36x18 hidden
+ @1029 group 353,230 36x18 hidden
+ @309 text "Enter" 357,231 28x16 hidden
+ @39 text "Open" 395,231 27x16 hidden
+ @1028 img "Ctrl Enter" 438,230 65x18 hidden
+ @146 group 438,230 27x18 hidden
+ @305 text "Ctrl" 442,231 19x16 hidden
+ @116 group 467,230 36x18 hidden
+ @117 text "Enter" 471,231 28x16 hidden
+ @112 text "Add project" 509,231 58x16 hidden
+ @54 img "esc" 908,230 26x18 hidden
+ @55 group 908,230 26x18 hidden
+ @56 text "esc" 912,231 18x16 hidden
+ @57 text "Clear" 940,231 27x16 hidden
+
diff --git a/apps/landing/tools/recreate/reference/themes/offsets.json b/apps/landing/tools/recreate/reference/themes/offsets.json
new file mode 100644
index 000000000..380846cf5
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/themes/offsets.json
@@ -0,0 +1 @@
+{"1488": [0.0, -0.5], "1502": [0.0, -0.5], "1899": [0.0, -0.5], "2014": [0.0, -0.5], "1102": [0.0, -0.5], "1105": [0.0, -0.5], "746": [0.0, -0.5], "1112": [0.0, -0.5], "1116": [0.0, -0.5], "1123": [0.0, -0.5], "802": [0.0, -0.5], "1149": [0.0, -0.5], "1188": [0.0, -0.5], "864": [0.0, -0.5], "1192": [0.0, -0.5], "1908": [-0.5, -0.5], "1754": [-0.5, -0.5], "1996": [-0.5, -0.5], "1494": [0.0, -0.5], "1508": [0.0, -0.5], "1729": [0.0, -0.5], "302": [0.0, -0.5], "687": [0.0, -0.5], "719": [0.0, -0.5], "109": [0.0, -0.5], "761": [0.0, -0.5], "780": [0.0, -0.5], "782": [-0.5, 0.0], "791": [0.0, -0.5], "335": [0.0, -0.5], "813": [0.0, -0.5], "845": [0.0, -0.5], "491": [0.5, -0.5], "907": [0.0, -0.5], "1539": [0.0, -0.5], "946": [0.0, 0.5], "1214": [0.0, 0.5], "1228": [0.0, 0.5], "1238": [0.0, 0.5], "1243": [0.0, 0.5], "1608": [-0.5, -0.5], "1318": [0.5, 0.0]}
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/themes/ref-catppuccin.png b/apps/landing/tools/recreate/reference/themes/ref-catppuccin.png
new file mode 100644
index 000000000..feae2c951
Binary files /dev/null and b/apps/landing/tools/recreate/reference/themes/ref-catppuccin.png differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-dracula.png b/apps/landing/tools/recreate/reference/themes/ref-dracula.png
new file mode 100644
index 000000000..5213be83e
Binary files /dev/null and b/apps/landing/tools/recreate/reference/themes/ref-dracula.png differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-github-light.png b/apps/landing/tools/recreate/reference/themes/ref-github-light.png
new file mode 100644
index 000000000..ec0610633
Binary files /dev/null and b/apps/landing/tools/recreate/reference/themes/ref-github-light.png differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-gruvbox.png b/apps/landing/tools/recreate/reference/themes/ref-gruvbox.png
new file mode 100644
index 000000000..db10f29be
Binary files /dev/null and b/apps/landing/tools/recreate/reference/themes/ref-gruvbox.png differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-tokyo-night.png b/apps/landing/tools/recreate/reference/themes/ref-tokyo-night.png
new file mode 100644
index 000000000..e4dbabf9a
Binary files /dev/null and b/apps/landing/tools/recreate/reference/themes/ref-tokyo-night.png differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-zeron-dark.png b/apps/landing/tools/recreate/reference/themes/ref-zeron-dark.png
new file mode 100644
index 000000000..a8feb668c
Binary files /dev/null and b/apps/landing/tools/recreate/reference/themes/ref-zeron-dark.png differ
diff --git a/apps/landing/tools/recreate/reference/themes/tree.json b/apps/landing/tools/recreate/reference/themes/tree.json
new file mode 100644
index 000000000..d513fb4c8
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/themes/tree.json
@@ -0,0 +1 @@
+[{"box": [0, 0, 1320, 840], "depth": 5, "n": 6, "role": "dialog", "text": "Zeron"}, {"box": [1304, 824, 0, 0], "depth": 6, "id": "host-toasts", "n": 7}, {"box": [0, 0, 1320, 840], "depth": 3, "id": "shell", "n": 1385}, {"box": [0, 0, 1320, 840], "depth": 4, "id": "shell-chats", "n": 1386}, {"box": [0, 0, 277, 840], "depth": 8, "id": "shell-sidebar", "n": 1476}, {"box": [5, 42, 272, 793], "depth": 12, "id": "sidebar-content", "n": 1481}, {"box": [13, 50, 256, 94], "depth": 13, "id": "sidebar-actions", "n": 1482}, {"box": [13, 50, 256, 30], "depth": 15, "n": 1484, "role": "button", "text": "New chat"}, {"box": [20, 57, 16, 16], "depth": 19, "n": 1488, "role": "img"}, {"box": [43, 56, 57, 19], "depth": 21, "n": 1494, "role": "text", "text": "New chat"}, {"box": [228, 57, 33, 16], "depth": 19, "n": 1495, "role": "text", "text": "Ctrl+N"}, {"box": [13, 82, 256, 30], "depth": 15, "n": 1498, "role": "button", "text": "Search"}, {"box": [20, 89, 16, 16], "depth": 19, "n": 1502, "role": "img"}, {"box": [43, 88, 42, 19], "depth": 21, "n": 1508, "role": "text", "text": "Search"}, {"box": [229, 89, 32, 16], "depth": 19, "n": 1509, "role": "text", "text": "Ctrl+K"}, {"box": [13, 114, 256, 30], "depth": 17, "n": 1720, "role": "button", "text": "Pull requests"}, {"box": [20, 121, 16, 16], "depth": 23, "n": 1899, "role": "img"}, {"box": [43, 120, 77, 19], "depth": 23, "n": 1729, "role": "text", "text": "Pull requests"}, {"box": [13, 160, 256, 627], "depth": 13, "id": "sidebar", "n": 1515}, {"box": [13, 160, 256, 627], "depth": 17, "n": 1732, "role": "scroll"}, {"box": [13, 160, 256, 24], "depth": 23, "n": 52, "role": "button", "text": "Projects"}, {"box": [21, 164, 43, 16], "depth": 26, "n": 21, "role": "text", "text": "Projects"}, {"box": [13, 186, 256, 30], "depth": 25, "n": 88, "role": "button", "text": "web"}, {"box": [19, 192, 18, 18], "depth": 35, "n": 2014, "role": "img"}, {"box": [43, 192, 26, 19], "depth": 31, "n": 302, "role": "text", "text": "web"}, {"box": [13, 218, 256, 30], "depth": 26, "n": 1137, "role": "button", "text": "Speed up the dashboard's first paint"}, {"box": [42, 226, 14, 14], "depth": 37, "n": 1102, "role": "img"}, {"box": [64, 224, 220, 19], "depth": 36, "n": 687, "role": "text", "text": "Speed up the dashboard's first paint"}, {"box": [237, 233, 0, 0], "depth": 31, "n": 978, "role": "group"}, {"box": [245, 225, 16, 16], "depth": 36, "n": 697, "role": "group", "text": "Completed"}, {"box": [246, 226, 14, 14], "depth": 38, "n": 700, "role": "img"}, {"box": [64, 244, 11, 11], "depth": 34, "n": 709, "role": "img"}, {"box": [79, 241, 63, 16], "depth": 34, "n": 1142, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 250, 256, 30], "depth": 26, "n": 966, "role": "button", "text": "Add dark mode to settings"}, {"box": [42, 258, 14, 14], "depth": 37, "n": 1105, "role": "img"}, {"box": [64, 256, 161, 19], "depth": 36, "n": 719, "role": "text", "text": "Add dark mode to settings"}, {"box": [237, 265, 0, 0], "depth": 31, "n": 141, "role": "group"}, {"box": [245, 257, 16, 16], "depth": 36, "n": 723, "role": "group", "text": "Completed"}, {"box": [246, 258, 14, 14], "depth": 38, "n": 728, "role": "img"}, {"box": [64, 276, 11, 11], "depth": 34, "n": 732, "role": "img"}, {"box": [79, 273, 63, 16], "depth": 34, "n": 137, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 282, 256, 30], "depth": 25, "n": 122, "role": "button", "text": "api"}, {"box": [19, 288, 18, 18], "depth": 35, "n": 746, "role": "img"}, {"box": [43, 288, 18, 19], "depth": 31, "n": 109, "role": "text", "text": "api"}, {"box": [13, 314, 256, 30], "depth": 26, "n": 955, "role": "button", "text": "Sweep idle keys without a timer"}, {"box": [42, 322, 14, 14], "depth": 37, "n": 1112, "role": "img"}, {"box": [64, 320, 193, 19], "depth": 36, "n": 761, "role": "text", "text": "Sweep idle keys without a timer"}, {"box": [237, 329, 0, 0], "depth": 31, "n": 250, "role": "group"}, {"box": [245, 321, 16, 16], "depth": 36, "n": 767, "role": "group", "text": "Completed"}, {"box": [246, 322, 14, 14], "depth": 38, "n": 770, "role": "img"}, {"box": [64, 340, 11, 11], "depth": 34, "n": 773, "role": "img"}, {"box": [79, 337, 63, 16], "depth": 34, "n": 188, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 346, 256, 30], "depth": 26, "n": 206, "role": "button", "text": "Fix burst at the rate limit boundary"}, {"box": [42, 354, 14, 14], "depth": 37, "n": 1116, "role": "img"}, {"box": [64, 352, 209, 19], "depth": 36, "n": 780, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [230, 361, 0, 0], "depth": 31, "n": 224, "role": "group"}, {"box": [238, 353, 23, 16], "depth": 35, "n": 782, "role": "text", "text": "30m"}, {"box": [64, 372, 11, 11], "depth": 34, "n": 784, "role": "img"}, {"box": [79, 369, 63, 16], "depth": 34, "n": 239, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 378, 256, 30], "depth": 26, "n": 273, "role": "button", "text": "Return a real Retry-After"}, {"box": [42, 386, 14, 14], "depth": 37, "n": 1123, "role": "img"}, {"box": [64, 384, 150, 19], "depth": 36, "n": 791, "role": "text", "text": "Return a real Retry-After"}, {"box": [237, 393, 0, 0], "depth": 31, "n": 290, "role": "group"}, {"box": [245, 385, 16, 16], "depth": 36, "n": 794, "role": "group", "text": "Completed"}, {"box": [246, 386, 14, 14], "depth": 38, "n": 796, "role": "img"}, {"box": [64, 404, 11, 11], "depth": 34, "n": 799, "role": "img"}, {"box": [79, 401, 63, 16], "depth": 34, "n": 307, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 410, 256, 30], "depth": 25, "n": 320, "role": "button", "text": "uptime"}, {"box": [19, 416, 18, 18], "depth": 35, "n": 802, "role": "img"}, {"box": [43, 416, 43, 19], "depth": 31, "n": 335, "role": "text", "text": "uptime"}, {"box": [13, 442, 256, 30], "depth": 26, "n": 353, "role": "button", "text": "Page only when two regions agree"}, {"box": [42, 450, 14, 14], "depth": 37, "n": 1149, "role": "img"}, {"box": [64, 448, 208, 19], "depth": 36, "n": 813, "role": "text", "text": "Page only when two regions agree"}, {"box": [237, 457, 0, 0], "depth": 31, "n": 370, "role": "group"}, {"box": [245, 449, 16, 16], "depth": 36, "n": 817, "role": "group", "text": "Completed"}, {"box": [246, 450, 14, 14], "depth": 38, "n": 819, "role": "img"}, {"box": [64, 468, 11, 11], "depth": 34, "n": 828, "role": "img"}, {"box": [79, 465, 63, 16], "depth": 34, "n": 384, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 474, 256, 30], "depth": 26, "n": 399, "role": "button", "text": "Why Frankfurt flapped overnight"}, {"box": [42, 482, 14, 14], "depth": 37, "n": 1188, "role": "img"}, {"box": [64, 480, 197, 19], "depth": 36, "n": 845, "role": "text", "text": "Why Frankfurt flapped overnight"}, {"box": [237, 489, 0, 0], "depth": 31, "n": 423, "role": "group"}, {"box": [245, 481, 16, 16], "depth": 36, "n": 851, "role": "group", "text": "Completed"}, {"box": [246, 482, 14, 14], "depth": 38, "n": 854, "role": "img"}, {"box": [64, 500, 11, 11], "depth": 34, "n": 861, "role": "img"}, {"box": [79, 497, 63, 16], "depth": 34, "n": 450, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 506, 256, 30], "depth": 25, "n": 476, "role": "button", "text": "docs"}, {"box": [19, 512, 18, 18], "depth": 35, "n": 864, "role": "img"}, {"box": [43, 512, 29, 19], "depth": 31, "n": 491, "role": "text", "text": "docs"}, {"box": [13, 538, 256, 30], "depth": 26, "n": 519, "role": "button", "text": "Write up the October incident"}, {"box": [42, 546, 14, 14], "depth": 37, "n": 1192, "role": "img"}, {"box": [64, 544, 179, 19], "depth": 36, "n": 907, "role": "text", "text": "Write up the October incident"}, {"box": [237, 553, 0, 0], "depth": 31, "n": 550, "role": "group"}, {"box": [245, 545, 16, 16], "depth": 36, "n": 923, "role": "group", "text": "Completed"}, {"box": [246, 546, 14, 14], "depth": 38, "n": 936, "role": "img"}, {"box": [64, 564, 11, 11], "depth": 34, "n": 942, "role": "img"}, {"box": [79, 561, 63, 16], "depth": 34, "n": 611, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 797, 224, 30], "depth": 17, "n": 1530, "role": "button", "text": "Local"}, {"box": [18, 802, 20, 20], "depth": 26, "n": 1902, "role": "group", "text": "Local"}, {"box": [43, 803, 33, 19], "depth": 23, "n": 1539, "role": "text", "text": "Local"}, {"box": [239, 797, 30, 30], "checked": false, "depth": 17, "n": 1542, "role": "checkbox", "text": "Settings"}, {"box": [246, 804, 16, 16], "depth": 18, "n": 1543, "role": "img"}, {"box": [5, 0, 272, 42], "depth": 11, "id": "sidebar-drag", "n": 1545}, {"box": [94, 9, 24, 24], "depth": 14, "n": 1549, "role": "button", "text": "Sidebar view options"}, {"box": [98, 13, 16, 16], "depth": 15, "n": 1550, "role": "img"}, {"box": [269, 42, 12, 793], "depth": 10, "n": 1553, "role": "group", "text": "Resize sidebar"}, {"box": [277, 0, 1043, 38], "depth": 7, "id": "shell-drag", "n": 1391}, {"box": [281, 42, 1034, 793], "depth": 8, "id": "shell-page-room", "n": 1393}, {"box": [281, 42, 1034, 793], "depth": 12, "id": "split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 1561}, {"box": [281, 42, 1034, 793], "depth": 9, "id": "shell-page", "n": 1396}, {"box": [281, 42, 1034, 793], "depth": 10, "id": "shell-page-card", "n": 1397}, {"box": [282, 43, 1032, 791], "depth": 16, "id": "chat-session", "n": 1903}, {"box": [282, 43, 1032, 751], "depth": 26, "n": 1181, "role": "document"}, {"box": [282, 43, 1032, 751], "depth": 27, "id": "transcript", "n": 1176, "role": "scroll", "text": "Conversation"}, {"box": [456, 59, 684, 68], "depth": 34, "id": "585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9", "n": 634, "role": "article", "text": "You"}, {"box": [609, 69, 473, 48], "depth": 45, "n": 946, "role": "text", "text": "Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it."}, {"box": [456, 175, 684, 398], "depth": 33, "n": 661, "role": "article", "text": "Reply"}, {"box": [456, 175, 684, 26], "depth": 37, "n": 1063, "role": "button", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [456, 180, 251, 17], "depth": 42, "n": 1198, "role": "text", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [456, 213, 674, 72], "depth": 44, "n": 1209, "role": "text", "text": "Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after."}, {"box": [456, 297, 684, 26], "depth": 37, "n": 1084, "role": "button", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [456, 302, 166, 17], "depth": 42, "n": 1203, "role": "text", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [456, 335, 669, 48], "depth": 44, "n": 1214, "role": "text", "text": "Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary."}, {"box": [456, 399, 684, 78], "depth": 43, "n": 1217, "role": "list"}, {"box": [456, 399, 684, 48], "depth": 44, "n": 1218, "role": "listitem", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [456, 399, 24, 24], "depth": 45, "n": 1221, "role": "group"}, {"box": [480, 399, 647, 48], "depth": 47, "n": 1228, "role": "text", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [456, 453, 684, 24], "depth": 44, "n": 1229, "role": "listitem", "text": "5 of 5 tests pass"}, {"box": [456, 453, 24, 24], "depth": 45, "n": 1232, "role": "group"}, {"box": [480, 453, 115, 24], "depth": 47, "n": 1238, "role": "text", "text": "5 of 5 tests pass"}, {"box": [456, 493, 675, 48], "depth": 44, "n": 1243, "role": "text", "text": "This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet."}, {"box": [456, 553, 84, 17], "depth": 39, "n": 1037, "role": "text", "text": "Nov 17, 9:15 AM"}, {"box": [548, 549, 24, 24], "depth": 41, "n": 1098, "role": "button", "text": "Copy message"}, {"box": [553, 554, 14, 14], "depth": 42, "n": 1099, "role": "img"}, {"box": [1304, 43, 10, 751], "depth": 25, "id": "transcript-rail", "n": 1239, "role": "group"}, {"box": [1309, 47, 3, 0], "depth": 26, "n": 685, "role": "group"}, {"box": [282, 745, 1032, 81], "depth": 11, "id": "chat-composer-dock", "n": 1404}, {"box": [468, 745, 660, 81], "depth": 12, "id": "chat-composer", "n": 1405}, {"box": [468, 745, 0, 0], "depth": 22, "n": 1578, "role": "tablist"}, {"box": [468, 745, 0, 0], "depth": 22, "n": 1585, "role": "button"}, {"box": [468, 745, 0, 0], "depth": 22, "n": 1586, "role": "button", "text": "Fold what's waiting"}, {"box": [468, 745, 0, 0], "depth": 23, "n": 1587, "role": "img"}, {"box": [468, 745, 0, 0], "depth": 20, "n": 1590, "role": "scroll"}, {"box": [468, 745, 0, 0], "depth": 19, "n": 1595, "role": "group"}, {"box": [515, 759, 531, 22], "depth": 20, "focused": true, "n": 1604, "role": "textbox", "text": "Message", "value": ""}, {"box": [515, 759, 531, 22], "depth": 22, "n": 1608, "text": "Ask anything, @ to mention\u2026"}, {"box": [479, 756, 28, 28], "depth": 22, "n": 1907, "role": "button", "text": "Attach"}, {"box": [484, 761, 18, 18], "depth": 23, "n": 1908, "role": "img"}, {"box": [1054, 756, 28, 28], "depth": 22, "id": "dictation-microphone", "n": 1753, "role": "button", "text": "Hold to dictate"}, {"box": [1059, 761, 18, 18], "depth": 23, "n": 1754, "role": "img"}, {"box": [1090, 756, 28, 28], "depth": 24, "disabled": true, "n": 1995, "role": "button", "text": "Send message"}, {"box": [1097, 763, 14, 14], "depth": 25, "n": 1996, "role": "img"}, {"box": [468, 802, 660, 24], "depth": 17, "id": "composer-toolbar", "n": 1621}, {"box": [478, 802, 93, 24], "depth": 21, "n": 1626, "role": "button", "text": "Access"}, {"box": [484, 808, 12, 12], "depth": 25, "n": 1911, "role": "img"}, {"box": [502, 805, 63, 17], "depth": 27, "n": 1914, "role": "text", "text": "Full access"}, {"box": [575, 802, 150, 24], "depth": 21, "n": 1764, "role": "group", "text": "Branch main"}, {"box": [468, 802, 17, 17], "depth": 22, "n": 931, "role": "group"}, {"box": [468, 802, 17, 17], "depth": 23, "n": 1138, "role": "text", "text": "api"}, {"box": [468, 802, 27, 17], "depth": 22, "n": 2612, "role": "group"}, {"box": [468, 802, 27, 17], "depth": 23, "n": 928, "role": "text", "text": "main"}, {"box": [468, 802, 35, 17], "depth": 22, "n": 959, "role": "group"}, {"box": [468, 802, 35, 17], "depth": 23, "n": 962, "role": "text", "text": "studio"}, {"box": [581, 808, 12, 12], "depth": 22, "id": "composer-place-lead", "n": 953}, {"box": [581, 808, 12, 12], "depth": 26, "n": 71, "role": "img"}, {"box": [599, 805, 35, 17], "depth": 24, "id": "composer-place-device", "n": 1164}, {"box": [599, 805, 35, 17], "depth": 25, "id": "composer-place-device", "n": 2035}, {"box": [599, 805, 35, 17], "depth": 28, "id": "composer-place-device", "n": 1342, "text": "studio"}, {"box": [638, 809, 10, 10], "depth": 24, "n": 1368, "role": "group"}, {"box": [638, 809, 10, 10], "depth": 25, "n": 1174, "role": "img"}, {"box": [654, 805, 17, 17], "depth": 23, "id": "composer-place-project", "n": 1671}, {"box": [654, 805, 17, 17], "depth": 24, "id": "composer-place-project", "n": 1327}, {"box": [654, 805, 17, 17], "depth": 27, "id": "composer-place-project", "n": 1133, "text": "api"}, {"box": [677, 809, 10, 10], "depth": 25, "n": 1166, "role": "group"}, {"box": [677, 809, 10, 10], "depth": 26, "n": 952, "role": "img"}, {"box": [691, 805, 28, 17], "depth": 24, "id": "composer-place-branch", "n": 1172}, {"box": [691, 805, 27, 17], "depth": 25, "id": "composer-place-branch", "n": 664}, {"box": [691, 805, 27, 17], "depth": 28, "id": "composer-place-branch", "n": 1082, "text": "main"}, {"box": [1006, 802, 112, 24], "depth": 23, "n": 473, "role": "button", "text": "Model"}, {"box": [1012, 808, 12, 12], "depth": 28, "n": 65, "role": "img"}, {"box": [1030, 805, 50, 17], "depth": 30, "n": 150, "role": "text", "text": "Opus 5.5"}, {"box": [1086, 805, 26, 17], "depth": 29, "n": 1318, "role": "text", "text": "High"}, {"box": [281, 42, 0, 0], "depth": 13, "n": 1641, "role": "img"}, {"box": [298, 43, 848, 40], "depth": 11, "id": "session-header", "n": 1643}, {"box": [298, 43, 0, 0], "depth": 12, "id": "page-title", "n": 1644}, {"box": [298, 43, 0, 0], "depth": 15, "n": 1647, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [1315, 42, 0, 793], "depth": 7, "id": "shell-files", "n": 1419}, {"box": [1315, 42, 0, 0], "depth": 10, "id": "panel", "n": 1648}, {"box": [1315, 42, 0, 0], "depth": 12, "id": "shell-files-content", "n": 1650}, {"box": [1315, 42, 0, 0], "depth": 14, "id": "panel-strip", "n": 1652, "role": "tablist", "text": "Panel tabs"}, {"box": [1315, 42, 0, 0], "depth": 16, "n": 1654, "role": "scroll"}, {"box": [1315, 42, 0, 0], "depth": 16, "id": "panel-tab-lifted", "n": 1663}, {"box": [1315, 42, 0, 0], "depth": 17, "id": "panel-empty", "n": 1792, "role": "group", "text": "Session home"}, {"box": [1315, 42, 0, 548], "depth": 21, "id": "panel-home-block", "n": 1796}, {"box": [1331, 74, 0, 94], "depth": 22, "id": "panel-home-info", "n": 1797}, {"box": [1331, 74, 16, 30], "depth": 23, "id": "panel-home-device", "n": 1798, "role": "group", "text": "studio"}, {"box": [1340, 81, 16, 16], "depth": 27, "n": 1938, "role": "img"}, {"box": [1331, 106, 0, 30], "depth": 27, "id": "panel-home-project", "n": 1942, "role": "group", "text": "api"}, {"box": [1340, 113, 16, 16], "depth": 33, "n": 1980, "role": "img"}, {"box": [1331, 138, 0, 30], "depth": 26, "id": "panel-home-branch", "n": 1950, "role": "group", "text": "main"}, {"box": [1339, 144, 18, 18], "depth": 28, "n": 1952, "role": "img"}, {"box": [1381, 141, 0, 24], "depth": 27, "id": "panel-home-branch-slot", "n": 1955}, {"box": [1381, 141, 45, 24], "depth": 32, "id": "git-branch-totals", "n": 739, "role": "button", "text": "12 lines added, 1 removed: open the branch's changes"}, {"box": [1385, 145, 20, 16], "depth": 33, "n": 744, "role": "text", "text": "+12"}, {"box": [1409, 145, 13, 16], "depth": 33, "n": 742, "role": "text", "text": "\u22121"}, {"box": [1331, 168, 0, 0], "depth": 25, "id": "panel-home-details", "n": 1959}, {"box": [1331, 192, 0, 66], "depth": 23, "id": "panel-home-actions", "n": 1963}, {"box": [1339, 198, 0, 16], "depth": 25, "n": 1965, "role": "text", "text": "Actions"}, {"box": [1331, 226, 0, 30], "depth": 24, "id": "panel-home-add-action", "n": 1971, "role": "button", "text": "Add action"}, {"box": [1339, 232, 18, 18], "depth": 26, "n": 1973, "role": "img"}, {"box": [1331, 282, 0, 252], "depth": 22, "id": "panel-home-open", "n": 1807}, {"box": [1339, 288, 0, 16], "depth": 24, "n": 1809, "role": "text", "text": "Open"}, {"box": [1331, 312, 0, 30], "depth": 24, "id": "panel-open-browser", "n": 1811, "role": "button", "text": "Browser"}, {"box": [1339, 318, 18, 18], "depth": 26, "n": 1813, "role": "img"}, {"box": [1381, 317, 20, 20], "depth": 25, "n": 1816, "role": "img", "text": "B"}, {"box": [1381, 317, 20, 20], "depth": 26, "n": 1817, "role": "group"}, {"box": [1387, 319, 8, 17], "depth": 27, "n": 1818, "role": "text", "text": "B"}, {"box": [1331, 344, 0, 30], "depth": 24, "id": "panel-open-files", "n": 1819, "role": "button", "text": "File viewer"}, {"box": [1339, 350, 18, 18], "depth": 26, "n": 1821, "role": "img"}, {"box": [1381, 349, 20, 20], "depth": 25, "n": 1824, "role": "img", "text": "F"}, {"box": [1381, 349, 20, 20], "depth": 26, "n": 1825, "role": "group"}, {"box": [1387, 351, 7, 17], "depth": 27, "n": 1826, "role": "text", "text": "F"}, {"box": [1331, 376, 0, 30], "depth": 24, "id": "panel-open-terminal", "n": 1827, "role": "button", "text": "Terminal"}, {"box": [1339, 382, 18, 18], "depth": 26, "n": 1829, "role": "img"}, {"box": [1381, 381, 20, 20], "depth": 25, "n": 1832, "role": "img", "text": "T"}, {"box": [1381, 381, 20, 20], "depth": 26, "n": 1833, "role": "group"}, {"box": [1388, 383, 7, 17], "depth": 27, "n": 1834, "role": "text", "text": "T"}, {"box": [1331, 408, 0, 30], "depth": 24, "id": "panel-open-side-chat", "n": 1835, "role": "button", "text": "Side chat"}, {"box": [1339, 414, 18, 18], "depth": 26, "n": 1837, "role": "img"}, {"box": [1381, 413, 20, 20], "depth": 25, "n": 1840, "role": "img", "text": "S"}, {"box": [1381, 413, 20, 20], "depth": 26, "n": 1841, "role": "group"}, {"box": [1387, 415, 8, 17], "depth": 27, "n": 1842, "role": "text", "text": "S"}, {"box": [1331, 440, 0, 30], "depth": 24, "id": "panel-open-fork", "n": 1843, "role": "button", "text": "Fork chat"}, {"box": [1339, 446, 18, 18], "depth": 26, "n": 1845, "role": "img"}, {"box": [1381, 445, 20, 20], "depth": 25, "n": 1848, "role": "img", "text": "K"}, {"box": [1381, 445, 20, 20], "depth": 26, "n": 1849, "role": "group"}, {"box": [1387, 447, 8, 17], "depth": 27, "n": 1850, "role": "text", "text": "K"}, {"box": [1331, 472, 0, 62], "depth": 23, "n": 1851, "role": "group"}, {"box": [1331, 472, 0, 62], "depth": 24, "id": "git-empty-rows", "n": 1852}, {"box": [1331, 472, 0, 30], "depth": 25, "id": "git-open-changes", "n": 1853, "role": "button", "text": "Changes"}, {"box": [1339, 478, 18, 18], "depth": 27, "n": 1855, "role": "img"}, {"box": [1381, 477, 20, 20], "depth": 26, "n": 1858, "role": "img", "text": "C"}, {"box": [1381, 477, 20, 20], "depth": 27, "n": 1859, "role": "group"}, {"box": [1387, 479, 9, 17], "depth": 28, "n": 1860, "role": "text", "text": "C"}, {"box": [1331, 504, 0, 30], "depth": 25, "id": "git-open-history", "n": 1861, "role": "button", "text": "History"}, {"box": [1339, 510, 18, 18], "depth": 27, "n": 1863, "role": "img"}, {"box": [1381, 509, 20, 20], "depth": 26, "n": 1866, "role": "img", "text": "H"}, {"box": [1381, 509, 20, 20], "depth": 27, "n": 1867, "role": "group"}, {"box": [1387, 511, 9, 17], "depth": 28, "n": 1868, "role": "text", "text": "H"}, {"box": [1331, 558, 0, 0], "depth": 22, "id": "panel-home-lanes", "n": 1869}, {"box": [277, 0, 0, 0], "depth": 7, "n": 1422, "role": "slider", "text": "Resize files", "value": "0 points wide"}, {"box": [132, 4, 1188, 34], "depth": 8, "id": "session-tabs", "n": 1425, "role": "tablist", "text": "Open chats"}, {"box": [132, 7, 953, 28], "depth": 10, "id": "session-tabs-scroll", "n": 1427, "role": "scroll"}, {"box": [132, 7, 220, 28], "depth": 17, "id": "session-tab-chosen", "n": 53}, {"box": [132, 7, 220, 28], "depth": 16, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 1674, "role": "tab", "text": "Fix burst at the rate limit boundary"}, {"box": [136, 11, 20, 20], "depth": 18, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1", "n": 1679}, {"box": [136, 11, 20, 20], "depth": 26, "n": 1086, "role": "img"}, {"box": [162, 13, 193, 17], "depth": 19, "n": 1684, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [132, 7, 0, 0], "depth": 10, "id": "session-tab-lifted", "n": 1434}, {"box": [1093, 7, 81, 28], "depth": 11, "id": "updates-button", "n": 1697, "role": "button", "text": "3 updates"}, {"box": [1127, 11, 20, 20], "depth": 14, "id": "updates-mark-3", "n": 1987}, {"box": [1127, 11, 20, 20], "depth": 15, "n": 1988, "role": "img"}, {"box": [1127, 11, 20, 20], "depth": 15, "id": "updates-mark-3-glyph", "n": 1981}, {"box": [1132, 16, 11, 11], "depth": 18, "n": 1985, "role": "img"}, {"box": [1112, 11, 20, 20], "depth": 14, "id": "updates-mark-2", "n": 1984}, {"box": [1112, 11, 20, 20], "depth": 15, "n": 1881, "role": "img"}, {"box": [1112, 11, 20, 20], "depth": 15, "id": "updates-mark-2-glyph", "n": 1886}, {"box": [1117, 16, 11, 11], "depth": 18, "n": 1887, "role": "img"}, {"box": [1097, 11, 20, 20], "depth": 14, "id": "updates-mark-1", "n": 1891}, {"box": [1097, 11, 20, 20], "depth": 15, "id": "updates-mark-1-glyph", "n": 1893}, {"box": [1102, 16, 11, 11], "depth": 18, "n": 1882, "role": "img"}, {"box": [1152, 13, 16, 16], "depth": 15, "n": 1896, "role": "img"}, {"box": [0, 0, 1320, 0], "depth": 5, "id": "titlebar", "n": 1438}, {"box": [6, 7, 90, 28], "depth": 7, "id": "titlebar-island", "n": 1440}, {"box": [10, 9, 24, 24], "depth": 9, "n": 1443, "role": "button", "text": "Toggle sidebar"}, {"box": [42, 9, 24, 24], "depth": 9, "disabled": true, "n": 1451, "role": "button", "text": "Back"}, {"box": [44, 11, 21, 21], "depth": 10, "n": 1452, "role": "img"}, {"box": [68, 9, 24, 24], "depth": 9, "n": 1456, "role": "button", "text": "Forward"}, {"box": [70, 11, 21, 21], "depth": 10, "n": 1457, "role": "img"}, {"box": [1178, 0, 142, 40], "depth": 7, "id": "titlebar-actions-island", "n": 1459}, {"box": [1182, 9, 24, 24], "depth": 8, "id": "titlebar-actions", "n": 1461}, {"box": [1182, 9, 24, 24], "depth": 11, "n": 1706, "role": "button", "text": "Panel"}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-palette", "n": 1714}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-add-project", "n": 1716}]
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/themes/tree.txt b/apps/landing/tools/recreate/reference/themes/tree.txt
new file mode 100644
index 000000000..ec49dd0d7
--- /dev/null
+++ b/apps/landing/tools/recreate/reference/themes/tree.txt
@@ -0,0 +1,285 @@
+ @6 dialog "Zeron" 0,0 1320x840
+ @7 #host-toasts 1304,824 0x0
+ @1385 #shell 0,0 1320x840
+ @1386 #shell-chats 0,0 1320x840
+ @1476 #shell-sidebar 0,0 277x840
+ @1481 #sidebar-content 5,42 272x793
+ @1482 #sidebar-actions 13,50 256x94
+ @1484 button "New chat" 13,50 256x30
+ @1488 img 20,57 16x16
+ @1494 text "New chat" 43,56 57x19
+ @1495 text "Ctrl+N" 228,57 33x16
+ @1498 button "Search" 13,82 256x30
+ @1502 img 20,89 16x16
+ @1508 text "Search" 43,88 42x19
+ @1509 text "Ctrl+K" 229,89 32x16
+ @1720 button "Pull requests" 13,114 256x30
+ @1899 img 20,121 16x16
+ @1729 text "Pull requests" 43,120 77x19
+ @1515 #sidebar 13,160 256x627
+ @1732 scroll 13,160 256x627
+ @52 button "Projects" 13,160 256x24
+ @21 text "Projects" 21,164 43x16
+ @88 button "web" 13,186 256x30
+ @2014 img 19,192 18x18
+ @302 text "web" 43,192 26x19
+ @1137 button "Speed up the dashboard's first paint" 13,218 256x30
+ @1102 img 42,226 14x14
+ @687 text "Speed up the dashboard's first paint" 64,224 220x19
+ @978 group 237,233 0x0
+ @697 group "Completed" 245,225 16x16
+ @700 img 246,226 14x14
+ @709 img 64,244 11x11 hidden
+ @1142 text "studio · main" 79,241 63x16 hidden
+ @966 button "Add dark mode to settings" 13,250 256x30
+ @1105 img 42,258 14x14
+ @719 text "Add dark mode to settings" 64,256 161x19
+ @141 group 237,265 0x0
+ @723 group "Completed" 245,257 16x16
+ @728 img 246,258 14x14
+ @732 img 64,276 11x11 hidden
+ @137 text "studio · main" 79,273 63x16 hidden
+ @122 button "api" 13,282 256x30
+ @746 img 19,288 18x18
+ @109 text "api" 43,288 18x19
+ @955 button "Sweep idle keys without a timer" 13,314 256x30
+ @1112 img 42,322 14x14
+ @761 text "Sweep idle keys without a timer" 64,320 193x19
+ @250 group 237,329 0x0
+ @767 group "Completed" 245,321 16x16
+ @770 img 246,322 14x14
+ @773 img 64,340 11x11 hidden
+ @188 text "studio · main" 79,337 63x16 hidden
+ @206 button "Fix burst at the rate limit boundary" 13,346 256x30
+ @1116 img 42,354 14x14
+ @780 text "Fix burst at the rate limit boundary" 64,352 209x19
+ @224 group 230,361 0x0
+ @782 text "30m" 238,353 23x16
+ @784 img 64,372 11x11 hidden
+ @239 text "studio · main" 79,369 63x16 hidden
+ @273 button "Return a real Retry-After" 13,378 256x30
+ @1123 img 42,386 14x14
+ @791 text "Return a real Retry-After" 64,384 150x19
+ @290 group 237,393 0x0
+ @794 group "Completed" 245,385 16x16
+ @796 img 246,386 14x14
+ @799 img 64,404 11x11 hidden
+ @307 text "studio · main" 79,401 63x16 hidden
+ @320 button "uptime" 13,410 256x30
+ @802 img 19,416 18x18
+ @335 text "uptime" 43,416 43x19
+ @353 button "Page only when two regions agree" 13,442 256x30
+ @1149 img 42,450 14x14
+ @813 text "Page only when two regions agree" 64,448 208x19
+ @370 group 237,457 0x0
+ @817 group "Completed" 245,449 16x16
+ @819 img 246,450 14x14
+ @828 img 64,468 11x11 hidden
+ @384 text "studio · main" 79,465 63x16 hidden
+ @399 button "Why Frankfurt flapped overnight" 13,474 256x30
+ @1188 img 42,482 14x14
+ @845 text "Why Frankfurt flapped overnight" 64,480 197x19
+ @423 group 237,489 0x0
+ @851 group "Completed" 245,481 16x16
+ @854 img 246,482 14x14
+ @861 img 64,500 11x11 hidden
+ @450 text "studio · main" 79,497 63x16 hidden
+ @476 button "docs" 13,506 256x30
+ @864 img 19,512 18x18
+ @491 text "docs" 43,512 29x19
+ @519 button "Write up the October incident" 13,538 256x30
+ @1192 img 42,546 14x14
+ @907 text "Write up the October incident" 64,544 179x19
+ @550 group 237,553 0x0
+ @923 group "Completed" 245,545 16x16
+ @936 img 246,546 14x14
+ @942 img 64,564 11x11 hidden
+ @611 text "studio · main" 79,561 63x16 hidden
+ @1530 button "Local" 13,797 224x30
+ @1902 group "Local" 18,802 20x20
+ @1539 text "Local" 43,803 33x19
+ @1542 checkbox "Settings" 239,797 30x30 unchecked
+ @1543 img 246,804 16x16
+ @1545 #sidebar-drag 5,0 272x42
+ @1549 button "Sidebar view options" 94,9 24x24
+ @1550 img 98,13 16x16
+ @1553 group "Resize sidebar" 269,42 12x793
+ @1391 #shell-drag 277,0 1043x38
+ @1393 #shell-page-room 281,42 1034x793
+ @1561 #split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8 281,42 1034x793
+ @1396 #shell-page 281,42 1034x793
+ @1397 #shell-page-card 281,42 1034x793
+ @1903 #chat-session 282,43 1032x791
+ @1181 document 282,43 1032x751
+ @1176 #transcript scroll "Conversation" 282,43 1032x751
+ @634 #585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9 article "You" 456,59 684x68
+ @946 text "Clients can send about twice the limit if they time it aroun…" 609,69 473x48
+ @661 article "Reply" 456,175 684x398
+ @1063 button "Thought process · ran 1 command · read 2 files" 456,175 684x26
+ @1198 text "Thought process · ran 1 command · read 2 files" 456,180 251x17
+ @1209 text "Found it. estimate() weights the previous window by Math.flo…" 456,213 674x72
+ @1084 button "Ran 1 command · edited 2 files" 456,297 684x26
+ @1203 text "Ran 1 command · edited 2 files" 456,302 166x17
+ @1214 text "Fixed in src/window.ts: the previous window now counts for t…" 456,335 669x48
+ @1217 list 456,399 684x78
+ @1218 listitem "test/window.test.ts fills a window in its last 10 ms, then c…" 456,399 684x48
+ @1221 group 456,399 24x24
+ @1228 text "test/window.test.ts fills a window in its last 10 ms, then c…" 480,399 647x48
+ @1229 listitem "5 of 5 tests pass" 456,453 684x24
+ @1232 group 456,453 24x24
+ @1238 text "5 of 5 tests pass" 480,453 115x24
+ @1243 text "This matches the October incident: a client at the limit got…" 456,493 675x48
+ @1037 text "Nov 17, 9:15 AM" 456,553 84x17
+ @1098 button "Copy message" 548,549 24x24
+ @1099 img 553,554 14x14
+ @1239 #transcript-rail group 1304,43 10x751 hidden
+ @685 group 1309,47 3x0 hidden
+ @1404 #chat-composer-dock 282,745 1032x81
+ @1405 #chat-composer 468,745 660x81
+ @1578 tablist 468,745 0x0 hidden
+ @1585 button 468,745 0x0 hidden
+ @1586 button "Fold what's waiting" 468,745 0x0 hidden
+ @1587 img 468,745 0x0 hidden
+ @1590 scroll 468,745 0x0 hidden
+ @1595 group 468,745 0x0 hidden
+ @1604 textbox "Message" ="" 515,759 531x22 focused
+ @1608 "Ask anything, @ to mention…" 515,759 531x22
+ @1907 button "Attach" 479,756 28x28
+ @1908 img 484,761 18x18
+ @1753 #dictation-microphone button "Hold to dictate" 1054,756 28x28
+ @1754 img 1059,761 18x18
+ @1995 button "Send message" 1090,756 28x28 disabled
+ @1996 img 1097,763 14x14
+ @1621 #composer-toolbar 468,802 660x24
+ @1626 button "Access" 478,802 93x24
+ @1911 img 484,808 12x12
+ @1914 text "Full access" 502,805 63x17
+ @1764 group "Branch main" 575,802 150x24
+ @931 group 468,802 17x17 hidden
+ @1138 text "api" 468,802 17x17 hidden
+ @2612 group 468,802 27x17 hidden
+ @928 text "main" 468,802 27x17 hidden
+ @959 group 468,802 35x17 hidden
+ @962 text "studio" 468,802 35x17 hidden
+ @953 #composer-place-lead 581,808 12x12
+ @71 img 581,808 12x12
+ @1164 #composer-place-device 599,805 35x17
+ @2035 #composer-place-device 599,805 35x17
+ @1342 #composer-place-device "studio" 599,805 35x17
+ @1368 group 638,809 10x10
+ @1174 img 638,809 10x10
+ @1671 #composer-place-project 654,805 17x17
+ @1327 #composer-place-project 654,805 17x17
+ @1133 #composer-place-project "api" 654,805 17x17
+ @1166 group 677,809 10x10
+ @952 img 677,809 10x10
+ @1172 #composer-place-branch 691,805 28x17
+ @664 #composer-place-branch 691,805 27x17
+ @1082 #composer-place-branch "main" 691,805 27x17
+ @473 button "Model" 1006,802 112x24
+ @65 img 1012,808 12x12
+ @150 text "Opus 5.5" 1030,805 50x17
+ @1318 text "High" 1086,805 26x17
+ @1641 img 281,42 0x0 hidden
+ @1643 #session-header 298,43 848x40
+ @1644 #page-title 298,43 0x0 hidden
+ @1647 text "Fix burst at the rate limit boundary" 298,43 0x0 hidden
+ @1419 #shell-files 1315,42 0x793 hidden
+ @1648 #panel 1315,42 0x0 hidden
+ @1650 #shell-files-content 1315,42 0x0 hidden
+ @1652 #panel-strip tablist "Panel tabs" 1315,42 0x0 hidden
+ @1654 scroll 1315,42 0x0 hidden
+ @1663 #panel-tab-lifted 1315,42 0x0 hidden
+ @1792 #panel-empty group "Session home" 1315,42 0x0 hidden
+ @1796 #panel-home-block 1315,42 0x548 hidden
+ @1797 #panel-home-info 1331,74 0x94 hidden
+ @1798 #panel-home-device group "studio" 1331,74 16x30 hidden
+ @1938 img 1340,81 16x16 hidden
+ @1942 #panel-home-project group "api" 1331,106 0x30 hidden
+ @1980 img 1340,113 16x16 hidden
+ @1950 #panel-home-branch group "main" 1331,138 0x30 hidden
+ @1952 img 1339,144 18x18 hidden
+ @1955 #panel-home-branch-slot 1381,141 0x24 hidden
+ @739 #git-branch-totals button "12 lines added, 1 removed: open the branch's changes" 1381,141 45x24 hidden
+ @744 text "+12" 1385,145 20x16 hidden
+ @742 text "−1" 1409,145 13x16 hidden
+ @1959 #panel-home-details 1331,168 0x0 hidden
+ @1963 #panel-home-actions 1331,192 0x66 hidden
+ @1965 text "Actions" 1339,198 0x16 hidden
+ @1971 #panel-home-add-action button "Add action" 1331,226 0x30 hidden
+ @1973 img 1339,232 18x18 hidden
+ @1807 #panel-home-open 1331,282 0x252 hidden
+ @1809 text "Open" 1339,288 0x16 hidden
+ @1811 #panel-open-browser button "Browser" 1331,312 0x30 hidden
+ @1813 img 1339,318 18x18 hidden
+ @1816 img "B" 1381,317 20x20 hidden
+ @1817 group 1381,317 20x20 hidden
+ @1818 text "B" 1387,319 8x17 hidden
+ @1819 #panel-open-files button "File viewer" 1331,344 0x30 hidden
+ @1821 img 1339,350 18x18 hidden
+ @1824 img "F" 1381,349 20x20 hidden
+ @1825 group 1381,349 20x20 hidden
+ @1826 text "F" 1387,351 7x17 hidden
+ @1827 #panel-open-terminal button "Terminal" 1331,376 0x30 hidden
+ @1829 img 1339,382 18x18 hidden
+ @1832 img "T" 1381,381 20x20 hidden
+ @1833 group 1381,381 20x20 hidden
+ @1834 text "T" 1388,383 7x17 hidden
+ @1835 #panel-open-side-chat button "Side chat" 1331,408 0x30 hidden
+ @1837 img 1339,414 18x18 hidden
+ @1840 img "S" 1381,413 20x20 hidden
+ @1841 group 1381,413 20x20 hidden
+ @1842 text "S" 1387,415 8x17 hidden
+ @1843 #panel-open-fork button "Fork chat" 1331,440 0x30 hidden
+ @1845 img 1339,446 18x18 hidden
+ @1848 img "K" 1381,445 20x20 hidden
+ @1849 group 1381,445 20x20 hidden
+ @1850 text "K" 1387,447 8x17 hidden
+ @1851 group 1331,472 0x62 hidden
+ @1852 #git-empty-rows 1331,472 0x62 hidden
+ @1853 #git-open-changes button "Changes" 1331,472 0x30 hidden
+ @1855 img 1339,478 18x18 hidden
+ @1858 img "C" 1381,477 20x20 hidden
+ @1859 group 1381,477 20x20 hidden
+ @1860 text "C" 1387,479 9x17 hidden
+ @1861 #git-open-history button "History" 1331,504 0x30 hidden
+ @1863 img 1339,510 18x18 hidden
+ @1866 img "H" 1381,509 20x20 hidden
+ @1867 group 1381,509 20x20 hidden
+ @1868 text "H" 1387,511 9x17 hidden
+ @1869 #panel-home-lanes 1331,558 0x0 hidden
+ @1422 slider "Resize files" ="0 points wide" 277,0 0x0 hidden
+ @1425 #session-tabs tablist "Open chats" 132,4 1188x34
+ @1427 #session-tabs-scroll scroll 132,7 953x28
+ @53 #session-tab-chosen 132,7 220x28
+ @1674 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8 tab "Fix burst at the rate limit boundary" 132,7 220x28
+ @1679 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1 136,11 20x20
+ @1086 img 136,11 20x20
+ @1684 text "Fix burst at the rate limit boundary" 162,13 193x17
+ @1434 #session-tab-lifted 132,7 0x0 hidden
+ @1697 #updates-button button "3 updates" 1093,7 81x28
+ @1987 #updates-mark-3 1127,11 20x20
+ @1988 img 1127,11 20x20
+ @1981 #updates-mark-3-glyph 1127,11 20x20
+ @1985 img 1132,16 11x11
+ @1984 #updates-mark-2 1112,11 20x20
+ @1881 img 1112,11 20x20
+ @1886 #updates-mark-2-glyph 1112,11 20x20
+ @1887 img 1117,16 11x11
+ @1891 #updates-mark-1 1097,11 20x20
+ @1893 #updates-mark-1-glyph 1097,11 20x20
+ @1882 img 1102,16 11x11
+ @1896 img 1152,13 16x16
+ @1438 #titlebar 0,0 1320x0
+ @1440 #titlebar-island 6,7 90x28 hidden
+ @1443 button "Toggle sidebar" 10,9 24x24
+ @1451 button "Back" 42,9 24x24 disabled
+ @1452 img 44,11 21x21
+ @1456 button "Forward" 68,9 24x24
+ @1457 img 70,11 21x21
+ @1459 #titlebar-actions-island 1178,0 142x40 hidden
+ @1461 #titlebar-actions 1182,9 24x24
+ @1706 button "Panel" 1182,9 24x24
+ @1714 #shell-palette 0,0 0x0
+ @1716 #shell-add-project 0,0 0x0
+
diff --git a/apps/landing/tools/recreate/stage_a.py b/apps/landing/tools/recreate/stage_a.py
new file mode 100644
index 000000000..19e07bb10
--- /dev/null
+++ b/apps/landing/tools/recreate/stage_a.py
@@ -0,0 +1,35 @@
+"""Stage A: the text and image nodes of the app's layout tree that the
+reference capture actually shows (a node's box must hold ink)."""
+import json, re, sys
+import numpy as np
+from PIL import Image
+
+from lib import REFS, P
+ref = REFS[P]
+S = ref.shape[1] / 1320
+tree = json.load(open("tree.json"))
+hidden = {int(m.group(1)) for m in re.finditer(r"@(\d+)[^\n]* hidden\s*$", open("tree.txt").read(), re.M)}
+
+def ink(box):
+ x, y, w, h = (int(round(v * S)) for v in box)
+ patch = ref[max(y, 0):y + h, max(x, 0):x + w].reshape(-1, 3)
+ if len(patch) == 0: return 0
+ base = np.median(patch, axis=0)
+ return int(np.abs(patch - base).sum(axis=1).max())
+
+badge = next((n["box"] for n in tree if n.get("id") == "updates-button" and n["n"] not in hidden), None)
+out = []
+for i, n in enumerate(tree):
+ if n["n"] in hidden: continue
+ leaf = i + 1 >= len(tree) or tree[i + 1]["depth"] <= n["depth"]
+ x, y, w, h = n["box"]
+ if w <= 0 or h <= 0: continue
+ if x >= 1320 or y >= 840: continue
+ if badge and badge[0] - 2 <= x <= badge[0] + badge[2] and y < 40: continue # the agents' updates badge: not part of the picture
+ kind = "img" if n.get("role") == "img" else "text" if n.get("text") and (n.get("role") == "text" or (leaf and n.get("role") is None)) else None
+ if not kind or ink(n["box"]) < 10: continue
+ out.append({"n": n["n"], "kind": kind, "box": n["box"], **({"text": n["text"]} if kind == "text" else {}), **({"id": n["id"]} if n.get("id") else {})})
+json.dump(out, open("nodes.json", "w"), ensure_ascii=False)
+texts = [o for o in out if o["kind"] == "text"]
+print(len(out), "nodes;", len(texts), "texts;", sum(o["kind"] == "img" for o in out), "imgs")
+print(" | ".join(f'{t["text"][:18]}@{t["box"][0]},{t["box"][1]}' for t in texts))
diff --git a/apps/landing/tools/recreate/tune.py b/apps/landing/tools/recreate/tune.py
new file mode 100644
index 000000000..6c7208f56
--- /dev/null
+++ b/apps/landing/tools/recreate/tune.py
@@ -0,0 +1,32 @@
+"""Move each placed node by what makes it meet the reference: for every text
+and icon, the whole-device-pixel shift (a few pixels at most) of the web render that
+best matches the app's pixels in its box. Adds to offsets.json."""
+import json, os, sys
+import numpy as np
+from PIL import Image
+from lib import *
+theme = P
+web = np.asarray(Image.open(f"web-{theme}.png").convert("RGB")).astype(np.int16)
+ref = REFS[theme]
+offsets = json.load(open("offsets.json")) if os.path.exists("offsets.json") else {}
+moved = 0
+for item in json.load(open("layout.json")):
+ x, y, w, h = item["box"]
+ if y < 40: continue
+ dxo, dyo = offsets.get(str(item["n"]), (0, 0))
+ x0, y0, x1, y1 = int((x + dxo) * S) - 2, int((y + dyo) * S) - 2, int((x + dxo + w) * S) + 2, int((y + dyo + h) * S) + 2
+ x1 = min(x1, 1305 * S)
+ best = (1e18, 0, 0)
+ for dy in range(-6, 7):
+ for dx in range(-4, 5):
+ a = web[y0:y1, x0:x1]
+ b = ref[y0 + dy:y1 + dy, x0 + dx:x1 + dx]
+ if a.shape != b.shape or a.size == 0: continue
+ err = float(np.abs(a - b).sum()) * (1 + 0.004 * (abs(dx) + abs(dy)))
+ if err < best[0]: best = (err, dx, dy)
+ _, dx, dy = best
+ if dx or dy:
+ moved += 1
+ offsets[str(item["n"])] = [dxo + dx / S, dyo + dy / S]
+json.dump(offsets, open("offsets.json", "w"))
+print("moved", moved)
diff --git a/apps/landing/tsconfig.json b/apps/landing/tsconfig.json
new file mode 100644
index 000000000..89b4a980a
--- /dev/null
+++ b/apps/landing/tsconfig.json
@@ -0,0 +1,5 @@
+{
+ "extends": "astro/tsconfigs/strict",
+ "include": [".astro/types.d.ts", "**/*"],
+ "exclude": ["dist", "tools", "public"]
+}
diff --git a/apps/landing/vitest.config.ts b/apps/landing/vitest.config.ts
new file mode 100644
index 000000000..0a75520ec
--- /dev/null
+++ b/apps/landing/vitest.config.ts
@@ -0,0 +1,5 @@
+import { defineConfig } from "vitest/config";
+
+export default defineConfig({
+ test: { include: ["src/**/*.test.ts", "tests/**/*.test.{ts,js}"] },
+});
diff --git a/apps/landing/wrangler.jsonc b/apps/landing/wrangler.jsonc
index ca68c9731..aafb92225 100644
--- a/apps/landing/wrangler.jsonc
+++ b/apps/landing/wrangler.jsonc
@@ -1,10 +1,14 @@
{
- // Landing page: pure static assets, no worker script. The install surface
- // (/install.sh, /releases/*) is served by the edge worker via path routes on
- // the same hostname — path routes beat this custom domain, so this worker
- // only ever sees page traffic. Deploy with `npx wrangler deploy` from this
- // dir. (The worker keeps its historical "comet-landing" name; renaming a
- // worker means a new worker. comet.zeron.sh stays attached for old links.)
+ // Landing page: an Astro site built to static assets, no worker script.
+ // `wrangler deploy` builds it first (`build` below): a clean install, the
+ // type check, the build into ./dist and the tests, so a deploy from CI
+ // (.github/workflows/deploy.yml, on a push to main that touches this
+ // folder) or from this directory uploads only a build that passed.
+ // The install surface (/install.sh, /releases/*) is served by the edge
+ // worker via path routes on the same hostname; path routes beat this
+ // custom domain, so this worker only ever sees page traffic. (The worker
+ // keeps its historical "comet-landing" name; renaming a worker means a new
+ // worker. comet.zeron.sh stays attached for old links.)
"$schema": "https://unpkg.com/wrangler/config-schema.json",
"name": "comet-landing",
"compatibility_date": "2026-07-01",
@@ -13,7 +17,9 @@
{ "pattern": "comet.zeron.sh", "custom_domain": true }
],
"workers_dev": true,
+ "build": { "command": "npm ci && npm run check && npm test" },
"assets": {
- "directory": "public"
+ "directory": "./dist",
+ "not_found_handling": "404-page"
}
}
diff --git a/apps/landing/wrangler.staging.jsonc b/apps/landing/wrangler.staging.jsonc
new file mode 100644
index 000000000..6872ae95b
--- /dev/null
+++ b/apps/landing/wrangler.staging.jsonc
@@ -0,0 +1,18 @@
+{
+ // The landing page's staging copy, at https://site-staging.zeron.sh: the
+ // same build as wrangler.jsonc deploys, on its own worker
+ // (zeron-landing-staging), which holds only that domain and so can never
+ // take zeron.sh.
+ // Deploy: `npx wrangler deploy -c wrangler.staging.jsonc` (it builds and
+ // tests first, as production's does).
+ "$schema": "https://unpkg.com/wrangler/config-schema.json",
+ "name": "zeron-landing-staging",
+ "compatibility_date": "2026-07-01",
+ "routes": [{ "pattern": "site-staging.zeron.sh", "custom_domain": true }],
+ "workers_dev": true,
+ "build": { "command": "npm ci && npm run check && npm test" },
+ "assets": {
+ "directory": "./dist",
+ "not_found_handling": "404-page"
+ }
+}
diff --git a/apps/zeron/Cargo.toml b/apps/zeron/Cargo.toml
index 2fda76d93..a067a3d4d 100644
--- a/apps/zeron/Cargo.toml
+++ b/apps/zeron/Cargo.toml
@@ -5,8 +5,7 @@ edition.workspace = true
license.workspace = true
publish.workspace = true
-# Shared by both binaries; the UI is referenced only by `zeron`, so the
-# background engine links without it.
+# Shared by both binaries.
[lib]
name = "zeron_app"
path = "src/lib.rs"
@@ -22,11 +21,11 @@ path = "src/bin/zeron-engine.rs"
[dependencies]
zeron-engine.workspace = true
zeron-rpc.workspace = true
-zeron-ui.workspace = true
zeron-update.workspace = true
zeron-cli.workspace = true
zeron-mcp.workspace = true
zeron-notify.workspace = true
+zeron-sync.workspace = true
tokio.workspace = true
clap.workspace = true
anyhow.workspace = true
diff --git a/apps/zeron/src/allocator.rs b/apps/zeron/src/allocator.rs
index c037522f8..abcaad1a4 100644
--- a/apps/zeron/src/allocator.rs
+++ b/apps/zeron/src/allocator.rs
@@ -15,6 +15,16 @@ use std::sync::atomic::{AtomicBool, Ordering};
/// The VM tag mimalloc maps the heap with.
pub const HEAP_VM_TAG: std::ffi::c_long = 254;
+/// mimalloc v2's `mi_option_purge_delay` (`mimalloc.h`; the bindings don't
+/// name it). Freed memory is handed back to the system after this many
+/// milliseconds (10 by default) — but only the next time that thread
+/// allocates or collects, which an engine at rest does rarely: after a burst
+/// (agents streaming), what it freed stayed counted against it until some
+/// later work. 0 hands it back as it's freed. Measured over five agents
+/// streaming: the engine's CPU the same (1.98%), its footprint once they're
+/// done 32 MB instead of 42.
+const MI_OPTION_PURGE_DELAY: libmimalloc_sys::mi_option_t = 15;
+
static TAGGED: AtomicBool = AtomicBool::new(false);
/// [`mimalloc::MiMalloc`], tagging its regions [`HEAP_VM_TAG`] from the first
@@ -27,10 +37,19 @@ fn tag_heap() {
// Only stores the option (no allocation); racing threads store the
// same value.
unsafe { libmimalloc_sys::mi_option_set(libmimalloc_sys::mi_option_os_tag, HEAP_VM_TAG) };
+ unsafe { libmimalloc_sys::mi_option_set(MI_OPTION_PURGE_DELAY, 0) };
TAGGED.store(true, Ordering::Relaxed);
}
}
+/// mimalloc's forced collect: what its threads freed (exited threads'
+/// pages too) goes back to the system. The engine calls it after dropping
+/// a large short-lived allocation ([`zeron_engine::heap`]).
+pub fn trim() {
+ // SAFETY: mimalloc's collect frees nothing in use.
+ unsafe { libmimalloc_sys::mi_collect(true) };
+}
+
unsafe impl GlobalAlloc for Allocator {
#[inline]
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@@ -60,6 +79,15 @@ unsafe impl GlobalAlloc for Allocator {
mod tests {
use super::*;
+ /// Freed memory goes back as it's freed (`MI_OPTION_PURGE_DELAY`), from
+ /// the first allocation on.
+ #[test]
+ fn freed_memory_is_handed_back_at_once() {
+ let held = vec![0u8; 1 << 20];
+ drop(held);
+ assert_eq!(unsafe { libmimalloc_sys::mi_option_get(MI_OPTION_PURGE_DELAY) }, 0);
+ }
+
/// `struct vm_region_extended_info` (`mach/vm_region.h`).
#[repr(C)]
#[derive(Default)]
diff --git a/apps/zeron/src/background.rs b/apps/zeron/src/background.rs
index b5626acb9..fb4cfb71b 100644
--- a/apps/zeron/src/background.rs
+++ b/apps/zeron/src/background.rs
@@ -55,6 +55,9 @@ fn run_engine(config: zeron_engine::EngineConfig) -> anyhow::Result<()> {
/// are posted on and delivers their clicks.
#[cfg(target_os = "macos")]
fn run_engine(config: zeron_engine::EngineConfig) -> anyhow::Result<()> {
+ // Before the engine starts: its sockets then never start the polling
+ // wake detector (`zeron_sync::wake`).
+ main_loop::watch_power();
let worker = std::thread::Builder::new()
.name("engine".into())
.spawn(move || {
@@ -75,9 +78,26 @@ fn run_engine(config: zeron_engine::EngineConfig) -> anyhow::Result<()> {
#[cfg(target_os = "macos")]
mod main_loop {
use std::ffi::c_void;
- use std::sync::atomic::{AtomicBool, Ordering};
+ use std::sync::atomic::{AtomicBool, AtomicPtr, AtomicU32, Ordering};
static DONE: AtomicBool = AtomicBool::new(false);
+ /// The source [`finish`] signals; null until [`run`] makes it.
+ static STOP: AtomicPtr = AtomicPtr::new(std::ptr::null_mut());
+
+ /// `CFRunLoopSourceContext`, version 0: only `perform` is used.
+ #[repr(C)]
+ struct SourceContext {
+ version: isize,
+ info: *mut c_void,
+ retain: *const c_void,
+ release: *const c_void,
+ copy_description: *const c_void,
+ equal: *const c_void,
+ hash: *const c_void,
+ schedule: *const c_void,
+ cancel: *const c_void,
+ perform: extern "C" fn(*mut c_void),
+ }
#[link(name = "CoreFoundation", kind = "framework")]
unsafe extern "C" {
@@ -86,39 +106,100 @@ mod main_loop {
fn CFRunLoopGetMain() -> *mut c_void;
fn CFRunLoopRunInMode(mode: *const c_void, seconds: f64, return_after_source: u8) -> i32;
fn CFRunLoopWakeUp(run_loop: *mut c_void);
- fn CFAbsoluteTimeGetCurrent() -> f64;
- fn CFRunLoopTimerCreate(
+ fn CFRunLoopSourceCreate(
allocator: *const c_void,
- fire_date: f64,
- interval: f64,
- flags: u64,
order: isize,
- callout: extern "C" fn(*mut c_void, *mut c_void),
- context: *mut c_void,
+ context: *mut SourceContext,
) -> *mut c_void;
- fn CFRunLoopAddTimer(run_loop: *mut c_void, timer: *mut c_void, mode: *const c_void);
+ fn CFRunLoopAddSource(run_loop: *mut c_void, source: *mut c_void, mode: *const c_void);
+ fn CFRunLoopSourceSignal(source: *mut c_void);
}
- extern "C" fn tick(_timer: *mut c_void, _info: *mut c_void) {}
+ #[link(name = "IOKit", kind = "framework")]
+ unsafe extern "C" {
+ fn IORegisterForSystemPower(
+ refcon: *mut c_void,
+ port: *mut *mut c_void,
+ callback: extern "C" fn(*mut c_void, u32, u32, *mut c_void),
+ notifier: *mut u32,
+ ) -> u32;
+ fn IONotificationPortGetRunLoopSource(port: *mut c_void) -> *mut c_void;
+ fn IOAllowPowerChange(kernel_port: u32, notification_id: isize) -> i32;
+ }
- /// Serve the main run loop until [`finish`]. A repeating timer keeps the
- /// loop from returning at once for want of sources and bounds how late
- /// the exit check runs.
+ // IOKit's power messages (IOKit/IOMessage.h).
+ const CAN_SYSTEM_SLEEP: u32 = 0xe000_0270;
+ const SYSTEM_WILL_SLEEP: u32 = 0xe000_0280;
+ const SYSTEM_HAS_POWERED_ON: u32 = 0xe000_0300;
+
+ /// The root power domain's connection, for acknowledging sleep.
+ static ROOT_PORT: AtomicU32 = AtomicU32::new(0);
+
+ extern "C" fn power(_refcon: *mut c_void, _service: u32, message: u32, argument: *mut c_void) {
+ match message {
+ // Every registered client must answer these, or the Mac waits
+ // up to 30 s before it sleeps.
+ CAN_SYSTEM_SLEEP | SYSTEM_WILL_SLEEP => unsafe {
+ IOAllowPowerChange(ROOT_PORT.load(Ordering::Acquire), argument as isize);
+ },
+ SYSTEM_HAS_POWERED_ON => zeron_sync::wake::notify_wake(),
+ _ => {}
+ }
+ }
+
+ /// Hear the Mac's sleep and wake from IOKit on the main run loop, so the
+ /// engine's sockets redial on wake without a detector waking the
+ /// process every second to compare clocks. Falls back to that detector
+ /// if registering fails.
+ pub(super) fn watch_power() {
+ unsafe {
+ let mut port = std::ptr::null_mut();
+ let mut notifier = 0u32;
+ let root =
+ IORegisterForSystemPower(std::ptr::null_mut(), &mut port, power, &mut notifier);
+ if root == 0 || port.is_null() {
+ tracing::warn!(
+ "couldn't register for power notifications; polling for wake instead"
+ );
+ return;
+ }
+ ROOT_PORT.store(root, Ordering::Release);
+ let source = IONotificationPortGetRunLoopSource(port);
+ CFRunLoopAddSource(CFRunLoopGetMain(), source, kCFRunLoopCommonModes);
+ }
+ zeron_sync::wake::use_os_wake_events();
+ }
+
+ /// The stop source fired: [`run`]'s wait returns and it reads `DONE`.
+ extern "C" fn stop(_info: *mut c_void) {}
+
+ /// Serve the main run loop until [`finish`]. It sleeps until something
+ /// arrives (a banner's click, the stop source) rather than on a timer:
+ /// an idle engine's main thread never wakes. The stop source both keeps
+ /// the loop from returning at once for want of sources and makes a
+ /// `finish` that comes before the wait begins end it at once (a signaled
+ /// source is served as soon as the loop runs).
pub(super) fn run() {
unsafe {
let main = CFRunLoopGetMain();
- let timer = CFRunLoopTimerCreate(
- std::ptr::null(),
- CFAbsoluteTimeGetCurrent() + 1.0,
- 1.0,
- 0,
- 0,
- tick,
- std::ptr::null_mut(),
- );
- CFRunLoopAddTimer(main, timer, kCFRunLoopCommonModes);
+ let mut context = SourceContext {
+ version: 0,
+ info: std::ptr::null_mut(),
+ retain: std::ptr::null(),
+ release: std::ptr::null(),
+ copy_description: std::ptr::null(),
+ equal: std::ptr::null(),
+ hash: std::ptr::null(),
+ schedule: std::ptr::null(),
+ cancel: std::ptr::null(),
+ perform: stop,
+ };
+ let source = CFRunLoopSourceCreate(std::ptr::null(), 0, &mut context);
+ CFRunLoopAddSource(main, source, kCFRunLoopCommonModes);
+ STOP.store(source, Ordering::SeqCst);
while !DONE.load(Ordering::SeqCst) {
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0, 0);
+ // (Returns after each source served, so `DONE` is read then.)
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e10, 1);
}
}
}
@@ -126,6 +207,12 @@ mod main_loop {
/// End [`run`] (any thread).
pub(super) fn finish() {
DONE.store(true, Ordering::SeqCst);
- unsafe { CFRunLoopWakeUp(CFRunLoopGetMain()) };
+ let source = STOP.load(Ordering::SeqCst);
+ unsafe {
+ if !source.is_null() {
+ CFRunLoopSourceSignal(source);
+ }
+ CFRunLoopWakeUp(CFRunLoopGetMain());
+ }
}
}
diff --git a/apps/zeron/src/bin/zeron-engine.rs b/apps/zeron/src/bin/zeron-engine.rs
index 76d9bcbc1..0b6648a1d 100644
--- a/apps/zeron/src/bin/zeron-engine.rs
+++ b/apps/zeron/src/bin/zeron-engine.rs
@@ -2,8 +2,9 @@
//! own ("Zeron Engine" in Activity Monitor): the app starts it and attaches;
//! sessions keep running with the app closed. Without the UI linked in.
//!
-//! It also answers what the engine runs its own executable for: `mcp` (the
-//! Zeron MCP server injected into agents) and `--noop-browser` (browser
+//! It also answers what the engine runs its own executable for: `mcp-proxy`
+//! (an agent's Zeron MCP tools on stdio, served by the engine), `mcp` (the
+//! standalone Zeron MCP server) and `--noop-browser` (browser
//! suppression for agents' sign-in flows). And it is the engine helper of an
//! interface that doesn't link the engine (the zgx app): every `zeron`
//! subcommand that runs the engine's code (`headless`, `login`, `status`,
@@ -17,6 +18,9 @@ use zeron_cli::{Engines, Launch};
fn main() -> anyhow::Result<()> {
match std::env::args().nth(1).as_deref() {
Some("--noop-browser") => Ok(()),
+ // An agent's Zeron MCP tools on stdio, forwarded to the engine's own
+ // endpoint. First, before any engine setup: it must stay tiny.
+ Some("mcp-proxy") => zeron_mcp::proxy::run(),
Some("--version" | "-V") => {
println!("zeron-engine {}", zeron_update::current_version());
Ok(())
diff --git a/apps/zeron/src/lib.rs b/apps/zeron/src/lib.rs
index 265c0d7d5..f65d61475 100644
--- a/apps/zeron/src/lib.rs
+++ b/apps/zeron/src/lib.rs
@@ -12,11 +12,11 @@ pub mod engine_commands;
pub mod ipc_cli;
pub mod plugin_cli;
+pub use engine_commands::run_engine_command;
pub use zeron_cli::{
DEFAULT_EDGE_URL, DEFAULT_WORKOS_CLIENT_ID, edge_url_from_env, init_logging,
long_running_setup, open_log_file, paths, workos_client_id_from_env,
};
-pub use engine_commands::run_engine_command;
/// mimalloc, macOS only: libmalloc never returns the streaming churn's
/// high-water pages, so transient allocation became permanent RSS
@@ -33,6 +33,9 @@ static ALLOC: allocator::Allocator = allocator::Allocator;
/// `logout`, and `status` — one resolution so the CLI auth commands always
/// operate on the exact session the daemon will load.
pub fn engine_config_from_env() -> zeron_engine::EngineConfig {
+ // (Every way an engine starts here resolves its configuration first.)
+ #[cfg(target_os = "macos")]
+ zeron_engine::heap::set_trim(allocator::trim);
// Dev-mode bearer (no WorkOS): an explicit token enables sync.
let edge_token = std::env::var("ZERON_EDGE_TOKEN").ok();
zeron_engine::EngineConfig {
diff --git a/apps/zeron/src/main.rs b/apps/zeron/src/main.rs
index 0a3d049b8..21cbe54d8 100644
--- a/apps/zeron/src/main.rs
+++ b/apps/zeron/src/main.rs
@@ -1,40 +1,27 @@
-//! zeron — headed by default; `zeron headless` runs the engine alone. Both start
-//! local-only without credentials. `zeron login` and `zeron logout` select the
-//! profile used by the next engine start without mutating a live runtime.
+//! zeron — the command line with the engine linked in: `zeron headless` runs
+//! the engine alone, and the engine's other subcommands run here. It starts
+//! local-only without credentials. `zeron login` and `zeron logout` select
+//! the profile used by the next engine start without mutating a live runtime.
//!
//! The command line is `zeron_cli`'s (shared with the engine helper and the
-//! zgx interface). This binary links the engine, so it runs the engine's
-//! subcommands itself; with no subcommand it opens the window.
+//! zgx interface). The desktop app is the zgx interface (apps/zgx), which
+//! ships its own `zeron`: this one opens no window.
-#![cfg_attr(windows, windows_subsystem = "windows")]
-
-use zeron_app::{edge_url_from_env, paths, workos_client_id_from_env};
use zeron_cli::{Engines, Launch};
fn main() -> anyhow::Result<()> {
+ // The engine runs its own executable as an agent's stdio MCP forwarder
+ // (`zeron headless`'s agents): first, before any setup, to stay tiny.
+ if std::env::args().nth(1).as_deref() == Some("mcp-proxy") {
+ return zeron_mcp::proxy::run();
+ }
match zeron_cli::run(zeron_update::current_version(), Engines::InProcess) {
Launch::Done(result) => result,
Launch::Engine(command) => zeron_app::run_engine_command(command),
#[cfg(target_os = "linux")]
- Launch::Appshot => {
- zeron_ui::appshots::request_running_appshot(&zeron_app::engine_config_from_env().data_dir)
- .map_err(anyhow::Error::msg)
- }
- Launch::Window { open_url, .. } => {
- let edge_token = std::env::var("ZERON_EDGE_TOKEN").ok();
- // Headed: the UI probes ZERON_IPC_PORT and connects to a running
- // daemon, or embeds the engine in-process (ARCHITECTURE §1).
- zeron_ui::run_app(zeron_ui::UiConfig {
- data_dir: paths::data_dir(),
- ipc_port: zeron_cli::ipc_port_from_env(),
- edge_url: edge_url_from_env(),
- workos_client_id: workos_client_id_from_env(&edge_token),
- edge_token,
- org_id: std::env::var("ZERON_ORG_ID").ok(),
- default_harness: zeron_ui::HarnessId::ClaudeCode,
- initial_url: open_url,
- });
- Ok(())
- }
+ Launch::Appshot => anyhow::bail!("Appshots are the desktop app's: open Zeron and use its shortcut"),
+ Launch::Window { .. } => anyhow::bail!(
+ "this `zeron` has no window: open the Zeron app, or run `zeron headless` for the engine alone"
+ ),
}
}
diff --git a/apps/zgx/Cargo.lock b/apps/zgx/Cargo.lock
index 1fa07a604..b7b2e8e79 100644
--- a/apps/zgx/Cargo.lock
+++ b/apps/zgx/Cargo.lock
@@ -30,7 +30,7 @@ dependencies = [
[[package]]
name = "accesskit_atspi_common"
version = "0.19.1"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -43,7 +43,7 @@ dependencies = [
[[package]]
name = "accesskit_consumer"
version = "0.38.0"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"accesskit",
"hashbrown 0.16.1",
@@ -66,7 +66,7 @@ dependencies = [
[[package]]
name = "accesskit_macos"
version = "0.26.3"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -79,7 +79,7 @@ dependencies = [
[[package]]
name = "accesskit_unix"
version = "0.22.1"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"accesskit",
"accesskit_atspi_common",
@@ -96,7 +96,7 @@ dependencies = [
[[package]]
name = "accesskit_windows"
version = "0.34.0"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -6450,7 +6450,7 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "29.0.4"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"android_system_properties",
"arrayvec",
@@ -6888,7 +6888,7 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
name = "winit"
version = "0.30.13"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"ahash",
"android-activity",
@@ -7067,7 +7067,7 @@ dependencies = [
[[package]]
name = "zatex"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"ttf-parser",
]
@@ -7233,7 +7233,7 @@ checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
[[package]]
name = "zeron-cli"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"clap",
@@ -7248,7 +7248,7 @@ dependencies = [
[[package]]
name = "zeron-launch"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"libc",
"windows-sys 0.61.2",
@@ -7256,7 +7256,7 @@ dependencies = [
[[package]]
name = "zeron-notify"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"objc",
"sha2",
@@ -7265,18 +7265,18 @@ dependencies = [
[[package]]
name = "zeron-plugin-guard"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"serde_json",
]
[[package]]
name = "zeron-preview-label"
-version = "0.3.4"
+version = "0.3.8"
[[package]]
name = "zeron-proto"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"chrono",
"pulldown-cmark 0.12.2",
@@ -7287,7 +7287,7 @@ dependencies = [
[[package]]
name = "zeron-theme"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"clap",
@@ -7301,7 +7301,7 @@ dependencies = [
[[package]]
name = "zeron-update"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"futures",
@@ -7318,7 +7318,7 @@ dependencies = [
[[package]]
name = "zeron-visual"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"base64 0.22.1",
"gltf",
@@ -7330,7 +7330,7 @@ dependencies = [
[[package]]
name = "zeron-visual-gpu"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"pollster",
"tracing",
@@ -7340,7 +7340,7 @@ dependencies = [
[[package]]
name = "zeron-voice"
-version = "0.3.4"
+version = "0.3.8"
dependencies = [
"anyhow",
"cpal",
@@ -7456,7 +7456,7 @@ dependencies = [
[[package]]
name = "zgx"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"fixed_decimal",
"foldhash 0.2.0",
@@ -7485,7 +7485,7 @@ dependencies = [
[[package]]
name = "zgx-3d"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"bytemuck",
"zgx",
@@ -7495,7 +7495,7 @@ dependencies = [
[[package]]
name = "zgx-alacritty-terminal"
version = "0.26.8"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"base64 0.22.1",
"bitflags 2.13.2",
@@ -7520,7 +7520,7 @@ dependencies = [
[[package]]
name = "zgx-components"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"zgx",
]
@@ -7528,7 +7528,7 @@ dependencies = [
[[package]]
name = "zgx-cosmic-text"
version = "0.19.14"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"bitflags 2.13.2",
"fontdb",
@@ -7552,7 +7552,7 @@ dependencies = [
[[package]]
name = "zgx-desktop"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -7603,12 +7603,12 @@ dependencies = [
[[package]]
name = "zgx-ghostty-sys"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
[[package]]
name = "zgx-gpu"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"ash",
"block2 0.6.2",
@@ -7648,7 +7648,7 @@ dependencies = [
[[package]]
name = "zgx-harfrust"
version = "0.5.4"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"bitflags 2.13.2",
"bytemuck",
@@ -7660,7 +7660,7 @@ dependencies = [
[[package]]
name = "zgx-mlua"
version = "0.12.9"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"bstr",
"either",
@@ -7675,7 +7675,7 @@ dependencies = [
[[package]]
name = "zgx-run"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"serde_json",
"ureq 3.5.0",
@@ -7687,7 +7687,7 @@ dependencies = [
[[package]]
name = "zgx-script"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"icu_locale_core",
"icu_plurals",
@@ -7712,7 +7712,7 @@ dependencies = [
[[package]]
name = "zgx-swash"
version = "0.2.11"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"skrifa",
"yazi",
@@ -7722,7 +7722,7 @@ dependencies = [
[[package]]
name = "zgx-taffy"
version = "0.9.2"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"arrayvec",
"grid",
@@ -7733,7 +7733,7 @@ dependencies = [
[[package]]
name = "zgx-terminal"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"base64 0.22.1",
"flate2",
@@ -7749,7 +7749,7 @@ dependencies = [
[[package]]
name = "zgx-vte"
version = "0.15.4"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"arrayvec",
"bitflags 2.13.2",
@@ -7761,7 +7761,7 @@ dependencies = [
[[package]]
name = "zgx-zune-jpeg"
version = "0.5.15"
-source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
+source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
dependencies = [
"zune-core",
]
diff --git a/apps/zgx/Cargo.toml b/apps/zgx/Cargo.toml
index eae2c0300..b1c16c719 100644
--- a/apps/zgx/Cargo.toml
+++ b/apps/zgx/Cargo.toml
@@ -32,7 +32,7 @@ layout_probe = []
[dependencies]
lz4_flex = { version = "0.11", default-features = false, features = ["safe-encode", "safe-decode"] }
-zgx = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+zgx = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
# `mimalloc`: the program's allocator, in place of the system's. It hands
# freed memory back to the system (the system's keeps the most it ever
# held), and zgx measures 1-10% less CPU for script, text and layout work.
@@ -43,7 +43,7 @@ zgx = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191
# none of it, and without it pages are placeholders ("Web view · ").
# zgx-run turns it on by default, but this app takes zgx-run without its
# defaults (below). Nothing on macOS or Windows.
-zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["mimalloc", "terminal", "webkitgtk"] }
+zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["mimalloc", "terminal", "webkitgtk"] }
# `inspect`: devtools for `zgx inspect` (and its MCP server), asked for
# with `--inspect`. `i18n`: `ui.t`'s plurals and numbers by each locale's
# own rules (ICU4X's data, about 90 KB), for ui/locales' translations.
@@ -51,18 +51,18 @@ zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb
# wgpu this app already links), for plugins that show 3D: the CAD plugin
# hands it its own triangles (`geometry = { positions, indices, … }`). It
# asks no grant; a scene draws a frame only when something in it changes.
-zgx-script = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["inspect", "i18n", "scene3d"] }
+zgx-script = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["inspect", "i18n", "scene3d"] }
# A picture's pixels for the clipboard (src/images.rs): zgx's own decoder,
# the formats `ui.image` shows (no features of its own: the ones zgx-desktop
# turns on).
-zgx-gpu = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", default-features = false }
+zgx-gpu = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", default-features = false }
# Each plugin's own database (`zeron.db`, src/plugins/db.rs): SQLite,
# built in; `limits` to keep one from attaching any other file.
rusqlite = { version = "0.32", features = ["bundled", "limits", "hooks"] }
# `fetch`: zgx's own transport for `ui.fetch` and remote images (HTTP and
# HTTPS, rustls), given to every window (src/main.rs): the app's scripts,
# and plugins granted "network". Nothing else of the runner.
-zgx-run = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", default-features = false, features = ["fetch"] }
+zgx-run = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", default-features = false, features = ["fetch"] }
# `webp`: `ui.image` decodes through this crate, by what its features
# allow, so turning WebP on here is all it takes (the member cards' art).
# `ico`: sites' favicons (the browser tab's: src/favicons.rs), most of
@@ -162,7 +162,7 @@ foreign-types = "0.5"
# elements, box drawing and Powerline glyphs to the cell; zgx's own renderer
# draws them from the font at its text line height, gapped. Builds Ghostty
# with Zig 0.16 (cached in ~/Library/Caches/zgx-ghostty).
-zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["ghostty"] }
+zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["ghostty"] }
# Windows' Transparency effects (src/transparency.rs), read and watched in
# the registry, until zgx reports them (zgx-asks/windows-transparency); a
@@ -172,8 +172,8 @@ zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb
# DirectComposition tree of the window's own. The runtime ships with Windows
# 11 (and with Edge on Windows 10); without it, pages are placeholders.
[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Graphics_Gdi", "Win32_Media_Audio", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Console", "Win32_System_Registry", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging"] }
-zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["webview2"] }
+windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Graphics_Gdi", "Win32_Media_Audio", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Console", "Win32_System_Registry", "Win32_System_Threading", "Win32_System_Time", "Win32_UI_WindowsAndMessaging"] }
+zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["webview2"] }
# zgx's D-Bus (menus, portals) linked in rather than loaded: `zeron` is also
# what a headless Linux server and every Cloud machine runs (`zeron
@@ -185,13 +185,13 @@ libdbus-sys = { version = "0.2.7", features = ["vendored"] }
# zgx's own patches (its root Cargo.toml): a git dependency does not bring
# them, so every consumer repeats them.
[patch.crates-io]
-wgpu-hal = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
-winit = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
-accesskit_macos = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
-accesskit_consumer = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
-accesskit_atspi_common = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
-accesskit_unix = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
-accesskit_windows = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+wgpu-hal = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+winit = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+accesskit_macos = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+accesskit_consumer = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+accesskit_atspi_common = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+accesskit_unix = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+accesskit_windows = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
# zgx is slow unoptimized (its own setting): optimize dependencies, keep
# this crate quick to build.
diff --git a/apps/zgx/build.rs b/apps/zgx/build.rs
index fb477fde6..cd9e9ec24 100644
--- a/apps/zgx/build.rs
+++ b/apps/zgx/build.rs
@@ -12,7 +12,7 @@
fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("macos") {
use std::{path::PathBuf, process::Command};
- let source = "../../crates/ui/src/dictation/permission.m";
+ let source = "native/dictation_permission.m";
println!("cargo:rerun-if-changed={source}");
let out = PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
let object = out.join("dictation-permission.o");
diff --git a/apps/zgx/docs/plugins.md b/apps/zgx/docs/plugins.md
index 6ad2dd6bd..5ac07018a 100644
--- a/apps/zgx/docs/plugins.md
+++ b/apps/zgx/docs/plugins.md
@@ -52,7 +52,8 @@ Your own plugins are signed as yours, and re-signed and reloaded each time you s
| `navigate` | open chats and pages (`zeron.open`) |
| `links.open` | open http(s) links (`zeron.open_url`), where you open links (Settings → Links) |
| `notifications` | send you notifications (`zeron.notify`), as Zeron's own: Settings → Notifications decides whether they show, a few a minute at most |
-| `compose` | put text in the message box (`zeron.compose`), or a review comment on it (`zeron.compose_comment`); you still send it |
+| `compose` | put text in the message box, after what's there or in place of its words (`zeron.compose`), or a review comment on it (`zeron.compose_comment`); you still send it |
+| `draft` | read the message box's draft as you type it (`zeron.draft`), or any chat's (`zeron.draft_of`), and take it whole, put it back, swap it or let it go (`zeron.take_draft`, `put_draft`, `swap_draft`, `drop_draft`). See [The composer's draft](#the-composers-draft) |
| `github`, `github.write` | read (and write) GitHub through Zeron's engine (older calls; prefer `commands` with `gh`) |
| `network` | the internet: `ui.fetch`, and remote images (`ui.image { src = "https://…" }`). See [Reaching the network](#reaching-the-network) |
| `clipboard`, `files`, `web`, `windows` | zgx's clipboard, file dialogs, web views, windows |
@@ -213,9 +214,13 @@ Zeron draws that row on your settings page: "Use as wallpaper", and while it's o
| call | what | needs |
|---|---|---|
| `zeron.open("home" \| { session = id } \| { settings = page })` | open a page | `navigate` |
-| `zeron.compose(text)` | text into the message box | `compose` |
+| `zeron.compose(text, { replace?, session? })` | text into a chat's draft: after what's there (on a line of its own), or in place of its words (`replace = true`, its chips kept); the chat shown's draft, or `session`'s ([below](#the-composers-draft)) | `compose` |
| `zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }` | a review comment on a file or a diff, as a chip on a chat's draft (below) | `compose` |
| `zeron.composed()` | in a build: your comments still on a draft, by `key`: `{ session, hovered }` | `compose` |
+| `zeron.draft()` | in a build: the message box's draft, `{ session?, text, attachments = { { kind, name } } }` (below) | `draft` |
+| `zeron.take_draft(key)`, `zeron.put_draft(key)`, `zeron.swap_draft(key)`, `zeron.drop_draft(key)` | the draft taken whole and kept by Zeron under your key; put back; traded with what the key keeps; let go (below) | `draft` |
+| `zeron.drafts()` | in a build: what Zeron keeps for you, by key: `{ session?, text, attachments, at }` | `draft` |
+| `zeron.draft_of(session)` | a promise of chat `session`'s draft as it is now, as `zeron.draft()` says it (`""`: a new chat's) | `draft` |
| `zeron.toast(text)` | a short note at the window's foot | (always) |
| `zeron.need("panel").open_tab { kind, title, icon?, data? }` | a tab of yours in the chat's panel; asked again, the one there is brought forward (found by `data.key` when you give one, else by its title) | `panel.tabs` |
| `zeron.tab(kind, function(tab) return node end)` | how a kind of your tabs draws (`tab` = `{ kind, title, data }`) | `panel.tabs` |
@@ -274,6 +279,48 @@ Comments on the diff (each cites the file and line it belongs to; L = line numbe
Give each a `key` of your own: `zeron.composed()` lists yours still on a draft by it (taken off or sent, gone), and says which one's chip is under the pointer (`hovered`), so the lines it was left on can keep a mark and light up as its chip is pointed at. Zeron's Git plugin does all of this in its Changes (`plugins-builtin/git/changes.luau`): the diff's + (or a drag from it over lines) opens `ds/comment`'s composer under them, using `ds/git_changes`'s `on_comment`, `ranges` and `marks`.
+### The composer's draft
+
+With `draft`, a plugin reads what you're typing and can set it aside and bring it back: a stash for a prompt written in the wrong chat, a counter of its length, a bar that says what it carries.
+
+- **`zeron.draft()`**, read in a build or an effect, is the draft shown as it changes: `session` (the chat it's for; nil on a new chat), `text` (the words as typed) and `attachments`, each chip's `kind` (`"file"`, `"image"`, `"chat"`, `"comment"`, …) and `name`. A file's path is never in it.
+- **`zeron.take_draft(key)`** takes the draft shown whole (its words, its chips, the passages quoted in it) and clears the composer. Zeron keeps it, under your `key` (1 to 64 characters), so your plugin never holds a file's path. An empty draft isn't taken; taking under a key that's kept replaces what it kept. Up to 16 at once.
+- **`zeron.put_draft(key)`** puts what `key` kept back on the draft shown, in whichever chat is open, and lets it go. Onto an empty composer it's as it was taken; onto words already there, its words follow after a blank line and its chips after theirs.
+- **`zeron.swap_draft(key)`** trades the draft shown with what `key` keeps. Either may be empty, so one call sets the draft aside (nothing kept), brings it back (an empty composer), or swaps the two.
+- **`zeron.drop_draft(key)`** lets what `key` kept go.
+- **`zeron.drafts()`**, read in a build, is what Zeron keeps for you, by key: `{ session?, text, attachments, at }` (`at` as `os.time()`). Drafts are kept while Zeron runs, as chats' own drafts are.
+- **`zeron.draft_of(session)`** reads another chat's draft once, shown or not: a promise of `{ session?, text, attachments }`, as `zeron.draft()` says it (`""` for a new chat's, with no session).
+
+With `compose` too, a plugin can change the words in place: **`zeron.compose(text, { replace = true })`** puts `text` in place of the draft's words, leaving its chips where they are, and `session` names another chat's draft. A rewrite or a snippet that expands is a read and a replace:
+
+```lua
+-- ("ui.add", "draft", "compose"): /bug alone in the box becomes the template.
+ui.effect(function()
+ local d = zeron.draft()
+ if d and d.text == "/bug" then
+ zeron.compose("## What happened\n\n## What I expected\n\n## Steps\n", { replace = true, session = d.session })
+ end
+end)
+```
+
+Nothing is sent: the person sees the new words in the composer, and sends or edits them. `zeron.compose` takes 20,000 characters at most.
+
+Each is done in the order you ask. A prompt stash is one shortcut and one chip:
+
+```lua
+-- ⌘⇧S (Ctrl+Shift+S): set the draft aside, bring it back, or swap the two.
+ui.command { id = "stash", title = "Stash prompt", key = "cmd+shift+s", run = function()
+ zeron.swap_draft("stash")
+end }
+
+-- While one is kept, a chip over the composer: click to bring it back.
+zeron.place { at = "#chat-composer", before = function(): Node
+ return ui.show(function(): boolean
+ return zeron.drafts().stash ~= nil
+ end, ui.button { "Stashed", on_click = function() zeron.swap_draft("stash") end })
+end }
+```
+
## Programs and a database
A plugin can do real work of its own: run the command-line tools you already use, and keep what it learns.
diff --git a/crates/ui/src/dictation/permission.m b/apps/zgx/native/dictation_permission.m
similarity index 100%
rename from crates/ui/src/dictation/permission.m
rename to apps/zgx/native/dictation_permission.m
diff --git a/apps/zgx/plugins-builtin/git/zeron.luau b/apps/zgx/plugins-builtin/git/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-builtin/git/zeron.luau
+++ b/apps/zgx/plugins-builtin/git/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-builtin/github/zeron.luau b/apps/zgx/plugins-builtin/github/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-builtin/github/zeron.luau
+++ b/apps/zgx/plugins-builtin/github/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau b/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau
+++ b/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/account-pin/zeron.luau b/apps/zgx/plugins-dev/account-pin/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/account-pin/zeron.luau
+++ b/apps/zgx/plugins-dev/account-pin/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/account-rotate/zeron.luau b/apps/zgx/plugins-dev/account-rotate/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/account-rotate/zeron.luau
+++ b/apps/zgx/plugins-dev/account-rotate/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/checkout-status/zeron.luau b/apps/zgx/plugins-dev/checkout-status/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/checkout-status/zeron.luau
+++ b/apps/zgx/plugins-dev/checkout-status/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/compact-sidebar/zeron.luau b/apps/zgx/plugins-dev/compact-sidebar/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/compact-sidebar/zeron.luau
+++ b/apps/zgx/plugins-dev/compact-sidebar/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/composer-cat/zeron.luau b/apps/zgx/plugins-dev/composer-cat/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/composer-cat/zeron.luau
+++ b/apps/zgx/plugins-dev/composer-cat/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/focus/zeron.luau b/apps/zgx/plugins-dev/focus/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/focus/zeron.luau
+++ b/apps/zgx/plugins-dev/focus/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/keep-going/zeron.luau b/apps/zgx/plugins-dev/keep-going/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/keep-going/zeron.luau
+++ b/apps/zgx/plugins-dev/keep-going/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/md-hello/zeron.luau b/apps/zgx/plugins-dev/md-hello/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/md-hello/zeron.luau
+++ b/apps/zgx/plugins-dev/md-hello/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/notes-tool/zeron.luau b/apps/zgx/plugins-dev/notes-tool/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/notes-tool/zeron.luau
+++ b/apps/zgx/plugins-dev/notes-tool/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/ping/zeron.luau b/apps/zgx/plugins-dev/ping/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/ping/zeron.luau
+++ b/apps/zgx/plugins-dev/ping/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/session-status/zeron.luau b/apps/zgx/plugins-dev/session-status/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/session-status/zeron.luau
+++ b/apps/zgx/plugins-dev/session-status/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/session-words/zeron.luau b/apps/zgx/plugins-dev/session-words/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/session-words/zeron.luau
+++ b/apps/zgx/plugins-dev/session-words/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/settings-demo/zeron.luau b/apps/zgx/plugins-dev/settings-demo/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-dev/settings-demo/zeron.luau
+++ b/apps/zgx/plugins-dev/settings-demo/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-sdk/zeron.luau b/apps/zgx/plugins-sdk/zeron.luau
index c5f896393..553b6cc16 100644
--- a/apps/zgx/plugins-sdk/zeron.luau
+++ b/apps/zgx/plugins-sdk/zeron.luau
@@ -69,13 +69,31 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text) text into the message box, for you to send ("compose")
+-- zeron.compose(text, { replace?, session? })
+-- text into the message box, for you to send: after
+-- what's there, or in place of its words (`replace =
+-- true`, its chips kept); the chat shown's draft, or
+-- `session`'s ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
+-- zeron.draft() the composer's draft as you type it: { session?,
+-- text, attachments = { { kind, name } } }, reactive
+-- ("draft")
+-- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
+-- zeron.drop_draft(key)
+-- the draft taken whole (words, chips, quotes) and
+-- kept by Zeron under your key, the composer
+-- cleared; put back on the draft shown; the two
+-- traded; let go ("draft")
+-- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
+-- attachments, at }, reactive ("draft")
+-- zeron.draft_of(session)
+-- a promise of another chat's draft, as `draft()`
+-- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1343,8 +1361,16 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- function M.compose(text: string)
- ui.invoke("zeron.compose.insert", text)
+ -- `text` into a chat's draft, for the person to send ("compose"): after
+ -- what's there, on a line of its own; with `replace = true`, in place of
+ -- its words (what it carries stays). The chat shown's draft, or
+ -- `session`'s ("" a new chat's).
+ function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
+ if opts and (opts.replace or opts.session) then
+ ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
+ else
+ ui.invoke("zeron.compose.insert", text)
+ end
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1374,6 +1400,57 @@ return function(id: string): any
return composed:get() or {}
end
+ -- The composer's draft as you type it: the chat it's for (nil, a new
+ -- chat), its words, and what it carries, each chip's kind ("file",
+ -- "image", "chat", …) and name, never a file's path. Read in a build or
+ -- an effect: it changes as the draft does. Nil until Zeron says.
+ -- (Reached on first read: only a plugin allowed "draft" may.)
+ local draft: any = nil
+ function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
+ draft = draft or ui.shared("zeron.draft", nil :: any)
+ return draft:get()
+ end
+
+ -- The draft shown, taken whole (its words, its chips, the passages
+ -- quoted in it) and kept by Zeron under `key`, yours, the composer
+ -- cleared; what that key kept before is replaced. An empty draft isn't
+ -- taken. Up to 16 kept at once.
+ function M.take_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "take", key = key })
+ end
+
+ -- What `key` kept, put back on the draft shown as it was taken (after
+ -- what's there, if the composer isn't empty), and no longer kept.
+ function M.put_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "put", key = key })
+ end
+
+ -- The draft shown and what `key` keeps, traded: either may be empty, so
+ -- one call sets the draft aside, brings it back, or swaps the two.
+ function M.swap_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
+ end
+
+ -- What `key` kept, let go of.
+ function M.drop_draft(key: string)
+ ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
+ end
+
+ -- What Zeron keeps for you, by key: the chat each was taken from, its
+ -- words, what it carries (as `draft()` says it) and when (os.time).
+ -- Read in a build: it changes as you take and put back.
+ local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
+ function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
+ return drafts:get() or {}
+ end
+
+ -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
+ -- follows the one shown). A promise of { session?, text, attachments }
+ -- as `draft()` says it ("" a new chat's draft, with no session).
+ function M.draft_of(session: string): any
+ return ui.call(`{prefix}.draft_of`, session)
+ end
+
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/src/access_mode_tests.rs b/apps/zgx/src/access_mode_tests.rs
new file mode 100644
index 000000000..0950b7f83
--- /dev/null
+++ b/apps/zgx/src/access_mode_tests.rs
@@ -0,0 +1,54 @@
+//! Changing agents must not leave an unsupported Auto mode looking usable.
+use zgx_script::{ScriptHost, Value, testing::TestApp};
+
+#[test]
+fn unsupported_auto_is_labelled_unavailable_and_sends_nothing_until_changed() {
+ let path =
+ std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("ui/auto_access_fixture.luau");
+ let mut app = TestApp::new(|runtime| ScriptHost::new(runtime, path));
+ app.ui.scene.borrow_mut().resize(900., 600.);
+ app.frames(30);
+ assert!(app.texts().iter().any(|text| text == "Auto"));
+ let offered = app.host.shared("test_composer_auto", Value::Bool(true));
+ let access = app.host.shared("test_composer_access", Value::from("auto"));
+ offered.set(Value::Bool(false));
+ app.frames(30);
+ // The animated label renders changing letters as separate text nodes.
+ assert!(app.texts().concat().contains("Auto unavailable"));
+ assert_eq!(
+ access.get(),
+ Value::from("auto"),
+ "never silently grant full access"
+ );
+ // Nothing is sent in it: the engine would refuse the run.
+ let draft = app.host.shared("test_composer_draft", Value::from(""));
+ let sent = app.host.shared("test_composer_sent", Value::from(""));
+ draft.set(Value::from("hello"));
+ app.frames(10);
+ app.click("role:button \"Send message\"");
+ app.frames(10);
+ assert_eq!(sent.get(), Value::from(""), "sent in an unavailable Auto");
+ assert_eq!(draft.get(), Value::from("hello"), "the draft stays");
+ // Rested on, it says why. (A press puts a tooltip away until the
+ // pointer leaves: off it first.)
+ app.hover("role:button \"Access\"");
+ app.frames(10);
+ app.hover("role:button \"Send message\"");
+ assert!(app.wait_until(|app| app.texts().concat().contains("Choose another access mode to send.")));
+ app.click("role:button \"Access\"");
+ app.frames(30);
+ assert!(
+ app.texts()
+ .iter()
+ .any(|text| text.contains("Choose another access mode or agent."))
+ );
+ app.click("role:option \"Full access Run commands and edits without asking.\"");
+ app.frames(30);
+ assert_eq!(access.get(), Value::from("full"));
+ assert!(app.wait_until(|app| !app.texts().concat().contains("Auto unavailable")));
+ // Another mode chosen, it goes.
+ app.click("role:button \"Send message\"");
+ app.frames(10);
+ assert_eq!(sent.get(), Value::from("hello"));
+ assert_eq!(app.error(), None);
+}
diff --git a/apps/zgx/src/activity_cost_tests.rs b/apps/zgx/src/activity_cost_tests.rs
index 9386b8cda..ead383afb 100644
--- a/apps/zgx/src/activity_cost_tests.rs
+++ b/apps/zgx/src/activity_cost_tests.rs
@@ -50,7 +50,7 @@ fn thread_cpu() -> Duration {
}
/// One call row's scene (kinds and boxes, no text) and every node above it to
-/// the root, for zgx's layout work to reproduce alone (`DEBUG_TREE=1`).
+/// the root, for zgx's layout work to reproduce alone (`ACTIVITY_TREE=1`).
fn dump_row(bench: &mut Bench) {
let Some(button) = bench.app.find("role:button ~\"package part8 --\"") else {
eprintln!("TREE no row in view");
@@ -88,9 +88,9 @@ fn dump_row(bench: &mut Bench) {
}
thread_local! {
- /// Whether `DEBUG_NODE` has shown its node.
+ /// Whether `ACTIVITY_NODE` has shown its node.
static NODE_SHOWN: std::cell::Cell = const { std::cell::Cell::new(false) };
- /// Whether frames show their damage now (`DEBUG_DAMAGE`: the scroll's).
+ /// Whether frames show their damage now (`ACTIVITY_DAMAGE`: the scroll's).
static DAMAGE_SHOWN: std::cell::Cell = const { std::cell::Cell::new(false) };
}
@@ -125,7 +125,7 @@ fn show_damage(scene: &zgx::scene::Scene, damage: &[zgx::scene::Rect]) {
}
}
}
- if std::env::var_os("DEBUG_DAMAGE_AT").is_some() {
+ if std::env::var_os("ACTIVITY_DAMAGE_AT").is_some() {
for (rect, radius) in scene.backdrop_filters() {
eprintln!("DAMAGE backdrop filter {:.1},{:.1} {:.1}x{:.1} radius {radius}", rect.x, rect.y, rect.width, rect.height);
}
@@ -496,9 +496,9 @@ impl Bench {
let gpu = draw.then(|| {
let mut gpu = GpuRenderer::new((W * SCALE) as u32, (H * SCALE) as u32).expect("a GPU");
gpu.set_scale_factor(SCALE);
- // (`DEBUG_SCROLL_COPY`: copying scrolls as a window does; offscreen
+ // (`ACTIVITY_SCROLL_COPY`: copying scrolls as a window does; offscreen
// on macOS the renderer repaints them instead.)
- if std::env::var_os("DEBUG_SCROLL_COPY").is_some() {
+ if std::env::var_os("ACTIVITY_SCROLL_COPY").is_some() {
gpu.debug_allow_scroll_copies();
}
for font in crate::fonts() {
@@ -579,7 +579,7 @@ impl Bench {
// ahead), then the frame's own work.
let (mut spare, mut spare_calls) = (0, 0);
let process_from = process_cpu();
- let debug = std::env::var_os("DEBUG_FRAMES").is_some();
+ let debug = std::env::var_os("ACTIVITY_FRAMES").is_some();
if debug {
eprintln!("@SPARE");
}
@@ -603,10 +603,10 @@ impl Bench {
let drawn = !report.damage.is_empty();
if drawn && let Some(gpu) = &mut self.gpu {
let stats = gpu.render(&self.app.ui.scene.borrow(), &report.damage).expect("a frame drawn");
- if std::env::var_os("DEBUG_GPU").is_some() && zgx::trace::enabled() {
+ if std::env::var_os("ACTIVITY_GPU").is_some() && zgx::trace::enabled() {
eprintln!("GPU {stats:?}");
}
- if std::env::var_os("DEBUG_DAMAGE").is_some() && DAMAGE_SHOWN.get() {
+ if std::env::var_os("ACTIVITY_DAMAGE").is_some() && DAMAGE_SHOWN.get() {
eprintln!("DAMAGE frame: {} rects, {} px repainted, {} scroll copies, {} layer repaints, {} backdrop copies", report.damage.len(), stats.damaged_pixels, stats.scroll_copies, stats.layer_repaints, stats.backdrop_copies);
show_damage(&self.app.ui.scene.borrow(), &report.damage);
}
@@ -730,7 +730,7 @@ fn scenarios(n: usize, think: usize, open: bool) {
}
bench.settle(30);
let ticks = bench.frames(60);
- if std::env::var_os("DEBUG_TREE").is_some() && open {
+ if std::env::var_os("ACTIVITY_TREE").is_some() && open {
dump_row(&mut bench);
}
row(n, think, label, "ticks", &ticks, 60, bench.nodes());
@@ -774,10 +774,10 @@ fn scenarios(n: usize, think: usize, open: bool) {
let new = call(calls, 4);
let id = new["id"].as_str().unwrap().to_owned();
entry["parts"].as_array_mut().unwrap().push(new);
- if std::env::var_os("DEBUG_FRAMES").is_some() {
+ if std::env::var_os("ACTIVITY_FRAMES").is_some() {
eprintln!("@CALL {calls}");
}
- let tracing = std::env::var_os("DEBUG_TRACE").is_some() && calls == n + 2;
+ let tracing = std::env::var_os("ACTIVITY_TRACE").is_some() && calls == n + 2;
if tracing {
zgx::trace::set_enabled(true);
}
@@ -787,8 +787,8 @@ fn scenarios(n: usize, think: usize, open: bool) {
call_cost.add(&cost);
if tracing {
// (A few frames into the arrival's animations.)
- // (`DEBUG_TRACE_FRAMES`: how many of the arrival's frames, 7 unless set.)
- let traced: usize = std::env::var("DEBUG_TRACE_FRAMES").ok().and_then(|n| n.parse().ok()).unwrap_or(7);
+ // (`ACTIVITY_TRACE_FRAMES`: how many of the arrival's frames, 7 unless set.)
+ let traced: usize = std::env::var("ACTIVITY_TRACE_FRAMES").ok().and_then(|n| n.parse().ok()).unwrap_or(7);
bench.frames(traced - 1);
for frame in zgx::trace::frames(2 * traced) {
let mut runs = frame.runs.clone();
@@ -819,10 +819,10 @@ fn scenarios(n: usize, think: usize, open: bool) {
let k = format!("{:?}", scene.kind(id));
k.split(|c: char| c == '(' || c == '{' || c == ' ').next().unwrap_or("").to_owned()
};
- // (`DEBUG_NODE=`: that node's kind, what's above it, and the
+ // (`ACTIVITY_NODE=`: that node's kind, what's above it, and the
// texts under the box above it.)
// (A number: that node, as the frame's runs name it.)
- let asked = std::env::var("DEBUG_NODE").ok();
+ let asked = std::env::var("ACTIVITY_NODE").ok();
let numbered = asked.as_deref().and_then(|n| n.parse::().ok());
let pick = match numbered {
Some(n) => Some(n),
@@ -872,7 +872,7 @@ fn scenarios(n: usize, think: usize, open: bool) {
let mut after = cost;
for f in 0..60 {
let frame = bench.frame();
- if std::env::var_os("DEBUG_ARRIVAL").is_some() && calls == n + 2 {
+ if std::env::var_os("ACTIVITY_ARRIVAL").is_some() && calls == n + 2 {
let k = |phase: Phase| frame.phase(phase) / 1000;
eprintln!(
"ARRIVAL f{f:02} {}k | script {}k update {}k layout {}k paint {}k encode {}k | calls {} | proc {} µs",
@@ -929,10 +929,10 @@ fn scenarios(n: usize, think: usize, open: bool) {
row(n, think, label, "rest", &rest, 60, bench.nodes());
// From there on down past the turn, a wheel's step a frame.
let mut scroll = Cost::default();
- // (`DEBUG_DAMAGE`: each scroll frame's damage, `DEBUG_SCROLL_STEP` points a step.)
- let step: f32 = std::env::var("DEBUG_SCROLL_STEP").ok().and_then(|s| s.parse().ok()).unwrap_or(120.);
+ // (`ACTIVITY_DAMAGE`: each scroll frame's damage, `ACTIVITY_SCROLL_STEP` points a step.)
+ let step: f32 = std::env::var("ACTIVITY_SCROLL_STEP").ok().and_then(|s| s.parse().ok()).unwrap_or(120.);
DAMAGE_SHOWN.set(true);
- let noting = std::env::var_os("DEBUG_DAMAGE").is_some();
+ let noting = std::env::var_os("ACTIVITY_DAMAGE").is_some();
if noting {
zgx::trace::set_enabled(true);
}
@@ -999,7 +999,7 @@ fn activity_cost() {
fn activity_goal() {
profiled();
// SAFETY: set before the renderer reads it, on this test's thread alone.
- unsafe { std::env::set_var("DEBUG_SCROLL_COPY", "1") };
+ unsafe { std::env::set_var("ACTIVITY_SCROLL_COPY", "1") };
let n: usize = std::env::var("ACTIVITY_GOAL_CALLS").ok().and_then(|v| v.parse().ok()).unwrap_or(1000);
let seconds: f64 = std::env::var("ACTIVITY_GOAL_SECONDS").ok().and_then(|v| v.parse().ok()).unwrap_or(20.);
let report = |what: &str, cost: &Cost, frames: usize, ticks: usize, seconds: f64| {
@@ -1100,7 +1100,7 @@ fn activity_goal() {
fn activity_goal_thinking() {
profiled();
// SAFETY: set before the renderer reads it, on this test's thread alone.
- unsafe { std::env::set_var("DEBUG_SCROLL_COPY", "1") };
+ unsafe { std::env::set_var("ACTIVITY_SCROLL_COPY", "1") };
let seconds: f64 = std::env::var("ACTIVITY_GOAL_SECONDS").ok().and_then(|v| v.parse().ok()).unwrap_or(120.);
let think_kb: usize = std::env::var("ACTIVITY_GOAL_THINK").ok().and_then(|v| v.parse().ok()).unwrap_or(50);
let report = |what: &str, cost: &Cost, frames: usize, ticks: usize, seconds: f64| {
@@ -1178,7 +1178,7 @@ fn activity_goal_thinking() {
bench.settle(240);
let mut cost = Cost::default();
let ticks = 10 * 120;
- let traced = std::env::var_os("DEBUG_GOAL_TRACE").is_some();
+ let traced = std::env::var_os("ACTIVITY_GOAL_TRACE").is_some();
for tick in 0..ticks {
let dy = if tick < ticks / 2 { 8. } else { -8. };
if traced && tick == 300 {
@@ -1187,7 +1187,7 @@ fn activity_goal_thinking() {
bench.app.scroll("transcript", dy);
cost.add(&bench.frame());
if traced && tick == 303 {
- // (`DEBUG_GOAL_TRACE`: a few scroll frames' runs and what they laid out.)
+ // (`ACTIVITY_GOAL_TRACE`: a few scroll frames' runs and what they laid out.)
for frame in zgx::trace::frames(8) {
let mut runs = frame.runs.clone();
runs.sort_by(|a, b| b.micros.total_cmp(&a.micros));
@@ -1386,8 +1386,8 @@ fn activity_row_cost() {
}
println!();
assert_eq!(app.error(), None);
- // (`DEBUG_ROW_TREE`: one row's nodes, kinds and boxes.)
- if std::env::var_os("DEBUG_ROW_TREE").is_some() {
+ // (`ACTIVITY_ROW_TREE`: one row's nodes, kinds and boxes.)
+ if std::env::var_os("ACTIVITY_ROW_TREE").is_some() {
let scene = app.ui.scene.borrow();
let mut stack = vec![scene.root()];
let mut verb = None;
diff --git a/apps/zgx/src/agents.rs b/apps/zgx/src/agents.rs
index af62053ae..00506865c 100644
--- a/apps/zgx/src/agents.rs
+++ b/apps/zgx/src/agents.rs
@@ -411,6 +411,24 @@ pub fn install(host: &ScriptHost) {
a.add_key(id, provider, key, name).await
}
});
+ // An API key for Cloud's agents (Settings → Providers with Cloud
+ // shown): kept by the vault, authorized for the account's Cloud device
+ // (`device`), the key every Cloud machine uses from its next turn.
+ // Rejects with the engine's words, which never hold the key.
+ let a = agents.clone();
+ host.async_action("agents.cloud_key", move |args| {
+ let a = a.clone();
+ let provider = args.field("provider").map(text).unwrap_or_default();
+ let key = args.field("key").map(text).unwrap_or_default().trim().to_string();
+ let device = args.field("device").map(text).unwrap_or_default();
+ async move {
+ crate::plugins::preview::refuse("agents.cloud_key")?;
+ let params = cloud_key_params(&provider, &key, &device)?;
+ engine::get().call("VaultPutApiKey", params).await.map_err(|error| engine::outcome(&error).to_string())?;
+ a.load_accounts(true).await;
+ Ok(Value::Nil)
+ }
+ });
// An API key's name (no secret: on whichever device shows it), rejecting
// with the engine's words.
let a = agents.clone();
@@ -1948,6 +1966,20 @@ fn epoch_secs(s: &str) -> Option {
mod tests {
use super::*;
+ /// A Cloud API key goes to the vault for the account's Cloud device:
+ /// Anthropic's or OpenAI's only, a real key, Cloud on.
+ #[test]
+ fn a_cloud_key_is_one_cloud_runs_for_its_device() {
+ let ok = cloud_key_params("anthropic-key", "sk-ant-123", "cloud-acct").unwrap();
+ assert_eq!(ok, json!({ "provider": "anthropic-key", "key": "sk-ant-123", "authorizedDevices": ["cloud-acct"] }));
+ assert!(cloud_key_params("openai-key", "sk-1", "d").is_ok());
+ assert!(cloud_key_params("claude", "sk", "d").is_err(), "a login isn't a key");
+ assert!(cloud_key_params("anthropic-key", "", "d").is_err());
+ assert!(cloud_key_params("anthropic-key", "a\nb", "d").is_err());
+ assert!(cloud_key_params("anthropic-key", &"k".repeat(5000), "d").is_err());
+ assert!(cloud_key_params("anthropic-key", "sk", "").is_err(), "Cloud off");
+ }
+
/// Pi signed in to Claude, or another login put in use: Pi's models are
/// looked up again. Usage moving, or another agent's, isn't Pi's change.
#[test]
@@ -2228,6 +2260,22 @@ pub(crate) fn shown_target() -> Option {
}
/// `params` addressed to the device Providers shows.
+/// `VaultPutApiKey`'s params for a Cloud API key: Anthropic's or OpenAI's
+/// alone, a key that's there and no longer than any key is, for the
+/// account's Cloud device. Else why not.
+pub(crate) fn cloud_key_params(provider: &str, key: &str, device: &str) -> Result {
+ if !matches!(provider, "anthropic-key" | "openai-key") {
+ return Err("Cloud takes Anthropic and OpenAI keys".into());
+ }
+ if key.is_empty() || key.len() > 4096 || key.chars().any(char::is_control) {
+ return Err("That isn't an API key".into());
+ }
+ if device.is_empty() {
+ return Err("Turn Cloud on in Settings → Cloud first".into());
+ }
+ Ok(json!({ "provider": provider, "key": key, "authorizedDevices": [device] }))
+}
+
pub(crate) fn addressed_to_shown(params: Json) -> Json {
addressed_to(shown_target().as_deref(), params)
}
diff --git a/apps/zgx/src/appshots/mod.rs b/apps/zgx/src/appshots/mod.rs
index a7a1211ac..a9f2719dc 100644
--- a/apps/zgx/src/appshots/mod.rs
+++ b/apps/zgx/src/appshots/mod.rs
@@ -535,7 +535,7 @@ impl Appshots {
}
}
-pub(crate) static SOUND: &[u8] = include_bytes!("../../../../crates/ui/assets/sounds/appshot.wav");
+pub(crate) static SOUND: &[u8] = include_bytes!("../../../../assets/sounds/appshot.wav");
fn play_sound() {
std::thread::spawn(|| crate::settings::play(SOUND));
diff --git a/apps/zgx/src/auth.rs b/apps/zgx/src/auth.rs
index 09fa21260..570ec53ed 100644
--- a/apps/zgx/src/auth.rs
+++ b/apps/zgx/src/auth.rs
@@ -341,6 +341,14 @@ pub fn install(cx: &mut WindowContext, host: &ScriptHost) {
Ok(Value::Nil)
}
});
+ host.async_action("account.keeps_chats_local", move |_| async move {
+ Ok(Value::Bool(engine::get().keeps_chats_local()))
+ });
+ host.async_action("account.keep_chats_local", move |on| async move {
+ crate::plugins::preview::refuse("account.keep_chats_local")?;
+ engine::get().keep_chats_local(matches!(on, Value::Bool(true)))?;
+ Ok(Value::Nil)
+ });
let a = auth.clone();
host.async_action("account.username", move |_| {
let a = a.clone();
diff --git a/apps/zgx/src/chat.rs b/apps/zgx/src/chat.rs
index 7dad220fa..fae3929e7 100644
--- a/apps/zgx/src/chat.rs
+++ b/apps/zgx/src/chat.rs
@@ -149,16 +149,53 @@ struct Entry {
/// by a part patch): the rest are as they were built. None: not known
/// (it came whole, or grew a text).
patched: Option>,
+ /// Its json's sum and its size as JSON, each worked out once and kept
+ /// until it changes (`json_mut`): a chat opened again says what it holds
+ /// by its sums, and one let go of is weighed (`let_go_weight`), on every
+ /// switch, and a long reply's json is hundreds of kilobytes.
+ kept_sum: std::cell::Cell>,
+ kept_bytes: std::cell::Cell >,
}
impl Entry {
fn new(json: Json) -> Self {
- Self { id: json["id"].as_str().unwrap_or_default().into(), json: Some(json), sum: 0, patched: None }
+ Self {
+ id: json["id"].as_str().unwrap_or_default().into(),
+ json: Some(json),
+ sum: 0,
+ patched: None,
+ kept_sum: std::cell::Cell::new(None),
+ kept_bytes: std::cell::Cell::new(None),
+ }
}
/// What it is now, to tell it from another copy of it.
fn sum(&self) -> u64 {
- self.json.as_ref().map_or(self.sum, sum_of)
+ let Some(json) = &self.json else { return self.sum };
+ if let Some(sum) = self.kept_sum.get() {
+ return sum;
+ }
+ let sum = sum_of(json);
+ self.kept_sum.set(Some(sum));
+ sum
+ }
+
+ /// How many bytes its json takes as JSON (none, settled).
+ fn json_bytes(&self) -> usize {
+ let Some(json) = &self.json else { return 0 };
+ if let Some(bytes) = self.kept_bytes.get() {
+ return bytes;
+ }
+ let bytes = serde_json::to_vec(json).map_or(0, |b| b.len());
+ self.kept_bytes.set(Some(bytes));
+ bytes
+ }
+
+ /// Its json, to change: what was worked out from it goes.
+ fn json_mut(&mut self) -> Option<&mut Json> {
+ self.kept_sum.set(None);
+ self.kept_bytes.set(None);
+ self.json.as_mut()
}
}
@@ -250,7 +287,12 @@ impl zgx_script::Unfold for FoldedEntry {
let json = lz4_flex::block::decompress_size_prepended(&self.bytes).ok();
let entry = json.and_then(|bytes| serde_json::from_slice::(&bytes).ok()).unwrap_or(Json::Null);
let RowContext { doc, device, model } = &*self.context;
- built_entry(&entry, doc, device.as_deref(), model.as_deref()).unwrap_or(Value::Nil)
+ // (Opened as it comes into view, after Settings' compact transcript
+ // may have been turned on: laid out compact as well, whichever shows.)
+ COMPACT_ANYWAY.set(true);
+ let row = built_entry(&entry, doc, device.as_deref(), model.as_deref()).unwrap_or(Value::Nil);
+ COMPACT_ANYWAY.set(false);
+ row
}
}
@@ -275,14 +317,241 @@ struct Built {
subagents: Option>,
/// Folded, its compressed bytes' length (what a chat kept is weighed by).
folded: usize,
+ /// A long reply's blocks, held here rather than in its row (`set_aside`).
+ aside: Option>,
+}
+
+/// A long settled reply's blocks and tools, kept out of its row. A script is
+/// handed a table for every value of a row it reads, so a reply of a thousand
+/// steps cost its 2,000 blocks' and 1,000 tools' tables each time its chat
+/// opened (about 3 ms of a long thread's open on an M5 Max, more than all it
+/// builds), though its end alone shows. Its row says its runs instead
+/// (ds/transcript's windowed runs: each its first block's id, how many
+/// blocks, a guess at its height, a sum of what it holds), and the
+/// transcript asks for a run's blocks as it builds that run
+/// (`chat.reply_run`), the end's alone as it opens.
+struct Aside {
+ /// Each run: its key (its first block's id) and its blocks.
+ runs: Vec<(Rc, Rc<[Value]>)>,
+ blocks: Rc<[Value]>,
+}
+
+/// More blocks than this, a settled reply's are set aside (ds/transcript's
+/// LONG_REPLY, past which it windows them).
+const LONG_REPLY: usize = 48;
+/// ds/transcript's runs: a block whose id falls on RUN starts one, and none
+/// runs past RUN_MOST.
+const RUN: u64 = 32;
+const RUN_MOST: usize = 64;
+
+thread_local! {
+ /// The long replies set aside, by their entry's id: the latest built of
+ /// each, while a view's rows (or a chat kept) hold it.
+ static ASIDE: RefCell, std::rc::Weak>> = RefCell::default();
+}
+
+/// Whether block `id` starts a run (ds/transcript's `starts_run`: the same
+/// sum, so both cut a reply into the same runs).
+fn starts_run(id: &str) -> bool {
+ id.bytes().fold(0u64, |h, b| (h * 31 + u64::from(b)) % 1_000_003) % RUN == 0
+}
+
+/// About how tall a block will be before it's laid out (ds/transcript's
+/// `guess_block`, the same arithmetic).
+fn guess_block(block: &Value) -> f64 {
+ let s = |key: &str| match block.field(key) {
+ Some(Value::Str(s)) => Some(s.clone()),
+ _ => None,
+ };
+ match s("kind").as_deref() {
+ Some("text") => {
+ let (mut h, mut chars, mut code, mut fenced) = (0f64, 0usize, 0usize, false);
+ let paragraph = |h: &mut f64, chars: &mut usize| {
+ if *chars > 0 {
+ *h += (*chars as f64 / 85.).ceil() * 24. + 16.;
+ *chars = 0;
+ }
+ };
+ let text = s("text").unwrap_or_else(|| Rc::from(""));
+ for line in text.split('\n') {
+ if line.trim_start().starts_with("```") {
+ if fenced {
+ h += code as f64 * 19. + 56. + 16.;
+ code = 0;
+ } else {
+ paragraph(&mut h, &mut chars);
+ }
+ fenced = !fenced;
+ } else if fenced {
+ code += 1;
+ } else if line.trim().is_empty() {
+ paragraph(&mut h, &mut chars);
+ } else {
+ chars += line.len() + 1;
+ }
+ }
+ paragraph(&mut h, &mut chars);
+ (h - 16.).max(24.)
+ }
+ Some("tools" | "work") => {
+ let live = matches!(block.field("live"), Some(Value::Bool(true)));
+ let tools = block.field("tools").map_or(0, |t| t.list().len());
+ if live { 26. * tools.max(1) as f64 } else { 26. }
+ }
+ _ => 240.,
+ }
+}
+
+/// What a block holds, summed: its id, its kind, its words' length, its
+/// tools' count and line (a run built again comes back as the same run, and
+/// isn't asked for again, unless one of these moved).
+fn block_sum(block: &Value) -> u64 {
+ use std::hash::{Hash, Hasher};
+ let mut h = rustc_hash::FxHasher::default();
+ for key in ["id", "kind", "summary", "live"] {
+ match block.field(key) {
+ Some(Value::Str(s)) => s.hash(&mut h),
+ Some(Value::Bool(b)) => b.hash(&mut h),
+ _ => 0u8.hash(&mut h),
+ }
+ }
+ match block.field("text") {
+ Some(Value::Str(s)) => s.len().hash(&mut h),
+ _ => 0usize.hash(&mut h),
+ }
+ block.field("tools").map_or(0, |t| t.list().len()).hash(&mut h);
+ h.finish()
+}
+
+/// `row` (an entry's, built whole) with its blocks and tools set aside, if
+/// it's a settled reply of more than LONG_REPLY blocks; else as it is.
+fn set_aside(row: Value) -> (Value, Option>) {
+ let Value::Map(fields) = &row else { return (row, None) };
+ let field = |key: &str| fields.iter().find(|(k, _)| &**k == key).map(|(_, v)| v);
+ let settled = matches!(field("role"), Some(Value::Str(r)) if &**r == "assistant")
+ && matches!(field("streaming"), Some(Value::Bool(false)));
+ let (Some(Value::Str(id)), Some(Value::List(blocks))) = (field("id"), field("blocks")) else {
+ return (row, None);
+ };
+ if !settled || blocks.len() <= LONG_REPLY {
+ return (row, None);
+ }
+ let id_of = |b: &Value| match b.field("id") {
+ Some(Value::Str(s)) => s.clone(),
+ _ => Rc::from(""),
+ };
+ // Cut as ds/transcript cuts them: a run ends before a block that starts
+ // one, or once it holds RUN_MOST.
+ let mut cuts: Vec<(usize, usize)> = Vec::new();
+ let mut from = 0;
+ for i in 1..blocks.len() {
+ if i - from >= RUN_MOST || starts_run(&id_of(&blocks[i])) {
+ cuts.push((from, i));
+ from = i;
+ }
+ }
+ cuts.push((from, blocks.len()));
+ let mut runs = Vec::with_capacity(cuts.len());
+ let mut listed = Vec::with_capacity(cuts.len());
+ for (from, to) in cuts {
+ let slice: Rc<[Value]> = blocks[from..to].iter().cloned().collect();
+ let key = id_of(&slice[0]);
+ let guess = slice.iter().map(|b| guess_block(b) + 12.).sum::() - 12.;
+ let sum = slice.iter().fold(0u64, |h, b| h.wrapping_mul(31).wrapping_add(block_sum(b)));
+ listed.push(Value::record([
+ ("key", Value::Str(key.clone())),
+ ("n", Value::Num(slice.len() as f64)),
+ ("guess", Value::Num(guess.max(0.))),
+ ("sum", Value::from(format!("{sum:x}").as_str())),
+ ]));
+ runs.push((key, slice));
+ }
+ let aside = Rc::new(Aside { runs, blocks: blocks.clone() });
+ let mut kept: Vec<(&str, Value)> =
+ fields.iter().filter(|(k, _)| !matches!(&**k, "blocks" | "tools")).map(|(k, v)| (&**k, v.clone())).collect();
+ kept.push(("runs", Value::List(listed.into())));
+ ASIDE.with_borrow_mut(|held| {
+ if held.len() >= 64 {
+ held.retain(|_, a| a.strong_count() > 0);
+ }
+ held.insert(id.clone(), Rc::downgrade(&aside));
+ });
+ (Value::record(kept), Some(aside))
+}
+
+/// The reply set aside as `id`, while something holds it.
+fn aside_of(id: &str) -> Option> {
+ ASIDE.with_borrow(|held| held.get(id).and_then(std::rc::Weak::upgrade))
+}
+
+fn text_field(arg: &Value, key: &str) -> Rc {
+ match arg.field(key) {
+ Some(Value::Str(s)) => s.clone(),
+ _ => Rc::from(""),
+ }
+}
+
+/// A long reply's run (`{ id, key }`), as `chat.reply_run` hands it to the
+/// transcript building it: its blocks; nil once the reply is let go of.
+pub(crate) fn reply_run(arg: &Value) -> Value {
+ let key = text_field(arg, "key");
+ aside_of(&text_field(arg, "id"))
+ .and_then(|aside| aside.runs.iter().find(|(k, _)| *k == key).map(|(_, blocks)| Value::List(blocks.clone())))
+ .unwrap_or(Value::Nil)
+}
+
+/// A long reply's blocks, all of them (`chat.reply_blocks`, given its id):
+/// what a find in the chat reads. Nil once the reply is let go of.
+pub(crate) fn reply_blocks(id: &Value) -> Value {
+ let Value::Str(id) = id else { return Value::Nil };
+ aside_of(id).map_or(Value::Nil, |aside| Value::List(aside.blocks.clone()))
+}
+
+/// The key of the run of a long reply (`{ id, block }`) that holds that
+/// block (`chat.reply_run_of`), nil if none does.
+pub(crate) fn reply_run_of(arg: &Value) -> Value {
+ let block = text_field(arg, "block");
+ aside_of(&text_field(arg, "id"))
+ .and_then(|aside| {
+ let holds = |b: &Value| matches!(b.field("id"), Some(Value::Str(s)) if *s == block);
+ aside.runs.iter().find(|(_, blocks)| blocks.iter().any(holds)).map(|(k, _)| Value::Str(k.clone()))
+ })
+ .unwrap_or(Value::Nil)
+}
+
+/// A long reply's blocks, set aside from its row (`set_aside`), for the
+/// scripts: a run as the transcript builds it, all of them for a find, and
+/// which run holds a block.
+pub(crate) fn reply_functions(host: &ScriptHost) {
+ host.function("chat.reply_run", |arg| reply_run(&arg));
+ host.function("chat.reply_blocks", |id| reply_blocks(&id));
+ host.function("chat.reply_run_of", |arg| reply_run_of(&arg));
+}
+
+/// `entry`'s row as a view builds it whole (a long settled reply's blocks
+/// set aside), and what holds what was set aside, for as long as it's kept.
+#[cfg(test)]
+pub(crate) fn built_as_shown(entry: &Json, model: Option<&str>) -> (Option, Option>) {
+ let context = Rc::new(RowContext { doc: "doc".into(), device: None, model: model.map(Into::into) });
+ let built = built_for(entry, &context, false);
+ (built.row, built.aside.map(|aside| aside as Rc))
}
/// `entry` built: its row, folded if `fold`, which a row that shows or may
-/// change isn't. What it shows of it is read as the row is, and held in `Built`.
+/// change isn't. What it shows of it is read as the row is, and held in
+/// `Built`. Built whole, a long settled reply's blocks are set aside there
+/// (`set_aside`).
fn built_for(entry: &Json, context: &Rc, fold: bool) -> Built {
let RowContext { doc, device, model } = &**context;
let row = built_entry(entry, doc, device.as_deref(), model.as_deref());
let subagents = row.as_ref().and_then(subagents_in);
+ let (row, aside) = match row {
+ Some(row) if !fold => {
+ let (row, aside) = set_aside(row);
+ (Some(row), aside)
+ }
+ row => (row, None),
+ };
let mut folded = 0;
let row = match row {
Some(_) if fold && entry["status"].as_str() != Some("streaming") => match (entry["id"].as_str(), serde_json::to_vec(entry)) {
@@ -301,7 +570,7 @@ fn built_for(entry: &Json, context: &Rc, fold: bool) -> Built {
},
row => row,
};
- Built { row, subagents, folded }
+ Built { row, subagents, folded, aside }
}
/// A long chat's settled entries, as a worker thread makes them: what they fold
@@ -484,11 +753,7 @@ const LET_GO_PER_ENTRY: usize = 512;
/// from it.
fn let_go_weight(entries: &[Entry], built: &HashMap, Built>) -> usize {
let folded: usize = built.values().map(|b| b.folded).sum();
- let whole: usize = entries
- .iter()
- .filter_map(|e| e.json.as_ref())
- .map(|json| serde_json::to_vec(json).map_or(0, |b| b.len()))
- .sum();
+ let whole: usize = entries.iter().map(Entry::json_bytes).sum();
folded + entries.len() * LET_GO_PER_ENTRY + 2 * whole
}
@@ -753,6 +1018,7 @@ pub fn install(_cx: &mut WindowContext, host: &ScriptHost) {
}
});
+ reply_functions(host);
let v = view.clone();
host.action("chat.open", move |id| {
let id = text(&id);
@@ -902,6 +1168,11 @@ pub fn install(_cx: &mut WindowContext, host: &ScriptHost) {
// app's `stop_background_task`): whether it's stopping.
host.async_action("chat.stop_task", move |args| async move { stop_task(args).await.map_err(String::from) });
host.async_action("chat.stop_waiting", move |id| async move { stop_waiting(text(&id)).await.map_err(String::from) });
+ // A new chat's agent, started before its first message (screens/chat/warm).
+ host.async_action("chat.warm", move |args| async move { warm(args).await.map_err(String::from) });
+ host.async_action("chat.unwarm", move |args| async move { unwarm(args).await.map_err(String::from) });
+ host.async_action("chat.warm_cleared", move |args| async move { warm_cleared(args).await.map_err(String::from) });
+ host.action("chat.warm_taken", move |id| warm_taken(&text(&id)));
let pick = which.clone();
host.async_action("chat.respond", move |args| {
let v = pick(&args);
@@ -1334,18 +1605,26 @@ impl Chats {
}
/// Settings' compact transcript turned on or off (`chat.compact`): the
- /// replies being written are built again, with or without its layout.
+ /// rows built whole are built again, with or without its layout (one
+ /// folded lays itself out both ways as it opens: `FoldedEntry`). A
+ /// row has it only while it shows: a long reply's compact layout is the
+ /// whole reply again, built and handed to the scripts each time it opens.
fn compact_shown(&self, on: bool) {
if COMPACT_SHOWN.replace(on) == on {
return;
}
+ for held in self.let_go.borrow_mut().iter_mut() {
+ for e in held.entries.iter().filter(|e| e.json.is_some()) {
+ held.built.remove(&e.id);
+ }
+ }
for view in self.views() {
let rebuilt = {
let mut slot = view.open.borrow_mut();
let Some(open) = slot.as_mut() else { continue };
let Open { entries, built, .. } = open;
let mut any = false;
- for e in entries.iter().filter(|e| e["status"].as_str() == Some("streaming")) {
+ for e in entries.iter().filter(|e| e.json.is_some()) {
any |= built.remove(&e.id).is_some();
}
any
@@ -2088,10 +2367,20 @@ impl View {
};
for entry in tail {
let id = entry["id"].as_str().unwrap_or_default().to_owned();
- open.built.remove(id.as_str());
+ let fresh = Entry::new(entry);
match open.entries.iter_mut().find(|e| *e.id == *id) {
- Some(held) => *held = Entry::new(entry),
- None => open.entries.push(Entry::new(entry)),
+ // The same as the row it has (most of a tail, a
+ // chat opened again): what was built from it
+ // stays, so nothing showing is made again.
+ Some(held) if held.sum() == fresh.sum() => {}
+ Some(held) => {
+ open.built.remove(id.as_str());
+ *held = fresh;
+ }
+ None => {
+ open.built.remove(id.as_str());
+ open.entries.push(fresh);
+ }
}
}
open.heard = true;
@@ -2596,37 +2885,24 @@ impl View {
self.mark_failed(&id, &message_id, None);
return Err("missing");
}
- if fresh {
- engine::get()
- .call("Mutate", json!({ "op": "setChatConfig", "chatId": id, "config": config }))
- .await
- .map_err(|e| {
- eprintln!("zeron-zgx: chat: a new chat's config wasn't set: {e}");
- self.mark_failed(&id, &message_id, None);
- engine::outcome(&e)
- })?;
- }
+ // A chat just made: its config goes out now, and its first message
+ // right behind it rather than after its answer. Awaited first, the
+ // message waited out the frame that builds the new chat's page
+ // (the answer is read once that frame is done). The message carries
+ // the same agent and model, and the engine stamps them on a chat
+ // whose config hasn't landed yet, so the two may land in any order.
+ // Not when the agent changes from the one the chat was made with (a
+ // side chat takes its parent's): the engine refuses that switch
+ // while a turn runs, and the message starts one. Then the config is
+ // awaited first, and the message goes only once it has landed.
+ let set_config = fresh.then(|| json!({ "op": "setChatConfig", "chatId": id, "config": config }));
+ let switching = fresh && changes_agent(&chat["config"], &config);
let field = |key: &str| req.field(key).map(text).filter(|s| !s.is_empty());
let cwd = field("cwd")
.or_else(|| chat["cwd"].as_str().map(Into::into))
.unwrap_or_else(|| "~".into());
- let mut request = json!({
- "prompt": prompt,
- "harness": config["harness"],
- "model": config["model"],
- "reasoning": config["reasoning"],
- "modelOptions": config.get("modelOptions").cloned().unwrap_or(json!({})),
- "cwd": cwd,
- "sandbox": "workspace-write",
- "autoApprove": false,
- "resume": null,
- });
- if let Some(access) = config.get("access") {
- request["access"] = access.clone();
- }
- if let Some(plan) = config.get("plan") {
- request["plan"] = plan.clone();
- }
+ let mut request = run_request(&config, &cwd);
+ request["prompt"] = json!(prompt);
if !paths.is_empty() {
request["attachments"] = json!(paths);
}
@@ -2638,7 +2914,23 @@ impl View {
});
}
let run = json!({ "kind": "run", "messageId": message_id, "request": request });
- let sent = command_with(&id, run.clone(), &transfers).await;
+ let sent = match set_config {
+ Some(params) => {
+ let engine = engine::get();
+ match first_send(switching, engine.call("Mutate", params), command_with(&id, run.clone(), &transfers)).await {
+ Ok(sent) => sent,
+ Err(e) => {
+ // Refused (a turn already running, a host too old to
+ // switch provider): the message never went, and the
+ // person is told, as for any send that fails.
+ eprintln!("zeron-zgx: chat: {id}: a new chat's agent wasn't set: {e}");
+ self.mark_failed(&id, &message_id, None);
+ return Err(engine::outcome(&e));
+ }
+ }
+ }
+ None => command_with(&id, run.clone(), &transfers).await,
+ };
if sent.is_err() {
// Not delivered: the prompt stays, failed, to send again.
if let Some(pending) = self.pending.borrow_mut().get_mut(&id)
@@ -3162,10 +3454,204 @@ async fn stop_waiting(id: String) -> Result {
Ok(Value::Bool(answer["stopped"].as_bool() == Some(true)))
}
+thread_local! {
+ /// New chats' warm starts asked of this app, by chat id: each ask's
+ /// number (a newer one, a stop or the send taking it makes an older
+ /// one's pending start or stop moot).
+ static WARM: RefCell> = RefCell::new(HashMap::new());
+}
+
+/// How long a new chat's start waits after the person opened it, so the
+/// page's first frames are drawn before the agent's startup takes a core.
+const WARM_OPEN_SETTLE: std::time::Duration = std::time::Duration::from_millis(150);
+/// A cleared draft keeps its agent this long.
+const WARM_CLEARED: std::time::Duration = std::time::Duration::from_secs(10);
+
+/// This ask's number for `id`.
+fn warm_ask(id: &str) -> u64 {
+ WARM.with(|w| {
+ let mut w = w.borrow_mut();
+ let n = w.entry(id.to_owned()).or_insert(0);
+ *n += 1;
+ *n
+ })
+}
+
+/// Whether ask `n` of `id` is still the latest.
+fn warm_latest(id: &str, n: u64) -> bool {
+ WARM.with(|w| w.borrow().get(id).is_some_and(|at| *at == n))
+}
+
+/// The engine's `WarmStart` request for a new chat's agent: the run its first
+/// send will make (`send`: a just-made chat's config is the composer's
+/// picks), its prompt aside. `req` as the composer sends (`store.Request`:
+/// model, effort, options, access, plan, cwd, device). `None` when it can't
+/// start early: no agent picked, a chat that exists already, or one that
+/// will run on another device (a warm start there would outlive this app's
+/// quit).
+fn warm_request(chats: &Chats, id: &str, req: &Value) -> Option {
+ if chats.chat(id).is_some() {
+ return None;
+ }
+ let field = |key: &str| req.field(key).map(text).filter(|s| !s.is_empty());
+ let here = chats.here.borrow().clone()?;
+ if field("device").is_some_and(|device| device != here) {
+ return None;
+ }
+ let config = merged_config(&Json::Null, req);
+ if config["harness"].is_null() {
+ return None;
+ }
+ Some(run_request(&config, &field("cwd").unwrap_or_else(|| "~".into())))
+}
+
+/// The run a chat with `config` makes in `cwd`, its prompt empty: what a send
+/// sends (`send`), and what a new chat's warm start launches early.
+fn run_request(config: &Json, cwd: &str) -> Json {
+ let mut request = json!({
+ "prompt": "",
+ "harness": config["harness"],
+ "model": config["model"],
+ "reasoning": config["reasoning"],
+ "modelOptions": config.get("modelOptions").cloned().unwrap_or(json!({})),
+ "cwd": cwd,
+ "sandbox": "workspace-write",
+ "autoApprove": false,
+ "resume": null,
+ });
+ if let Some(access) = config.get("access") {
+ request["access"] = access.clone();
+ }
+ if let Some(plan) = config.get("plan") {
+ request["plan"] = plan.clone();
+ }
+ request
+}
+
+/// A new chat's agent started before its first message (the engine's
+/// `WarmStart`), for the id it will be made with: `{ id, req, typed }`.
+/// Opened and not typed into, it starts [`WARM_OPEN_SETTLE`] later. Its
+/// outcome word, or nil when nothing can warm (see [`warm_request`]) or a
+/// newer ask, a stop or the send took over.
+async fn warm(args: Value) -> Result {
+ if std::env::var("ZERON_WARM_START").is_ok_and(|v| v == "0") {
+ return Ok(Value::Nil);
+ }
+ let id = args.field("id").map(text).filter(|id| plain_id(id)).ok_or("missing")?;
+ let Some(req) = args.field("req") else { return Err("missing") };
+ let typed = args.field("typed").is_some_and(Value::truthy);
+ let chats = CHATS.with(Rc::clone);
+ let Some(request) = warm_request(&chats, &id, &req) else {
+ return Ok(Value::Nil);
+ };
+ let n = warm_ask(&id);
+ if !typed {
+ zgx::timer::sleep(WARM_OPEN_SETTLE).await;
+ if !warm_latest(&id, n) {
+ return Ok(Value::Nil);
+ }
+ }
+ let answer = engine::get()
+ .call("WarmStart", json!({ "chatId": id, "request": request, "typed": typed }))
+ .await
+ .map_err(|e| engine::outcome(&e))?;
+ Ok(answer["outcome"].as_str().map(Value::from).unwrap_or(Value::Nil))
+}
+
+/// Stop a warm start: `{ id }`.
+async fn unwarm(args: Value) -> Result {
+ let id = args.field("id").map(text).filter(|id| plain_id(id)).ok_or("missing")?;
+ WARM.with(|w| w.borrow_mut().remove(&id));
+ engine::get()
+ .call("WarmStop", json!({ "chatId": id }))
+ .await
+ .map_err(|e| engine::outcome(&e))?;
+ Ok(Value::Nil)
+}
+
+/// The send took the warm start of `id`: a start or stop still pending for
+/// it is moot (the engine hands it to the chat's run).
+fn warm_taken(id: &str) {
+ WARM.with(|w| w.borrow_mut().remove(id));
+}
+
+/// A warm start's draft was cleared: stopped [`WARM_CLEARED`] later unless
+/// it's asked for again (typed into) meanwhile. `{ id }`.
+async fn warm_cleared(args: Value) -> Result {
+ let id = args.field("id").map(text).filter(|id| plain_id(id)).ok_or("missing")?;
+ let n = WARM.with(|w| w.borrow().get(&id).copied());
+ let Some(n) = n else { return Ok(Value::Nil) };
+ zgx::timer::sleep(WARM_CLEARED).await;
+ if !warm_latest(&id, n) {
+ return Ok(Value::Nil);
+ }
+ unwarm(json_value(json!({ "id": id }))).await
+}
+
+fn json_value(json: Json) -> Value {
+ Value::from_json(&json.to_string()).unwrap_or(Value::Nil)
+}
+
+/// An id a chat may be made with (`sessions.create`'s).
+fn plain_id(id: &str) -> bool {
+ (8..=64).contains(&id.len()) && id.chars().all(|c| c.is_ascii_alphanumeric() || c == '-')
+}
+
async fn command(chat: &str, command: Json) -> Result<(), Outcome> {
command_with(chat, command, &[]).await
}
+/// Whether `next` runs another agent than the `current` config names (one
+/// that names none changes nothing the engine would refuse).
+fn changes_agent(current: &Json, next: &Json) -> bool {
+ current["harness"].as_str().is_some_and(|harness| next["harness"].as_str() != Some(harness))
+}
+
+/// A new chat's config (`configure`) and first message (`send`). Switching
+/// agent, the config is awaited first: refused, the message never goes and
+/// the refusal is the answer. Otherwise both go out at once ([`both`]), the
+/// config first, and the message's answer stands (it carries the same agent
+/// and model; a config that didn't land is only logged).
+async fn first_send(switching: bool, configure: C, send: S) -> Result
+where
+ C: Future>,
+ S: Future,
+{
+ if switching {
+ configure.await?;
+ return Ok(send.await);
+ }
+ let (configured, sent) = both(configure, send).await;
+ if let Err(e) = configured {
+ eprintln!("zeron-zgx: chat: a new chat's config wasn't set: {e}");
+ }
+ Ok(sent)
+}
+
+/// Both futures, polled together (`a` first each time), and both answers.
+async fn both(a: A, b: B) -> (A::Output, B::Output) {
+ let (mut a, mut b) = (std::pin::pin!(a), std::pin::pin!(b));
+ let (mut done_a, mut done_b) = (None, None);
+ std::future::poll_fn(move |cx| {
+ if done_a.is_none()
+ && let std::task::Poll::Ready(out) = a.as_mut().poll(cx)
+ {
+ done_a = Some(out);
+ }
+ if done_b.is_none()
+ && let std::task::Poll::Ready(out) = b.as_mut().poll(cx)
+ {
+ done_b = Some(out);
+ }
+ if done_a.is_some() && done_b.is_some() {
+ std::task::Poll::Ready((done_a.take().unwrap(), done_b.take().unwrap()))
+ } else {
+ std::task::Poll::Pending
+ }
+ })
+ .await
+}
+
/// [`command`], with the files the engine delivers for it.
async fn command_with(chat: &str, command: Json, transfers: &[Json]) -> Result<(), Outcome> {
let mut params = json!({ "chatId": chat, "command": command });
@@ -4179,13 +4665,16 @@ fn settle_off(open: &mut Open, folded: FoldedOff, context: &Rc) {
let folded = bytes.as_ref().map_or(0, |bytes| bytes.len());
let row = bytes.map(|bytes| Value::folded(entry.id.clone(), FoldedEntry { bytes, context: context.clone() }));
let subagents = (!subagents.is_empty()).then(|| subagents.iter().map(SubagentOff::value).collect());
- built.insert(entry.id.clone(), Built { row, subagents, folded });
+ built.insert(entry.id.clone(), Built { row, subagents, folded, aside: None });
}
/// `entry`, built, down to its id and sum; a plan in it is kept (`todos`).
fn settle(entry: &mut Entry, at: usize, older_todo: &mut Option<(usize, Json)>) {
+ if entry.json.is_none() {
+ return;
+ }
+ entry.sum = entry.sum();
let Some(json) = entry.json.take() else { return };
- entry.sum = sum_of(&json);
if older_todo.as_ref().is_none_or(|(place, _)| *place < at)
&& let Some(part) = latest_todo(std::iter::once(&json))
{
@@ -4225,6 +4714,9 @@ thread_local! {
static PATCHED: RefCell>> = const { RefCell::new(None) };
/// Settings' compact transcript is on (`chat.compact`).
static COMPACT_SHOWN: Cell = const { Cell::new(false) };
+ /// A folded row opening (`FoldedEntry`): laid out compact too, whether
+ /// or not that shows, as it can't be built again when it turns on.
+ static COMPACT_ANYWAY: Cell = const { Cell::new(false) };
}
/// `build`, with `patched` (the parts changed since the entry's row was last
@@ -4409,7 +4901,7 @@ fn apply_counted(entries: &mut Vec, frame: &mut Json, counted: bool) -> R
.ok_or(())?;
// (A settled entry growing again: its whole copy is the engine's.)
entry.patched = None;
- let entry = entry.json.as_mut().ok_or(())?;
+ let entry = entry.json_mut().ok_or(())?;
let streaming = entry["status"].as_str() == Some("streaming");
let part = entry["parts"]
.as_array_mut()
@@ -4456,7 +4948,7 @@ fn apply_counted(entries: &mut Vec, frame: &mut Json, counted: bool) -> R
let at = patch["at"].as_u64().ok_or(())? as usize;
let part = &patch["part"];
let id = part["id"].as_str().ok_or(())?.to_owned();
- let json = entry.json.as_mut().ok_or(())?;
+ let json = entry.json_mut().ok_or(())?;
let parts = json["parts"].as_array_mut().ok_or(())?;
if at < parts.len() && parts[at]["id"].as_str() == Some(&id) {
parts[at] = part.clone();
@@ -4724,10 +5216,13 @@ pub(crate) fn message(entry: &Json, model: Option<&str>) -> Option {
if let Some(ms) = entry["durationMs"].as_f64() {
fields.push(("worked", Value::Num((ms / 1000.).round().max(1.))));
}
- // The same reply laid out for Settings' compact transcript (one
- // being written, only while that shows: built with each of its
- // changes, it'd cost each the whole reply again).
- if (!streaming || COMPACT_SHOWN.get())
+ // The same reply laid out for Settings' compact transcript, only
+ // while that shows (`Chats::compact_shown` builds rows again as it
+ // turns on): it's the whole reply again, which a long reply built
+ // and handed to the scripts as it opened (a 1,000-step reply, a
+ // second copy of its 2,000 blocks and 1,000 tools). A folded row
+ // opening has it either way (`COMPACT_ANYWAY`).
+ if (COMPACT_SHOWN.get() || (COMPACT_ANYWAY.get() && !streaming))
&& let Some(compact) = compact_blocks(entry)
{
fields.push(("compact", compact));
@@ -5544,9 +6039,18 @@ fn tool_row(part: &Json, live: bool) -> Option {
fields.push(("failed", Value::Bool(true)));
}
// Auto's reviewer on it: reviewing, approved, denied or timed-out, its
- // risk and why (as the agent's reviewer said).
- if let Some(status) = part["review"]["status"].as_str() {
- let text = |key: &str| part["review"][key].as_str().filter(|t| !t.trim().is_empty()).map_or(Value::Nil, Value::from);
+ // risk and why (as the agent's reviewer said). A status this build
+ // doesn't know (a newer peer's) shows nothing rather than a bare key.
+ if let Some(status) = part["review"]["status"]
+ .as_str()
+ .filter(|s| matches!(*s, "reviewing" | "approved" | "denied" | "timed-out"))
+ {
+ let text = |key: &str| {
+ part["review"][key]
+ .as_str()
+ .filter(|t| !t.trim().is_empty())
+ .map_or(Value::Nil, Value::from)
+ };
fields.push((
"review",
Value::record([("status", Value::from(status)), ("risk", text("risk")), ("reason", text("reason"))]),
@@ -6139,8 +6643,19 @@ fn seen_would_change(chat: &Json, session: &Json, now: chrono::DateTime String {
+ const MONTHS: [&str; 12] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+ let month = MONTHS.get(month0 as usize).copied().unwrap_or("Jan");
+ let twelve = match hour % 12 {
+ 0 => 12,
+ h => h,
+ };
+ format!("{month} {day}, {twelve}:{minute:02} {}", if hour < 12 { "AM" } else { "PM" })
+}
+
+/// [`clock`] for `at` (seconds since 1970) in this machine's time zone.
#[cfg(unix)]
fn stamp(at: i64) -> Option {
#[repr(C)]
@@ -6173,21 +6688,47 @@ fn stamp(at: i64) -> Option {
}
tm.assume_init()
};
- let hour = match tm.hour % 12 {
- 0 => 12,
- h => h,
+ Some(clock(tm.mon as u32, tm.mday as u32, tm.hour as u32, tm.min as u32))
+}
+
+/// [`clock`] for `at` (seconds since 1970) in this machine's time zone: on
+/// Windows through its own conversion (it has no `localtime_r`). Without
+/// it every message's time was missing there, and with it the hover strip
+/// that holds Copy.
+#[cfg(windows)]
+fn stamp(at: i64) -> Option {
+ use windows_sys::Win32::Foundation::{FILETIME, SYSTEMTIME};
+ use windows_sys::Win32::System::Time::{FileTimeToSystemTime, SystemTimeToTzSpecificLocalTime};
+ if at <= 0 {
+ return None;
+ }
+ // FILETIME counts 100 ns from 1601-01-01 (11,644,473,600 s before 1970).
+ let ticks = (at as u64).checked_add(11_644_473_600)?.checked_mul(10_000_000)?;
+ let file = FILETIME {
+ dwLowDateTime: ticks as u32,
+ dwHighDateTime: (ticks >> 32) as u32,
};
- const MONTHS: [&str; 12] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
- let month = MONTHS.get(tm.mon as usize).copied().unwrap_or("Jan");
- Some(format!(
- "{month} {}, {hour}:{:02} {}",
- tm.mday,
- tm.min,
- if tm.hour < 12 { "AM" } else { "PM" }
+ // SAFETY: both calls read only the structs passed in and write only the
+ // caller's SYSTEMTIMEs; a null zone means the machine's current one.
+ let local = unsafe {
+ let mut utc: SYSTEMTIME = std::mem::zeroed();
+ let mut local: SYSTEMTIME = std::mem::zeroed();
+ if FileTimeToSystemTime(&file, &mut utc) == 0
+ || SystemTimeToTzSpecificLocalTime(std::ptr::null(), &utc, &mut local) == 0
+ {
+ return None;
+ }
+ local
+ };
+ Some(clock(
+ u32::from(local.wMonth).checked_sub(1)?,
+ u32::from(local.wDay),
+ u32::from(local.wHour),
+ u32::from(local.wMinute),
))
}
-#[cfg(not(unix))]
+#[cfg(not(any(unix, windows)))]
fn stamp(_at: i64) -> Option {
None
}
@@ -6251,6 +6792,21 @@ mod stream_tests;
#[cfg(test)]
mod tests {
+ /// A message's time reads as the shipping app's, on every platform: the
+ /// formatting, and a real local time from `stamp` (Windows included,
+ /// where it once was always missing and hid the message's hover strip).
+ #[test]
+ fn a_messages_time_reads_like_the_shipping_apps_on_every_platform() {
+ assert_eq!(super::clock(6, 1, 16, 12), "Jul 1, 4:12 PM");
+ assert_eq!(super::clock(0, 9, 0, 5), "Jan 9, 12:05 AM");
+ assert_eq!(super::clock(11, 31, 12, 0), "Dec 31, 12:00 PM");
+ let at = super::stamp(1_794_600_000).expect("a time for a real moment");
+ let (month, rest) = at.split_once(' ').unwrap();
+ assert!(["Nov", "Dec"].contains(&month), "{at}");
+ assert!(rest.ends_with(" AM") || rest.ends_with(" PM"), "{at}");
+ assert_eq!(super::stamp(0), None);
+ }
+
/// Opening a chat marks it seen only while that changes something any
/// viewport reads (its last message, its terminal's report, the end of
/// its sleep): a chat looked at already writes nothing, so its devices'
@@ -6367,6 +6923,45 @@ mod tests {
assert!(super::apply(&mut entries, &mut words).is_err());
}
+ /// An entry's sum and size are kept between switches (a long reply's
+ /// json is hashed and weighed once, not on every open and let-go), and
+ /// what changes it (words appended, a part patched) changes them too:
+ /// a reopen that said the old sum would be sent nothing new.
+ #[test]
+ fn an_entrys_kept_sum_and_size_follow_its_changes() {
+ let entry = serde_json::json!({ "id": "a", "role": "assistant", "status": "streaming", "parts": [
+ { "id": "t", "kind": "text", "text": "Hel" },
+ { "id": "k", "kind": "tool", "call": { "kind": "read", "path": "x" } },
+ ] });
+ let mut entries = vec![super::Entry::new(entry)];
+ let fresh = |e: &super::Entry| {
+ let json = e.json.as_ref().unwrap();
+ (super::sum_of(json), serde_json::to_vec(json).unwrap().len())
+ };
+ let first = (entries[0].sum(), entries[0].json_bytes());
+ assert_eq!(first, fresh(&entries[0]));
+ assert_eq!(entries[0].kept_sum.get(), Some(first.0), "kept once worked out");
+ assert_eq!(entries[0].kept_bytes.get(), Some(first.1), "kept once worked out");
+ // Words appended.
+ let mut words = serde_json::json!({ "append": [{ "entry": "a", "part": "t", "text": "lo", "len": 5 }] });
+ super::apply(&mut entries, &mut words).unwrap();
+ let grown = (entries[0].sum(), entries[0].json_bytes());
+ assert_eq!(grown, fresh(&entries[0]));
+ assert_ne!(grown, first);
+ // A part patched.
+ let mut patch = serde_json::json!({ "parts": [{ "entry": "a", "at": 1, "part":
+ { "id": "k", "kind": "tool", "call": { "kind": "read", "path": "y" } }, "len": 2 }] });
+ super::apply(&mut entries, &mut patch).unwrap();
+ let patched = (entries[0].sum(), entries[0].json_bytes());
+ assert_eq!(patched, fresh(&entries[0]));
+ assert_ne!(patched.0, grown.0);
+ // Settled: its sum as it was, its json gone and weighing nothing.
+ let mut older = None;
+ let mut settled = entries.pop().unwrap();
+ super::settle(&mut settled, 0, &mut older);
+ assert_eq!((settled.sum(), settled.json_bytes()), (patched.0, 0));
+ }
+
/// The worker's fold, kept, is what folding here keeps.
#[test]
fn the_worker_folds_as_the_window_would() {
@@ -6431,7 +7026,11 @@ mod tests {
],
});
let context = Rc::new(super::RowContext { doc: "chat".into(), device: None, model: Some("Opus".into()) });
+ // (Built whole while compact shows: a folded row opens laid out
+ // compact either way, `COMPACT_ANYWAY`.)
+ super::COMPACT_SHOWN.set(true);
let whole = super::built_for(&entry, &context, false);
+ super::COMPACT_SHOWN.set(false);
let folded = super::built_for(&entry, &context, true);
let Some(Value::Folded(_)) = folded.row else { panic!("folded") };
let (whole_row, folded_row) = (whole.row.unwrap(), folded.row.unwrap());
@@ -6633,6 +7232,94 @@ mod tests {
assert_eq!(words.lines().count(), 30);
}
+ /// A new side chat switched from its parent's agent: its config is
+ /// awaited before its first message goes, and a refusal (a turn already
+ /// running, a host too old to switch) stops the message and is the
+ /// answer. The same agent: both go out in one poll, and a config that
+ /// didn't land leaves the sent message standing.
+ #[test]
+ fn a_new_chat_switching_agent_sends_its_message_only_once_the_config_landed() {
+ use std::task::{Context, Poll, Waker};
+ let claude = json!({ "harness": "claude-code", "model": "opus" });
+ let codex = json!({ "harness": "codex", "model": "gpt" });
+ assert!(super::changes_agent(&claude, &codex));
+ assert!(!super::changes_agent(&claude, &json!({ "harness": "claude-code", "model": "sonnet" })));
+ assert!(!super::changes_agent(&Json::Null, &codex), "made with no agent: nothing to refuse");
+
+ // Config, then message, never both at once.
+ let log = Rc::new(std::cell::RefCell::new(Vec::new()));
+ let (config_gate, a, b) = (Rc::new(std::cell::Cell::new(false)), log.clone(), log.clone());
+ let gate = config_gate.clone();
+ let configure = std::future::poll_fn(move |_| {
+ if gate.get() {
+ a.borrow_mut().push("config landed");
+ Poll::Ready(Ok::(Json::Null))
+ } else {
+ Poll::Pending
+ }
+ });
+ let send = async move {
+ b.borrow_mut().push("message");
+ "sent"
+ };
+ let mut cx = Context::from_waker(Waker::noop());
+ let mut sending = std::pin::pin!(super::first_send(true, configure, send));
+ assert!(sending.as_mut().poll(&mut cx).is_pending());
+ assert!(log.borrow().is_empty(), "the message went before the config landed");
+ config_gate.set(true);
+ assert_eq!(sending.as_mut().poll(&mut cx), Poll::Ready(Ok("sent")));
+ assert_eq!(*log.borrow(), ["config landed", "message"]);
+
+ // Refused: the message never goes, and the refusal is the answer.
+ let went = Rc::new(std::cell::Cell::new(false));
+ let w = went.clone();
+ let refused = std::pin::pin!(super::first_send(
+ true,
+ async { Err::("Wait for the current turn to finish before switching provider".into()) },
+ async move { w.set(true) },
+ ))
+ .poll(&mut cx);
+ assert!(matches!(refused, Poll::Ready(Err(ref e)) if e.contains("switching provider")));
+ assert!(!went.get());
+
+ // The same agent: one poll sends both, and the message's answer stands.
+ let went = Rc::new(std::cell::Cell::new(false));
+ let w = went.clone();
+ let together = std::pin::pin!(super::first_send(
+ false,
+ async { Err::("offline".into()) },
+ async move {
+ w.set(true);
+ "sent"
+ },
+ ))
+ .poll(&mut cx);
+ assert_eq!(together, Poll::Ready(Ok("sent")));
+ assert!(went.get());
+ }
+
+ /// A new chat's config and first message go out in the same poll, the
+ /// config first, and both answers come back (`both`).
+ #[test]
+ fn both_sends_the_first_then_the_second_in_one_poll() {
+ use std::task::{Context, Poll, Waker};
+ let sent = Rc::new(std::cell::RefCell::new(Vec::new()));
+ let (a, b) = (sent.clone(), sent.clone());
+ let mut joined = std::pin::pin!(super::both(
+ async move {
+ a.borrow_mut().push("config");
+ 1
+ },
+ async move {
+ b.borrow_mut().push("message");
+ 2
+ },
+ ));
+ let mut cx = Context::from_waker(Waker::noop());
+ assert_eq!(joined.as_mut().poll(&mut cx), Poll::Ready((1, 2)));
+ assert_eq!(*sent.borrow(), vec!["config", "message"]);
+ }
+
/// 2026-11-11, work-laptop: a queued message on the Mac hosting it said
/// "being edited on another device" while the app didn't know yet which
/// device it was on. Only a known, different owner is another device.
@@ -6678,6 +7365,42 @@ mod tests {
assert!(chats.catalog_value().field("device").is_none());
}
+ /// A new chat's warm start asks the engine for the very run its first
+ /// send will make, the prompt aside; never for a chat that exists, one
+ /// that will run on another device, or with no agent picked.
+ #[test]
+ fn a_warm_start_is_asked_only_for_a_new_chat_here_as_its_send_would_run() {
+ let chats = Chats::default();
+ let req = |fields: Json| Value::from_json(&fields.to_string()).unwrap();
+ let ask = req(json!({
+ "model": "claude-code/opus", "effort": "high", "cwd": "/tmp/atlas",
+ "device": "mac", "access": "edits", "plan": true,
+ }));
+ assert!(warm_request(&chats, "new-chat-1", &ask).is_none(), "this device not known yet");
+ *chats.here.borrow_mut() = Some("mac".into());
+ let request = warm_request(&chats, "new-chat-1", &ask).expect("a new chat here");
+ let mut sent = run_request(&merged_config(&Json::Null, &ask), "/tmp/atlas");
+ sent["prompt"] = json!("");
+ assert_eq!(request, sent, "the run its send makes");
+ assert_eq!(request["harness"], "claude-code");
+ assert_eq!(request["model"], "opus");
+ assert_eq!(request["reasoning"], "high");
+ assert_eq!(request["access"], "auto-accept-edits");
+ assert_eq!(request["plan"], true);
+ assert_eq!(request["prompt"], "");
+ // No project, no device named: here, in its own folder.
+ let projectless = warm_request(&chats, "new-chat-1", &req(json!({ "model": "claude-code/opus" })));
+ assert_eq!(projectless.expect("here")["cwd"], "~");
+ for (why, fields) in [
+ ("another device", json!({ "model": "claude-code/opus", "device": "box" })),
+ ("no agent picked", json!({ "cwd": "/tmp/atlas" })),
+ ] {
+ assert!(warm_request(&chats, "new-chat-1", &req(fields)).is_none(), "{why}");
+ }
+ chats.chats.borrow_mut().insert("s1".into(), json!({ "id": "s1", "deviceId": "mac" }));
+ assert!(warm_request(&chats, "s1", &ask).is_none(), "a chat that exists");
+ }
+
/// A look at another device's catalog answers for itself alone: once the
/// composer has moved on (another device, or the same one looked at
/// again since), what it hears changes nothing.
@@ -7437,6 +8160,33 @@ mod tests {
assert!(compact_blocks(&plain).is_none());
}
+ /// A reply's compact layout is its whole work again (a 1,000-step reply:
+ /// a second copy of its blocks and tools), built and handed to the
+ /// scripts each time it opened: it's there only while Settings' compact
+ /// transcript shows, and in a folded row opening, which can't be built
+ /// again as it turns on.
+ #[test]
+ fn a_reply_is_laid_out_compact_only_while_that_shows() {
+ let reply = json!({ "id": "a", "role": "assistant", "status": "complete", "durationMs": 5_000,
+ "parts": [{ "id": "p1", "kind": "text", "text": "Looking." },
+ { "id": "k1", "kind": "tool", "isError": false, "resolved": true, "call": { "kind": "exec", "command": "ls" } },
+ { "id": "p2", "kind": "text", "text": "Done." }] });
+ let compact = |row: &Value| row.field("compact").is_some_and(|v| !matches!(v, Value::Nil));
+ assert!(!COMPACT_SHOWN.get());
+ let row = built_entry(&reply, "doc", None, None).expect("a row");
+ assert!(!compact(&row), "no compact layout while it doesn't show");
+ assert!(row.field("blocks").is_some());
+ COMPACT_SHOWN.set(true);
+ let shown = built_entry(&reply, "doc", None, None).expect("a row");
+ COMPACT_SHOWN.set(false);
+ assert!(compact(&shown), "laid out compact while that shows");
+ // Folded, it has it as it opens, either way.
+ let context = Rc::new(RowContext { doc: "doc".into(), device: None, model: None });
+ let Built { row: Some(folded), .. } = built_for(&reply, &context, true) else { panic!("a folded row") };
+ assert!(matches!(folded, Value::Folded(_)));
+ assert!(folded.field("compact").is_some_and(|v| !matches!(v, Value::Nil)), "a folded row opens laid out compact too");
+ }
+
#[test]
fn a_settled_reply_with_nothing_to_show_has_no_row() {
let reply = |status: &str| {
@@ -8038,6 +8788,63 @@ mod tests {
assert!(!rows().contains("tail engine.log"), "the whole copy replaces it: {}", rows());
}
+ /// Rows held, the chat's doc cold in the engine: what changed among its
+ /// newest entries comes first (an opening tail of just those), then what
+ /// changed since, measured from the rows as they hold it after that
+ /// tail (crates/engine/src/rpc.rs `since_doc_messages_stream`). The rows
+ /// end as the engine's, nothing asked for whole.
+ #[test]
+ fn rows_held_take_a_cold_chats_tail_then_what_changed_since() {
+ use super::{Entry, Open, View, draft_value};
+ use serde_json::json;
+ use std::cell::{Cell, RefCell};
+ use std::rc::Rc;
+ use zgx_script::{ScriptHost, Value, testing::TestApp};
+ let app = TestApp::new(|runtime| ScriptHost::inline(runtime, "app", "return ui.text { \"x\" }"));
+ let reply = |id: &str, words: &str| {
+ json!({ "id": id, "role": "assistant", "status": "complete", "parts": [{ "id": format!("{id}p"), "kind": "text", "text": words }], "createdAt": 1_762_000_000_000_i64 })
+ };
+ let held: Vec = (0..10).map(|i| Entry::new(reply(&format!("a{i}"), "done"))).collect();
+ let view = Rc::new(View {
+ session: app.host.shared("t.session", Value::Nil),
+ messages: app.host.shared("t.messages", Value::List(Rc::from([]))),
+ subagents: app.host.shared("t.subagents", Value::List(Rc::from([]))),
+ draft: app.host.shared("t.draft", draft_value("", "")),
+ rpc: RefCell::default(),
+ open: RefCell::new(Some(Open { id: "c".into(), entries: held, heard: true, has_whole: true, ..Open::default() })),
+ pending: RefCell::default(),
+ generation: Cell::new(0),
+ snapshot: Cell::new(false),
+ });
+ let ids = || view.open.borrow().as_ref().unwrap().entries.iter().map(|e| e.id.to_string()).collect::>();
+ let rows = || format!("{:?}", view.messages.signal().with_untracked(Clone::clone));
+ // While away: a8 changed, a10 and a11 came, a3 went (older than the tail).
+ let engine: Vec = (0..12)
+ .filter(|&i| i != 3)
+ .map(|i| reply(&format!("a{i}"), if i == 8 { "changed" } else if i >= 10 { "new" } else { "done" }))
+ .collect();
+ // First: of the newest entries, only what changed.
+ view.heard_frame(json!({ "reset": [engine[7].clone(), engine[9].clone(), engine[10].clone()], "historyPending": true }));
+ assert!(view.open.borrow().as_ref().unwrap().has_whole, "still waiting for what changed since");
+ assert_eq!(ids(), ["a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11"]);
+ assert!(rows().contains("changed") && rows().contains("new"), "{}", rows());
+ // Then what changed since, from the rows as they now are: a3 gone,
+ // a4 after a2.
+ let order: Vec<&str> = engine.iter().map(|e| e["id"].as_str().unwrap()).collect();
+ view.heard_frame(json!({
+ "since": true,
+ "remove": ["a3"],
+ "upsert": [{ "after": "a2", "entry": engine[3].clone() }],
+ "count": engine.len(),
+ "orderSum": super::order_sum(order.iter().copied()),
+ }));
+ assert_eq!(view.generation.get(), 0, "nothing asked for whole");
+ assert!(!view.open.borrow().as_ref().unwrap().has_whole);
+ assert_eq!(ids(), order);
+ let sums: Vec = view.open.borrow().as_ref().unwrap().entries.iter().map(|e| e.sum()).collect();
+ assert_eq!(sums, engine.iter().map(super::sum_of).collect::>(), "the engine's entries, as they are");
+ }
+
/// A prompt sent from here that a reopened chat's opening tail brings
/// shows once: the engine's copy, the one pending here let go. Shown twice
/// it was two rows with one id, and zgx's virtual list panicked
diff --git a/apps/zgx/src/cloud.rs b/apps/zgx/src/cloud.rs
index 366080383..e85feb199 100644
--- a/apps/zgx/src/cloud.rs
+++ b/apps/zgx/src/cloud.rs
@@ -13,14 +13,21 @@
//! chat runs there):
//! { state, available, device?, credits?,
//! error?, failed_action?, awake, max_awake,
-//! machines, machine? }; `machines` is empty
+//! machines, machine?, reach? }; `machines` is empty
//! from an edge that predates machine choice,
//! each { id, name, vcpu, memory_gb, disk_gb,
//! rate } (`rate`: credits relative to standard)
//! cloud.set_machine({ machine }) the size new chats start on; the status
+//! cloud.set_reach({ reach }) what new Cloud chats reach (`devices`: the
+//! person's other devices; `isolated`: only
+//! their own machine): the status
+//! cloud.set_session_reach({ chat, reach })
+//! what one Cloud chat reaches: its session.
+//! Only ever the person's: the engine takes
+//! it from this app alone.
//! cloud.sessions the Cloud sessions, each { chat, device, state,
//! space, repo?, error?, failed_action?,
-//! machine?, stage?, disk?, wake_blocked?,
+//! machine?, reach?, stage?, disk?, wake_blocked?,
//! expires?, restored? }; disk: { used, capacity,
//! level }; wake_blocked: { reason, needed };
//! expires (and restored: when its machine last
@@ -104,6 +111,24 @@ pub fn install(_cx: &mut WindowContext, host: &ScriptHost) {
Ok(status_value(&status))
}
});
+ host.async_action("cloud.set_reach", |args| {
+ let reach = args.field("reach").map(text).filter(|r| is_reach(r));
+ async move {
+ crate::plugins::preview::refuse("cloud.set_reach")?;
+ let status = call("CloudSetReach", json!({ "reach": reach.ok_or("invalid")? })).await?;
+ Ok(status_value(&status))
+ }
+ });
+ host.async_action("cloud.set_session_reach", |args| {
+ let chat = args.field("chat").map(text).filter(|c| !c.is_empty());
+ let reach = args.field("reach").map(text).filter(|r| is_reach(r));
+ async move {
+ crate::plugins::preview::refuse("cloud.set_session_reach")?;
+ let params = json!({ "chatId": chat.ok_or("invalid")?, "reach": reach.ok_or("invalid")? });
+ let session = call("CloudSessionSetReach", params).await?;
+ Ok(session_value(&session))
+ }
+ });
host.async_action("cloud.usage", |args| {
let day = |key: &str| args.field(key).map(text).filter(|d| is_day(d));
let range = day("from").zip(day("to"));
@@ -247,9 +272,15 @@ fn status_value(s: &Json) -> Value {
("max_awake", num(&s["maxAwakeSessions"])),
("machines", machines_value(&s["machines"])),
("machine", str_or_nil(&s["machine"])),
+ ("reach", str_or_nil(&s["reach"])),
])
}
+/// What a Cloud chat may reach (crates/proto `CloudReach`).
+fn is_reach(reach: &str) -> bool {
+ matches!(reach, "devices" | "isolated")
+}
+
fn machines_value(list: &Json) -> Value {
let machines: Vec = list
.as_array()
@@ -300,6 +331,7 @@ fn session_value(s: &Json) -> Value {
("error", str_or_nil(&s["error"])),
("failed_action", str_or_nil(&s["failedAction"])),
("machine", str_or_nil(&s["machine"])),
+ ("reach", str_or_nil(&s["reach"])),
("stage", str_or_nil(&s["stage"])),
("disk", disk),
("wake_blocked", blocked),
@@ -453,20 +485,22 @@ mod tests {
#[test]
fn machines_and_a_session_read_as_the_scripts_expect() {
- let status = json!({ "state": "ready", "available": true, "deviceId": "cloud-1", "machine": "large",
+ let status = json!({ "state": "ready", "available": true, "deviceId": "cloud-1", "machine": "large", "reach": "isolated",
"machines": [{ "id": "xlarge", "name": "Extra large", "vcpu": 8, "memoryGB": 32, "diskGiB": 400, "creditMultiplier": 5.56 }] });
let out: Json = serde_json::from_str(&status_value(&status).to_json()).unwrap();
assert_eq!(out["machine"], "large");
+ assert_eq!(out["reach"], "isolated");
assert_eq!(out["machines"][0]["disk_gb"], 400.0);
assert_eq!(out["machines"][0]["memory_gb"], 32.0);
assert_eq!(out["machines"][0]["rate"], 5.56);
- let session = json!({ "chatId": "c1", "deviceId": "cloud-s1", "state": "sleeping", "repo": "acme/atlas", "machine": "default",
+ let session = json!({ "chatId": "c1", "deviceId": "cloud-s1", "state": "sleeping", "repo": "acme/atlas", "machine": "default", "reach": "devices",
"disk": { "usedGiB": 41.5, "capacityGiB": 50, "level": "warn" },
"wakeBlocked": { "reason": "disk_too_small", "neededGiB": 150 },
"expiresAt": 1_800_000_000_000_i64, "storeRecoveredAt": 1_799_000_000_000_i64 });
let out: Json = serde_json::from_str(&session_value(&session).to_json()).unwrap();
assert_eq!(out["chat"], "c1");
+ assert_eq!(out["reach"], "devices");
assert_eq!(out["disk"]["used"], 41.5);
assert_eq!(out["disk"]["level"], "warn");
assert_eq!(out["wake_blocked"]["needed"], 150.0);
@@ -479,12 +513,22 @@ mod tests {
let out: Json = serde_json::from_str(&status_value(&json!({ "state": "ready", "available": true })).to_json()).unwrap();
assert_eq!(out["machines"].as_array().map(Vec::len), Some(0));
assert!(out["machine"].is_null());
+ assert!(out["reach"].is_null());
let out: Json = serde_json::from_str(&session_value(&json!({ "chatId": "c", "deviceId": "d", "state": "ready" })).to_json()).unwrap();
assert!(out["disk"].is_null());
assert!(out["wake_blocked"].is_null());
assert!(out["expires"].is_null());
assert!(out["restored"].is_null());
assert!(out["machine"].is_null());
+ assert!(out["reach"].is_null());
+ }
+
+ #[test]
+ fn only_the_two_reaches_are_asked_for() {
+ assert!(is_reach("devices"));
+ assert!(is_reach("isolated"));
+ assert!(!is_reach("everything"));
+ assert!(!is_reach(""));
}
#[test]
diff --git a/apps/zgx/src/engine/manager.rs b/apps/zgx/src/engine/manager.rs
index 9180c2487..47dc0b4f5 100644
--- a/apps/zgx/src/engine/manager.rs
+++ b/apps/zgx/src/engine/manager.rs
@@ -81,6 +81,7 @@ const BETA: bool = cfg!(feature = "beta");
/// The soonest a second engine is started after the first.
const SPAWN_SPACING: Duration = Duration::from_secs(10);
+#[derive(Clone)]
pub struct Config {
pub port: u16,
pub data_dir: PathBuf,
@@ -278,6 +279,13 @@ impl Spawner {
self.said_held
}
+ /// Whether an engine this app started is likely still coming up: started
+ /// less than [`SPAWN_SPACING`] ago, so it's dialled again soon rather
+ /// than less and less often.
+ pub fn starting(&self) -> bool {
+ self.last.is_some_and(|at| at.elapsed() < SPAWN_SPACING)
+ }
+
/// Nothing answers on the port: start an engine, if this app may and
/// it's been long enough since the last. Whether one was started. An
/// engine that holds the data dir without serving yet is on its way in or
@@ -311,17 +319,24 @@ impl Spawner {
}
self.said_held = false;
self.last = Some(Instant::now());
- let started = if config.managed { launch(config) } else { spawn(config, bin) };
- match started {
- Ok(()) => {
- eprintln!("zeron-zgx: engine: started {} ({})", bin.display(), config.describe());
- true
- }
- Err(error) => {
- eprintln!("zeron-zgx: engine: {} didn't start: {error}", bin.display());
- false
+ // Started on a thread of its own: creating the process waits for the
+ // system to map (and Windows' antivirus to scan) the engine's
+ // executable, a few hundred milliseconds the first time a new
+ // version runs, which the window's first frame shouldn't wait for.
+ let (config, bin) = (config.clone(), bin.clone());
+ let started = std::thread::Builder::new().name("engine-start".into()).spawn(move || {
+ let started = if config.managed { launch(&config) } else { spawn(&config, &bin) };
+ match started {
+ Ok(()) => eprintln!("zeron-zgx: engine: started {} ({})", bin.display(), config.describe()),
+ Err(error) => eprintln!("zeron-zgx: engine: {} didn't start: {error}", bin.display()),
}
+ });
+ if let Err(error) = started {
+ eprintln!("zeron-zgx: engine: couldn't start a thread to start it: {error}");
+ self.last = None;
+ return false;
}
+ true
}
}
@@ -402,9 +417,15 @@ fn spawn(config: &Config, bin: &Path) -> std::io::Result<()> {
/// Whether the engine has to start again to follow its session: signed in
/// (or choosing an organization) while its workspace is still the local
-/// one it opened signed out.
-pub fn needs_restart(scope: Option<&str>, signed_in: bool) -> bool {
- signed_in && scope == Some("local")
+/// one it opened signed out, unless this device keeps its chats local; or
+/// synced while it now keeps them local.
+pub fn needs_restart(scope: Option<&str>, signed_in: bool, keep_local: bool) -> bool {
+ signed_in
+ && match scope {
+ Some("local") => !keep_local,
+ Some("synced") => keep_local,
+ _ => false,
+ }
}
#[cfg(test)]
@@ -426,11 +447,23 @@ mod tests {
#[test]
fn a_signed_in_session_on_a_local_workspace_restarts() {
- assert!(needs_restart(Some("local"), true));
- assert!(!needs_restart(Some("local"), false));
- assert!(!needs_restart(Some("synced"), true));
- assert!(!needs_restart(Some("development"), true));
- assert!(!needs_restart(None, true));
+ assert!(needs_restart(Some("local"), true, false));
+ assert!(!needs_restart(Some("local"), false, false));
+ assert!(!needs_restart(Some("synced"), true, false));
+ assert!(!needs_restart(Some("development"), true, false));
+ assert!(!needs_restart(None, true, false));
+ }
+
+ #[test]
+ fn keeping_chats_local_holds_a_signed_in_engine_local() {
+ // Signed in and kept local: the local workspace stays.
+ assert!(!needs_restart(Some("local"), true, true));
+ // Kept local after it synced: back to the local workspace.
+ assert!(needs_restart(Some("synced"), true, true));
+ // Signed out, it changes nothing.
+ assert!(!needs_restart(Some("local"), false, true));
+ assert!(!needs_restart(Some("development"), true, true));
+ assert!(!needs_restart(None, true, true));
}
/// A development build never touches the production engine: its port,
@@ -519,6 +552,34 @@ mod tests {
assert!(spawner.start_if_due(&config), "let go: started at once");
}
+ /// A start returns at once (the process is made on a thread of its own),
+ /// and the engine it started counts as coming up until a second could
+ /// be started: one start, not two, however soon it's asked again.
+ #[test]
+ fn a_start_returns_at_once_and_is_coming_up_until_the_next_is_due() {
+ let dir = tempfile::tempdir().unwrap();
+ let config = Config {
+ port: 1,
+ data_dir: dir.path().join("data"),
+ bin: Some(dir.path().join("no-such-engine")),
+ home: None,
+ spawn: true,
+ edge: String::new(),
+ client: String::new(),
+ callback_port: 0,
+ managed: false,
+ };
+ let mut spawner = Spawner::new();
+ assert!(!spawner.starting());
+ let asked = Instant::now();
+ assert!(spawner.start_if_due(&config));
+ assert!(asked.elapsed() < Duration::from_secs(1), "not waiting for the process");
+ assert!(spawner.starting());
+ assert!(!spawner.start_if_due(&config), "one start per SPAWN_SPACING");
+ let never = Config { spawn: false, ..config };
+ assert!(!Spawner::new().start_if_due(&never));
+ }
+
#[test]
fn home_relative_paths_expand() {
let home = Path::new("/Users/someone");
diff --git a/apps/zgx/src/engine/mod.rs b/apps/zgx/src/engine/mod.rs
index d4f8e76e3..0fbaae88d 100644
--- a/apps/zgx/src/engine/mod.rs
+++ b/apps/zgx/src/engine/mod.rs
@@ -96,6 +96,10 @@ pub struct Engine {
/// the next window's when that window closes.
tasks: RefCell>,
supervising: Cell,
+ /// What starts this app's engine: ahead of the first window
+ /// ([`start_ahead`]), then whenever the supervisor finds none. One, so
+ /// the two never start an engine each.
+ spawner: RefCell,
}
thread_local! {
@@ -122,6 +126,18 @@ pub fn install(cx: &mut WindowContext) {
}
}
+/// Starts the engine now if none is running (none holds its data dir), as
+/// the launch begins, rather than once the first window is up and its
+/// supervisor finds none: the engine starts up beside the window's.
+pub fn start_ahead() {
+ let engine = get();
+ if let Ok(config) = &engine.config
+ && !zeron_launch::data_dir_held(&config.data_dir)
+ {
+ engine.spawner.borrow_mut().start_if_due(config);
+ }
+}
+
/// Clears `supervising` however the supervisor ends (its window closing
/// drops it), so the next window starts it again.
struct Supervising(Rc);
@@ -154,9 +170,15 @@ impl Engine {
unreachable_listeners: RefCell::default(),
tasks: RefCell::default(),
supervising: Cell::new(false),
+ spawner: RefCell::new(Spawner::new()),
}
}
+ /// Whether this app started an engine that is likely still coming up.
+ pub fn started_engine(&self) -> bool {
+ self.spawner.borrow().starting()
+ }
+
/// Where the engine's IPC is (its port and data folder, which holds its
/// token): for a helper process of this app's own that talks to it
/// directly (src/terminal.rs's bridge).
@@ -283,16 +305,36 @@ impl Engine {
self.follow_session();
}
+ /// Whether this device keeps its chats local while signed in.
+ pub fn keeps_chats_local(&self) -> bool {
+ self.data_dir().is_some_and(|dir| zeron_proto::keeps_chats_local(&dir))
+ }
+
+ /// Keep this device's chats local while signed in, or sync them again:
+ /// saved for the engine's next start, and the engine started again now
+ /// if its workspace no longer follows (see [`manager::needs_restart`]).
+ pub fn keep_chats_local(&self, on: bool) -> Result<(), String> {
+ let dir = self.data_dir().ok_or("offline")?;
+ zeron_proto::set_keep_chats_local(&dir, on).map_err(|error| error.to_string())?;
+ self.follow_session();
+ Ok(())
+ }
+
fn follow_session(&self) {
let scope = self.scope.borrow().clone();
- if self.restarting.get() || !manager::needs_restart(scope.as_deref(), self.signed_in.get()) {
+ let keep_local = self.keeps_chats_local();
+ if self.restarting.get() || !manager::needs_restart(scope.as_deref(), self.signed_in.get(), keep_local) {
return;
}
let Some(rpc) = self.rpc.borrow().clone() else {
return;
};
self.restarting.set(true);
- eprintln!("zeron-zgx: engine: signed in on a local workspace; starting it again to sync");
+ if keep_local {
+ eprintln!("zeron-zgx: engine: chats kept on this device; starting it again on the local workspace");
+ } else {
+ eprintln!("zeron-zgx: engine: signed in on a local workspace; starting it again to sync");
+ }
self.spawn(async move {
// It answers, then stops; the connection ends and a new engine
// is started in its place.
@@ -309,7 +351,6 @@ impl Engine {
let Ok(config) = &self.config else {
return;
};
- let mut spawner = Spawner::new();
let mut delay = Duration::from_millis(250);
let mut said = None::;
let mut said_unreachable = false;
@@ -322,6 +363,12 @@ impl Engine {
// which that engine replaced as it started again).
let stale = refused.as_ref() == Some(&token);
let mut refused_now = false;
+ // No engine holds the data dir (a launch after a restart of the
+ // computer, or after the engine stopped): none is running, so
+ // one is started before dialling, not once a dial is refused.
+ if !zeron_launch::data_dir_held(&config.data_dir) {
+ self.spawner.borrow_mut().start_if_due(config);
+ }
match rpc::connect(config.port, token.clone()).await {
Ok(rpc) => {
delay = Duration::from_millis(250);
@@ -353,10 +400,12 @@ impl Engine {
}
Err(DialError::Refused) => {
refused = None;
- // (Started one, or an engine is about to let go of the
- // data dir: it's a moment away, not worth backing off.)
- if spawner.start_if_due(config) || spawner.held() {
- delay = Duration::from_millis(500);
+ // (Started one, one this app started is still coming up,
+ // or an engine is about to let go of the data dir: it's a
+ // moment away, not worth backing off.)
+ let mut spawner = self.spawner.borrow_mut();
+ if spawner.start_if_due(config) || spawner.held() || spawner.starting() {
+ delay = Duration::from_millis(100);
}
}
// A new engine is writing its token: try again shortly. The
diff --git a/apps/zgx/src/engine/rpc.rs b/apps/zgx/src/engine/rpc.rs
index da3017c11..a76c9b39a 100644
--- a/apps/zgx/src/engine/rpc.rs
+++ b/apps/zgx/src/engine/rpc.rs
@@ -53,6 +53,39 @@ pub fn read_token(data_dir: &Path) -> Option {
(!token.is_empty()).then(|| token.to_string())
}
+/// One answer of `method` from the engine on `port`, read here and now, on
+/// this thread: a call's reply, or a stream's first item. `None` when
+/// nothing answers, it refuses the token, says an error, or not within
+/// `within` all told. For a launch reading what an engine that's already
+/// running has (`plugins::preload`) before its window is built; everything
+/// else goes through the connection ([`connect`]).
+pub fn ask_now(port: u16, data_dir: &Path, method: &str, params: Value, within: Duration) -> Option {
+ let until = std::time::Instant::now() + within;
+ let token = read_token(data_dir);
+ let mut socket = dial_within(port, token.as_deref(), within).ok()?;
+ let request = json!({ "id": 1, "method": method, "params": params }).to_string();
+ socket.send(tungstenite::Message::text(request)).ok()?;
+ let answer = loop {
+ let left = until.checked_duration_since(std::time::Instant::now())?;
+ let _ = socket.get_mut().set_read_timeout(Some(left.max(Duration::from_millis(1))));
+ let tungstenite::Message::Text(text) = socket.read().ok()? else { continue };
+ let Ok(mut frame) = serde_json::from_str::(&text) else { continue };
+ if frame.get("id").and_then(Value::as_u64) != Some(1) {
+ continue;
+ }
+ if frame.get("err").is_some() || frame.get("done").is_some() {
+ break None;
+ }
+ if let Some(item) = frame.get_mut("item") {
+ break Some(item.take());
+ }
+ break frame.get_mut("ok").map(Value::take);
+ };
+ let _ = socket.close(None);
+ let _ = socket.flush();
+ answer
+}
+
#[derive(Default)]
struct Inbox {
frames: VecDeque,
@@ -99,16 +132,26 @@ type Socket = tungstenite::WebSocket;
/// The handshake, blocking (on the network thread).
fn dial(port: u16, token: Option<&str>) -> Result {
+ dial_within(port, token, DIAL_TIMEOUT)
+}
+
+/// How long connecting to a port on this machine may take before nothing is
+/// taken to listen there. The system completes a listening socket's
+/// handshake itself, however busy the engine is, so an engine that listens
+/// connects in a millisecond or two. Windows doesn't say a port nobody
+/// listens on refused at once: it tries the connection again for 2 s first,
+/// which every launch with no engine running waited out, in full, before
+/// the engine was even started.
+const LOOPBACK_CONNECT: Duration = Duration::from_millis(250);
+
+fn dial_within(port: u16, token: Option<&str>, within: Duration) -> Result {
use tungstenite::client::IntoClientRequest;
let address = SocketAddr::from(([127, 0, 0, 1], port));
- let stream = TcpStream::connect_timeout(&address, DIAL_TIMEOUT).map_err(|error| {
- if error.kind() == std::io::ErrorKind::ConnectionRefused {
- DialError::Refused
- } else {
- DialError::Other(error.to_string())
- }
+ let stream = TcpStream::connect_timeout(&address, within.min(LOOPBACK_CONNECT)).map_err(|error| match error.kind() {
+ std::io::ErrorKind::ConnectionRefused | std::io::ErrorKind::TimedOut => DialError::Refused,
+ _ => DialError::Other(error.to_string()),
})?;
- let _ = stream.set_read_timeout(Some(DIAL_TIMEOUT));
+ let _ = stream.set_read_timeout(Some(within));
let _ = stream.set_nodelay(true);
let mut request = format!("ws://127.0.0.1:{port}")
.into_client_request()
@@ -136,6 +179,50 @@ fn dial(port: u16, token: Option<&str>) -> Result {
}
}
+/// One call answered on a connection of its own, blocking (at most
+/// `timeout` waiting for the answer): for the app's last words to its
+/// engine as it quits, once its own connection and tasks are gone.
+pub fn call_blocking(
+ port: u16,
+ data_dir: &Path,
+ method: &str,
+ params: Value,
+ timeout: std::time::Duration,
+) -> Result {
+ let token = read_token(data_dir);
+ let mut socket = dial(port, token.as_deref()).map_err(|error| match error {
+ DialError::Refused => "offline".to_string(),
+ DialError::Unauthorized => "unauthorized".to_string(),
+ DialError::Other(error) => error,
+ })?;
+ let _ = socket.get_mut().set_read_timeout(Some(timeout));
+ let frame = serde_json::json!({ "id": 1, "method": method, "params": params });
+ socket
+ .send(tungstenite::Message::text(frame.to_string()))
+ .map_err(|error| error.to_string())?;
+ loop {
+ match socket.read().map_err(|error| error.to_string())? {
+ tungstenite::Message::Text(text) => {
+ for line in text.lines() {
+ let Ok(frame) = serde_json::from_str::(line) else {
+ continue;
+ };
+ if frame["id"] != 1 {
+ continue;
+ }
+ if let Some(error) = frame["err"].as_str() {
+ return Err(error.to_string());
+ }
+ let _ = socket.close(None);
+ return Ok(frame["ok"].clone());
+ }
+ }
+ tungstenite::Message::Close(_) => return Err("closed".into()),
+ _ => {}
+ }
+ }
+}
+
/// Whether a socket call only found nothing to do yet: no frame to read, or
/// no room to write (the frame waits in tungstenite's buffer).
pub(crate) fn would_block(error: &tungstenite::Error) -> bool {
@@ -643,6 +730,54 @@ impl Drop for Watch {
mod tests {
use super::*;
+ /// An engine on a port of its own that answers each request with
+ /// `answer` (or, `None`, never answers), and a data dir holding a token.
+ fn engine_answering(answer: Option) -> (u16, std::path::PathBuf) {
+ let listener = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
+ let port = listener.local_addr().unwrap().port();
+ let dir = std::env::temp_dir().join(format!("zgx-ask-now-{port}-{}", std::process::id()));
+ std::fs::create_dir_all(&dir).unwrap();
+ std::fs::write(dir.join("ipc-token"), "token").unwrap();
+ std::thread::spawn(move || {
+ let (stream, _) = listener.accept().unwrap();
+ let mut socket = tungstenite::accept(stream).unwrap();
+ let Ok(tungstenite::Message::Text(text)) = socket.read() else { return };
+ let request: Value = serde_json::from_str(&text).unwrap();
+ assert_eq!(request["method"], "WatchPlugins");
+ match answer {
+ Some(item) => {
+ // (Another stream's frame first: only this request's counts.)
+ let other = json!({ "id": 7, "item": "not this one" }).to_string();
+ socket.send(tungstenite::Message::text(other)).unwrap();
+ let frame = json!({ "id": request["id"], "item": item }).to_string();
+ socket.send(tungstenite::Message::text(frame)).unwrap();
+ let _ = socket.read();
+ }
+ None => std::thread::sleep(Duration::from_secs(2)),
+ }
+ });
+ (port, dir)
+ }
+
+ /// A launch reads what an engine already running says, at once; nothing
+ /// running, or none answering in time, is no answer, and no wait past it.
+ #[test]
+ fn asking_now_takes_the_first_answer_or_none_in_time() {
+ let (port, dir) = engine_answering(Some(json!({ "plugins": [{ "id": "git" }] })));
+ let list = ask_now(port, &dir, "WatchPlugins", json!({}), Duration::from_secs(2)).unwrap();
+ assert_eq!(list["plugins"][0]["id"], "git");
+
+ let free = std::net::TcpListener::bind("127.0.0.1:0").unwrap().local_addr().unwrap().port();
+ let started = std::time::Instant::now();
+ assert!(ask_now(free, &dir, "WatchPlugins", json!({}), Duration::from_secs(2)).is_none());
+ assert!(started.elapsed() < Duration::from_secs(1), "refused at once");
+
+ let (port, dir) = engine_answering(None);
+ let started = std::time::Instant::now();
+ assert!(ask_now(port, &dir, "WatchPlugins", json!({}), Duration::from_millis(150)).is_none());
+ assert!(started.elapsed() < Duration::from_millis(600), "waited {:?}", started.elapsed());
+ }
+
/// A connection with no socket: frames handed to it as the network
/// thread would.
fn loopback() -> (Rpc, Frames, OwnedFd) {
diff --git a/apps/zgx/src/links.rs b/apps/zgx/src/links.rs
index 8d647e251..a2486dcce 100644
--- a/apps/zgx/src/links.rs
+++ b/apps/zgx/src/links.rs
@@ -71,6 +71,41 @@ pub fn open(url: &str) {
});
}
+/// Banner clicks, taken in this process. The engine posts Zeron's banners,
+/// but macOS hands a click to the app its bundle names (Zeron.app's
+/// interface, this process), never to the engine that posted it, so the
+/// engine's own route (`open -a … zeron://notification/…`) never runs. As
+/// Zeron.app's interface always has (crates/ui `notify::on_click`), the
+/// click is answered here: Zeron comes forward, on the banner's chat.
+pub fn take_banner_clicks() {
+ zeron_notify::on_click(|target| {
+ activate();
+ clicked(&target);
+ });
+}
+
+/// A clicked banner's target (a chat, or agent updates), opened as its
+/// `zeron://notification/` link is.
+fn clicked(target: &str) {
+ open(&zeron_notify::link(target));
+}
+
+/// This app to the front: a banner was clicked. (Main thread: the click
+/// comes through the AppKit delegate.)
+#[cfg(target_os = "macos")]
+fn activate() {
+ use objc::{class, msg_send, sel, sel_impl};
+ unsafe {
+ let app: *mut objc::runtime::Object = msg_send![class!(NSApplication), sharedApplication];
+ if !app.is_null() {
+ let _: () = msg_send![app, activateIgnoringOtherApps: true];
+ }
+ }
+}
+
+#[cfg(not(target_os = "macos"))]
+fn activate() {}
+
fn tell(target: Target) {
let seq = SEQ.with(|s| {
s.set(s.get() + 1);
@@ -94,6 +129,28 @@ fn tell(target: Target) {
mod tests {
use super::*;
+ fn last() -> (Option, Option) {
+ LAST.with(|l| {
+ let l = l.borrow();
+ let text = |k: &str| match l.field(k) {
+ Some(Value::Str(s)) => Some(s.to_string()),
+ Some(Value::Text(s)) => Some(s.to_string()),
+ _ => None,
+ };
+ (text("chat"), text("settings"))
+ })
+ }
+
+ /// A banner clicked in this process (macOS hands the click to the app,
+ /// not the engine that posted it) opens its chat as its link would.
+ #[test]
+ fn a_clicked_banner_opens_its_chat() {
+ clicked("chat-42");
+ assert_eq!(last(), (Some("chat-42".into()), None));
+ clicked(zeron_notify::AGENT_UPDATES_TARGET);
+ assert_eq!(last(), (None, Some("providers".into())));
+ }
+
#[test]
fn banners_and_chat_links_open_where_zeron_s_do() {
assert_eq!(parse(&zeron_notify::link("chat-1")), Some((Target::Chat("chat-1".into()), None)));
diff --git a/apps/zgx/src/long_thread_tests.rs b/apps/zgx/src/long_thread_tests.rs
new file mode 100644
index 000000000..78209973b
--- /dev/null
+++ b/apps/zgx/src/long_thread_tests.rs
@@ -0,0 +1,166 @@
+//! A long thread, as ademark's A11 makes it: one reply of a thousand steps,
+//! each a short text (one in five with a code block) and a call reading a
+//! file, about 2,000 blocks, its last text holding `LONGTHREAD-END` (the
+//! engine's mock `/longthread`). Its rows built by src/chat.rs from the
+//! engine's entry, as the app builds them.
+//!
+//! Opening it costs what its end costs: a reply's blocks are windowed in runs
+//! (ds/transcript's `blocks_of`), so the scripts a thousand steps call and
+//! the nodes they make are about a hundred steps'. (Nov 13: 0.3.4 built all
+//! 2,000 blocks' rows on every open, 44,000 script runs in one frame, about
+//! 380 ms on an M1 where 0.2 took 96 ms.) Scrolled up, it passes through
+//! every step to its first.
+
+use std::path::PathBuf;
+
+use serde_json::{Value as Json, json};
+use zgx_script::{ScriptHost, Value, testing::TestApp};
+
+use crate::transcript_scroll_tests::{moved, shown};
+
+fn ui() -> PathBuf {
+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("ui")
+}
+
+/// What holds a long reply's blocks while its rows show (src/chat.rs
+/// `set_aside`).
+type Held = Vec>;
+
+/// The thread as the engine holds it (`/longthread `), built into its
+/// rows as a chat's view builds them, and what holds what they set aside.
+fn long_thread(steps: usize) -> (Value, Held) {
+ let mut parts: Vec = Vec::with_capacity(steps * 2 + 1);
+ for n in 1..=steps {
+ let mut text = format!("Step {n} of {steps}. I read src/invoices.ts and noted what step {n} needs from it.");
+ if n % 5 == 0 {
+ text.push_str("\n\n```ts\nfunction summarize(invoice: Invoice): InvoiceSummary {\n const total = invoiceTotal(invoice);\n return { id: invoice.id, totalCents: total };\n}\n```");
+ }
+ parts.push(json!({ "id": format!("t{}", 2 * (n - 1)), "kind": "text", "text": text }));
+ parts.push(json!({
+ "id": format!("toolu_long_{n:04}"),
+ "kind": "tool",
+ "call": { "kind": "readFile", "path": "/private/tmp/ademark-recording/arena/src/invoices.ts" },
+ "isError": false,
+ "resolved": true,
+ }));
+ }
+ parts.push(json!({ "id": format!("t{}", 2 * steps), "kind": "text", "text": "All steps done. LONGTHREAD-END" }));
+ let at = 1_794_000_000_000_i64;
+ let prompt = json!({ "id": "lt-u", "role": "user", "parts": [{ "id": "lt-up", "kind": "text", "text": format!("/longthread {steps}") }], "createdAt": at });
+ let reply = json!({ "id": "lt-a", "role": "assistant", "status": "complete", "parts": parts, "createdAt": at + 1000, "durationMs": 28 });
+ let mut held: Held = Vec::new();
+ let rows: Vec = [prompt, reply]
+ .iter()
+ .map(|entry| {
+ let (row, aside) = crate::chat::built_as_shown(entry, Some("Opus"));
+ held.extend(aside);
+ row.unwrap()
+ })
+ .collect();
+ (Value::List(rows.into()), held)
+}
+
+/// The chat page on another chat, then the thread of `steps` opened in it:
+/// the app, the script calls its opening took (until it rests), the nodes
+/// its window holds then, the values its rows handed the scripts, and what
+/// holds its reply's blocks.
+fn opened(steps: usize) -> (TestApp, u64, usize, u64, Held) {
+ let fixture = ui().join("chat_fixture.luau");
+ let mut app = TestApp::with_spare_time(move |runtime| {
+ let host = ScriptHost::new(runtime, fixture);
+ crate::chat::reply_functions(&host);
+ host
+ });
+ app.ui.scene.borrow_mut().resize(960., 700.);
+ app.frames(20);
+ assert!(app.host.run_command("go_s7"));
+ for _ in 0..30 {
+ app.spend_spare_time();
+ app.frame();
+ }
+ let messages = app.host.shared("chat.messages", Value::Nil);
+ let calls = app.calls();
+ let converted = zgx_script::values_converted();
+ let (rows, held) = long_thread(steps);
+ messages.set(rows);
+ for _ in 0..30 {
+ app.spend_spare_time();
+ app.frame();
+ }
+ assert_eq!(app.error(), None);
+ let calls = app.calls() - calls;
+ let converted = zgx_script::values_converted() - converted;
+ let nodes = app.ui.scene.borrow().len();
+ let _ = app.find("transcript");
+ (app, calls, nodes, converted, held)
+}
+
+#[test]
+fn a_long_threads_open_costs_what_its_end_costs() {
+ let (mut long, calls, nodes, converted, _held) = opened(1000);
+ let (_, short_calls, short_nodes, short_converted, _short_held) = opened(100);
+ eprintln!(
+ "open: 1000 steps {calls} calls, {nodes} nodes, {converted} values; 100 steps {short_calls} calls, {short_nodes} nodes, {short_converted} values"
+ );
+ // What its rows hand the scripts is its end's too: its blocks are the
+ // host's, a run asked for as it's built. (Before, every one of its
+ // blocks and tools, and again laid out compact: 22,117 values for 1000
+ // steps, 4,896 for 100. Now 1,886 and 3,350.)
+ assert!(converted < short_converted * 5 / 4, "1000 steps handed the scripts {converted} values, 100 {short_converted}");
+ assert!(converted < 3_000, "1000 steps handed the scripts {converted} values as it opened");
+ // Ten times the steps, not ten times the nodes: a held run is a box.
+ // (Before the window, all their blocks built: 1000 steps held 18,340
+ // nodes and took 43,091 calls; 100, 2,148 and 4,383. Now 782 and 962;
+ // 985 and 1,583.)
+ assert!(nodes < short_nodes * 5 / 4, "1000 steps held {nodes} nodes once open, 100 held {short_nodes}");
+ // Budgets of its own, about twice what it takes now.
+ assert!(nodes < 2_000, "1000 steps held {nodes} nodes once open");
+ assert!(calls < 2_500, "1000 steps took {calls} script calls to open");
+ // Its end shows, opened there.
+ let end = shown(&mut long);
+ assert!(end.iter().any(|(words, _)| words == "All steps done. LONGTHREAD-END"), "the end shows: {end:?}");
+}
+
+/// Up from its end a trackpad's step a refresh, what shows moves by the step
+/// each time (runs built as they come near, held ones above measured without
+/// moving the view), through to its first step; and back to its end.
+#[test]
+fn a_long_thread_scrolled_up_passes_through_every_step_to_its_first() {
+ let steps = 300;
+ let (mut app, _, _, _, _held) = opened(steps);
+ let list = app.find("transcript").expect("the transcript");
+ let step = 60.;
+ let mut skips = Vec::new();
+ let mut first = false;
+ for i in 0..2000 {
+ let before = shown(&mut app);
+ if before.iter().any(|(words, _)| words.starts_with(&format!("Step 1 of {steps}."))) {
+ first = true;
+ break;
+ }
+ zgx_script::driver::wheel(&mut app.ui, list, 0., -step, None);
+ app.spend_spare_time();
+ app.frame();
+ let after = shown(&mut app);
+ let (d, n) = moved(&before, &after);
+ if d.is_none_or(|d| (d - step).abs() > 1.) {
+ skips.push(format!("step {i}: moved {d:?} ({n} texts in both)"));
+ }
+ }
+ assert_eq!(app.error(), None);
+ assert!(skips.is_empty(), "each step of {step} moved the view by {step}:\n{}", skips.join("\n"));
+ assert!(first, "its first step came into view");
+ // And from its very top, Jump to latest takes it back to its end.
+ for _ in 0..30 {
+ app.spend_spare_time();
+ app.frame();
+ }
+ app.click("role:button \"Jump to latest\"");
+ for _ in 0..90 {
+ app.spend_spare_time();
+ app.frame();
+ }
+ let end = shown(&mut app);
+ assert!(end.iter().any(|(words, _)| words == "All steps done. LONGTHREAD-END"), "back at its end: {end:?}");
+ assert_eq!(app.error(), None);
+}
diff --git a/apps/zgx/src/main.rs b/apps/zgx/src/main.rs
index 11a592697..c1c6fca0e 100644
--- a/apps/zgx/src/main.rs
+++ b/apps/zgx/src/main.rs
@@ -60,6 +60,7 @@ mod mermaid;
mod plugins;
mod previews;
mod projects;
+mod quit_prompt;
mod relaunch;
mod session_home;
mod sessions;
@@ -121,6 +122,8 @@ mod drop_tests;
mod picker_settle_tests;
#[cfg(test)]
mod fit_tests;
+#[cfg(test)]
+mod access_mode_tests;
// (Unix only: it reads thread CPU time through libc.)
#[cfg(all(test, unix))]
mod slide_bench_tests;
@@ -134,6 +137,8 @@ mod transcript_scroll_tests;
#[cfg(test)]
mod transcript_paint_tests;
#[cfg(test)]
+mod long_thread_tests;
+#[cfg(test)]
mod editor_scroll_tests;
#[cfg(test)]
mod i18n_tests;
@@ -244,7 +249,7 @@ fn main() -> Result<(), Box> {
// may not have brought: bring it in first (src/windows_install.rs).
#[cfg(all(windows, feature = "beta"))]
{
- windows_install::complete_if_needed(&argv);
+ windows_install::complete_if_needed(&argv)?;
if let Some(dir) = std::env::current_exe().ok().as_deref().and_then(zeron_update::windows::install_directory) {
zeron_launch::set_full_app_engine(
zeron_update::windows::version_files(&dir, about::APP_VERSION).join("engine").join("zeron.exe"),
@@ -254,12 +259,8 @@ fn main() -> Result<(), Box> {
if cfg!(feature = "beta") || !dev_launch(&argv[1..]) {
match zeron_cli::run(about::APP_VERSION, zeron_cli::Engines::Helper) {
zeron_cli::Launch::Done(result) => {
- // (As a `main` returning it would: the error, exit status 1.)
- if let Err(error) = result {
- eprintln!("Error: {error:?}");
- std::process::exit(1);
- }
- return Ok(());
+ // (Its error is `main`'s: "Error: …", exit status 1.)
+ return result.map_err(Into::into);
}
zeron_cli::Launch::Window { open_url: url, safe_mode } => {
open_url = url;
@@ -334,6 +335,12 @@ fn main() -> Result<(), Box> {
// requires find them compiled. (After the last `set_var` above: it
// starts a thread.)
compile_ahead(&screen);
+ // The engine, if none is running, started as the launch begins (on a
+ // thread of its own), not once the first window is up: it's ready about
+ // when the window is.
+ if matches!(screen, Screen::Intro | Screen::Onboarding | Screen::Main) {
+ engine::start_ahead();
+ }
let mut application = Application::new();
for font in fonts() {
@@ -352,6 +359,8 @@ fn main() -> Result<(), Box> {
}
});
}
+ // A clicked banner: Zeron forward on its chat (src/links.rs).
+ links::take_banner_clicks();
let options = match screen {
Screen::Intro => intro_window(),
Screen::Onboarding => onboarding_window(),
@@ -371,6 +380,12 @@ fn main() -> Result<(), Box> {
links::open(url);
}
})?;
+ // Quitting with "Keep Zeron running after you quit" off: the engine
+ // stops once its work is done, asking first about any still running
+ // (src/quit_prompt.rs). (Not for a relaunch: the app is coming back.)
+ if !relaunch::asked() {
+ quit_prompt::after_quit();
+ }
// Quitting: an update downloaded and never restarted for installs now,
// so the next launch is on it (src/about.rs).
about::install_on_quit();
@@ -548,7 +563,9 @@ fn open_main(cx: &mut WindowContext, inspect: bool) {
let state = zgx_script::app_data_dir(APP_ID).map(|dir| dir.join("script-state").join("app.luau"));
carried_settings::carry(from.as_deref(), state.as_deref());
}
- let host = script_host_at(cx, plugins::prepare_live(), "app.luau");
+ let live = plugins::prepare_live();
+ zgx::profile::mark("templates laid");
+ let host = script_host_at(cx, live, "app.luau");
host.shared("window", "main");
// Plugins and your templates (src/plugins): the main window's alone.
plugins::install(cx, &host);
@@ -696,7 +713,7 @@ fn script_host_at(cx: &mut WindowContext, path: PathBuf, entry: &str) -> ScriptH
// ds/transcript's trace (`ZERON_ZGX_TRACE_TRANSCRIPT=1`): the hover lane
// and the rows' heights as they change, a line each on stdout.
if std::env::var("ZERON_ZGX_TRACE_TRANSCRIPT").is_ok_and(|v| v == "1") {
- host.shared("debug.trace_transcript", true);
+ host.shared("trace.transcript", true);
}
// How much the desktop blurs behind the glass (`window.blur`), for the
// glass's tint (ds/material).
@@ -1097,6 +1114,12 @@ fn serve_with(
cx.on_closed(move || {
reloading.borrow_mut().take();
if let Some((host, devtools, commands, corner)) = keep.borrow_mut().take() {
+ // The scripts' last word before what they saved is written: a
+ // save still waiting on a timer (the new chat's draft,
+ // ui/screens/chat/shared.luau) goes now, as no timer fires
+ // after this. (Read at once: setting it runs what follows it.)
+ host.shared("app.closing", Value::Bool(false))
+ .set(Value::Bool(true));
host.save();
drop(devtools);
drop(commands);
diff --git a/apps/zgx/src/picker_settle_tests.rs b/apps/zgx/src/picker_settle_tests.rs
index 10794248d..3596226e0 100644
--- a/apps/zgx/src/picker_settle_tests.rs
+++ b/apps/zgx/src/picker_settle_tests.rs
@@ -32,3 +32,42 @@ fn a_device_that_doesnt_answer_leaves_the_picker_at_rest_once_settled() {
assert!(!app.clock.wants_frame(), "settled: nothing breathes, no frames asked for");
assert!(app.target("role:button \"Model\"").is_ok(), "the model chip still there");
}
+
+/// New project's pages show breathing rows while a device lists a folder:
+/// once it has, and the palette closed, nothing breathes on. (Each page left
+/// its five breathing for good, so the window asked for every frame of the
+/// display for as long as it was open: a project added through the palette
+/// kept an idle window waking ~120 times a second.)
+#[test]
+fn new_projects_loading_rows_stop_breathing_once_loaded() {
+ let path = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("ui/shell_fixture.luau");
+ let mut app = TestApp::new(|runtime| ScriptHost::new(runtime, path));
+ app.ui.scene.borrow_mut().resize(1200., 800.);
+ app.frames(30);
+ assert_eq!(app.error(), None, "the shell failed");
+ // (No chat working: its ring would breathe throughout.)
+ assert!(app.host.run_command("fixture.no_sessions"));
+ app.frames(60);
+ assert!(!app.clock.wants_frame(), "at rest before: no frames asked for");
+ assert!(app.host.run_command("fixture.slow_folders"));
+ assert!(app.host.run_command("shell.new_project"));
+ app.frames(30);
+ let option = |label: &str| format!("#palette-list >> role:option \"{label}\"");
+ // This Mac's places, then Home's folders: each page listed slowly, its
+ // loading rows breathing meanwhile.
+ for (pick, then) in [("MacBook Pro", "Home"), ("Home", "code")] {
+ app.click(&option(pick));
+ app.frames(20);
+ assert!(app.clock.wants_frame(), "loading {pick}: its rows breathe");
+ let next = option(then);
+ assert!(app.wait_until(|app| app.find(&next).is_some()), "{then} listed");
+ }
+ app.frames(60);
+ assert_eq!(app.error(), None);
+ for _ in 0..4 {
+ app.key(zgx::input::Key::Escape);
+ app.frames(30);
+ }
+ app.frames(60);
+ assert!(!app.clock.wants_frame(), "loaded and closed: nothing breathes, no frames asked for");
+}
diff --git a/apps/zgx/src/plugins/grants.rs b/apps/zgx/src/plugins/grants.rs
index 6093dfebd..2e731d6e2 100644
--- a/apps/zgx/src/plugins/grants.rs
+++ b/apps/zgx/src/plugins/grants.rs
@@ -39,6 +39,9 @@ pub const SHARED_READ: &[(&str, Option<&str>)] = &[
("zeron.project", Some("zeron.sessions")),
("zeron.device", Some("zeron.devices")),
("zeron.devices", Some("zeron.devices")),
+ // The draft in the window's composer, for a plugin allowed "draft":
+ // `{ session, text, attachments = { { kind, name } } }`, never a path.
+ ("zeron.draft", Some("zeron.draft")),
// Whether the window shows and is in front (the SDK's `zeron.window`):
// work no one would see waits for it.
("zgx.window.shown", None),
@@ -77,9 +80,9 @@ pub const ACTIONS: &[(&str, &str)] = &[
pub const NEVER_REPLACED: &[&str] = &["@app/screens/plugins", "@app/screens/shell/settings"];
/// Each plugin's own actions (`plugin..`).
-pub const OWN_ACTIONS: &[&str] = &["result", "ack", "send", "menus", "toast", "problem", "open_tab", "add_page", "github_watch", "github_call", "store_set", "setting_status", "open_url", "notify", "cost", "run", "db", "service_call", "agents", "menu_run", "compose_comment", "file", "block"];
+pub const OWN_ACTIONS: &[&str] = &["result", "ack", "send", "menus", "toast", "problem", "open_tab", "add_page", "github_watch", "github_call", "store_set", "setting_status", "open_url", "notify", "cost", "run", "db", "service_call", "agents", "menu_run", "compose_comment", "draft", "draft_of", "file", "block"];
/// Each plugin's own shared state, to read (`plugin..`).
-pub const OWN_SHARED: &[&str] = &["calls", "inbox", "records", "github", "store", "settings", "locales", "menu_items", "composed"];
+pub const OWN_SHARED: &[&str] = &["calls", "inbox", "records", "github", "store", "settings", "locales", "menu_items", "composed", "drafts"];
/// The capability naming plugin `id`'s own calls and actions.
pub fn own(id: &str) -> Capability {
@@ -252,6 +255,9 @@ pub fn capabilities(id: &str, permissions: &[String], change: &[String], replace
"pages.add" => out.push(Capability::OverrideElement(page_selector(id))),
"navigate" => out.push(named("zeron.navigate")),
"compose" => out.push(named("zeron.compose")),
+ // Reading the composer's draft (`zeron.draft`); taking it and
+ // putting it back are its own action's, checked by the host.
+ "draft" => out.push(named("zeron.draft")),
"devices" => out.push(named("zeron.devices")),
"network" => out.push(Capability::Fetch),
"clipboard" => out.push(Capability::Clipboard),
@@ -394,6 +400,15 @@ mod tests {
assert!(!got.iter().any(|c| matches!(c, Capability::Override(_))));
}
+ /// "draft" reads the composer's draft; "compose" alone never does.
+ #[test]
+ fn only_draft_reads_the_draft() {
+ let draft = Capability::Named("zeron.draft".into());
+ assert_eq!(capabilities("stash", &s(&["draft"]), &[], &[]), vec![own("stash"), draft.clone()]);
+ assert!(!capabilities("x", &s(&["compose"]), &[], &[]).contains(&draft));
+ assert!(SHARED_READ.contains(&("zeron.draft", Some("zeron.draft"))));
+ }
+
#[test]
fn listed_targets_without_the_permission_give_nothing() {
let got = capabilities("x", &[], &s(&["#titlebar-actions"]), &s(&["@app/screens/chat"]));
diff --git a/apps/zgx/src/plugins/live.rs b/apps/zgx/src/plugins/live.rs
index d6197d413..b5d480c3e 100644
--- a/apps/zgx/src/plugins/live.rs
+++ b/apps/zgx/src/plugins/live.rs
@@ -97,6 +97,16 @@ pub fn plain(rel: &str) -> bool {
/// that `keep` keeps. Dot folders are skipped.
pub fn files(dir: &Path, keep: impl Fn(&str) -> bool) -> BTreeMap {
let mut out = BTreeMap::new();
+ walk(dir, keep, |rel, path, _| {
+ out.insert(rel, path);
+ });
+ out
+}
+
+/// Each regular file under `dir` that `keep` keeps, as [`files`] finds them,
+/// handed to `each` with its folder entry (which has its size and time
+/// written: on Windows without opening the file, which `fs::metadata` does).
+fn walk(dir: &Path, keep: impl Fn(&str) -> bool, mut each: impl FnMut(String, PathBuf, &std::fs::DirEntry)) {
let mut stack = vec![dir.to_path_buf()];
while let Some(at) = stack.pop() {
let Ok(entries) = std::fs::read_dir(&at) else { continue };
@@ -110,11 +120,10 @@ pub fn files(dir: &Path, keep: impl Fn(&str) -> bool) -> BTreeMap std::io::Result {
/// touching only what differs and leaving `keep`'s paths alone: how many
/// files changed.
pub fn mirror(to: &Path, want: &BTreeMap, keep: impl Fn(&str) -> bool) -> std::io::Result {
- let mut changed = 0;
- for (rel, from) in want {
+ mirror_reading(to, want, keep, |_, _| {})
+}
+
+/// [`mirror`], handing each wanted file's bytes to `read` as they're read.
+///
+/// The files are read and written on several threads: on Windows, the
+/// antivirus scans each file as it's first read and as it's written, one at
+/// a time on the thread doing it, so a thousand files laid down one by one
+/// (a first launch, Zeron's own copied twice over) took six seconds before
+/// the window could open, and a few at once take a fraction of that.
+fn mirror_reading(
+ to: &Path,
+ want: &BTreeMap,
+ keep: impl Fn(&str) -> bool,
+ read: impl Fn(&str, &[u8]) + Sync,
+) -> std::io::Result {
+ let changed = std::sync::atomic::AtomicUsize::new(0);
+ let jobs: Vec<(&String, &PathBuf)> = want.iter().collect();
+ in_parallel(&jobs, |&(rel, from)| {
let bytes = std::fs::read(from)?;
+ read(rel, &bytes);
if put(&to.join(rel), &bytes)? {
- changed += 1;
+ changed.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
}
- }
+ Ok(())
+ })?;
+ let mut changed = changed.into_inner();
for (rel, path) in files(to, |_| true) {
if !want.contains_key(&rel) && !keep(&rel) {
std::fs::remove_file(path)?;
@@ -153,6 +182,39 @@ pub fn mirror(to: &Path, want: &BTreeMap, keep: impl Fn(&str) -
Ok(changed)
}
+/// The most threads [`in_parallel`] uses: past this, laying files down
+/// went no faster on Windows (Defender's own scanning was the limit).
+const MAX_FILE_THREADS: usize = 8;
+
+/// `work` for each of `jobs`, on up to [`MAX_FILE_THREADS`] threads, each
+/// taking the next job as it finishes one: the first error, once every
+/// thread has stopped (no new job is started after an error).
+fn in_parallel(jobs: &[T], work: impl Fn(&T) -> std::io::Result<()> + Sync) -> std::io::Result<()> {
+ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
+ let threads = std::thread::available_parallelism().map_or(1, |n| n.get()).min(MAX_FILE_THREADS).min(jobs.len());
+ if threads <= 1 {
+ return jobs.iter().try_for_each(work);
+ }
+ let (next, failed, error) = (AtomicUsize::new(0), AtomicBool::new(false), std::sync::Mutex::new(None));
+ std::thread::scope(|scope| {
+ for _ in 0..threads {
+ scope.spawn(|| {
+ while !failed.load(Ordering::Relaxed) {
+ let Some(job) = jobs.get(next.fetch_add(1, Ordering::Relaxed)) else { break };
+ if let Err(e) = work(job) {
+ failed.store(true, Ordering::Relaxed);
+ error.lock().unwrap_or_else(|p| p.into_inner()).get_or_insert(e);
+ }
+ }
+ });
+ }
+ });
+ match error.into_inner().unwrap_or_else(|p| p.into_inner()) {
+ Some(e) => Err(e),
+ None => Ok(()),
+ }
+}
+
/// `.zeron`, as `ui/` has it now: the app's files, their hashes, the catalog
/// of screens (what each draws, the hooks it declares) and Zeron's manifest;
/// and the official templates beside it, as this build ships them
@@ -160,11 +222,12 @@ pub fn mirror(to: &Path, want: &BTreeMap, keep: impl Fn(&str) -
pub fn sync_zeron(ui: &Path, templates: &Path) -> std::io::Result {
let dir = templates.join(ZERON);
let want = files(ui, |rel| !not_the_app(rel));
- let changed = mirror(&dir, &want, |rel| rel == "zeron-template.json")?;
- let hashes: BTreeMap = want
- .iter()
- .filter_map(|(rel, path)| std::fs::read(path).ok().map(|b| (rel.clone(), hash(&b))))
- .collect();
+ // Each file's hash from the bytes the copy read (`ui/` read once).
+ let hashes = std::sync::Mutex::new(BTreeMap::new());
+ let changed = mirror_reading(&dir, &want, |rel| rel == "zeron-template.json", |rel, bytes| {
+ hashes.lock().unwrap_or_else(|p| p.into_inner()).insert(rel.to_string(), hash(bytes));
+ })?;
+ let hashes: BTreeMap = hashes.into_inner().unwrap_or_else(|p| p.into_inner());
let json = |v: serde_json::Value| serde_json::to_vec_pretty(&v).unwrap_or_default();
put(&dir.join(".hashes.json"), &json(serde_json::json!(hashes)))?;
put(&dir.join(".catalog.json"), &json(super::templates::catalog(ui)))?;
@@ -219,6 +282,14 @@ pub struct Overlay {
/// `failed` files (Zeron's show in their place) and the paths never templated.
/// Zeron's own alone for `BUILTIN`, or `whole_failed`. How many files changed.
pub fn compose(templates: &Path, id: &str, failed: &BTreeSet, whole_failed: bool) -> std::io::Result<(usize, Overlay)> {
+ let (want, overlay) = plan(templates, id, failed, whole_failed);
+ let changed = mirror(&templates.join(LIVE), &want, |_| false)?;
+ Ok((changed, overlay))
+}
+
+/// What `compose` lays down, each file's source by its path in `.live`, and
+/// the overlay that is: folders listed, nothing read.
+pub fn plan(templates: &Path, id: &str, failed: &BTreeSet, whole_failed: bool) -> (BTreeMap, Overlay) {
let mut want = files(&templates.join(ZERON), |rel| !template_meta(rel));
let mut from_template = BTreeSet::new();
if id != BUILTIN && !whole_failed {
@@ -240,8 +311,64 @@ pub fn compose(templates: &Path, id: &str, failed: &BTreeSet, whole_fail
want.insert(rel, path);
}
}
- let changed = mirror(&templates.join(LIVE), &want, |_| false)?;
- Ok((changed, Overlay { template: id.to_string(), from_template }))
+ (want, Overlay { template: id.to_string(), from_template })
+}
+
+/// Beside the templates: what a launch last laid `.live` down from, and
+/// `.live` as that left it (`LaunchStamp`).
+pub const LAUNCH_STAMP: &str = ".launch-stamp.json";
+
+/// What a launch lays `.live` down from, as it stands (each file's path,
+/// size and time written; nothing read): this Zeron, `ui/`, the active
+/// template, and `.live` itself. A launch that finds the one the last left
+/// needs neither `sync_zeron` nor `compose`, which read every file of
+/// Zeron's (twice) to write none: a quarter of a second of a warm launch
+/// spent before the window, more from a cold disk. Anything changed since
+/// (an update, a template edited or switched, `.live` written by anyone)
+/// stamps differently, and the launch lays everything down as before.
+#[derive(Clone, Debug, PartialEq, Eq)]
+pub struct LaunchStamp {
+ pub zeron: String,
+ pub ui: String,
+ pub id: String,
+ pub template: String,
+ pub live: String,
+}
+
+impl LaunchStamp {
+ /// `ui/` and template `id` under `templates` as they stand now.
+ pub fn now(ui: &Path, templates: &Path, id: &str) -> Self {
+ Self {
+ zeron: ZERON_VERSION.to_string(),
+ ui: ui_stamp(ui),
+ id: id.to_string(),
+ template: if id == BUILTIN { String::new() } else { template_stamp(&templates.join(id)) },
+ live: listed_stamp(&templates.join(LIVE), |_| true),
+ }
+ }
+
+ /// The one the last launch left, if any.
+ pub fn read(templates: &Path) -> Option {
+ let v = read_json(&templates.join(LAUNCH_STAMP));
+ let field = |k: &str| v[k].as_str().map(str::to_string);
+ Some(Self { zeron: field("zeron")?, ui: field("ui")?, id: field("id")?, template: field("template")?, live: field("live")? })
+ }
+
+ pub fn write(&self, templates: &Path) -> std::io::Result {
+ let v = serde_json::json!({
+ "zeron": self.zeron, "ui": self.ui, "id": self.id, "template": self.template, "live": self.live,
+ });
+ put(&templates.join(LAUNCH_STAMP), &serde_json::to_vec_pretty(&v).unwrap_or_default())
+ }
+
+ /// Whether `.live` can run as it is: laid from just this, and whole
+ /// (Zeron's copy and its hashes there, the official templates too).
+ pub fn still_laid(&self, ui: &Path, templates: &Path) -> bool {
+ Self::read(templates).as_ref() == Some(self)
+ && templates.join(LIVE).join("app.luau").is_file()
+ && templates.join(ZERON).join(".hashes.json").is_file()
+ && !super::official::missing(ui, templates)
+ }
}
/// The files of `.live` an error names, first mention first: each
@@ -303,23 +430,41 @@ pub fn blame(error: &str, templates: &Path, overlay: &Overlay) -> Option
/// last written. A save changes it, so a failure recorded against it is
/// tried again once the file is edited.
pub fn file_stamp(path: &Path) -> String {
- match std::fs::metadata(path) {
- Ok(meta) => {
- let at = meta.modified().ok().and_then(|t| t.duration_since(std::time::UNIX_EPOCH).ok()).unwrap_or_default();
- format!("{}:{}", meta.len(), at.as_nanos())
- }
- Err(_) => String::new(),
- }
+ std::fs::metadata(path).map(|meta| stamp_of(&meta)).unwrap_or_default()
+}
+
+fn stamp_of(meta: &std::fs::Metadata) -> String {
+ let at = meta.modified().ok().and_then(|t| t.duration_since(std::time::UNIX_EPOCH).ok()).unwrap_or_default();
+ format!("{}:{}", meta.len(), at.as_nanos())
}
/// Everything in `dir` that `keep` keeps, as it stands (each file's path,
/// size and time written; nothing read): a template or `ui/` edited reads
/// as new. A stat each, where reading the bytes was most of a look's time.
pub fn stamp(dir: &Path, keep: impl Fn(&str) -> bool) -> String {
+ stamped(dir, keep, |_, path| file_stamp(path))
+}
+
+/// [`stamp`], each file's size and time as its folder lists them: for the
+/// folders only Zeron's installer and this app write (`ui/`, `.live`), whose
+/// files are replaced whole. On Windows, asking each file opened and closed
+/// it (40 µs a file): an eighth of a second of every launch, for `ui/` and
+/// `.live`'s thousand files each. (NTFS can list a file edited through
+/// another of its links with its old size and time: so not for templates,
+/// which anyone edits.)
+pub fn listed_stamp(dir: &Path, keep: impl Fn(&str) -> bool) -> String {
+ stamped(dir, keep, |entry, path| entry.metadata().map(|meta| stamp_of(&meta)).unwrap_or_else(|_| file_stamp(path)))
+}
+
+fn stamped(dir: &Path, keep: impl Fn(&str) -> bool, stamp: impl Fn(&std::fs::DirEntry, &Path) -> String) -> String {
+ let mut stamps = BTreeMap::new();
+ walk(dir, keep, |rel, path, entry| {
+ stamps.insert(rel, stamp(entry, &path));
+ });
let mut h = DefaultHasher::new();
- for (rel, path) in files(dir, keep) {
+ for (rel, stamp) in stamps {
rel.hash(&mut h);
- file_stamp(&path).hash(&mut h);
+ stamp.hash(&mut h);
}
format!("{:016x}", h.finish())
}
@@ -333,7 +478,7 @@ pub fn template_stamp(dir: &Path) -> String {
/// `ui/`'s app files (and the official templates') as they stand:
/// unchanged, `.zeron` needn't be copied again.
pub fn ui_stamp(ui: &Path) -> String {
- stamp(ui, synced)
+ listed_stamp(ui, synced)
}
/// What of `ui/` a sync copies: the app's files, and the official templates'.
@@ -411,9 +556,11 @@ pub fn watched(templates: &Path, ui: &Path) -> (Vec, Vec) {
(files_, dirs)
}
-/// Whether `ui` is what a macOS app bundle shipped.
+/// Whether `ui` is what a release shipped: a macOS app bundle's, or this
+/// installed version's own folder (Windows' `beta\\ui`, which an
+/// update never changes: it installs the next version beside it).
fn in_app_bundle(ui: &Path) -> bool {
- ui.ends_with("Contents/Resources/ui")
+ ui.ends_with("Contents/Resources/ui") || crate::bundled_ui().as_deref() == Some(ui)
}
/// `root` and every folder under it that `keep` keeps (by its path from
@@ -643,6 +790,82 @@ mod tests {
let _ = std::fs::remove_dir_all(&templates);
}
+ /// A mirror laid down on several threads is the one laid down one file
+ /// at a time: every file's bytes, what changed counted once, the ones it
+ /// doesn't want removed, and laying it again changes (or rewrites)
+ /// nothing.
+ #[test]
+ fn a_mirror_on_several_threads_lays_every_file_once() {
+ let root = dir("mirror-threads");
+ let (from, to) = (root.join("from"), root.join("to"));
+ for i in 0..300 {
+ write(&from, &format!("screens/s{}/f{i}.luau", i % 7), &format!("-- file {i}"));
+ }
+ write(&to, "screens/stale.luau", "-- not wanted");
+ write(&to, "screens/s0/f0.luau", "-- file 0");
+ let want = files(&from, |_| true);
+ assert_eq!(mirror(&to, &want, |_| false).unwrap(), 299 + 1, "every new file and the stale one, not the one already there");
+ for (rel, path) in &want {
+ assert_eq!(read(&to, rel), std::fs::read_to_string(path).unwrap(), "{rel}");
+ }
+ assert!(!to.join("screens/stale.luau").exists());
+ let at = mtime(&to.join("screens/s3/f10.luau"));
+ assert_eq!(mirror(&to, &want, |_| false).unwrap(), 0);
+ assert_eq!(mtime(&to.join("screens/s3/f10.luau")), at, "nothing rewritten");
+ let _ = std::fs::remove_dir_all(&root);
+ }
+
+ /// Several threads stop at the first error, and say it.
+ #[test]
+ fn work_on_several_threads_says_its_first_error() {
+ let ran = std::sync::atomic::AtomicUsize::new(0);
+ let jobs: Vec = (0..64).collect();
+ let result = in_parallel(&jobs, |&job| {
+ ran.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
+ if job == 5 { Err(std::io::Error::other("job 5")) } else { Ok(()) }
+ });
+ assert_eq!(result.unwrap_err().to_string(), "job 5");
+ assert!(ran.into_inner() <= jobs.len());
+ let done = std::sync::atomic::AtomicUsize::new(0);
+ in_parallel(&jobs, |_| {
+ done.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
+ Ok(())
+ })
+ .unwrap();
+ assert_eq!(done.into_inner(), jobs.len(), "all of them, once");
+ }
+
+ /// `.zeron`'s hashes, taken from the bytes its copy read, are each file's.
+ #[test]
+ fn zeron_s_hashes_are_its_files() {
+ let root = dir("hashes");
+ let (ui, t) = (root.join("ui"), root.join("templates"));
+ write(&ui, "app.luau", "-- app");
+ write(&ui, "screens/shell/sidebar.luau", "-- sidebar");
+ sync_zeron(&ui, &t).unwrap();
+ let hashes = read_json(&t.join(ZERON).join(".hashes.json"));
+ assert_eq!(hashes["app.luau"], hash(b"-- app"));
+ assert_eq!(hashes["screens/shell/sidebar.luau"], hash(b"-- sidebar"));
+ let _ = std::fs::remove_dir_all(&root);
+ }
+
+ /// A folder stamped as its listing says is stamped as asking each file
+ /// says (the launch stamps written before read the same), and a file
+ /// replaced restamps it.
+ #[test]
+ fn a_listed_stamp_is_the_files_own() {
+ let root = dir("listed-stamp");
+ write(&root, "app.luau", "-- app");
+ write(&root, "screens/a.luau", "-- a");
+ write(&root, ".hidden/x.luau", "-- not stamped");
+ assert_eq!(listed_stamp(&root, |_| true), stamp(&root, |_| true));
+ let before = listed_stamp(&root, |_| true);
+ put(&root.join("screens/a.luau"), b"-- a, changed").unwrap();
+ assert_ne!(listed_stamp(&root, |_| true), before);
+ assert_eq!(listed_stamp(&root, |_| true), stamp(&root, |_| true));
+ let _ = std::fs::remove_dir_all(&root);
+ }
+
/// A templates folder with a small Zeron and a template `t`.
fn setup(name: &str) -> PathBuf {
let root = dir(name);
@@ -841,6 +1064,59 @@ mod tests {
assert_ne!(survey(&ui, &t, Some(&saved.ui_stamp)).template_stamp, used.template_stamp);
}
+ /// A launch lays `.live` down once; the next, finding everything as the
+ /// last left it, runs it as it is. Anything changed since lays it down
+ /// again: `ui/` (an update), the template switched or edited, `.live`
+ /// written by anyone, a file of it gone.
+ #[test]
+ fn a_launch_runs_live_as_it_is_only_while_nothing_changed() {
+ let root = dir("launch-stamp");
+ let ui = root.join("ui");
+ write(&ui, "app.luau", "-- app");
+ write(&ui, "screens/x.luau", "-- x");
+ let t = root.join("templates");
+ let lay = |id: &str| {
+ sync_zeron(&ui, &t).unwrap();
+ compose(&t, id, &Default::default(), false).unwrap();
+ LaunchStamp::now(&ui, &t, id).write(&t).unwrap();
+ };
+ let runs_as_is = |id: &str| LaunchStamp::now(&ui, &t, id).still_laid(&ui, &t);
+ // Nothing laid yet.
+ assert!(!runs_as_is(BUILTIN));
+ lay(BUILTIN);
+ assert!(runs_as_is(BUILTIN));
+ assert!(runs_as_is(BUILTIN), "looking writes nothing");
+ // Zeron's own changed (an update): laid again, then as it is.
+ std::thread::sleep(std::time::Duration::from_millis(5));
+ write(&ui, "screens/x.luau", "-- x, updated");
+ assert!(!runs_as_is(BUILTIN));
+ lay(BUILTIN);
+ assert!(runs_as_is(BUILTIN));
+ assert_eq!(read(&t.join(LIVE), "screens/x.luau"), "-- x, updated");
+ // `.live` written by someone else, or a file of it gone.
+ std::thread::sleep(std::time::Duration::from_millis(5));
+ write(&t.join(LIVE), "screens/x.luau", "-- not this Zeron's");
+ assert!(!runs_as_is(BUILTIN));
+ lay(BUILTIN);
+ std::fs::remove_file(t.join(LIVE).join("app.luau")).unwrap();
+ assert!(!runs_as_is(BUILTIN));
+ lay(BUILTIN);
+ assert!(runs_as_is(BUILTIN));
+ // Another template in use, then one of its files edited.
+ write(&t, "mine/zeron-template.json", r#"{"name":"Mine"}"#);
+ write(&t, "mine/screens/x.luau", "-- mine");
+ assert!(!runs_as_is("mine"));
+ lay("mine");
+ assert!(runs_as_is("mine"));
+ assert_eq!(read(&t.join(LIVE), "screens/x.luau"), "-- mine");
+ std::thread::sleep(std::time::Duration::from_millis(5));
+ write(&t, "mine/screens/x.luau", "-- mine, edited");
+ assert!(!runs_as_is("mine"));
+ // (The overlay a launch that skips the copy still knows.)
+ let (_, overlay) = plan(&t, "mine", &Default::default(), false);
+ assert!(overlay.from_template.contains("screens/x.luau"));
+ }
+
#[test]
fn ui_is_watched_by_its_folders_scripts_and_themes() {
let ui = Path::new(env!("CARGO_MANIFEST_DIR")).join("ui");
diff --git a/apps/zgx/src/plugins/mod.rs b/apps/zgx/src/plugins/mod.rs
index 43e8a8776..e009314ed 100644
--- a/apps/zgx/src/plugins/mod.rs
+++ b/apps/zgx/src/plugins/mod.rs
@@ -202,8 +202,17 @@ struct Gh {
watches: github::Watches,
}
+/// How long Settings → Plugins waits for what asked it to settle: past the
+/// launch (its first publish), then a moment.
+const PAGE_SETTLE_LAUNCH: std::time::Duration = std::time::Duration::from_millis(1500);
+const PAGE_SETTLE: std::time::Duration = std::time::Duration::from_millis(200);
+
pub struct Bridge {
host: ScriptHost,
+ /// A publish of Settings → Plugins on its way (`publish_page`), and
+ /// whether one has been made.
+ page_due: Cell,
+ page_published: Cell,
/// Where each plugin's requests may go, as its manifest names them.
network: network::Network,
windows: WindowFactory,
@@ -297,6 +306,9 @@ pub struct Bridge {
/// (`plugins.remote`; never loaded here).
pub(crate) remote: remote::Remote,
me: RefCell>,
+ /// The window's first load is still to come (until `set_view`):
+ /// plugins applied before it load with it, no reload.
+ first_load: Cell,
}
/// What plugins may read and ask of the app, each behind its permission,
@@ -346,6 +358,36 @@ pub fn expose_own(host: &ScriptHost, id: &str) {
/// finished (no organization chosen): then they're asked again once it is
/// (`auth::set_up`), on the same connection, so plugins load as setup
/// finishes, with no relaunch. Settings → Plugins says so meanwhile.
+/// How long a launch waits for an engine already running to say which
+/// plugins it allows: an answer is a few milliseconds; past this the
+/// window doesn't wait, and they come with the connection as ever.
+const PRELOAD_WAIT: std::time::Duration = std::time::Duration::from_millis(150);
+
+/// The plugins an engine that's already running allows (`WatchPlugins`'
+/// first word), heard before the window's first load, which then loads
+/// them with it. Otherwise their list came with the connection, after the
+/// first frame, and loading them took a reload of every script in the
+/// window (a fifth of a second on an M5 Max, as the first keys are typed);
+/// the list the connection brings is now the one loaded, and changes
+/// nothing. Only what the engine says is loaded, as ever: with no engine
+/// running (a cold start), or none answering in `PRELOAD_WAIT`, nothing.
+fn preload(b: &Rc) {
+ let Some((port, data_dir)) = engine::get().ipc_endpoint() else { return };
+ // No engine was running at launch (none holds its data dir, or the one
+ // that does is the one this launch started, still coming up): there's
+ // none yet to ask, so none is dialled, as on a cold start before (on
+ // Windows, a port nobody listens on takes the whole wait to say so).
+ if engine::get().started_engine() || !zeron_launch::data_dir_held(&data_dir) {
+ return;
+ }
+ let Some(list) = crate::engine::rpc::ask_now(port, &data_dir, "WatchPlugins", json!({}), PRELOAD_WAIT) else {
+ return;
+ };
+ if list.get("plugins").is_some_and(Json::is_array) {
+ b.heard(&list);
+ }
+}
+
fn connect(b: &Rc, rpc: &Rpc) {
// Zeron's own plugins, shipped beside the app's scripts: the engine
// scans them with yours (each connection: an engine started again
@@ -456,6 +498,88 @@ pub(crate) fn comment(asked: &Value, shown: &str) -> Option {
Some(json_value(&out))
}
+/// The longest key a plugin keeps a taken draft under.
+const DRAFT_KEY: usize = 64;
+
+/// A plugin's ask of the composer's draft (`zeron.take_draft`,
+/// `put_draft`, `swap_draft`, `drop_draft`), held to `{ op, key }`: `op`
+/// one of "take", "put", "swap" or "drop", `key` 1 to 64 characters with
+/// no control characters. Anything else is refused.
+pub(crate) fn draft_ask(asked: &Value) -> Option {
+ let op = asked.field("op").map(text)?;
+ let key = asked.field("key").map(text)?;
+ let valid_key = !key.is_empty() && key.chars().count() <= DRAFT_KEY && !key.chars().any(char::is_control);
+ if !matches!(op.as_str(), "take" | "put" | "swap" | "drop") || !valid_key {
+ return None;
+ }
+ Some(Value::record([("op", Value::from(op.as_str())), ("key", Value::from(key.as_str()))]))
+}
+
+/// What `zeron.compose` asks of the composer: its words alone (added to
+/// the draft shown, as ever), or with `{ text, replace, session }` (the
+/// draft's words replaced, or a chat named other than the one shown).
+pub(crate) fn compose(asked: &Value) -> Value {
+ let Some(words) = asked.field("text") else {
+ return Value::from(text(asked).as_str());
+ };
+ let words = match words {
+ Value::Str(_) | Value::Text(_) => words.clone(),
+ _ => Value::from(""),
+ };
+ let mut fields = vec![
+ ("text", words),
+ ("replace", Value::from(matches!(asked.field("replace"), Some(Value::Bool(true))))),
+ ];
+ if let Some(session) = asked.field("session").map(text).filter(|s| !s.is_empty()) {
+ fields.push(("session", Value::from(session.as_str())));
+ }
+ Value::record(fields)
+}
+
+/// The app's shared states a chat's draft lives in (screens/chat/shared),
+/// each read with the value the app starts it at: read before the app has
+/// made one, it's made as the app would.
+const DRAFT_HERE: &str = "chat.composer.here";
+const DRAFT_TEXT: &str = "chat.composer.text";
+const DRAFT_CARGO: &str = "chat.composer.cargo";
+const DRAFTS_KEPT: &str = "chat.composer.drafts";
+
+/// What a draft carries, as plugins are told it (as `zeron.draft()` says
+/// it, screens/plugins): each chip's kind and name, never a file's path.
+fn draft_attachments(cargo: &Value) -> Value {
+ let said = |item: &Value, field: &str, or: &str| match item.field(field) {
+ Some(v @ Value::Str(_)) => v.clone(),
+ _ => Value::from(or),
+ };
+ vlist(cargo.items().iter().map(|item| Value::record([("kind", said(item, "kind", "file")), ("name", said(item, "name", ""))])).collect())
+}
+
+/// Chat `session`'s draft, for `zeron.draft_of` ("draft"): out in the
+/// composer (`here` its chat, "" a new chat's; `shown` its words, `cargo`
+/// its chips) or kept for it (`kept`, by chat). Its words as typed, what it
+/// carries, and its chat (none for a new chat's). A chat with no draft has
+/// no words and carries nothing.
+pub(crate) fn draft_of(session: &str, here: &Value, shown: &Value, cargo: &Value, kept: &Value) -> Value {
+ let (words, carried) = if session == text(here) {
+ (shown.clone(), cargo.clone())
+ } else {
+ let d = kept.field(session);
+ (
+ d.and_then(|d| d.field("text")).cloned().unwrap_or_default(),
+ d.and_then(|d| d.field("cargo")).cloned().unwrap_or_default(),
+ )
+ };
+ let words = match words {
+ Value::Str(_) | Value::Text(_) => words,
+ _ => Value::from(""),
+ };
+ let mut fields = vec![("text", words), ("attachments", draft_attachments(&carried))];
+ if !session.is_empty() {
+ fields.push(("session", Value::from(session)));
+ }
+ Value::record(fields)
+}
+
/// Plugins for the main window `cx` shows `host` in.
pub fn install(cx: &mut WindowContext, host: &ScriptHost) {
expose_surface(host);
@@ -468,6 +592,8 @@ pub fn install(cx: &mut WindowContext, host: &ScriptHost) {
network: plugin_network,
windows: cx.windows.clone(),
page: host.shared("plugins", page_value("loading", None, &[], &[])),
+ page_due: Cell::new(false),
+ page_published: Cell::new(false),
menus: host.shared("plugins.menus", vlist(Vec::new())),
requests: host.shared("plugins.request", vlist(Vec::new())),
request_list: RefCell::default(),
@@ -516,6 +642,7 @@ pub fn install(cx: &mut WindowContext, host: &ScriptHost) {
reviewed: Cell::new(false),
remote: remote::Remote::new(host.shared("plugins.remote", remote::Remote::initial())),
me: RefCell::default(),
+ first_load: Cell::new(true),
});
*bridge.me.borrow_mut() = Rc::downgrade(&bridge);
BRIDGE.with(|b| *b.borrow_mut() = Rc::downgrade(&bridge));
@@ -542,6 +669,10 @@ pub fn install(cx: &mut WindowContext, host: &ScriptHost) {
}
});
+ // A launch whose engine already runs (it outlives the app): the plugins
+ // it has allowed, in the window's first load (`preload`).
+ preload(&bridge);
+
let weak = Rc::downgrade(&bridge);
engine::get().on_connect(move |rpc| {
let Some(b) = weak.upgrade() else { return };
@@ -674,27 +805,43 @@ pub fn prepare_live() -> PathBuf {
preview::set_template_running(id != live::BUILTIN);
preview::set((!preview::trusted(&root, &id)).then(|| preview::Preview { name: template_name(&root, &id), id: id.clone() }));
}
- if let Err(error) = live::sync_zeron(&crate::ui_dir(), &root) {
- eprintln!("zeron-zgx: Zeron's own interface wasn't copied ({error}); running it from ui/");
- return fallback;
- }
// The built-in themes once installed as templates, retired: one in use
// gives way to the default template, wearing that theme
// (retired_themes.rs).
if let Some(data) = crate::engine::data_dir() {
retired_themes::retire(&root, &data);
}
+ let ui = crate::ui_dir();
let id = live::active(&root);
+ // `.live` as the last launch left it, from the same Zeron and template:
+ // it runs as it is (live::LaunchStamp), nothing read or written.
+ let stamp = live::LaunchStamp::now(&ui, &root, &id);
+ if stamp.still_laid(&ui, &root) {
+ let (_, overlay) = live::plan(&root, &id, &Default::default(), false);
+ LIVE_OVERLAY.with(|o| *o.borrow_mut() = overlay);
+ let laid = live::Laid { ui_stamp: stamp.ui, id, template_stamp: stamp.template, ..Default::default() };
+ LIVE_LAID.with(|l| *l.borrow_mut() = laid);
+ return root.join(live::LIVE).join("app.luau");
+ }
+ if let Err(error) = live::sync_zeron(&ui, &root) {
+ eprintln!("zeron-zgx: Zeron's own interface wasn't copied ({error}); running it from ui/");
+ return fallback;
+ }
+ zgx::profile::mark("Zeron's own interface copied");
match live::compose(&root, &id, &Default::default(), false) {
Ok((_, overlay)) => {
LIVE_OVERLAY.with(|o| *o.borrow_mut() = overlay);
- let template_stamp = if id == live::BUILTIN { String::new() } else { live::template_stamp(&root.join(&id)) };
- let laid = live::Laid { ui_stamp: live::ui_stamp(&crate::ui_dir()), id, template_stamp, ..Default::default() };
- LIVE_LAID.with(|l| *l.borrow_mut() = laid);
// (Pictures of templates taken from the window, before their
// previews were drawn from their colours: gone.)
let _ = std::fs::remove_dir_all(root.join(".previews"));
let _ = std::fs::remove_dir_all(root.join(live::LIVE).join("previews"));
+ // What the next launch can run as it is: `.live` as this left it.
+ let laid_now = live::LaunchStamp::now(&ui, &root, &id);
+ if let Err(error) = laid_now.write(&root) {
+ eprintln!("zeron-zgx: the launch stamp wasn't kept ({error})");
+ }
+ let laid = live::Laid { ui_stamp: laid_now.ui, id, template_stamp: laid_now.template, ..Default::default() };
+ LIVE_LAID.with(|l| *l.borrow_mut() = laid);
root.join(live::LIVE).join("app.luau")
}
Err(error) => {
@@ -1005,6 +1152,7 @@ fn dev_service(host: &ScriptHost, id: &str) {
/// elements in it.
pub fn set_view(handle: zgx::compose::ViewHandle) {
if let Some(b) = BRIDGE.with(|b| b.borrow().upgrade()) {
+ b.first_load.set(false);
*b.view.borrow_mut() = Some(handle);
b.publish_page();
}
@@ -1340,7 +1488,10 @@ impl Bridge {
}
*self.loaded.borrow_mut() = want.clone();
self.host.set_plugins(want);
- self.reload();
+ // (Before the window's first load: that load takes them.)
+ if !self.first_load.get() {
+ self.reload();
+ }
}
fn reload(&self) {
@@ -1702,7 +1853,32 @@ impl Bridge {
]));
}
+ /// Settings → Plugins brought up to date, once what asked has settled:
+ /// asks in a row (a launch makes several: the view known, the engine's
+ /// list, its look) make one, after [`PAGE_SETTLE`] ([`PAGE_SETTLE_LAUNCH`]
+ /// for a launch's first). It walks every element of the window (a tenth
+ /// of a second of a launch's main thread), and nothing a launch shows
+ /// reads it.
fn publish_page(&self) {
+ if cfg!(test) {
+ return self.publish_page_now();
+ }
+ if self.page_due.replace(true) {
+ return;
+ }
+ let settle = if self.page_published.get() { PAGE_SETTLE } else { PAGE_SETTLE_LAUNCH };
+ let me = Rc::downgrade(&self.me());
+ self.tasks.spawn(async move {
+ zgx::timer::sleep(settle).await;
+ if let Some(b) = me.upgrade() {
+ b.page_due.set(false);
+ b.page_published.set(true);
+ b.publish_page_now();
+ }
+ });
+ }
+
+ fn publish_page_now(&self) {
// A plugin that failed here shows so, with why, whatever the engine
// says of it; one placed where the template in use has nothing says
// where it won't show, and one whose place zgx refused says why.
@@ -2398,6 +2574,49 @@ impl Bridge {
}
}
});
+ // The composer's draft taken (its words, its chips, the passages
+ // quoted in it), put back or let go, under a key of the plugin's,
+ // for a plugin allowed "draft": screens/plugins keeps what's taken
+ // (the plugin never holds its files' paths) and tells it what it
+ // keeps as `plugin..drafts`.
+ host.action(format!("plugin.{id}.draft"), {
+ let (me, plugin) = (me.clone(), plugin.clone());
+ move |asked| {
+ if let Some(b) = me.upgrade()
+ && b.item(&plugin).is_some_and(|i| i.may("draft"))
+ {
+ match draft_ask(&asked) {
+ Some(asked) => b.request("draft", &plugin, asked),
+ None => eprintln!("zeron-zgx: plugin {plugin}: a draft ask that isn't take, put, swap or drop with a key, refused"),
+ }
+ }
+ }
+ });
+ // Another chat's draft, as it is (`zeron.draft_of`, "draft"): read
+ // where the app keeps it, once, never followed.
+ host.async_action(format!("plugin.{id}.draft_of"), {
+ let (me, plugin) = (me.clone(), plugin.clone());
+ move |asked| {
+ let (me, plugin) = (me.clone(), plugin.clone());
+ async move {
+ let b = me.upgrade().ok_or("This plugin isn't on")?;
+ let item = b.item(&plugin).ok_or("This plugin isn't on")?;
+ if !item.may("draft") {
+ return Err("This plugin wasn't allowed to read what you type in the message box".to_string());
+ }
+ let session = text(&asked);
+ if session.chars().count() > 200 {
+ return Err("That isn't a chat".to_string());
+ }
+ let read = |name: &str, initial: Value| b.host.shared(name, initial).signal().with_untracked(Value::clone);
+ let here = read(DRAFT_HERE, Value::from(""));
+ let shown = read(DRAFT_TEXT, Value::from(""));
+ let cargo = read(DRAFT_CARGO, vlist(Vec::new()));
+ let kept = read(DRAFTS_KEPT, Value::record(Vec::<(&str, Value)>::new()));
+ Ok(draft_of(&session, &here, &shown, &cargo, &kept))
+ }
+ }
+ });
host.action(format!("plugin.{id}.open_url"), {
let (me, plugin) = (me.clone(), plugin.clone());
move |url| {
@@ -3298,9 +3517,9 @@ impl Bridge {
});
host.action("zeron.compose.insert", {
let me = me.clone();
- move |text_| {
+ move |asked| {
if let Some(b) = me.upgrade() {
- b.request("compose", "", Value::from(text(&text_).as_str()));
+ b.request("compose", "", compose(&asked));
}
}
});
@@ -3442,6 +3661,52 @@ mod tests {
assert_eq!(gone, vec!["clock".to_string(), "ping".to_string()]);
}
+ /// `zeron.compose(text)` adds its words as ever; with options, it says
+ /// whether they replace the draft and which chat's (none: the shown).
+ #[test]
+ fn compose_takes_words_alone_or_with_replace_and_a_chat() {
+ assert_eq!(compose(&Value::from("hello")), Value::from("hello"));
+ let asked = json_value(&json!({ "text": "clearer", "replace": true, "session": "s2" }));
+ let out = compose(&asked);
+ assert_eq!(text(out.field("text").unwrap()), "clearer");
+ assert_eq!(out.field("replace"), Some(&Value::from(true)));
+ assert_eq!(text(out.field("session").unwrap()), "s2");
+ // (Only `true` replaces; a blank chat is the one shown; words that
+ // aren't text are none.)
+ let loose = json_value(&json!({ "text": 5, "replace": "yes", "session": "" }));
+ let out = compose(&loose);
+ assert_eq!(text(out.field("text").unwrap()), "");
+ assert_eq!(out.field("replace"), Some(&Value::from(false)));
+ assert!(out.field("session").is_none());
+ }
+
+ /// `zeron.draft_of`: the chat shown's draft (from the composer), or
+ /// another chat's (kept), with its chat and its chips by kind and name
+ /// alone; a new chat's has no chat; a chat with none, nothing.
+ #[test]
+ fn a_chats_draft_is_read_where_it_is_kept_without_paths() {
+ let kept = json_value(&json!({
+ "s2": { "text": "kept words", "cargo": [{ "kind": "file", "name": "a.rs", "path": "/Users/me/a.rs" }] },
+ "": { "text": "new chat words", "cargo": [] },
+ }));
+ let (here, shown) = (Value::from("s1"), Value::from("typing now"));
+ let cargo = json_value(&json!([{ "kind": "image", "name": "shot.png", "path": "/tmp/shot.png" }]));
+ let out = draft_of("s1", &here, &shown, &cargo, &kept);
+ assert_eq!(value_json(&out), json!({ "text": "typing now", "session": "s1", "attachments": [{ "kind": "image", "name": "shot.png" }] }));
+ let out = draft_of("s2", &here, &shown, &cargo, &kept);
+ assert_eq!(value_json(&out), json!({ "text": "kept words", "session": "s2", "attachments": [{ "kind": "file", "name": "a.rs" }] }));
+ assert!(!out.to_json().contains("/Users/me"), "never a path");
+ // A chat with no draft: nothing written, nothing carried.
+ let out = draft_of("s9", &here, &shown, &cargo, &kept);
+ assert_eq!(value_json(&out), json!({ "text": "", "session": "s9", "attachments": [] }));
+ // A new chat's draft, kept while a chat shows: no chat.
+ let out = draft_of("", &here, &shown, &cargo, &kept);
+ assert_eq!(value_json(&out), json!({ "text": "new chat words", "attachments": [] }));
+ // Before the app has made its states: nothing, not an error.
+ let out = draft_of("s1", &Value::Nil, &Value::Nil, &Value::Nil, &Value::Nil);
+ assert_eq!(text(out.field("text").unwrap()), "");
+ }
+
/// R21: a plugin's review comment goes on the chat shown alone, with
/// at most the 40 lines of code that are sent (a 20,000-character
/// snippet once rode along unseen, onto any chat's draft).
@@ -3462,6 +3727,23 @@ mod tests {
assert!(text(comment(&wide, "s1").unwrap().field("snippet").unwrap()).len() <= COMMENT_BYTES);
}
+ /// A plugin's ask of the draft is take, put, swap or drop, under a key
+ /// of 1 to 64 characters; nothing else rides along to the app.
+ #[test]
+ fn a_draft_ask_is_take_put_or_drop_with_a_key() {
+ let ask = |v: Json| draft_ask(&json_value(&v));
+ let took = ask(json!({ "op": "take", "key": "stash", "extra": "dropped" })).expect("a take");
+ assert_eq!(value_json(&took), json!({ "op": "take", "key": "stash" }));
+ assert!(ask(json!({ "op": "put", "key": "k".repeat(64) })).is_some());
+ assert!(ask(json!({ "op": "drop", "key": "é" })).is_some());
+ assert!(ask(json!({ "op": "swap", "key": "stash" })).is_some());
+ assert!(ask(json!({ "op": "send", "key": "stash" })).is_none(), "not an op");
+ assert!(ask(json!({ "op": "take", "key": "" })).is_none(), "no key");
+ assert!(ask(json!({ "op": "take" })).is_none(), "no key");
+ assert!(ask(json!({ "op": "take", "key": "k".repeat(65) })).is_none(), "too long");
+ assert!(ask(json!({ "op": "take", "key": "a\nb" })).is_none(), "a control character");
+ }
+
#[test]
fn only_a_plugin_on_loads_from_its_snapshot_with_its_grants() {
let on = item(json!({
diff --git a/apps/zgx/src/plugins/preview.rs b/apps/zgx/src/plugins/preview.rs
index 4b3e7a029..cab28f7a6 100644
--- a/apps/zgx/src/plugins/preview.rs
+++ b/apps/zgx/src/plugins/preview.rs
@@ -81,6 +81,8 @@ pub const BLOCKED: &[&str] = &[
"agents.set_key",
// (An API key, and what an agent's keys are called.)
"agents.add_key",
+ // (The API key every Cloud machine's agent uses, kept by the vault.)
+ "agents.cloud_key",
"agents.rename",
"agents.sign_in",
"agents.sign_out",
@@ -103,6 +105,9 @@ pub const BLOCKED: &[&str] = &[
"cloud.sleep",
"cloud.retry",
"cloud.set_machine",
+ // (What a Cloud chat reaches: the person's own choice.)
+ "cloud.set_reach",
+ "cloud.set_session_reach",
];
pub fn blocked(action: &str) -> bool {
diff --git a/apps/zgx/src/quit_prompt.rs b/apps/zgx/src/quit_prompt.rs
new file mode 100644
index 000000000..cfedb19a3
--- /dev/null
+++ b/apps/zgx/src/quit_prompt.rs
@@ -0,0 +1,202 @@
+//! Quitting with "Keep Zeron running after you quit" off (Settings →
+//! General; the engine's `crates/engine/src/keep_running.rs`).
+//!
+//! On (the default) nothing happens here: the engine keeps running, as it
+//! always has. Off: the app tells its engine it quit, and the engine stops
+//! once nothing is pending. Work still running is never ended silently:
+//! the app asks first — "N chats are still working. Keep running in the
+//! background until they finish, or stop them now?" — and only "Stop them
+//! now" stops them (each chat's own Stop). Anything that keeps the question
+//! from being asked (no engine, no answer) leaves the engine running.
+//!
+//! The question's words are the scripts' (`ui.t`, in the language the app
+//! shows), handed over as they change (`app.quit_words`): by the time the
+//! app quits, its scripts are gone.
+
+use std::cell::RefCell;
+use std::time::Duration;
+
+use serde_json::{Value as Json, json};
+
+/// The question, in the app's language: the message for one chat and for
+/// many (its count written as [`COUNT_MARK`]), the detail, and the buttons.
+#[derive(Debug, Clone, PartialEq)]
+pub struct Words {
+ pub one: String,
+ pub other: String,
+ pub detail: String,
+ pub keep: String,
+ pub stop: String,
+}
+
+/// The count the scripts word "many" with, replaced by the real one.
+pub const COUNT_MARK: &str = "999999";
+
+impl Default for Words {
+ fn default() -> Self {
+ Self {
+ one: "1 chat is still working.".into(),
+ other: format!("{COUNT_MARK} chats are still working."),
+ detail: "Keep running in the background until they finish, or stop them now?".into(),
+ keep: "Keep Running".into(),
+ stop: "Stop Them Now".into(),
+ }
+ }
+}
+
+impl Words {
+ pub fn message(&self, working: usize) -> String {
+ if working == 1 {
+ self.one.clone()
+ } else {
+ // (However the scripts' number formatting grouped it.)
+ ["999,999", "999\u{a0}999", "999\u{202f}999", "999 999", "999.999", COUNT_MARK]
+ .iter()
+ .fold(self.other.clone(), |text, mark| text.replace(mark, &working.to_string()))
+ }
+ }
+}
+
+thread_local! {
+ static WORDS: RefCell = RefCell::new(Words::default());
+}
+
+/// `app.quit_words`: the scripts' words for the question.
+pub fn install(host: &zgx_script::ScriptHost) {
+ host.action("app.quit_words", |args| {
+ let field = |key: &str| {
+ args.field(key)
+ .map(crate::auth::text)
+ .filter(|text| !text.is_empty())
+ };
+ WORDS.with(|words| {
+ let mut words = words.borrow_mut();
+ let defaults = Words::default();
+ *words = Words {
+ one: field("one").unwrap_or(defaults.one),
+ other: field("other").unwrap_or(defaults.other),
+ detail: field("detail").unwrap_or(defaults.detail),
+ keep: field("keep").unwrap_or(defaults.keep),
+ stop: field("stop").unwrap_or(defaults.stop),
+ };
+ });
+ });
+}
+
+/// What the person chose for work still running.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Choice {
+ KeepRunning,
+ StopNow,
+}
+
+/// What to tell the engine, given what it said: nothing (it keeps running),
+/// or `AppQuitting` with whether to stop the work — asking the person
+/// only when there's work to stop.
+pub fn decide(check: &Json, ask: impl FnOnce(usize) -> Choice) -> Option {
+ if check["keepRunning"].as_bool() != Some(false) {
+ return None;
+ }
+ let working = check["working"].as_u64().unwrap_or(0) as usize;
+ let stop_work = working > 0 && ask(working) == Choice::StopNow;
+ Some(json!({ "stopWork": stop_work }))
+}
+
+/// After the app's windows have closed, as it quits.
+pub fn after_quit() {
+ let Some((port, data_dir)) = crate::engine::get().ipc_endpoint() else {
+ return;
+ };
+ let call = |method: &str, params: Json| {
+ crate::engine::rpc::call_blocking(port, &data_dir, method, params, Duration::from_secs(5))
+ };
+ let check = match call("QuitCheck", json!({})) {
+ Ok(check) => check,
+ // No engine, or one too old to know the setting: it runs on.
+ Err(error) => {
+ eprintln!("zeron-zgx: quit: the engine didn't say what's running ({error}); it keeps running");
+ return;
+ }
+ };
+ let words = WORDS.with(|words| words.borrow().clone());
+ let Some(quitting) = decide(&check, |working| ask(&words, working)) else {
+ return;
+ };
+ if let Err(error) = call("AppQuitting", quitting) {
+ eprintln!("zeron-zgx: quit: couldn't tell the engine ({error}); it keeps running");
+ }
+}
+
+/// The question, as a native alert (macOS). Elsewhere work keeps running
+/// until it finishes: nothing is stopped without asking.
+#[cfg(target_os = "macos")]
+fn ask(words: &Words, working: usize) -> Choice {
+ use objc::runtime::Object;
+ use objc::{class, msg_send, sel, sel_impl};
+ let string = |text: &str| -> *mut Object {
+ let text = std::ffi::CString::new(text.replace('\0', "")).unwrap_or_default();
+ // SAFETY: a NUL-terminated UTF-8 string; NSString copies it.
+ unsafe { msg_send![class!(NSString), stringWithUTF8String: text.as_ptr()] }
+ };
+ // SAFETY: AppKit on the main thread (where the app's run ended), with
+ // its shared application still there; NSAlert is modal and returns the
+ // button pressed (1000 for the first).
+ unsafe {
+ let alert: *mut Object = msg_send![class!(NSAlert), new];
+ let _: () = msg_send![alert, setMessageText: string(&words.message(working))];
+ let _: () = msg_send![alert, setInformativeText: string(&words.detail)];
+ let _: *mut Object = msg_send![alert, addButtonWithTitle: string(&words.keep)];
+ let _: *mut Object = msg_send![alert, addButtonWithTitle: string(&words.stop)];
+ let app: *mut Object = msg_send![class!(NSApplication), sharedApplication];
+ let _: () = msg_send![app, activateIgnoringOtherApps: true];
+ let pressed: isize = msg_send![alert, runModal];
+ let _: () = msg_send![alert, release];
+ if pressed == 1001 { Choice::StopNow } else { Choice::KeepRunning }
+ }
+}
+
+#[cfg(not(target_os = "macos"))]
+fn ask(_words: &Words, _working: usize) -> Choice {
+ Choice::KeepRunning
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn with_the_setting_on_nothing_is_said_or_asked() {
+ let asked = std::cell::Cell::new(false);
+ let check = json!({ "keepRunning": true, "working": 3 });
+ assert_eq!(decide(&check, |_| { asked.set(true); Choice::StopNow }), None);
+ assert!(!asked.get());
+ // An engine that doesn't say keeps running too.
+ assert_eq!(decide(&json!({}), |_| Choice::StopNow), None);
+ }
+
+ #[test]
+ fn off_with_nothing_running_the_engine_stops_without_asking() {
+ let check = json!({ "keepRunning": false, "working": 0 });
+ let quitting = decide(&check, |_| panic!("asked with nothing running"));
+ assert_eq!(quitting, Some(json!({ "stopWork": false })));
+ }
+
+ #[test]
+ fn off_with_work_running_the_person_decides() {
+ let check = json!({ "keepRunning": false, "working": 2 });
+ let mut asked_about = 0;
+ let keep = decide(&check, |n| { asked_about = n; Choice::KeepRunning });
+ assert_eq!(asked_about, 2);
+ assert_eq!(keep, Some(json!({ "stopWork": false })));
+ assert_eq!(decide(&check, |_| Choice::StopNow), Some(json!({ "stopWork": true })));
+ }
+
+ #[test]
+ fn the_count_is_written_into_the_message() {
+ let words = Words::default();
+ assert_eq!(words.message(1), "1 chat is still working.");
+ assert_eq!(words.message(4), "4 chats are still working.");
+ let grouped = Words { other: "999,999 chats are still working.".into(), ..Words::default() };
+ assert_eq!(grouped.message(12), "12 chats are still working.");
+ }
+}
diff --git a/apps/zgx/src/relaunch.rs b/apps/zgx/src/relaunch.rs
index 503f84117..956b59618 100644
--- a/apps/zgx/src/relaunch.rs
+++ b/apps/zgx/src/relaunch.rs
@@ -74,6 +74,11 @@ pub fn ask(quit: impl FnOnce()) {
quit();
}
+/// Whether this quit is a relaunch (the app comes straight back).
+pub fn asked() -> bool {
+ ASKED.load(Ordering::SeqCst)
+}
+
/// Last in `main`, once the app has quit: the new process, if a relaunch
/// was asked for.
pub fn after_quit() {
diff --git a/apps/zgx/src/sessions.rs b/apps/zgx/src/sessions.rs
index 7e5810e89..872508e79 100644
--- a/apps/zgx/src/sessions.rs
+++ b/apps/zgx/src/sessions.rs
@@ -35,6 +35,8 @@
//! without one, `device` hosts it; `parent`:
//! a side chat of that chat, where it is;
//! `cloud`: on a Cloud machine of its own,
+//! reaching `reach` (`devices` | `isolated`;
+//! none: the account's default),
//! `{ id, cwd }`, or why not in words)
//! sessions.fork({ source, parent?, id? }) a side chat starting as a copy of
//! `source` (`ForkSideChat`): its id, or the
@@ -191,6 +193,21 @@ struct RowWith {
working_side_chats: u32,
known_project: bool,
agent_icon: Option,
+ /// The last turn its agent finished, as its session row marks it
+ /// (`lastCompletedTurn`): what a "finished" chime rings on moving.
+ turn: Option,
+}
+
+/// A session row's finished turn, and whether the row is fresh: written in
+/// the last `SESSION_STALE_MS`, so a turn's end just published rather than
+/// an old row a sync or reconnect brings back (the shipping app's chime
+/// rule, crates/engine/src/desktop_notify.rs `SessionNotificationState`).
+fn finished_turn(session: Option<&Session>, at: chrono::DateTime) -> (Option, bool) {
+ let Some(s) = session else {
+ return (None, false);
+ };
+ let fresh = at.signed_duration_since(s.updated_at).num_milliseconds() <= zeron_proto::view::SESSION_STALE_MS;
+ (s.last_completed_turn.clone(), fresh)
}
/// `slot` holds `item` now; whether that's new.
@@ -621,6 +638,7 @@ fn child_row(rows: &mut HashMap, c: &Json, id: &str, parent: &str,
working_side_chats: 0,
known_project: false,
agent_icon: harness.and_then(crate::agents::registry_icon),
+ turn: None,
};
if rows.get(id).is_some_and(|row| row.with == with) {
return;
@@ -681,6 +699,7 @@ fn top_row(
working_side_chats,
known_project: project.is_some(),
agent_icon: harness.and_then(crate::agents::registry_icon),
+ turn: finished_turn(session, at).0,
};
if let Some(row) = rows.get(id).filter(|row| row.with == with) {
return row.value.clone();
@@ -721,6 +740,12 @@ fn top_row(
// it woke (Unix seconds).
("sleep_until", with.sleep.filter(|s| s.0).map_or(Value::Nil, |s| Value::from(s.1 as f64))),
("woke", with.sleep.filter(|s| !s.0).map_or(Value::Nil, |s| Value::from(s.1 as f64))),
+ // The last turn its agent finished (an opaque mark), and whether its
+ // session row was fresh when that was read: the chimes ring
+ // "finished" on this moving, never on the status alone ("done" is
+ // only unseen activity, which your own send makes too).
+ ("turn", with.turn.as_deref().map_or(Value::Nil, Value::from)),
+ ("turn_fresh", Value::from(finished_turn(session, at).1)),
]);
rows.insert(id.to_owned(), Row { moved: moved(c), updated: updated as f64, marks, with, value: value.clone() });
value
@@ -1529,6 +1554,9 @@ impl Sessions {
if let Some(branch) = field("branch") {
params["branch"] = Json::from(branch);
}
+ if let Some(reach) = field("reach").filter(|r| matches!(r.as_str(), "devices" | "isolated")) {
+ params["cloudReach"] = Json::from(reach);
+ }
if let Some(config) = args
.field("config")
.filter(|c| !matches!(c, Value::Nil))
@@ -2516,6 +2544,33 @@ mod tests {
assert!(!s.rows.borrow().contains_key("b"));
}
+ /// A chat's finished turn (what the "done" chime rings on, issue #1437):
+ /// its session's `lastCompletedTurn`, published as it moves, and whether
+ /// the row saying so is fresh.
+ #[test]
+ fn a_chat_s_finished_turn_is_published_as_it_moves() {
+ let now = now_seconds();
+ let s = with_children("2099-01-01T00:00:00Z");
+ s.heard.set(true);
+ let row = |turn: &str, ago: i64| {
+ json!([{ "chatId": "p", "deviceId": "d", "status": "idle", "updatedAt": iso(now - ago), "lastCompletedTurn": turn }])
+ };
+ s.set_live(row("t1", 1));
+ s.publish();
+ let p = s.value();
+ assert_eq!(chat(&p, "p").field("turn").map(crate::auth::text).as_deref(), Some("t1"));
+ assert!(chat(&p, "p").field("turn_fresh").is_some_and(zgx_script::Value::truthy));
+ let before = s.published.get();
+ s.heard(Slot::Live, row("t2", 0));
+ assert_eq!(s.published.get(), before + 1, "a finish is shown at once");
+ assert_eq!(chat(&s.value(), "p").field("turn").map(crate::auth::text).as_deref(), Some("t2"));
+ // An end published long ago (a sync, a reconnect): not fresh.
+ s.heard(Slot::Live, row("t3", 600));
+ let p = s.value();
+ assert_eq!(chat(&p, "p").field("turn").map(crate::auth::text).as_deref(), Some("t3"));
+ assert!(!chat(&p, "p").field("turn_fresh").is_some_and(zgx_script::Value::truthy));
+ }
+
#[test]
fn an_update_that_changes_nothing_publishes_nothing() {
let s = with_children("2099-01-01T00:00:00Z");
diff --git a/apps/zgx/src/settings.rs b/apps/zgx/src/settings.rs
index e68d8baac..85903c1cf 100644
--- a/apps/zgx/src/settings.rs
+++ b/apps/zgx/src/settings.rs
@@ -94,6 +94,9 @@ const ENGINE_METHODS: &[&str] = &[
"SetTitleSettings",
"GetNativeSubagents",
"SetNativeSubagents",
+ // "Keep Zeron running after you quit" (src/quit_prompt.rs).
+ "GetBackgroundSettings",
+ "SetBackgroundSettings",
// Whether this window has the keys: banners set to "only when in the
// background" hold while it does.
"SetViewportFocus",
@@ -316,6 +319,7 @@ pub fn install(_cx: &mut WindowContext, host: &ScriptHost) {
forget_wallpaper(&path, &dir.join(WALLPAPER_DIR));
}
});
+ crate::quit_prompt::install(host);
host.async_action("settings.engine", |args| {
let method = args.field("method").map(text).unwrap_or_default();
let params = args.field("params").map(value_json).unwrap_or(json!({}));
diff --git a/apps/zgx/src/shortcut_tests.rs b/apps/zgx/src/shortcut_tests.rs
index bf18a0579..4fce8ead2 100644
--- a/apps/zgx/src/shortcut_tests.rs
+++ b/apps/zgx/src/shortcut_tests.rs
@@ -219,6 +219,74 @@ fn the_shortcuts_reach_their_commands_from_any_focus() {
assert!(wrong.is_empty(), "{}", wrong.join("\n"));
}
+/// ⌘N's new chat is ready in the frame it first shows (ademark's A3: ⌘N,
+/// then a key every 50 ms, timed to the first frame the keys read in the
+/// new chat's composer, with the old chat gone). From a session whose
+/// composer has the keys, what's typed right after ⌘N, with no frame
+/// between, is the new chat's draft, not the session's; that first frame
+/// shows the new chat, the session's page gone, its composer already where
+/// it rests (it snaps there: nothing glides into place). From focus
+/// anywhere else, the first frame gives the composer the keys.
+#[test]
+fn keys_typed_right_after_command_n_land_in_the_new_chat_in_its_first_frame() {
+ let field = "#chat-composer >> role:textbox";
+ let draft = |w: &mut Window| -> String {
+ let node = w.app.find(field).expect("the composer's field");
+ let editor = w.app.ui.editor_within(node).expect("its editor");
+ editor.editor.borrow().text().to_string()
+ };
+ let composer = |w: &mut Window| -> zgx::scene::Rect {
+ let node = w.app.find("#chat-composer").expect("the composer");
+ w.app.ui.scene.borrow().transformed_bounds(node)
+ };
+ let mut w = mount();
+ w.app.ui.scene.borrow_mut().resize(1600., 1000.);
+ w.app.click("#shell-sidebar >> role:button \"Fix the build\"");
+ w.app.frames(30);
+ let session = w.route();
+ for at in [Focus::Composer, Focus::Nothing, Focus::Sidebar] {
+ if w.route() != session {
+ w.app.click("#shell-sidebar >> role:button \"Fix the build\"");
+ w.app.frames(30);
+ }
+ focus(&mut w, at);
+ assert_eq!(draft(&mut w), "", "{at:?}: the session's draft starts empty");
+ // ⌘N as the menu runs it, then the first keys: no frame between
+ // for a composer that had the keys, the first frame for any other
+ // focus.
+ w.heard.borrow_mut().clear();
+ w.app.keys("cmd+n");
+ let heard: Vec = w.heard.borrow_mut().drain(..).collect();
+ assert_eq!(heard, ["shell.new_chat"], "{at:?}: ⌘N reached the new chat");
+ assert!(w.app.host.run_command("shell.new_chat"));
+ if !matches!(at, Focus::Composer) {
+ w.app.frame();
+ }
+ w.app.ui.dispatch(InputEvent::Text("ad".into()));
+ w.app.settle();
+ w.app.frame();
+ assert_eq!(w.route(), "/", "{at:?}: a new chat");
+ assert!(w.app.find("#chat-session").is_none(), "{at:?}: the session's page is gone in the first frame");
+ assert!(w.app.find("#chat-home").is_some(), "{at:?}: the new chat's page shows in the first frame");
+ assert_eq!(draft(&mut w), "ad", "{at:?}: the keys are the new chat's draft");
+ let first = composer(&mut w);
+ w.app.frames(30);
+ let rest = composer(&mut w);
+ assert!(
+ (first.y - rest.y).abs() < 0.5 && (first.height - rest.height).abs() < 0.5 && (first.x - rest.x).abs() < 0.5,
+ "{at:?}: the composer rests where the first frame put it: {first:?}, then {rest:?}"
+ );
+ // (The draft goes, so the next new chat starts empty.)
+ w.app.click(field);
+ w.app.keys("cmd+a");
+ w.app.key(zgx::input::Key::Backspace);
+ w.app.frames(10);
+ w.app.click("#shell-sidebar >> role:button \"Fix the build\"");
+ w.app.frames(30);
+ assert_eq!(draft(&mut w), "", "{at:?}: nothing typed reached the session's draft");
+ }
+}
+
/// Alt+←/→ step the history on Windows and Linux (zgx's router binds them
/// there, ⌘[ ⌘] on macOS, where ⌥← ⌥→ are the caret's word-jump and must
/// not): from anywhere, text fields included, as a browser's are (the
diff --git a/apps/zgx/src/transcript_paint_tests.rs b/apps/zgx/src/transcript_paint_tests.rs
index e29774ed1..a78157c3d 100644
--- a/apps/zgx/src/transcript_paint_tests.rs
+++ b/apps/zgx/src/transcript_paint_tests.rs
@@ -153,6 +153,14 @@ fn a_long_chat_come_back_to_mid_scroll_draws_what_a_whole_repaint_draws() {
}
}
+/// One reply of a thousand steps (ademark's A11 thread), its blocks windowed
+/// in runs: built as they come near, held as boxes away.
+#[test]
+fn a_long_thread_opened_and_scrolled_draws_what_a_whole_repaint_draws() {
+ let misses = drawn_against_whole("long_thread");
+ assert!(misses.is_empty(), "{}", misses.join("\n"));
+}
+
#[test]
fn a_long_chat_of_other_chats_messages_opened_and_scrolled_draws_what_a_whole_repaint_draws() {
let misses = drawn_against_whole("long_chat_cross");
diff --git a/apps/zgx/src/transcript_scroll_tests.rs b/apps/zgx/src/transcript_scroll_tests.rs
index ad6910e26..ad5ad0b37 100644
--- a/apps/zgx/src/transcript_scroll_tests.rs
+++ b/apps/zgx/src/transcript_scroll_tests.rs
@@ -18,7 +18,7 @@ fn ui() -> PathBuf {
}
/// Each text in the transcript's view, by its words: its top.
-fn shown(app: &mut TestApp) -> Vec<(String, f32)> {
+pub(crate) fn shown(app: &mut TestApp) -> Vec<(String, f32)> {
let view = app.bounds("transcript");
let tree = app.tree();
let mut out = Vec::new();
@@ -47,7 +47,7 @@ fn shown(app: &mut TestApp) -> Vec<(String, f32)> {
/// How far what shows moved between two looks (the median of the texts seen
/// in both), and how many were seen in both.
-fn moved(before: &[(String, f32)], after: &[(String, f32)]) -> (Option, usize) {
+pub(crate) fn moved(before: &[(String, f32)], after: &[(String, f32)]) -> (Option, usize) {
let mut deltas: Vec = before
.iter()
.filter_map(|(words, y)| after.iter().find(|(w, _)| w == words).map(|(_, y2)| y2 - y))
diff --git a/apps/zgx/src/windows_install.rs b/apps/zgx/src/windows_install.rs
index c243a016f..0deec024d 100644
--- a/apps/zgx/src/windows_install.rs
+++ b/apps/zgx/src/windows_install.rs
@@ -21,20 +21,38 @@ use zeron_update::windows::{self, Completion};
use crate::about::APP_VERSION;
+/// Why this launch can't go on, as `main`'s error: said as written
+/// ("Error: …"), exit status 1.
+pub struct Failed(String);
+
+impl std::fmt::Debug for Failed {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_str(&self.0)
+ }
+}
+
+impl std::fmt::Display for Failed {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_str(&self.0)
+ }
+}
+
+impl std::error::Error for Failed {}
+
/// Complete this installation if it needs it; returns once this process may
/// go on. Exits instead when the newer `zeron.exe` the feed had by then ran
-/// in its place, or when the person gives up.
-pub fn complete_if_needed(argv: &[String]) {
+/// in its place; fails when the person gives up (or isn't asked: a command).
+pub fn complete_if_needed(argv: &[String]) -> Result<(), Failed> {
windows::set_packaged();
// Answered without the folder: the old updater checks a staged copy so.
if matches!(argv.get(1).map(String::as_str), Some("--version" | "-V" | "--help" | "-h" | "help")) {
- return;
+ return Ok(());
}
let Ok(exe) = std::env::current_exe() else {
- return;
+ return Ok(());
};
let Some(directory) = windows::incomplete_install(&exe, APP_VERSION) else {
- return;
+ return Ok(());
};
// A window launch: nothing, a link, or the update's relaunch.
let window = argv
@@ -42,14 +60,13 @@ pub fn complete_if_needed(argv: &[String]) {
.is_none_or(|arg| arg.starts_with("--") || arg.starts_with("zeron:"));
loop {
match complete(&directory) {
- Ok(Completion::Complete | Completion::Installed) => return,
+ Ok(Completion::Complete | Completion::Installed) => return Ok(()),
Ok(Completion::Updated(version)) => {
- run_installed(&directory, &argv[1..], &version);
+ return Err(run_installed(&directory, &argv[1..], &version));
}
Err(error) => {
- eprintln!("Error: Zeron couldn't finish installing this update: {error}");
if !window || !ask_to_retry(&error) {
- std::process::exit(1);
+ return Err(Failed(format!("Zeron couldn't finish installing this update: {error}")));
}
}
}
@@ -68,15 +85,13 @@ fn complete(directory: &Path) -> Result {
}
/// The feed had a newer release, now installed as `zeron.exe`: it runs this
-/// launch instead, and its exit is this one's.
-fn run_installed(directory: &Path, args: &[String], version: &str) -> ! {
+/// launch instead, and its exit is this one's. Returns only when it
+/// couldn't start.
+fn run_installed(directory: &Path, args: &[String], version: &str) -> Failed {
let installed = directory.join("zeron.exe");
match std::process::Command::new(&installed).args(args).status() {
Ok(status) => std::process::exit(status.code().unwrap_or(1)),
- Err(error) => {
- eprintln!("Error: Zeron {version} is installed, but couldn't start: {error}");
- std::process::exit(1);
- }
+ Err(error) => Failed(format!("Zeron {version} is installed, but couldn't start: {error}")),
}
}
diff --git a/apps/zgx/tests/cli.rs b/apps/zgx/tests/cli.rs
index 819db7a86..a6750457a 100644
--- a/apps/zgx/tests/cli.rs
+++ b/apps/zgx/tests/cli.rs
@@ -67,7 +67,8 @@ fn the_engine_s_subcommands_run_in_the_helper_beside_the_app() {
let dir = scratch("helper");
let zeron = zeron_in(&dir);
let heard = dir.join("heard");
- let helper = dir.join("Zeron Engine");
+ // (The helper's name here: "Zeron Engine" on macOS, zeron-engine on Linux.)
+ let helper = dir.join(zeron_launch::ENGINE_EXECUTABLES[0]);
std::fs::write(&helper, format!("#!/bin/sh\necho \"$@\" > '{}'\nexit 7\n", heard.display())).unwrap();
std::fs::set_permissions(&helper, std::fs::Permissions::from_mode(0o755)).unwrap();
let status = Command::new(&zeron).args(["plugin", "list"]).env("ZERON_DATA_DIR", &dir).status().unwrap();
diff --git a/apps/zgx/tests/pointer_cursor.rs b/apps/zgx/tests/pointer_cursor.rs
index 532b5732f..24f93f31c 100644
--- a/apps/zgx/tests/pointer_cursor.rs
+++ b/apps/zgx/tests/pointer_cursor.rs
@@ -1,9 +1,12 @@
//! The pointer's cursor is the one under it: the sidebar's edge shows the
-//! column-resize cursor, a sidebar row the pointing hand. zgx gives the
-//! cursor of the front-most node at the pointer (`Scene::cursor_at`); a
-//! layer the window's size in front of the shell, even one that lets the
-//! pointer through (the session hover card's, until it was made an anchor of
-//! no size), took every cursor away.
+//! column-resize cursor, a sidebar row the pointing hand. Asked as the
+//! window asks zgx (zgx-desktop's `ui.input.cursor_at`): the cursor of what
+//! a press there would reach, past a layer that lets the pointer through, as
+//! CSS's `pointer-events: none`. A layer the window's size in front of the
+//! shell that doesn't took every cursor away. (`Scene::cursor_at`, the
+//! front-most node's whatever it passes, isn't the window's: the session
+//! card's root is the window's size, passing the pointer, since 1b409eb0e,
+//! so the card leaving stays by its own row.)
use std::path::PathBuf;
@@ -21,7 +24,7 @@ fn the_sidebar_edge_shows_the_resize_cursor_and_a_row_the_hand() {
let b = scene.visible_bounds(edge).expect("the sidebar shows");
// Its edge: its last few points, down its whole height.
for y in [b.y + 120., b.y + b.height / 2., b.y + b.height - 120.] {
- assert_eq!(scene.cursor_at(b.x + b.width - 3., y), Some(Cursor::ColResize), "at its edge, y {y}");
+ assert_eq!(app.ui.input.cursor_at(&scene, b.x + b.width - 3., y), Some(Cursor::ColResize), "at its edge, y {y}");
}
// A row: the hand, as a button.
let row = scene
@@ -30,7 +33,7 @@ fn the_sidebar_edge_shows_the_resize_cursor_and_a_row_the_hand() {
.find_map(|id| scene.cursor_for(id))
.expect("a sidebar row under the pointer");
assert_eq!(row, Cursor::Pointer);
- assert_eq!(scene.cursor_at(100., 290.), Some(Cursor::Pointer));
+ assert_eq!(app.ui.input.cursor_at(&scene, 100., 290.), Some(Cursor::Pointer));
}
/// Every resize handle Zeron v3 has shows its cursor under the pointer, a
@@ -57,11 +60,11 @@ fn every_resize_edge_shows_its_cursor_alone_and_in_a_split() {
let scene = app.ui.scene.borrow();
let b = scene.visible_bounds(sidebar).expect("the sidebar shows");
for y in [b.y + 120., b.y + b.height / 2., b.y + b.height - 120.] {
- assert_eq!(scene.cursor_at(b.x + b.width - 3., y), Some(Cursor::ColResize), "{when}: the sidebar's edge, y {y}");
+ assert_eq!(app.ui.input.cursor_at(&scene, b.x + b.width - 3., y), Some(Cursor::ColResize), "{when}: the sidebar's edge, y {y}");
}
let e = scene.visible_bounds(panel).expect("the panel's edge shows");
for y in [e.y + 120., e.y + e.height / 2., e.y + e.height - 120.] {
- assert_eq!(scene.cursor_at(e.x + e.width / 2., y), Some(Cursor::ColResize), "{when}: the panel's edge, y {y}");
+ assert_eq!(app.ui.input.cursor_at(&scene, e.x + e.width / 2., y), Some(Cursor::ColResize), "{when}: the panel's edge, y {y}");
}
};
check(&mut app, "a chat alone");
@@ -92,5 +95,5 @@ fn every_resize_edge_shows_its_cursor_alone_and_in_a_split() {
let tab = app.target("#panel-strip >> role:tab").expect("a panel tab");
let scene = app.ui.scene.borrow();
let r = scene.visible_bounds(tab).expect("the tab shows");
- assert_eq!(scene.cursor_at(r.x + r.width / 2., r.y + r.height / 2.), Some(Cursor::Pointer), "a panel tab under the title bar's band");
+ assert_eq!(app.ui.input.cursor_at(&scene, r.x + r.width / 2., r.y + r.height / 2.), Some(Cursor::Pointer), "a panel tab under the title bar's band");
}
diff --git a/apps/zgx/tests/reload.rs b/apps/zgx/tests/reload.rs
index 8dd47e4b7..e17c3d8a0 100644
--- a/apps/zgx/tests/reload.rs
+++ b/apps/zgx/tests/reload.rs
@@ -49,6 +49,8 @@ const CALLS: &[&str] = &[
"account.revoke_invite",
"account.resend_invite",
"account.rename_org",
+ "account.keeps_chats_local",
+ "account.keep_chats_local",
"agents.complete",
"agents.install",
"agents.remove",
@@ -102,6 +104,7 @@ const INVOKES: &[&str] = &[
"app.open_main",
"appearance",
"chat.catalog",
+ "chat.catalog_on",
"chat.open",
"done",
"files.unwatch",
@@ -760,18 +763,21 @@ fn a_reload_keeps_the_sidebar_and_settings_where_they_were_scrolled() {
// Settings' page, scrolled down.
assert!(app.host.run_command("shell.settings"));
app.frames(60);
- for _ in 0..4 {
- // (At a heading in view: the page runs on below the window.)
+ // (Scrolled at a heading in view: the page runs on below the window.)
+ let heading_in_view = |app: &mut TestApp| {
let target = zgx_script::driver::parse("#settings-page >> role:heading").unwrap();
app.ui.prepare_frame();
let found = zgx_script::driver::find_all(&app.ui, &app.handle, &target).unwrap_or_default();
- let id = found
+ found
.into_iter()
.find(|&id| {
let b = app.ui.scene.borrow().hit_bounds(id);
b.y > 40. && b.y < 560.
})
- .expect("a heading in view");
+ .expect("a heading in view")
+ };
+ for _ in 0..4 {
+ let id = heading_in_view(&mut app);
zgx_script::driver::scroll(&mut app.ui, id, 150.);
app.settle();
app.frames(4);
@@ -793,7 +799,9 @@ fn a_reload_keeps_the_sidebar_and_settings_where_they_were_scrolled() {
app.frames(30);
assert_eq!(on_screen(&mut app, headings), before, "once settled after the reload: settings' page moved");
let kept = scroll(&app);
- let heading = app.target("#settings-page >> role:heading \"Links\"").expect("a heading in view");
+ // (Any heading in view: General's Links section, which this scrolled
+ // at, went with "Open pull requests in", 0d8a6eb3f.)
+ let heading = heading_in_view(&mut app);
zgx_script::driver::scroll(&mut app.ui, heading, -100.);
app.settle();
app.frames(30);
diff --git a/apps/zgx/tools/file_icons.py b/apps/zgx/tools/file_icons.py
index 677b0333a..66293e38a 100644
--- a/apps/zgx/tools/file_icons.py
+++ b/apps/zgx/tools/file_icons.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-"""File icons for the design system: Zeron's Symbols set (crates/ui/assets/
+"""File icons for the design system: Zeron's Symbols set (assets/
file-icons, miguelsolorio/vscode-symbols, MIT) copied under ui/assets/
icons/files/, each twice (as drawn for light, and with its darker accents
lifted for dark, as Zeron's `dark_icon_svg` does), and the theme's lookup
diff --git a/apps/zgx/ui/account/cloud.luau b/apps/zgx/ui/account/cloud.luau
index fd79dd2ad..d163d6348 100644
--- a/apps/zgx/ui/account/cloud.luau
+++ b/apps/zgx/ui/account/cloud.luau
@@ -33,6 +33,15 @@
-- that predates choosing one
-- cloud.machine() the size new chats start on (tracked)
-- cloud.set_machine(id) choose it, shown at once, put back if refused
+-- cloud.reach() what new chats' machines reach (tracked):
+-- "devices" (your other devices) or "isolated";
+-- nil from an edge that predates choosing
+-- cloud.set_reach(reach) choose it, as set_machine does
+-- cloud.set_session_reach(chat, reach)
+-- what one chat's machine reaches: shown at
+-- once, put back if refused (a toast says why).
+-- Only ever this app's: the engine takes it from
+-- nowhere else
-- cloud.wake(chat, machine?) wake a chat's machine (on that size)
-- cloud.resize(chat, machine) a machine that's up: to sleep, and back on it
-- cloud.fresh(chat, machine?) files expired: a fresh machine, same repository
@@ -41,7 +50,7 @@
-- cloud.clear_failure(chat) that failure read
--
-- A status: { state, available, device?, credits?, error?, failed_action?,
--- awake?, max_awake?, machines?, machine? }. A repository: { name, private,
+-- awake?, max_awake?, machines?, machine?, reach? }. A repository: { name, private,
-- branch?, pushed, account?, accounts?, installation? }: `account`, the GitHub
-- login a new chat on it would use; `accounts`, every one that reaches it;
-- `installation`, the GitHub App's installation that gives the access. (None
@@ -50,6 +59,8 @@
-- answers staying as it is here).
local auth = require("@account/auth")
+local locale = require("@ds/locale")
+local toast = require("@ds/toast")
local M = {}
@@ -64,6 +75,8 @@ export type Status = {
max_awake: number?,
machines: { Machine }?,
machine: string?,
+ -- "devices" | "isolated"; nil from an edge that predates choosing.
+ reach: string?,
}
-- A size of machine, as the edge offers it. `rate`: its credits relative to
-- the standard machine's (xlarge 5.56).
@@ -80,6 +93,8 @@ export type Session = {
error: string?,
failed_action: string?,
machine: string?,
+ -- What its machine reaches: "devices" | "isolated" (nil from an older edge).
+ reach: string?,
stage: string?,
disk: Disk?,
wake_blocked: { reason: string?, needed: number? }?,
@@ -108,6 +123,8 @@ export type Now = {
failure: string?,
-- Why the size chosen for new chats didn't take.
machine_failure: string?,
+ -- Why the reach chosen for new chats didn't take.
+ reach_failure: string?,
}
M.now = ui.state("account_cloud", { phase = "unknown", repos_loading = false } :: Now)
@@ -243,6 +260,17 @@ end
function M.ask_set_machine(machine: string): any
return ui.call("cloud.set_machine", { machine = machine })
end
+function M.ask_set_reach(reach: string): any
+ return ui.call("cloud.set_reach", { reach = reach })
+end
+function M.ask_set_session_reach(chat: string, reach: string): any
+ return ui.call("cloud.set_session_reach", { chat = chat, reach = reach })
+end
+
+function M.reach(): string?
+ local s = M.now:get().status
+ return s and s.reach
+end
function M.machines(): { Machine }
local s = M.now:get().status
@@ -501,6 +529,57 @@ function M.set_machine(id: string)
end)
end
+function M.set_reach(reach: string)
+ local status = M.now:peek().status
+ if not status or status.reach == nil or status.reach == reach then
+ return
+ end
+ local was = status.reach
+ local shown = table.clone(status) :: any
+ shown.reach = reach
+ patch { status = shown, reach_failure = nil :: any }
+ M.ask_set_reach(reach):after(function(s: any)
+ if s then
+ M.take(s)
+ end
+ end, function(e: any)
+ local back = table.clone(M.now:peek().status or status) :: any
+ back.reach = was
+ patch { status = back, reach_failure = word_of(e) }
+ end)
+end
+
+-- One chat's machine reaches `reach`: said at once, its session's answer
+-- taken, or put back with why (the edge's words, else a word).
+function M.set_session_reach(chat: string, reach: string)
+ local s = M.session_for(chat, nil)
+ if not s or s.reach == reach then
+ return
+ end
+ local was = s.reach
+ local shown = table.clone(s) :: any
+ shown.reach = reach
+ take_session(shown)
+ M.ask_set_session_reach(chat, reach):after(function(answer: any)
+ if answer then
+ take_session(answer)
+ end
+ end, function(e: any)
+ local now = M.session_for(chat, nil)
+ if now then
+ local back = table.clone(now) :: any
+ back.reach = was
+ take_session(back)
+ end
+ toast.show {
+ title = locale.s("account.cloud.reach_not_changed"),
+ body = if word_of(e) ~= "failed" then word_of(e) else nil,
+ tone = "danger",
+ }
+ M.load_sessions(true)
+ end)
+end
+
function M.usage(from: string, to: string): any
return ui.call("cloud.usage", { from = from, to = to })
end
diff --git a/apps/zgx/ui/account/sessions.luau b/apps/zgx/ui/account/sessions.luau
index 22b51e557..7940c4c68 100644
--- a/apps/zgx/ui/account/sessions.luau
+++ b/apps/zgx/ui/account/sessions.luau
@@ -77,6 +77,11 @@ export type Chat = {
-- woke (Unix seconds).
sleep_until: number?,
woke: number?,
+ -- The last turn its agent finished (an opaque mark, nil before its
+ -- first), and whether its session row was fresh as that was read: what
+ -- the "finished" chime rings on moving (screens/settings/chimes).
+ turn: string?,
+ turn_fresh: boolean?,
}
export type WaitingOn = { id: string, kind: string, label: string }
-- A side chat: a chat under another (its `parent`).
diff --git a/apps/zgx/ui/auto_access_fixture.luau b/apps/zgx/ui/auto_access_fixture.luau
new file mode 100644
index 000000000..4a8f3b583
--- /dev/null
+++ b/apps/zgx/ui/auto_access_fixture.luau
@@ -0,0 +1,44 @@
+-- Composer fixture for capability changes while Auto remains selected.
+ui.theme.strict("warn")
+local ds = require("@ds")
+local Composer = require("@ds/composer")
+local Cargo = require("@ds/composer_cargo")
+local Ask = require("@ds/composer_ask")
+ds.setup()
+
+local HARNESSES: { ds.Harness } = { { id = "claude", label = "Claude", mark = "claude" } }
+local MODELS: { ds.Model } = { { value = "sonnet", label = "Sonnet", harness = "claude" } }
+local access_auto = ui.shared("test_composer_auto", true)
+local sent = ui.shared("test_composer_sent", "")
+local PROJECTS: { Composer.Project } = {
+ { value = "atlas", label = "Atlas", hue = "violet" },
+ { value = "borealis", label = "Borealis", hue = "blue" },
+ { value = "none", label = "No project" },
+}
+
+return ui.column {
+ w_full = true,
+ h_full = true,
+ p = "$space.4",
+ justify = "end",
+ ds.Composer {
+ value = ui.shared("test_composer_draft", ""),
+ on_send = function(text: string)
+ sent:set(text)
+ end,
+ access = ui.shared("test_composer_access", "auto" :: string?),
+ access_auto = function(): boolean
+ return access_auto:get()
+ end,
+ model = ui.state("test_composer_model", "sonnet" :: string?),
+ effort = ui.state("test_composer_effort", "medium" :: string?),
+ harnesses = HARNESSES,
+ models = MODELS,
+ notice = ui.state("test_composer_notice", nil :: Composer.Notice?),
+ dictating = ui.state("test_composer_dictating", false),
+ cargo = ui.state("test_composer_cargo", {} :: { Cargo.Item }),
+ question = ui.state("test_composer_question", nil :: Ask.Question?),
+ project = ui.state("test_composer_project", "atlas" :: string?),
+ projects = PROJECTS,
+ },
+}
diff --git a/apps/zgx/ui/chat_fixture.luau b/apps/zgx/ui/chat_fixture.luau
index 95a481f9a..299b460f1 100644
--- a/apps/zgx/ui/chat_fixture.luau
+++ b/apps/zgx/ui/chat_fixture.luau
@@ -330,6 +330,24 @@ ui.command {
SEND_FAILS:set(true)
end,
}
+-- A new chat's agent started early (screens/chat/warm): noted, with whether
+-- it was typed into (`warm::`; a new chat's id is "new"), and
+-- what it was asked for (`warm_ask:|||`).
+stub.warm = function(id: string, req: any, typed: boolean): any
+ local m = META[id]
+ note(`warm:{if m then id else "new"}:{if typed then "typed" else "open"}`)
+ note(`warm_ask:{id}|{req.model or "-"}|{req.cwd or "-"}|{req.device or "-"}`)
+ return { after = function(_: any, done: (any) -> ()) done("started") end }
+end
+stub.unwarm = function(id: string)
+ note(`unwarm:{if META[id] then id else "new"}`)
+end
+stub.warm_cleared = function(id: string)
+ note(`warm_cleared:{if META[id] then id else "new"}`)
+end
+stub.warm_taken = function(id: string)
+ note(`warm_taken:{id}`)
+end
stub.send = function(req: any)
note(`send:{req.session or "new"}:{req.text}`)
-- A send carries no time of its own: the host starts its clock when it
@@ -886,6 +904,16 @@ ui.command {
end,
}
+-- A settled reply the host gave no time (as Windows did before it could
+-- read one): its Copy shows all the same (tests/chat_in_place).
+ui.command {
+ id = "reply_without_time",
+ title = "A reply with no time",
+ run = function()
+ store.messages:push { id = "notime1", role = "assistant", text = "Answered with no clock.", copy = "Answered with no clock." }
+ end,
+}
+
-- Messages from other chats, as the host gives them: one from a chat that's
-- listed, one from a chat that isn't, one with a long title (tests/chat_sender).
ui.command {
@@ -1127,7 +1155,18 @@ stub.create_failed = function(id: string)
TRANSCRIPTS[id] = nil
seed()
end
+local CREATE_FAILS = ui.state("fixture_create_fails", false)
+ui.command { id = "create_fails", title = "The next new chat isn't made", run = function()
+ CREATE_FAILS:set(true)
+end }
sessions_stub.create = function(req: any)
+ if CREATE_FAILS:peek() and not req.cloud then
+ CREATE_FAILS:set(false)
+ note(`create_failed_for:{req.id or "-"}`)
+ return { after = function(_self: any, _ok: any, bad: (any) -> ())
+ bad("offline")
+ end }
+ end
made_chats += 1
local id = req.id or `new{made_chats}`
note(`create:{req.project or "none"}:{req.config and req.config.model or ""}`)
@@ -1606,6 +1645,29 @@ ui.effect(function()
table.sort(keys)
plugin_comments:set(table.concat(keys, ","))
end)
+-- The draft lifted out whole and laid back (a plugin's `zeron.take_draft`
+-- and `put_draft`; screens/plugins keeps it between the two, as this
+-- does). `test_lifted` says what was lifted: its words and how many chips.
+local lifted: any = nil
+local lifted_said = ui.state("test_lifted", "")
+ui.command {
+ id = "draft_lift",
+ title = "A plugin takes the draft",
+ run = function()
+ lifted = require("@app/screens/chat/shared").lift()
+ lifted_said:set(if lifted then `{lifted.text}|{#lifted.cargo}` else "nothing")
+ end,
+}
+ui.command {
+ id = "draft_lay",
+ title = "A plugin puts the draft back",
+ run = function()
+ if lifted then
+ require("@app/screens/chat/shared").lay(lifted)
+ lifted = nil
+ end
+ end,
+}
ui.command {
id = "comment_moves",
title = "The comment is carried two lines down",
@@ -1643,6 +1705,49 @@ ui.command {
}
end,
}
+-- `long_thread`: ademark's A11 thread, one reply of a thousand steps, each a
+-- short text (one in five with a code block) and a call reading a file, its
+-- last text holding `LONGTHREAD-END` (the engine's mock `/longthread`), as
+-- Tall replies (s7).
+local function long_thread(steps: number): { any }
+ local blocks: { any } = {}
+ for n = 1, steps do
+ local text = `Step {n} of {steps}. I read src/invoices.ts and noted what step {n} needs from it.`
+ if n % 5 == 0 then
+ text ..= "\n\n```ts\nfunction summarize(invoice: Invoice): InvoiceSummary {\n const total = invoiceTotal(invoice);\n return { id: invoice.id, totalCents: total };\n}\n```"
+ end
+ table.insert(blocks, { id = `t{n}`, kind = "text", text = text })
+ table.insert(blocks, {
+ id = `g:toolu_{n}`,
+ kind = "tools",
+ summary = "Read 1 file",
+ live = false,
+ tools = { { id = `toolu_{n}`, kind = "read", verb = "Read", target = "invoices.ts", call = "src/invoices.ts" } },
+ })
+ end
+ table.insert(blocks, { id = "tend", kind = "text", text = "All steps done. LONGTHREAD-END" })
+ local texts = {}
+ for _, b in blocks do
+ if b.kind == "text" then
+ table.insert(texts, b.text)
+ end
+ end
+ local whole = table.concat(texts, "\n\n")
+ return {
+ { id = "lt1", role = "user", text = `/longthread {steps}` },
+ { id = "lt2", role = "assistant", text = whole, model = "Opus", at = "Nov 13, 9:00 PM", copy = whole, blocks = blocks },
+ }
+end
+ui.command {
+ id = "long_thread",
+ title = "A thread of a thousand steps",
+ run = function()
+ TRANSCRIPTS.s7 = long_thread(1000)
+ if store.session:peek() and (store.session:peek() :: any).id == "s7" then
+ store.messages:set(TRANSCRIPTS.s7)
+ end
+ end,
+}
-- A long chat: many long messages, landing at once (a chat of a day's
-- work), for what the transcript asks of each as it's listed and scrolled.
ui.command {
@@ -2072,6 +2177,14 @@ ui.command {
route.new_chat()
end,
}
+-- The person's own new chat (⌘N's own path: screens/chat/warm hears it).
+ui.command {
+ id = "go_new_by_hand",
+ title = "New chat, by hand",
+ run = function()
+ route.new_chat("atlas")
+ end,
+}
ui.command {
id = "go_home",
title = "A new chat",
diff --git a/apps/zgx/ui/chimes_fixture.luau b/apps/zgx/ui/chimes_fixture.luau
new file mode 100644
index 000000000..a9788cbae
--- /dev/null
+++ b/apps/zgx/ui/chimes_fixture.luau
@@ -0,0 +1,7 @@
+-- The session chimes (screens/settings/chimes) with no engine: a test sets
+-- the `sessions` shared state as the engine would publish it, and reads what
+-- played from `settings_stub_calls` ("sound.play:done", …).
+require("./settings_stub")
+require("@app/screens/settings/chimes")
+
+return ui.column {}
diff --git a/apps/zgx/ui/cloud_stub.luau b/apps/zgx/ui/cloud_stub.luau
index e91cad896..29094b7ff 100644
--- a/apps/zgx/ui/cloud_stub.luau
+++ b/apps/zgx/ui/cloud_stub.luau
@@ -92,6 +92,8 @@ local old_edge = ui.state("cloud_stub_old_edge", false)
local chosen_machine = ui.state("cloud_stub_machine", "default")
local refuse_wake = ui.state("cloud_stub_refuse_wake", false)
local refuse_machine = ui.state("cloud_stub_refuse_machine", false)
+local chosen_reach = ui.state("cloud_stub_reach", "devices")
+local refuse_reach = ui.state("cloud_stub_refuse_reach", false)
-- The chat's session, as the edge says it now.
local session_now = ui.state("cloud_stub_session", nil :: any)
@@ -110,6 +112,7 @@ local function status(): cloud.Status
max_awake = 5,
machines = if old_edge:peek() then nil else MACHINES,
machine = if old_edge:peek() then nil else chosen_machine:peek(),
+ reach = if old_edge:peek() then nil else chosen_reach:peek(),
}
end
@@ -240,6 +243,24 @@ c.ask_set_machine = function(machine: string): any
chosen_machine:set(machine)
return answer(status())
end
+c.ask_set_reach = function(reach: string): any
+ log(`cloud.set_reach:{reach}`)
+ if refuse_reach:peek() then
+ return settled(nil, "failed")
+ end
+ chosen_reach:set(reach)
+ return answer(status())
+end
+c.ask_set_session_reach = function(chat: string, reach: string): any
+ log(`cloud.set_session_reach:{chat}:{reach}`)
+ if refuse_reach:peek() then
+ return settled(nil, "failed")
+ end
+ local s = table.clone(session_now:peek() or {})
+ s.reach = reach
+ session_now:set(s)
+ return answer(s)
+end
c.branches = function(repo: string, default: string?): any
log(`cloud.branches:{repo}`)
return answer {
@@ -533,7 +554,15 @@ local chat_id, device_id = "s2", "cloud-s2"
-- often it's read.
local RESTORED_AT = os.time() - 3600
local function session_of(fields: { [string]: any }): any
- local s: { [string]: any } = { chat = chat_id, device = device_id, state = "sleeping", space = "atlas", repo = "acme/atlas", machine = "default" }
+ local s: { [string]: any } = {
+ chat = chat_id,
+ device = device_id,
+ state = "sleeping",
+ space = "atlas",
+ repo = "acme/atlas",
+ machine = "default",
+ reach = "devices",
+ }
for k, v in fields do
s[k] = v
end
diff --git a/apps/zgx/ui/composer_place_fixture.luau b/apps/zgx/ui/composer_place_fixture.luau
index e4e28fa2d..34767771b 100644
--- a/apps/zgx/ui/composer_place_fixture.luau
+++ b/apps/zgx/ui/composer_place_fixture.luau
@@ -16,6 +16,10 @@
-- test_place_bare the art hidden, its backings kept (to measure ink)
-- test_place_picture "plate-1-night" | "plate-3-sunrise"
-- test_place_radii "default" | "hot" (the Hot Pink template's radii; reload)
+-- test_place_reach a new chat's reach on Cloud (nil: the default)
+-- test_place_reach_default the account's ("devices" | "isolated")
+-- test_place_fixed an existing chat's place (Composer.Fixed), or nil
+-- test_place_reach_picked what an existing Cloud chat's reach was set to
ui.theme.strict("warn")
local ds = require("@ds")
@@ -38,6 +42,9 @@ local bare = ui.state("test_place_bare", false)
-- (The picture: "plate-1-night" dark, "plate-3-sunrise" bright.)
local picture = ui.state("test_place_picture", "plate-1-night")
local usage = ui.state("test_place_usage", { tokens = 408389, window = 1000000 } :: Composer.Usage?)
+local reach_default = ui.state("test_place_reach_default", "devices" :: string?)
+local fixed = ui.state("test_place_fixed", nil :: Composer.Fixed?)
+local reach_picked = ui.state("test_place_reach_picked", nil :: string?)
-- The theme, as the app sets it (the window's, global), so what reads the
-- theme's values follows it too.
@@ -177,6 +184,16 @@ return ui.column {
checkout = ui.state("test_place_checkout", "worktree" :: string?),
branch = ui.state("test_place_branch", "zeron/create-readme-update-for-onboarding" :: string?),
branches = BRANCHES,
+ reach = ui.state("test_place_reach", nil :: string?),
+ reach_default = function(): string?
+ return reach_default:get()
+ end,
+ branch_fixed = function(): Composer.Fixed?
+ return fixed:get()
+ end,
+ on_reach = function(r: string)
+ reach_picked:set(r)
+ end,
-- (The fraction too: a composer before `usage` reads it.)
context = function(): number
local u = usage:get()
diff --git a/apps/zgx/ui/consent_fixture.luau b/apps/zgx/ui/consent_fixture.luau
index 666c0d1fd..0c70daf87 100644
--- a/apps/zgx/ui/consent_fixture.luau
+++ b/apps/zgx/ui/consent_fixture.luau
@@ -174,9 +174,9 @@ local PLUGINS: { [string]: any } = {
hash = "long-1",
status = "pending",
author = { kind = "unknown" },
- permissions = { "ui.add", "ui.change", "profile.read", "sessions.read", "messages.read", "account.email", "files.read", "panel.tabs", "pages.add", "github", "github.write", "notifications", "links.open", "navigate", "compose", "network", "clipboard", "files", "web", "windows", "tools", "devices", "service", "commands", "native" },
+ permissions = { "ui.add", "ui.change", "profile.read", "sessions.read", "messages.read", "account.email", "files.read", "panel.tabs", "pages.add", "github", "github.write", "notifications", "links.open", "navigate", "compose", "draft", "network", "clipboard", "files", "web", "windows", "tools", "devices", "service", "commands", "native" },
allowed = {},
- ask = { "ui.add", "ui.change", "profile.read", "sessions.read", "messages.read", "account.email", "files.read", "panel.tabs", "pages.add", "github", "github.write", "notifications", "links.open", "navigate", "compose", "network", "clipboard", "files", "web", "windows", "tools", "devices", "service", "commands", "native" },
+ ask = { "ui.add", "ui.change", "profile.read", "sessions.read", "messages.read", "account.email", "files.read", "panel.tabs", "pages.add", "github", "github.write", "notifications", "links.open", "navigate", "compose", "draft", "network", "clipboard", "files", "web", "windows", "tools", "devices", "service", "commands", "native" },
ui = { change = { "#shell" } },
commands = { "git" },
tools = { { name = "a", description = "First." } },
diff --git a/apps/zgx/ui/demos/syntax.luau b/apps/zgx/ui/demos/syntax.luau
index 683232613..e0d8d83a6 100644
--- a/apps/zgx/ui/demos/syntax.luau
+++ b/apps/zgx/ui/demos/syntax.luau
@@ -70,8 +70,7 @@ local function editor(id: string, value: State): Node
highlight = Syntax.highlighter(id),
line_numbers = true,
font = "$font.mono",
- -- The textarea takes its type size as a number, not a token.
- text_size = ui.theme.get("zeron.prose.code.size") :: number,
+ text_size = "$zeron.prose.code.size",
tab = " ",
current_line = "$hover",
-- No inset on the scrolling sides: a textarea clips inside its padding.
diff --git a/apps/zgx/ui/ds/activity.luau b/apps/zgx/ui/ds/activity.luau
index 29cebb203..8e05f0bc4 100644
--- a/apps/zgx/ui/ds/activity.luau
+++ b/apps/zgx/ui/ds/activity.luau
@@ -585,13 +585,6 @@ local OPENS: { [string]: boolean } = { exec = true, read = true, edit = true, wr
-- Kinds whose row counts lines added and removed (an edit's).
local COUNTS: { [string]: boolean } = { edit = true, write = true }
--- (`below`: a tool with a branch follows, so the trunk runs on under this
--- one; `running`: it is the one in flight, its glyph the working loader;
--- `resized`: told the row's size as it's laid out; `settled`: it is before
--- the group's last, so never the one in flight.)
--- A row is built often (each comes into view, a long group's thousands), so
--- what can't change once a tool has started is read once as it's made (its
--- kind, its verb, its glyph); only what a tool's result changes follows it.
-- Auto's reviewer on a call: its glyph becomes a shield in the verdict's
-- hue (let through quiet, stopped in danger's, timed out in warning's), its
-- risk and why in the tooltip. A call no reviewer looked at keeps its own.
@@ -635,6 +628,13 @@ local function review_glyph(now: () -> Tool, size: number): Node
}
end
+-- (`below`: a tool with a branch follows, so the trunk runs on under this
+-- one; `running`: it is the one in flight, its glyph the working loader;
+-- `resized`: told the row's size as it's laid out; `settled`: it is before
+-- the group's last, so never the one in flight.)
+-- A row is built often (each comes into view, a long group's thousands), so
+-- what can't change once a tool has started is read once as it's made (its
+-- kind, its verb, its glyph); only what a tool's result changes follows it.
local function row(
now: () -> Tool,
below: () -> boolean,
@@ -912,6 +912,12 @@ return ui.component(function(props: Props): Node
-- be built for nothing as a list scrolls, and a selection across the
-- reply would take text no one can see.
local mounted = ui.use_state(opened:peek())
+ -- (The tree itself, its list and what keeps its rows' heights, is made
+ -- the first time it opens: a finished reply's groups, folded, most of a
+ -- long thread's, never make one. `unfolded`: one made by opening eases
+ -- open from nothing, as one made earlier does.)
+ local tree_made = ui.use_state(opened:peek())
+ local unfolded = ui.use_state(opened:peek())
local folding: (() -> ())? = nil
ui.effect(function()
local on = opened:get()
@@ -920,7 +926,10 @@ return ui.component(function(props: Props): Node
folding = nil
end
if on then
- mounted:set(true)
+ ui.batch(function()
+ tree_made:set(true)
+ mounted:set(true)
+ end)
elseif mounted:peek() then
folding = ui.after(FOLD, function()
folding = nil
@@ -928,98 +937,139 @@ return ui.component(function(props: Props): Node
end)
end
end)
- -- The rows: a list virtualized by the view around it (the transcript's),
- -- each call a row of its own, built only as the view shows it, the rows
- -- about to come into it built ahead in the time frames leave over
- -- (zgx's `ahead`), so a scroll or the tree opening builds what shows
- -- alone. A row follows its tool in place (its item as a state), and
- -- holds its height in `heights`: a call's line is ROW, one opened or a
- -- thought its own, as it was last laid out.
- local own_key = key or tostring(own)
- local heights = ui.use_state({} :: { number })
- local listed: { string } = {}
- -- Calls arriving while the rows are made: each plays `ENTER` as it is
- -- first built, as a row joining a `ui.each` does.
- local arriving: { [string]: boolean } = {}
- local was_mounted = false
- -- A row's height as it is first laid out: a call's line, ROW, or as it
- -- was last laid out if opened; a thought, as it was if it's short or
- -- opened, else its four lines folded before it knows it's long (its
- -- button's room comes a frame on, as the words are measured).
- local line = ui.theme.get("zeron.prose.small.line") :: number
- local first_folded = THOUGHT_LINES * line + (ROW - line)
- local function height_of(t: Tool): number
- local h = MEASURED[`{own_key}:{t.id}`]
- local open = CALLS_OPEN:peek()[t.id] == true
- if t.kind ~= "thought" then
- return if open and h then h else ROW
- end
- if h and (open or h <= first_folded) then
- return h
- end
- return first_folded
- end
- ui.effect(function()
- local list = tools:get()
- local m = mounted:get()
- local n = #list
- -- (Rows that were there before: the same calls in the same places,
- -- looked at at the ends; anything else is written whole.)
- local same = #listed <= n
- and (#listed == 0 or (list[1].id == listed[1] and list[#listed].id == listed[#listed]))
- ui.batch(function()
- if not same then
- heights:set({})
- table.clear(listed)
+ local Tree = ui.component(function(_: {}): Node
+ -- The rows: a list virtualized by the view around it (the transcript's),
+ -- each call a row of its own, built only as the view shows it, the rows
+ -- about to come into it built ahead in the time frames leave over
+ -- (zgx's `ahead`), so a scroll or the tree opening builds what shows
+ -- alone. A row follows its tool in place (its item as a state), and
+ -- holds its height in `heights`: a call's line is ROW, one opened or a
+ -- thought its own, as it was last laid out.
+ local own_key = key or tostring(own)
+ local heights = ui.use_state({} :: { number })
+ local listed: { string } = {}
+ -- Calls arriving while the rows are made: each plays `ENTER` as it is
+ -- first built, as a row joining a `ui.each` does.
+ local arriving: { [string]: boolean } = {}
+ local was_mounted = false
+ -- A row's height as it is first laid out: a call's line, ROW, or as it
+ -- was last laid out if opened; a thought, as it was if it's short or
+ -- opened, else its four lines folded before it knows it's long (its
+ -- button's room comes a frame on, as the words are measured).
+ local line = ui.theme.get("zeron.prose.small.line") :: number
+ local first_folded = THOUGHT_LINES * line + (ROW - line)
+ local function height_of(t: Tool): number
+ local h = MEASURED[`{own_key}:{t.id}`]
+ local open = CALLS_OPEN:peek()[t.id] == true
+ if t.kind ~= "thought" then
+ return if open and h then h else ROW
end
- for i = #listed + 1, n do
- local t = list[i]
- listed[i] = t.id
- if m and was_mounted then
- arriving[t.id] = true
+ if h and (open or h <= first_folded) then
+ return h
+ end
+ return first_folded
+ end
+ ui.effect(function()
+ local list = tools:get()
+ local m = mounted:get()
+ local n = #list
+ -- (Rows that were there before: the same calls in the same places,
+ -- looked at at the ends; anything else is written whole.)
+ local same = #listed <= n
+ and (#listed == 0 or (list[1].id == listed[1] and list[#listed].id == listed[#listed]))
+ ui.batch(function()
+ if not same then
+ heights:set({})
+ table.clear(listed)
end
- heights:push(height_of(t))
- end
+ for i = #listed + 1, n do
+ local t = list[i]
+ listed[i] = t.id
+ if m and was_mounted then
+ arriving[t.id] = true
+ end
+ heights:push(height_of(t))
+ end
+ end)
+ was_mounted = m
end)
- was_mounted = m
- end)
- local function row_view(t: Tool, index: State, item: State): Node
- local id = t.id
- local function place(): number
- return index:get()
- end
- -- Its height, as laid out, for the rows after it.
- local function resized(size: { w: number, h: number })
- local k = `{own_key}:{id}`
- if MEASURED[k] ~= size.h then
- kept_set(MEASURED, k, size.h)
+ local function row_view(t: Tool, index: State, item: State): Node
+ local id = t.id
+ local function place(): number
+ return index:get()
end
- local i = index:peek()
- local held = heights:peek()[i]
- if held ~= nil and held ~= size.h then
- heights:set_key(i, size.h)
+ -- Its height, as laid out, for the rows after it.
+ local function resized(size: { w: number, h: number })
+ local k = `{own_key}:{id}`
+ if MEASURED[k] ~= size.h then
+ kept_set(MEASURED, k, size.h)
+ end
+ local i = index:peek()
+ local held = heights:peek()[i]
+ if held ~= nil and held ~= size.h then
+ heights:set_key(i, size.h)
+ end
end
+ local function made(): Node
+ return row(function(): Tool
+ return item:get()
+ end, function(): boolean
+ return place() < last_branch:get()
+ end, function(): boolean
+ return live() and place() == count:get()
+ end, props.open_subagent, props.thought, props.key, resized, place() < count:peek(), props.pictures)
+ end
+ -- (A call arriving joins as a row joining a `ui.each` does; the rest
+ -- are made as they come into view, as they were.)
+ if arriving[id] then
+ arriving[id] = nil
+ return ui.presence(function(): string
+ return "row"
+ end, made, { enter = ENTER, initial = true, w_full = true })
+ end
+ return made()
end
- local function made(): Node
- return row(function(): Tool
- return item:get()
- end, function(): boolean
- return place() < last_branch:get()
- end, function(): boolean
- return live() and place() == count:get()
- end, props.open_subagent, props.thought, props.key, resized, place() < count:peek(), props.pictures)
- end
- -- (A call arriving joins as a row joining a `ui.each` does; the rest
- -- are made as they come into view, as they were.)
- if arriving[id] then
- arriving[id] = nil
- return ui.presence(function(): string
- return "row"
- end, made, { enter = ENTER, initial = true, w_full = true })
- end
- return made()
- end
+ return ui.column {
+ w_full = true,
+ overflow = "hidden",
+ layout = "height",
+ layout_clip = true,
+ layout_duration = FOLD,
+ layout_ease = "outQuart",
+ max_h = function(): number
+ return if opened:get() and unfolded:get() then 1e6 else 0
+ end,
+ on_mount = function()
+ if not unfolded:peek() then
+ ui.after(0, function()
+ unfolded:set(true)
+ end)
+ end
+ end,
+ if props.body
+ then ui.presence(function(): string?
+ return if mounted:get() then "body" else nil
+ end, function(): Node
+ return (props.body :: () -> Node)()
+ end, { w_full = true })
+ else ui.show(
+ mounted,
+ ui.list {
+ w_full = true,
+ virtualize = "ancestor",
+ data = tools,
+ key = "id",
+ heights = heights,
+ row = row_view,
+ }
+ ),
+ }
+ end)
+
+ -- (Made while it works: its line rolls and its loader shows as it goes.
+ -- Made done, it stays done: a finished reply's group never works again.)
+ local working = live()
return ui.column {
w_full = true,
ui.show(
@@ -1055,40 +1105,14 @@ return ui.component(function(props: Props): Node
-- While it works, the working loader before the summary, its
-- ring over the trunk below; done, the summary alone, on the
-- reply's left edge.
- ui.show(live, status.StatusIcon { kind = "working", size = LOADER }),
+ if working then ui.show(live, status.StatusIcon { kind = "working", size = LOADER }) else nil,
-- (Its box fills the header: its width easing would show nothing,
- -- and lay the header out every frame of a roll.)
- FadeText { title, roll = true, glide = false, grow = 1, text_size = "$font.size.sm" },
+ -- and lay the header out every frame of a roll. A group made once
+ -- it's done keeps its line: nothing to roll.)
+ FadeText { title, roll = working, glide = false, grow = 1, text_size = "$font.size.sm" },
}
),
- -- The tree: its rows, each arriving under the last.
- ui.column {
- w_full = true,
- overflow = "hidden",
- layout = "height",
- layout_clip = true,
- layout_duration = FOLD,
- layout_ease = "outQuart",
- max_h = function(): number
- return if opened:get() then 1e6 else 0
- end,
- if props.body
- then ui.presence(function(): string?
- return if mounted:get() then "body" else nil
- end, function(): Node
- return (props.body :: () -> Node)()
- end, { w_full = true })
- else ui.show(
- mounted,
- ui.list {
- w_full = true,
- virtualize = "ancestor",
- data = tools,
- key = "id",
- heights = heights,
- row = row_view,
- }
- ),
- },
+ -- The tree: its rows, each arriving under the last (made once it opens).
+ ui.show(tree_made, Tree {}),
}
end)
diff --git a/apps/zgx/ui/ds/command_palette.luau b/apps/zgx/ui/ds/command_palette.luau
index 8229b151f..fc8cb6e23 100644
--- a/apps/zgx/ui/ds/command_palette.luau
+++ b/apps/zgx/ui/ds/command_palette.luau
@@ -1735,6 +1735,22 @@ local Body = ui.component(function(props: Props & { recent_state: State<{ string
-- lengths, breathing one after another.
local widths = { 168, 120, 212, 144, 96 }
local breath = ui.use_state(0.4)
+ -- The breathing goes with the row: a loop on a state is the
+ -- script's, not the row's, and one left behind wanted every
+ -- frame of the display for as long as the app ran (each page
+ -- the palette loaded left five).
+ local waiting: (() -> ())? = nil
+ local breathing: any = nil
+ ui.on_cleanup(function()
+ if waiting then
+ waiting()
+ waiting = nil
+ end
+ if breathing then
+ breathing:cancel()
+ breathing = nil
+ end
+ end)
return ui.div {
w_full = true,
h = r.h,
@@ -1744,8 +1760,9 @@ local Body = ui.component(function(props: Props & { recent_state: State<{ string
if motion.reduced_now() then
return
end
- ui.after((r.count or 1) * 90, function()
- anime.animate(breath, { value = 0.9, duration = 700, ease = "inOutSine", loop = true, alternate = true })
+ waiting = ui.after((r.count or 1) * 90, function()
+ waiting = nil
+ breathing = anime.animate(breath, { value = 0.9, duration = 700, ease = "inOutSine", loop = true, alternate = true })
end)
end,
ui.row {
diff --git a/apps/zgx/ui/ds/composer.luau b/apps/zgx/ui/ds/composer.luau
index 7e003b82f..2e2bbcb87 100644
--- a/apps/zgx/ui/ds/composer.luau
+++ b/apps/zgx/ui/ds/composer.luau
@@ -52,9 +52,11 @@ local dock = require("@self/composer_dock")
local ask = require("@self/composer_ask")
local mentions = require("@self/composer_mentions")
local locale = require("@self/locale")
+local Tooltip = require("@self/tooltip")
local VoiceWave = require("@self/voice_wave").VoiceWave
local context_usage = require("@self/context_usage")
local TextMetrics = require("@self/composer_metrics")
+local Draft = require("@self/draft_text")
local Layout = require("@self/composer_layout")
local ComposerMotion = require("@self/composer_motion")
local EditorMenu = require("@self/editor_menu")
@@ -97,8 +99,20 @@ export type Notice = {
quiet: boolean?,
}
export type Answer = { values: { string }, text: string }
--- Where an existing chat works (`branch_fixed`).
-export type Fixed = { device: string?, name: string?, worktree: boolean, project: string?, hue: string?, src: string?, emoji: string? }
+-- Where an existing chat works (`branch_fixed`). On Cloud (`cloud`): a
+-- machine of its own, and what it reaches (`reach`: "devices" | "isolated",
+-- nil while not known).
+export type Fixed = {
+ device: string?,
+ name: string?,
+ worktree: boolean,
+ project: string?,
+ hue: string?,
+ src: string?,
+ emoji: string?,
+ cloud: boolean?,
+ reach: string?,
+}
export type Sizes = { rest: number, target: number, presented: number, active: boolean, ready: boolean, settling: boolean, context: number }
export type Props = {
on_sizes: ((sizes: Sizes) -> ())?,
@@ -178,9 +192,16 @@ export type Props = {
branches_empty: ((query: string) -> Dropdown.Empty)?,
-- Where an existing chat works, fixed (its branch, live, whether its
-- folder is a worktree, and its project's name, hue and artwork): the
- -- chip says so and opens nothing, as a chat can't move. Nil (a new
- -- chat): the picker.
+ -- chip says so, and its panel shows where it works with nothing to
+ -- change, as a chat can't move; but a Cloud chat's reach, which
+ -- `on_reach` changes. Nil (a new chat): the picker.
branch_fixed: (() -> Fixed?)?,
+ on_reach: ((reach: string) -> ())?,
+ -- On Cloud, what a new chat's machine reaches ("devices" | "isolated";
+ -- nil: `reach_default`, the account's). No default (an edge that can't
+ -- keep one), no choice.
+ reach: State?,
+ reach_default: (() -> string?)?,
on_send: ((text: string) -> ())?,
on_stop: (() -> ())?,
-- A bare Escape no one else took (no mention list, question or
@@ -369,7 +390,7 @@ end
-- held back (an open padlock). Auto only where the agent has one (`auto`),
-- or while it's the mode chosen. (Made as they're read, in the locale's
-- words.)
-local function ACCESS(auto: boolean): { Dropdown.Item }
+local function ACCESS(auto: boolean, chosen: string?): { Dropdown.Item }
local items = {
worded({ value = "supervised", icon = "access-supervised" }, {
label = "ds.composer.access.supervised",
@@ -380,10 +401,10 @@ local function ACCESS(auto: boolean): { Dropdown.Item }
description = "ds.composer.access.edits_hint",
}),
}
- if auto then
- table.insert(items, worded({ value = "auto", icon = "shield-check" }, {
- label = "ds.composer.access.auto",
- description = "ds.composer.access.auto_hint",
+ if auto or chosen == "auto" then
+ table.insert(items, worded({ value = "auto", icon = "shield-check", disabled = not auto }, {
+ label = if auto then "ds.composer.access.auto" else "ds.composer.access.auto_unavailable",
+ description = if auto then "ds.composer.access.auto_hint" else "ds.composer.access.auto_unavailable_hint",
}))
end
table.insert(items, worded({ value = "full", icon = "access-full" }, {
@@ -446,6 +467,21 @@ local function CHECKOUTS(): { Choice }
}
end
+-- What a Cloud chat's machine reaches, as Zeron offers it: the person's
+-- other devices, or nothing past itself and the chats it starts.
+local function REACHES(): { Choice }
+ return {
+ worded({ value = "devices", icon = "monitor" }, {
+ label = "ds.composer.reach.devices",
+ description = "ds.composer.reach.devices_hint",
+ }),
+ worded({ value = "isolated", icon = "shield-check" }, {
+ label = "ds.composer.reach.isolated",
+ description = "ds.composer.reach.isolated_hint",
+ }),
+ }
+end
+
-- A menu row, the menus' own: compact, full width, washed under the
-- pointer.
local function menu_row(props: ContainerProps): Node
@@ -474,17 +510,77 @@ local function list_of(given: any): any
return given or {}
end
+-- A choice's own tile (a project's hue or artwork), else its icon: one or
+-- the other, following the choice. (`ink`: the icon's, a row's that can't
+-- change.)
+local function choice_mark(current: () -> Choice, ink: string?): Node
+ return ui.presence(function(): string
+ local c = current()
+ return if c.hue or c.src or c.emoji then "tile" else "icon"
+ end, function(kind: string): Node
+ if kind == "tile" then
+ return Tile {
+ label = function(): string?
+ return current().label
+ end,
+ hue = function(): string?
+ return current().hue
+ end,
+ src = function(): string?
+ return current().src
+ end,
+ emoji = function(): string?
+ return current().emoji
+ end,
+ -- (A project's choice: its tile `.project-icon`.)
+ project = function(): string?
+ return (current() :: any).project
+ end,
+ size = 18,
+ }
+ end
+ return glyph(function(): Icon.Name
+ return current().icon or "monitor"
+ end, ink)
+ end)
+end
+
+-- A row of the panel's head saying a choice that can't be changed (where
+-- an existing chat works): a submenu row's mark and name, dimmed, opening
+-- nothing.
+local function fixed_row(label: Message, current: () -> Choice): Node
+ return ui.menu_item(Menu.look {
+ label = label,
+ disabled = true,
+ cursor = "default",
+ hover = {},
+ active = {},
+ choice_mark(current, "$text.disabled"),
+ FadeText {
+ function()
+ return current().label
+ end,
+ text_size = "$font.size.md",
+ color = "$text.disabled",
+ grow = 1,
+ },
+ })
+end
+
local function submenu(
siblings: { State },
label: Message,
value: State,
choices: { Choice } | () -> { Choice },
- fallback: number,
+ -- The row shown while nothing is chosen (a function follows a default).
+ fallback: number | () -> number,
-- (A string: Dropdown names its field by it only so.)
search: string?,
actions: { Dropdown.Action }?,
-- Choices named by the row but not listed (one an action picks).
- unlisted: ({ Choice } | () -> { Choice })?
+ unlisted: ({ Choice } | () -> { Choice })?,
+ -- Told of a pick, after `value` takes it.
+ on_choose: ((v: string) -> ())?
): Node
local function current(): Choice
local v = value:get()
@@ -497,7 +593,8 @@ local function submenu(
end
end
-- (None yet, as a list still coming: a blank row.)
- return listed[fallback] or listed[1] or { value = "", label = "" }
+ local at: number = if type(fallback) == "function" then fallback() else fallback
+ return listed[at] or listed[1] or { value = "", label = "" }
end
local own: State? = nil
local function close_siblings()
@@ -509,6 +606,7 @@ local function submenu(
end
return Dropdown {
on_open = close_siblings,
+ on_choose = on_choose,
value = value,
items = choices,
actions = actions,
@@ -547,37 +645,7 @@ local function submenu(
end
end
end,
- -- The choice's own tile (a project's hue or artwork), else its
- -- icon: one or the other, following the choice.
- ui.presence(function(): string
- local c = current()
- return if c.hue or c.src or c.emoji then "tile" else "icon"
- end, function(kind: string): Node
- if kind == "tile" then
- return Tile {
- label = function(): string?
- return current().label
- end,
- hue = function(): string?
- return current().hue
- end,
- src = function(): string?
- return current().src
- end,
- emoji = function(): string?
- return current().emoji
- end,
- -- (A project's choice: its tile `.project-icon`.)
- project = function(): string?
- return (current() :: any).project
- end,
- size = 18,
- }
- end
- return glyph(function(): Icon.Name
- return current().icon or "monitor"
- end)
- end),
+ choice_mark(current),
FadeText {
function()
return current().label
@@ -634,15 +702,18 @@ local function on_cloud(device: State?, devices: any): boolean
end
-- The head of where-it-works's panel: "Work in", then the device it runs
--- on, the project there and the checkout, each a row opening its choices
--- beside the panel (the project's with "New project" under them).
+-- on, the project there and the checkout (on Cloud, what its machine
+-- reaches instead), each a row opening its choices beside the panel (the
+-- project's with "New project" under them).
local function work_in(
project: State?,
projects: ({ Project } | State<{ Project }> | () -> { Project })?,
on_new_project: (() -> ())?,
checkout: State?,
device: State?,
- devices: ({ Device } | State<{ Device }> | () -> { Device })?
+ devices: ({ Device } | State<{ Device }> | () -> { Device })?,
+ reach: State?,
+ reach_default: (() -> string?)?
): Node
local siblings: { State } = {}
local rows: { Node } = {
@@ -738,6 +809,65 @@ local function work_in(
end, submenu(siblings, locale.t("ds.composer.checkout.label"), checkout, CHECKOUTS, 2))
)
end
+ if reach and reach_default then
+ -- On Cloud, in the checkout's place: whether its machine reaches your
+ -- other devices (none chosen: the account's default).
+ table.insert(
+ rows,
+ ui.show(function(): boolean
+ return on_cloud(device, devices) and reach_default() ~= nil
+ end, submenu(siblings, locale.t("ds.composer.reach.label"), reach, REACHES, function(): number
+ return if reach_default() == "isolated" then 2 else 1
+ end))
+ )
+ end
+ return ui.column { w_full = true, table.unpack(rows) }
+end
+
+-- The same head for an existing chat, which can't move: where it works,
+-- said in rows that open nothing; and on Cloud, what its machine reaches,
+-- which `on_reach` changes (shown at once, the chat's own following).
+local function fixed_work_in(fixed: () -> Fixed?, on_reach: ((reach: string) -> ())?): Node
+ local function f(): Fixed
+ return fixed() or { worktree = false }
+ end
+ local rows: { Node } = {
+ Menu.Heading { locale.t("ds.composer.work_in") },
+ ui.show(function(): boolean
+ return f().device ~= nil
+ end, fixed_row(locale.t("ds.composer.device.label"), function(): Choice
+ local it = f()
+ return { value = it.device or "", label = it.device or "", icon = if it.cloud then "cloud" else "monitor" }
+ end)),
+ fixed_row(locale.t("ds.composer.project.label"), function(): Choice
+ local it = f()
+ if it.project then
+ return { value = it.project, label = it.project, hue = it.hue, src = it.src, emoji = it.emoji }
+ end
+ return worded({ value = NO_PROJECT, icon = "folder" }, { label = "ds.composer.project.none" })
+ end),
+ ui.show(function(): boolean
+ local it = f()
+ return it.project ~= nil and not it.cloud
+ end, fixed_row(locale.t("ds.composer.checkout.label"), function(): Choice
+ return CHECKOUTS()[if f().worktree then 2 else 1]
+ end)),
+ }
+ if on_reach then
+ local reach = ui.use_state(nil :: string?)
+ ui.effect(function()
+ local now = f().reach
+ if reach:peek() ~= now then
+ reach:set(now)
+ end
+ end)
+ table.insert(
+ rows,
+ ui.show(function(): boolean
+ return f().cloud == true and f().reach ~= nil
+ end, submenu({}, locale.t("ds.composer.reach.label"), reach, REACHES, 1, nil, nil, nil, on_reach))
+ )
+ end
return ui.column { w_full = true, table.unpack(rows) }
end
@@ -1012,12 +1142,14 @@ return ui.component(function(props: Props): Node
-- Past the cap a draft is measured no more: its size changes nothing
-- (Layout.estimate). The type's line height changed (tracked), it is
-- measured again.
- estimate = function(text: string, line_height: number): Layout.Sample?
+ estimate = function(line_height: number): Layout.Sample?
local line = ui.theme.get("zeron.composer.line")
if type(line) == "number" and math.abs(line - line_height) > 0.01 then
return nil
end
- return Layout.estimate(text, line_height)
+ -- Its line breaks counted where it's held, up to the cap's.
+ local capped = Layout.capped_lines(line_height)
+ return Layout.estimate_lines(1 + #value:find("\n", { limit = capped - 1 }), line_height)
end,
}
local head_h_seen = kept("head_h", 0)
@@ -1058,11 +1190,20 @@ return ui.component(function(props: Props): Node
end
local function has_text(): boolean
- return string.find(value:get(), "%S") ~= nil
+ return Draft.has_text(value)
end
local function disabled(): boolean
return read(props.disabled) == true
end
+ -- Auto is chosen on an agent without it ("Auto unavailable"): nothing is
+ -- sent until another mode or agent is picked (the engine would refuse
+ -- the run).
+ local function access_blocked(): boolean
+ return props.access ~= nil
+ and props.access_auto ~= nil
+ and props.access:get() == "auto"
+ and not props.access_auto()
+ end
local function dictating(): boolean
return props.dictating ~= nil and props.dictating:get()
end
@@ -1123,6 +1264,9 @@ return ui.component(function(props: Props): Node
if not string.find(text, "%S") and not has_cargo() then
return
end
+ if access_blocked() then
+ return
+ end
if props.on_send then
props.on_send(text)
end
@@ -1188,7 +1332,7 @@ return ui.component(function(props: Props): Node
cargo = has_cargo(),
asking = asking(),
dictating = dictating(),
- multiline = string.find(value:get(), "\n") ~= nil,
+ multiline = Draft.multiline(value),
}
end
local target_geometry = ui.use_state(Layout.calculate(layout_input(), previous_text_expanded:peek()))
@@ -1432,7 +1576,7 @@ return ui.component(function(props: Props): Node
value = props.access,
items = function(): { Dropdown.Item }
local chosen = props.access and props.access:get()
- return ACCESS(chosen == "auto" or (props.access_auto ~= nil and props.access_auto()))
+ return ACCESS(props.access_auto ~= nil and props.access_auto(), chosen)
end,
tone = "chip",
label = locale.t("ds.composer.access.label") :: any,
@@ -1465,20 +1609,41 @@ return ui.component(function(props: Props): Node
on_click = props.on_dictate,
Icon { name = "microphone", size = 18 },
})
- local send_button = Button {
- shape = "pill",
- size = "sm",
- icon = true,
- label = function()
- return locale.s(if running and running:get() then "ds.composer.queue_message" else "ds.composer.send_message")
- end,
- disabled = function()
- return disabled() or not (has_text() or has_cargo() or dictating())
- end,
- on_press = if spoken then spoken.on_send_press else nil,
- on_click = send,
- Icon { name = "arrow-up", size = 14 },
- }
+ local function send_control(): Node
+ return Button {
+ shape = "pill",
+ size = "sm",
+ icon = true,
+ label = function()
+ return locale.s(if running and running:get() then "ds.composer.queue_message" else "ds.composer.send_message")
+ end,
+ disabled = function()
+ return disabled() or access_blocked() or not (has_text() or has_cargo() or dictating())
+ end,
+ on_press = if spoken then spoken.on_send_press else nil,
+ on_click = send,
+ Icon { name = "arrow-up", size = 14 },
+ }
+ end
+ -- Held by an unavailable Auto, it says why when rested on. (A tooltip is
+ -- set once, not followed, and a disabled button hears no pointer: the
+ -- held one is a button of its own under a box that carries the words.)
+ local send_button = ui.show(
+ access_blocked,
+ ui.div {
+ relative = true,
+ send_control(),
+ ui.div {
+ absolute = true,
+ left = 0,
+ right = 0,
+ top = 0,
+ bottom = 0,
+ tooltip = Tooltip { locale.t("ds.composer.send_auto_unavailable") },
+ },
+ },
+ send_control()
+ )
local stop_button = Button {
shape = "pill",
size = "sm",
@@ -2038,7 +2203,16 @@ return ui.component(function(props: Props): Node
-- Built for each chip it heads (a node lives in one place).
local function head_node(): Node?
return if checkout or props.device or props.project
- then work_in(props.project, props.projects :: any, props.on_new_project, checkout, props.device, props.devices :: any)
+ then work_in(
+ props.project,
+ props.projects :: any,
+ props.on_new_project,
+ checkout,
+ props.device,
+ props.devices :: any,
+ props.reach,
+ props.reach_default
+ )
else nil
end
-- In a project, its refs: the branch chip, its search and its
@@ -2103,6 +2277,29 @@ return ui.component(function(props: Props): Node
end
return nil
end
+ -- The chip: [glyph] device › project › branch, washed under the
+ -- pointer and while its panel is open, as a chip is.
+ local function chip(menu: Dropdown.Menu, label: Message | () -> string, place: Place): Node
+ return ui.button {
+ label = label :: any,
+ h = CHIP_H,
+ px = "$zeron.space.tight",
+ gap = "$zeron.space.tight",
+ items = "center",
+ min_w = 0,
+ rounded = CHIP_RADIUS,
+ text_size = "$font.size.sm",
+ weight = "$font.weight.medium",
+ bg = function(): string
+ return if menu.open:get() then "$hover" else "#00000000"
+ end,
+ color = "$text.tertiary",
+ hover = { bg = "$hover", color = "$text.secondary" },
+ active = { bg = "$pressed", color = "$text.secondary" },
+ on_click = menu.toggle,
+ table.unpack(place_line(place)),
+ }
+ end
local picker = Dropdown {
value = props.branch,
label = locale.t("ds.composer.branch.label") :: any,
@@ -2113,80 +2310,69 @@ return ui.component(function(props: Props): Node
list_when = in_project,
width = 280,
head = head_node(),
- -- The chip: [tile] project › [glyph] branch, washed under the
- -- pointer and while its panel is open, as a chip is.
trigger = function(menu: Dropdown.Menu): Node
- return ui.button {
- label = locale.t("ds.composer.branch.label"),
- h = CHIP_H,
- px = "$zeron.space.tight",
- gap = "$zeron.space.tight",
- items = "center",
- min_w = 0,
- rounded = CHIP_RADIUS,
- text_size = "$font.size.sm",
- weight = "$font.weight.medium",
- bg = function(): string
- return if menu.open:get() then "$hover" else "#00000000"
- end,
- color = "$text.tertiary",
- hover = { bg = "$hover", color = "$text.secondary" },
- active = { bg = "$pressed", color = "$text.secondary" },
- on_click = menu.toggle,
- table.unpack(place_line {
- device = chosen_device,
- project = chosen_project,
- in_project = in_project,
- branch = branch_name,
- glyph = runs_in,
- folded = folded,
- on_measures = place_measures,
- }),
- }
- end,
- }
- -- An existing chat's: where it works, said, opening nothing.
- local fixed = props.branch_fixed
- local static: Node? = if fixed
- then ui.row {
- h = CHIP_H,
- px = "$zeron.space.tight",
- gap = "$zeron.space.tight",
- items = "center",
- min_w = 0,
- text_size = "$font.size.sm",
- weight = "$font.weight.medium",
- color = "$text.tertiary",
- label = function(): string
- local f = fixed()
- return locale.s("ds.composer.branch.fixed", { name = if f and f.name then f.name else "" })
- end,
- table.unpack(place_line {
- device = function(): string?
- local f = fixed()
- return if f then f.device else nil
- end,
- project = function(): Project?
- local f = fixed()
- if f and f.project then
- return { value = f.project, label = f.project, hue = f.hue, src = f.src, emoji = f.emoji }
- end
- return nil
- end,
- in_project = function(): boolean
- return true
- end,
- branch = function(): string
- local f = fixed()
- return if f and f.name then f.name else locale.s("ds.composer.branch.no_ref")
- end,
- glyph = function(): Icon.Name?
- local f = fixed()
- return if f and f.worktree then "worktree" else nil
- end,
+ return chip(menu, locale.t("ds.composer.branch.label"), {
+ device = chosen_device,
+ project = chosen_project,
+ in_project = in_project,
+ branch = branch_name,
+ glyph = runs_in,
folded = folded,
on_measures = place_measures,
- }),
+ })
+ end,
+ }
+ -- An existing chat's: where it works, said; its panel says so too
+ -- (nothing there to change, as a chat can't move), but for what a
+ -- Cloud chat's machine reaches.
+ local fixed = props.branch_fixed
+ local static: Node? = if fixed
+ then Dropdown {
+ value = ui.use_state(nil :: string?),
+ label = locale.t("ds.composer.branch.label") :: any,
+ items = {},
+ search = false,
+ list_when = function(): boolean
+ return false
+ end,
+ width = 280,
+ head = fixed_work_in(fixed, props.on_reach),
+ trigger = function(menu: Dropdown.Menu): Node
+ return chip(menu, function(): string
+ local f = fixed()
+ return locale.s("ds.composer.branch.fixed", { name = if f and f.name then f.name else "" })
+ end, {
+ device = function(): string?
+ local f = fixed()
+ return if f then f.device else nil
+ end,
+ project = function(): Project?
+ local f = fixed()
+ if f and f.project then
+ return { value = f.project, label = f.project, hue = f.hue, src = f.src, emoji = f.emoji }
+ end
+ return nil
+ end,
+ in_project = function(): boolean
+ return true
+ end,
+ branch = function(): string
+ local f = fixed()
+ return if f and f.name then f.name else locale.s("ds.composer.branch.no_ref")
+ end,
+ -- Where it runs off the branch: Cloud's machine, a
+ -- worktree, or the project's own folder.
+ glyph = function(): Icon.Name?
+ local f = fixed()
+ if f and f.cloud then
+ return "cloud"
+ end
+ return if f and f.worktree then "worktree" else nil
+ end,
+ folded = folded,
+ on_measures = place_measures,
+ })
+ end,
}
else nil
table.insert(
diff --git a/apps/zgx/ui/ds/composer_layout.luau b/apps/zgx/ui/ds/composer_layout.luau
index a6698dca0..53c0f8e51 100644
--- a/apps/zgx/ui/ds/composer_layout.luau
+++ b/apps/zgx/ui/ds/composer_layout.luau
@@ -59,7 +59,7 @@ end
-- wraps to. Measuring a long draft walks every line at each keystroke; this
-- looks for at most a dozen newlines. Nil: the draft must be measured.
function M.estimate(text: string, line_height: number): Sample?
- local need = math.ceil((TEXT_MAX - TEXT_TOP - TEXT_BOTTOM) / math.max(1, line_height))
+ local need = M.capped_lines(line_height)
local lines, at = 1, 1
while lines < need do
local newline = string.find(text, "\n", at, true)
@@ -69,7 +69,22 @@ function M.estimate(text: string, line_height: number): Sample?
lines += 1
at = newline + 1
end
- return { unwrapped_width = 0, wrapped_height = lines * line_height, line_height = line_height }
+ return M.estimate_lines(lines, line_height)
+end
+
+-- How many hard lines fill the text box to its cap at `line_height`.
+function M.capped_lines(line_height: number): number
+ return math.ceil((TEXT_MAX - TEXT_TOP - TEXT_BOTTOM) / math.max(1, line_height))
+end
+
+-- `estimate` for a draft of `lines` hard lines (counted up to
+-- `capped_lines`, where it's held: the draft itself never read for it).
+function M.estimate_lines(lines: number, line_height: number): Sample?
+ local need = M.capped_lines(line_height)
+ if lines < need then
+ return nil
+ end
+ return { unwrapped_width = 0, wrapped_height = need * line_height, line_height = line_height }
end
-- Whether two targets lay the composer out alike: every field a view binds
diff --git a/apps/zgx/ui/ds/composer_mentions.luau b/apps/zgx/ui/ds/composer_mentions.luau
index b58078b30..73ca42768 100644
--- a/apps/zgx/ui/ds/composer_mentions.luau
+++ b/apps/zgx/ui/ds/composer_mentions.luau
@@ -33,10 +33,9 @@ local Skeleton = require("@self/skeleton")
local Launcher = require("@self/mention_launcher")
local M = {}
--- Prints the caret and each choice to the host's log (debugging the keys).
-M.debug = false
local tokens = require("@self/mention_tokens")
+local Draft = require("@self/draft_text")
local locale = require("@self/locale")
export type Trigger = tokens.Trigger
@@ -103,6 +102,10 @@ function M.use(opts: Use)
-- The token whose list was put away (Escape, a click away from it), by
-- where it starts, for each draft (`key`): that token's alone, see below.
local dismissed = ui.use_state({} :: { [any]: number })
+ -- The draft as it was when its list was put away, and at each keystroke
+ -- while it stays away (nil otherwise): whether its trigger was typed
+ -- again reads it then alone, not a long draft at every keystroke.
+ local was_text: string? = nil
local function key_now(): any
return if opts.key then opts.key() else ""
end
@@ -112,6 +115,9 @@ function M.use(opts: Use)
end
local function dismiss(key: any, from: number?)
local all = dismissed:peek()
+ if from ~= nil then
+ was_text = opts.value:peek()
+ end
if all[key] ~= from then
local next = table.clone(all)
next[key] = from
@@ -120,7 +126,7 @@ function M.use(opts: Use)
end
local active = ui.use_state(1)
local token = ui.computed(function(): Token?
- local t = M.token(opts.value:get(), caret:get())
+ local t = Draft.token(opts.value, caret:get())
if t and opts.enabled and not opts.enabled(t.trigger) then
return nil
end
@@ -259,21 +265,27 @@ function M.use(opts: Use)
-- (moved, the token deleted), or its trigger typed again, and the next
-- token's list opens. Typed further at, it stays away. (Another chat's draft shown in
-- its place: that draft's own, kept with it.)
- local was_text = opts.value:peek()
local was_key = key_now()
ui.effect(function()
local t = token:get()
- local text = opts.value:get()
+ Draft.track(opts.value)
local key = key_now()
+ local moved = key ~= was_key
+ was_key = key
+ local gone = dismissed:peek()[key]
+ if gone == nil then
+ was_text = nil
+ return
+ end
+ local text = opts.value:get()
-- (The draft just as it was with the token's trigger put in: that
-- trigger was typed.)
local typed = t ~= nil
+ and was_text ~= nil
and #text == #was_text + 1
and string.sub(text, 1, t.from) .. string.sub(text, t.from + 2) == was_text
- local moved = key ~= was_key
- was_text, was_key = text, key
- local gone = dismissed:peek()[key]
- if gone == nil or moved then
+ was_text = text
+ if moved then
return
end
if t == nil or t.from ~= gone or typed then
@@ -285,11 +297,12 @@ function M.use(opts: Use)
-- path with it.
local refs = ui.use_state({} :: { [string]: string })
ui.effect(function()
- local now = opts.value:get()
+ -- (Each looked for where the draft is held, not copied out of it.)
+ Draft.track(opts.value)
local kept = refs:peek()
local stale: { string } = {}
for tok in kept do
- if not string.find(now, tok, 1, true) then
+ if #opts.value:find(tok, { limit = 1 }) == 0 then
table.insert(stale, tok)
end
end
@@ -312,10 +325,6 @@ function M.use(opts: Use)
if not from or not to or not text or not tok then
return
end
- if M.debug then
- local a, b = el:selection_bytes()
- print(`[mentions] choose from {from} to {to} (field selection {a}..{b}) text {string.sub(now, 1, 80)}`)
- end
-- The path the new token stands for, in place of the old one's.
local old = string.sub(now, from + 1, to)
local next = table.clone(refs:peek())
@@ -326,10 +335,6 @@ function M.use(opts: Use)
refs:set(next)
el:set_selection_bytes(from, to)
el:replace_selection(text)
- if M.debug then
- local a, b = el:selection_bytes()
- print(`[mentions] after: selection {a}..{b} text {string.sub(opts.value:peek(), 1, 80)}`)
- end
-- The caret is past what was put in (the field says so on its next
-- caret event; said here too, so the list goes with the token at
-- once). The token's session is over; the next trigger opens one.
@@ -386,9 +391,6 @@ function M.use(opts: Use)
return false
end
local function on_caret(_line: number, _column: number, _anchor: number, focus: number)
- if M.debug then
- print(`[mentions] caret {focus} text {string.sub(opts.value:peek(), 1, 80)}`)
- end
caret:set(focus)
end
-- The field's focus and blur (`on_focus`, `on_blur`).
diff --git a/apps/zgx/ui/ds/composer_metrics.luau b/apps/zgx/ui/ds/composer_metrics.luau
index 267c80c96..9446c8e69 100644
--- a/apps/zgx/ui/ds/composer_metrics.luau
+++ b/apps/zgx/ui/ds/composer_metrics.luau
@@ -12,7 +12,8 @@ export type Sample = {
}
type Request = {
width: number, editor: Element?, source: Sample?, estimate: Size?, revision: number,
- text: string, theme: string, mount: number,
+ -- Which edit of the draft (`edits`), not the draft itself.
+ edit: number, theme: string, mount: number,
}
export type Result = {
-- A complete last sample, never one axis from a different request.
@@ -36,7 +37,7 @@ export type Props = {
-- the exact one can't change its layout (a long draft past the cap),
-- with the line height last measured; nil to measure. Measuring walks
-- every line of the draft, so a long one paid that at every keystroke.
- estimate: ((text: string, line_height: number) -> Size?)?,
+ estimate: ((line_height: number) -> Size?)?,
}
function M.use(props: Props)
@@ -71,10 +72,19 @@ function M.use(props: Props)
local s = size:get()
return s == nil or s.unwrapped_width >= math.max(0, props.width()) - 1
end)
+ -- Each edit of the draft, counted: what a request follows edits by.
+ -- The draft itself was copied into the request (and out again at each
+ -- read of it): 2 ms of a keystroke in a draft of 30,000 lines.
+ local edit_count = 0
+ local edits = ui.computed(function(): number
+ props.value:len()
+ edit_count += 1
+ return edit_count
+ end)
local last: Request? = nil
local request = ui.computed(function(): Request
-- Track edits even when the measured dimensions stay equal.
- local text = props.value:get()
+ local edit = edits:get()
local width = math.max(0, if follows:get() then props.width() else props.width(true))
local theme = ui.theme.current:get()
local mount = mounted:get()
@@ -82,7 +92,7 @@ function M.use(props: Props)
local source, estimate = nil, nil
if el and width > 0 then
if props.estimate and exact and exact.mount == mount.revision and exact.theme == theme then
- estimate = props.estimate(text, exact.line_height)
+ estimate = props.estimate(exact.line_height)
end
-- Reading follows the editor's settled content/IME/style revision.
if estimate == nil then
@@ -100,11 +110,11 @@ function M.use(props: Props)
return was
end
revision += 1
- local now: Request = { width = width, editor = el, source = source, estimate = estimate, revision = revision, text = text, theme = theme, mount = mount.revision }
+ local now: Request = { width = width, editor = el, source = source, estimate = estimate, revision = revision, edit = edit, theme = theme, mount = mount.revision }
last = now
return now
end)
- local settled: { mount: number, text: string, theme: string, revision: number, width: number }? = nil
+ local settled: { mount: number, edit: number, theme: string, revision: number, width: number }? = nil
local function publish(wanted: Request, source: Size, width: number)
ui.batch(function()
-- (An equal size notifies nobody: layout wakes only for a new one.)
@@ -123,7 +133,7 @@ function M.use(props: Props)
end)
end
local function publish_exact(wanted: Request, source: Sample)
- settled = { mount = wanted.mount, text = wanted.text, theme = wanted.theme,
+ settled = { mount = wanted.mount, edit = wanted.edit, theme = wanted.theme,
revision = source.revision, width = wanted.width }
exact = { mount = wanted.mount, theme = wanted.theme, line_height = source.line_height }
publish(wanted, source, source.width)
@@ -149,7 +159,7 @@ function M.use(props: Props)
-- round-trip for every frame of a page resize. Content, IME, style,
-- editor replacement and initial requests still need acknowledgement.
if settled and settled.width ~= wanted.width and settled.mount == wanted.mount
- and settled.text == wanted.text and settled.theme == wanted.theme
+ and settled.edit == wanted.edit and settled.theme == wanted.theme
and settled.revision == wanted.source.revision then
publish_exact(wanted, wanted.source)
return
diff --git a/apps/zgx/ui/ds/draft_text.luau b/apps/zgx/ui/ds/draft_text.luau
new file mode 100644
index 000000000..e41fe6284
--- /dev/null
+++ b/apps/zgx/ui/ds/draft_text.luau
@@ -0,0 +1,107 @@
+-- A draft's text read where it's held (its state), not copied whole into the
+-- script: what the composer's bindings need of it at every keystroke.
+--
+-- A state's `get` makes the whole draft a script string, and a dozen of the
+-- composer's bindings each did at every keystroke: a key in a draft of
+-- 30,000 lines cost 5 ms in copies alone. These read only the part they
+-- need (zgx's `state:sub`, `state:len`, `state:find`), so a key costs the
+-- same in a draft of 20 lines or 30,000. A zgx without `sub` reads the whole
+-- draft, as before.
+--
+-- draft_text.track(s) follow its edits (nothing read)
+-- draft_text.size(s) its length in bytes
+-- draft_text.sub(s, i, j?) `string.sub` of it
+-- draft_text.has_text(s) whether it holds anything but blanks
+-- draft_text.multiline(s) whether it has a line break
+-- draft_text.token(s, caret) the mention token the caret is in
+-- (ds/mention_tokens), or nil
+-- draft_text.end_token(s) the one at its end
+-- draft_text.holds(s, text) whether `text` is anywhere in it
+
+local tokens = require("@self/mention_tokens")
+
+local M = {}
+
+-- Whether states read in place (`sub`, and `len` a string's length).
+local in_place: boolean? = nil
+local function native(s: any): boolean
+ if in_place == nil then
+ in_place = pcall(function()
+ return s:sub(1, 0)
+ end)
+ end
+ return in_place :: boolean
+end
+
+-- Follows its edits, as `get` does, without reading it.
+function M.track(s: any)
+ s:len()
+end
+
+function M.size(s: any): number
+ return if native(s) then s:len() else #(s:get() :: string)
+end
+
+function M.sub(s: any, i: number, j: number?): string
+ return if native(s) then s:sub(i, j) else string.sub(s:get(), i, j)
+end
+
+-- How much of its start shows whether it has text: past that many blanks,
+-- the rest is read.
+local HEAD = 256
+
+function M.has_text(s: any): boolean
+ if not native(s) then
+ return string.find(s:get(), "%S") ~= nil
+ end
+ if string.find(s:sub(1, HEAD), "%S") then
+ return true
+ end
+ return s:len() > HEAD and string.find(s:get(), "%S") ~= nil
+end
+
+function M.holds(s: any, text: string): boolean
+ if not native(s) then
+ return string.find(s:get(), text, 1, true) ~= nil
+ end
+ return (s:count(text, { limit = 1 })) > 0
+end
+
+function M.multiline(s: any): boolean
+ return #s:find("\n", { limit = 1 }) > 0
+end
+
+-- How far either side of the caret a token is looked for first: none runs
+-- this long (ds/mention_tokens' reach).
+local NEAR = 1024
+
+-- The token at `caret` (bytes from 0): looked for around the caret, and only
+-- where there is one, in the whole draft (whether a fence above holds it).
+-- The look around can't tell a fence's parity, though: a closed block
+-- opened more than `NEAR` above shows it only its closing fence, which
+-- reads as one still open. Where it found nothing with a fence before the
+-- caret, the whole draft decides.
+function M.token(s: any, caret: number): tokens.Token?
+ if not native(s) then
+ return tokens.token(s:get(), caret)
+ end
+ local lo = math.max(1, caret - NEAR + 1)
+ local near = s:sub(lo, caret + NEAR)
+ if tokens.token(near, caret - lo + 1) == nil then
+ local fence = string.find(near, "```", 1, true)
+ if fence == nil or fence > caret - lo + 1 then
+ return nil
+ end
+ end
+ return tokens.token(s:get(), caret)
+end
+
+function M.end_token(s: any): tokens.Token?
+ if not native(s) then
+ local text: string = s:get()
+ return tokens.token(text, #text)
+ end
+ return M.token(s, s:len())
+end
+
+return M
diff --git a/apps/zgx/ui/ds/icon.luau b/apps/zgx/ui/ds/icon.luau
index 7bd21d073..4a56ee71c 100644
--- a/apps/zgx/ui/ds/icon.luau
+++ b/apps/zgx/ui/ds/icon.luau
@@ -1,4 +1,4 @@
--- Icons: Zeron's own (crates/ui/assets/icons, Solar Linear), drawn in the
+-- Icons: Zeron's own (assets/icons, Solar Linear), drawn in the
-- colour of the text around them (a button's, hover included).
-- `Icon { name = "plus", size = 16 }`.
diff --git a/apps/zgx/ui/ds/island.luau b/apps/zgx/ui/ds/island.luau
index 0aef699ee..13ce913b1 100644
--- a/apps/zgx/ui/ds/island.luau
+++ b/apps/zgx/ui/ds/island.luau
@@ -7,8 +7,6 @@
-- `island.glass { … }`: a node's props with the island's glass added.
-- `island.metrics()`: its numbers (read as it's built).
-local material = require("@self/material")
-
local M = {}
export type Metrics = { radius: number, inset: number, pad: number, control: number, gap: number, group: number, blur: number }
@@ -37,15 +35,14 @@ function M.thickness(): number
end
-- Its glass, or with glass turned solid (ds/material: the Opaque setting,
--- or the system's transparency off), the menus' solid fill, unblurred.
+-- or the system's transparency off), the menus' solid fill, unblurred: the
+-- window's solid theme says so through these tokens (`material.solid_theme`).
+-- Plain tokens, never functions: an animated node runs its style's
+-- functions again each frame (the title bar's island slides).
function M.glass(props: { [any]: any }): { [any]: any }
props.rounded = "$zeron.island.radius"
- props.bg = function()
- return if material.see_through() then "$zeron.island.tint" else "$zeron.menu.solid"
- end
- props.backdrop_blur = function()
- return if material.see_through() then "$zeron.island.blur" else 0
- end
+ props.bg = "$zeron.island.tint"
+ props.backdrop_blur = "$zeron.island.blur"
props.shadow = "$zeron.island.shadow"
return props
end
diff --git a/apps/zgx/ui/ds/locale_en.luau b/apps/zgx/ui/ds/locale_en.luau
index 797581c81..b241658c8 100644
--- a/apps/zgx/ui/ds/locale_en.luau
+++ b/apps/zgx/ui/ds/locale_en.luau
@@ -475,6 +475,11 @@ return {
["ds.composer.checkout.worktree"] = "Worktree",
["ds.composer.checkout.worktree_hint"] = "An isolated copy, on a branch of its own.",
["ds.composer.work_in"] = "Work in",
+ ["ds.composer.reach.label"] = "Reaches",
+ ["ds.composer.reach.devices"] = "All devices",
+ ["ds.composer.reach.devices_hint"] = "Works with your other devices: their chats, and commands on them.",
+ ["ds.composer.reach.isolated"] = "Isolated",
+ ["ds.composer.reach.isolated_hint"] = "Only its own machine and the chats it starts.",
["ds.composer.project.label"] = "Project",
["ds.composer.project.search"] = "Search projects…",
["ds.composer.project.none_action"] = "Don't work in a project",
diff --git a/apps/zgx/ui/ds/markdown.luau b/apps/zgx/ui/ds/markdown.luau
index 1735c61b3..77bf61b52 100644
--- a/apps/zgx/ui/ds/markdown.luau
+++ b/apps/zgx/ui/ds/markdown.luau
@@ -139,9 +139,19 @@ export type Find = {
-- it has shown; what's new is a chunk, fading exactly once, its time following how fast
-- text is coming. Kept by the reply's key, so a row made again doesn't fade again.
local VEIL_MIN, VEIL_MAX, VEIL_EMA_SEED, VEIL_GAP_MAX = 120, 400, 160, 1000
+local VEIL_SETTLE = 50
type VeilChunk = { from: number, to: number, started: number, ms: number, boost: number }
type VeilElem = { text: string, chunks: { VeilChunk }, ema: number, last: number? }
-type Veil = { elems: { [string]: VeilElem }, block: number, n: number, seeding: boolean, tick: State?, ticking: any }
+type Veil = {
+ elems: { [string]: VeilElem },
+ block: number,
+ n: number,
+ seeding: boolean,
+ tick: State?,
+ ticking: any,
+ clocks: number?,
+ ends: number?,
+}
local VEILS: { [string]: Veil } = {}
local veil_count = 0
local function veil_of(key: string, seeding: boolean): Veil
@@ -157,6 +167,38 @@ local function veil_of(key: string, seeding: boolean): Veil
end
return v
end
+-- The veil's clock (`v.tick`) run until its fades have ended (`v.ends`). The
+-- fades are timed by `ui.now()`, the wall clock, and the clock by the frames',
+-- which can run a little ahead of it: a few frames past the end, and again
+-- if the wall clock isn't there yet, so the last frame paints the ink and not
+-- a hair short of it.
+local function veil_tick(v: Veil)
+ local tick = v.tick
+ if not tick then
+ return
+ end
+ if v.ticking then
+ v.ticking:cancel()
+ end
+ -- (Ended, it goes: a table of 400 replies' clips would keep them for nothing.
+ -- By number: a callback holding its own clip would keep both for good.)
+ local clock = (v.clocks or 0) + 1
+ v.clocks = clock
+ v.ticking = anime.animate(tick, {
+ value = tick:peek() + 1,
+ duration = math.max((v.ends or 0) - ui.now(), 0) + VEIL_SETTLE,
+ ease = "linear",
+ onComplete = function()
+ if v.clocks ~= clock then
+ return
+ end
+ v.ticking = nil
+ if ui.now() < (v.ends or 0) then
+ veil_tick(v)
+ end
+ end,
+ })
+end
-- What of `text` is still fading, after what's newly arrived is added.
local function veil_chunks(v: Veil, text: string): { VeilChunk }
v.n += 1
@@ -208,26 +250,12 @@ local function veil_chunks(v: Veil, text: string): { VeilChunk }
for _, c in going do
c.boost = 1 + 0.3 * math.max(#going - 2, 0)
end
- -- A clock for what's fading, its frames what the colours below follow.
- local tick = v.tick
- if tick and longest > 0 then
- if v.ticking then
- v.ticking:cancel()
- end
- -- (Ended, it goes: a table of 400 replies' clips would keep them for nothing.
- -- By number: a callback holding its own clip would keep both for good.)
- local clock = (v.clocks or 0) + 1
- v.clocks = clock
- v.ticking = anime.animate(tick, {
- value = tick:peek() + 1,
- duration = longest,
- ease = "linear",
- onComplete = function()
- if v.clocks == clock then
- v.ticking = nil
- end
- end,
- })
+ -- A clock for what's fading, its frames what the colours below follow: on
+ -- until the last of the reply's fades ends (another paragraph's may end
+ -- later than this one's).
+ if v.tick and longest > 0 then
+ v.ends = math.max(v.ends or 0, now + longest)
+ veil_tick(v)
end
return going
end
diff --git a/apps/zgx/ui/ds/markdown_edit.luau b/apps/zgx/ui/ds/markdown_edit.luau
index 9e04face3..c47933d2f 100644
--- a/apps/zgx/ui/ds/markdown_edit.luau
+++ b/apps/zgx/ui/ds/markdown_edit.luau
@@ -238,6 +238,35 @@ function M.highlight(line: string, state: number): ({ { any } }, number)
return runs(marks), 0
end
+-- How many of the lines in the first `upto` bytes of `text` start with
+-- `fence` after blanks (`%s`): found with a plain search, which skips the
+-- lines between them rather than matching each.
+local function fences(text: string, upto: number, fence: string): number
+ local count, from = 0, 1
+ while true do
+ local s = string.find(text, fence, from, true)
+ if s == nil or s + #fence - 1 > upto then
+ return count
+ end
+ local i = s - 1
+ while i >= 1 do
+ local c = string.byte(text, i)
+ if c == 10 or (c ~= 32 and (c < 9 or c > 13)) then
+ break
+ end
+ i -= 1
+ end
+ if i < 1 or string.byte(text, i) == 10 then
+ count += 1
+ end
+ local nl = string.find(text, "\n", s + #fence, true)
+ if nl == nil then
+ return count
+ end
+ from = nl + 1
+ end
+end
+
-- What a line break does at the selection `a`..`b` (bytes from 0) in a
-- list item: `(from, to, text)` to put in place of `from`..`to`, or nil
-- for a plain break.
@@ -245,34 +274,33 @@ function M.newline(text: string, a: number, b: number): (number?, number?, strin
if a ~= b then
return nil, nil, nil
end
- -- The caret's line, in bytes from 0.
+ -- The caret's line, in bytes from 0: its start looked for back from the
+ -- caret a window at a time, not from the draft's top (a break in a
+ -- draft of 30,000 lines walked them all, then matched them all for
+ -- fences, 20 ms of an Enter).
local start = 0
- local i = 0
- while true do
- local nl = string.find(text, "\n", i + 1, true)
- if not nl or nl > a then
+ local hi = a
+ while hi > 0 do
+ local lo = math.max(1, hi - 1023)
+ local after = string.match(string.sub(text, lo, hi), "^.*\n()")
+ if after then
+ start = lo + after - 2
break
end
- start = nl
- i = nl
+ hi = lo - 1
end
local stop = string.find(text, "\n", a + 1, true)
local line_end = if stop then stop - 1 else #text
local line = string.sub(text, start + 1, line_end)
- -- Not inside a fenced code block: count the fences above.
- local fences = 0
- for fence in string.gmatch(string.sub(text, 1, start), "[^\n]*") do
- if string.match(fence, "^%s*```") or string.match(fence, "^%s*~~~") then
- fences += 1
- end
- end
- if fences % 2 == 1 then
- return nil, nil, nil
- end
local p = prefix(line)
if not p or a < start + p.stop then
return nil, nil, nil
end
+ -- Not inside a fenced code block: count the fences above (lines
+ -- starting, after blanks, with ``` or ~~~: never both).
+ if (fences(text, start, "```") + fences(text, start, "~~~")) % 2 == 1 then
+ return nil, nil, nil
+ end
if string.match(string.sub(line, p.stop + 1), "^%s*$") then
-- An empty item: undone, a level out.
return start, line_end, string.sub(p.indent, 1, math.max(0, #p.indent - 2))
diff --git a/apps/zgx/ui/ds/material.luau b/apps/zgx/ui/ds/material.luau
index 64d812b69..4940fe049 100644
--- a/apps/zgx/ui/ds/material.luau
+++ b/apps/zgx/ui/ds/material.luau
@@ -40,15 +40,23 @@ end
-- and its edge, and muted text. Nil over glass, and for a theme that doesn't
-- name its own.
function M.solid_theme(): { [string]: any }?
- if M.see_through() or ui.theme.get("zeron.solid.card") == nil then
+ if M.see_through() then
return nil
end
- return {
- ["zeron.inset.bg"] = "$zeron.solid.card",
- ["zeron.inset.edge"] = "$zeron.solid.edge",
- ["text.secondary"] = "$zeron.solid.secondary",
- ["text.tertiary"] = "$zeron.solid.tertiary",
+ -- The islands' glass (ds/island) turns to the menus' solid fill,
+ -- unblurred: by its tokens, so an island the engine animates (the title
+ -- bar's, sliding in and out of full screen) runs no script per frame.
+ local out: { [string]: any } = {
+ ["zeron.island.tint"] = "$zeron.menu.solid",
+ ["zeron.island.blur"] = 0,
}
+ if ui.theme.get("zeron.solid.card") ~= nil then
+ out["zeron.inset.bg"] = "$zeron.solid.card"
+ out["zeron.inset.edge"] = "$zeron.solid.edge"
+ out["text.secondary"] = "$zeron.solid.secondary"
+ out["text.tertiary"] = "$zeron.solid.tertiary"
+ end
+ return out
end
-- Windows' Transparency effects off (zgx reports macOS's alone, as
diff --git a/apps/zgx/ui/ds/mention_tokens.luau b/apps/zgx/ui/ds/mention_tokens.luau
index 5a6ef8ac1..dcf7bb750 100644
--- a/apps/zgx/ui/ds/mention_tokens.luau
+++ b/apps/zgx/ui/ds/mention_tokens.luau
@@ -31,6 +31,45 @@ export type Token = { trigger: Trigger, query: string, from: number, to: number
-- What a token is made of after its trigger.
local WORD = "[%w%./_:%-]"
+-- How far from the caret a token is looked for, each way. A token never
+-- crosses a line and none runs this long, so only the caret's line, this
+-- much of it at most, is read: a keystroke in a draft of 30,000 lines costs
+-- what one in a draft of a line does. (The whole draft was copied and
+-- matched against at every keystroke: 9 ms of each, at 30,000 lines.)
+local REACH = 1024
+
+-- Whether the `upto` bytes of `text` leave it in a fenced block: an odd
+-- number of its lines start with ``` (after blanks). Found with a plain
+-- search, which skips the lines between fences rather than matching each.
+local function fenced(text: string, upto: number): boolean
+ local fences, from = 0, 1
+ while true do
+ local s = string.find(text, "```", from, true)
+ if s == nil or s + 2 > upto then
+ break
+ end
+ -- Only blanks (`%s`) between its line's start and it.
+ local i = s - 1
+ while i >= 1 do
+ local c = string.byte(text, i)
+ if c == 10 or (c ~= 32 and (c < 9 or c > 13)) then
+ break
+ end
+ i -= 1
+ end
+ if i < 1 or string.byte(text, i) == 10 then
+ fences += 1
+ end
+ -- (A line counts once, however many it holds.)
+ local nl = string.find(text, "\n", s + 3, true)
+ if nl == nil then
+ break
+ end
+ from = nl + 1
+ end
+ return fences % 2 == 1
+end
+
-- The token the caret is in, if any: its trigger, what has been typed
-- before the caret (the query), and where the whole token runs, to its
-- end past the caret too, so a pick replaces all of it (a caret in the
@@ -38,7 +77,13 @@ local WORD = "[%w%./_:%-]"
-- trigger starts a token only at a start, after a space, or after an
-- opening bracket.
function M.token(text: string, caret: number): Token?
- local before = string.sub(text, 1, caret)
+ -- The caret's line before it (`REACH` of it at most), which starts
+ -- `base` bytes into the text.
+ local lo = math.max(1, caret - REACH + 1)
+ local near = string.sub(text, lo, caret)
+ local line = string.match(near, "^.*\n()")
+ local base = lo - 1 + (if line then line - 1 else 0)
+ local before = if line then string.sub(near, line) else near
local function starts(at: number): boolean
local prev = if at > 1 then string.sub(before, at - 1, at - 1) else ""
return prev == "" or string.match(prev, "[%s%(%[{>]") ~= nil
@@ -46,19 +91,9 @@ function M.token(text: string, caret: number): Token?
-- Where the token ends: over its characters after the caret (a
-- command's never cross a slash).
local function ends(chars: string): number
- local rest = string.match(string.sub(text, caret + 1), "^" .. chars .. "*") or ""
+ local rest = string.match(string.sub(text, caret + 1, caret + REACH), "^" .. chars .. "*") or ""
return caret + #rest
end
- -- Inside a fenced block, nothing.
- local function fenced(at: number): boolean
- local fences = 0
- for line in string.gmatch(string.sub(text, 1, at), "[^\n]*") do
- if string.match(line, "^%s*```") then
- fences += 1
- end
- end
- return fences % 2 == 1
- end
-- `@` and `$`: back over the token's characters (a path's slashes among
-- them) to the trigger.
local at = #before
@@ -74,19 +109,20 @@ function M.token(text: string, caret: number): Token?
local query = string.sub(before, at + 1)
local to = ends(WORD)
-- "$12" is money, wherever the caret sits in it.
- if trigger == "$" and string.match(string.sub(text, at + 1, to), "^%d") then
+ if trigger == "$" and string.match(string.sub(text, base + at + 1, to), "^%d") then
return nil
end
- if fenced(at) then
+ -- Inside a fenced block, nothing.
+ if fenced(text, base + at) then
return nil
end
- return { trigger = trigger :: Trigger, query = query, from = at - 1, to = to }
+ return { trigger = trigger :: Trigger, query = query, from = base + at - 1, to = to }
end
-- `/`: the run after the last slash, where that slash starts a word (a
-- path's slashes never do), with no slash in the run.
local s = string.find(before, "/[%w%._:%-]*$")
- if s and starts(s) and not fenced(s) then
- return { trigger = "/", query = string.sub(before, s + 1), from = s - 1, to = ends("[%w%._:%-]") }
+ if s and starts(s) and not fenced(text, base + s) then
+ return { trigger = "/", query = string.sub(before, s + 1), from = base + s - 1, to = ends("[%w%._:%-]") }
end
return nil
end
diff --git a/apps/zgx/ui/ds/provider_card.luau b/apps/zgx/ui/ds/provider_card.luau
index 6e3cb0f3c..959c15355 100644
--- a/apps/zgx/ui/ds/provider_card.luau
+++ b/apps/zgx/ui/ds/provider_card.luau
@@ -221,6 +221,9 @@ export type CardProps = {
-- back, Claude's when it can't finish in the browser) or "failed".
foot: (string | () -> string)?,
enabled: State,
+ -- An agent nothing here switches or updates (Cloud's: on every Cloud
+ -- machine, its accounts alone managed here): no switch, no Update.
+ fixed: boolean?,
-- The account in use, by its email.
active: () -> string?,
settings: boolean?,
@@ -1468,7 +1471,7 @@ function M.Card(c: CardProps): Node
gap = "$space.3",
items = "center",
ui.show(function()
- return latest() ~= nil or (c.updating ~= nil and c.updating())
+ return not c.fixed and (latest() ~= nil or (c.updating ~= nil and c.updating()))
end, Button {
locale.t("ds.provider_card.update"),
tone = "secondary",
@@ -1488,7 +1491,7 @@ function M.Card(c: CardProps): Node
on_click = c.on_settings,
}
else nil,
- Switch { value = c.enabled, label = locale.t("ds.provider_card.enabled", { name = provider.name }) :: any },
+ if c.fixed then nil else Switch { value = c.enabled, label = locale.t("ds.provider_card.enabled", { name = provider.name }) :: any },
},
}
-- Its accounts, a row each, keyed: one arriving or going is that row
diff --git a/apps/zgx/ui/ds/rail.luau b/apps/zgx/ui/ds/rail.luau
index ef2b41f27..0e559bc0b 100644
--- a/apps/zgx/ui/ds/rail.luau
+++ b/apps/zgx/ui/ds/rail.luau
@@ -42,6 +42,11 @@ export type Props = {
hint: (() -> boolean)?,
-- An id for the strip, for tools that look for it.
id: string?,
+ -- Read: as what it returns changes, the view is placing itself again,
+ -- as on its mount (the same rail over another chat's rows, a chat
+ -- switched to): for a moment its offset's changes are no scroll, and
+ -- the rail, if it showed, goes.
+ settle: (() -> any)?,
}
-- The rail's geometry: the strip that takes the pointer, the thumb at rest
@@ -103,10 +108,17 @@ return ui.component(function(props: Props): Node
-- rail and drew some 60 frames for it.
local settled = false
local settling: (() -> ())? = nil
- settling = ui.after(SETTLE, function()
- settling = nil
- settled = true
- end)
+ local function settle()
+ if settling then
+ settling()
+ end
+ settled = false
+ settling = ui.after(SETTLE, function()
+ settling = nil
+ settled = true
+ end)
+ end
+ settle()
-- Only a scroll's first move is heard: while the rail shows, a poll
-- every POLL ms sees whether the view has moved since (the effect then
-- reads nothing, so a scroll's frames run nothing here), and it goes
@@ -142,6 +154,21 @@ return ui.component(function(props: Props): Node
end
recent:set(true)
end)
+ -- Placing itself again (`settle`): as it mounted.
+ if props.settle then
+ local again = props.settle
+ local first = true
+ ui.effect(function()
+ again()
+ if first then
+ first = false
+ return
+ end
+ seen = offset:peek()
+ recent:set(false)
+ settle()
+ end)
+ end
ui.on_cleanup(function()
if settling then
settling()
diff --git a/apps/zgx/ui/ds/sidebar.luau b/apps/zgx/ui/ds/sidebar.luau
index 437918e9d..0af48c008 100644
--- a/apps/zgx/ui/ds/sidebar.luau
+++ b/apps/zgx/ui/ds/sidebar.luau
@@ -3551,8 +3551,12 @@ local places: State = props.places or ui.use_state({ pinned = pinned_ids
local going: { [string]: { it: Item, after: string? } } = {}
local pending: { [string]: number }? = nil
local GLIDES: { [string]: boolean } = { session = true, group = true, pager = true, empties = true }
+ -- (Folded away, it takes each new shape at once: no row glides,
+ -- comes or goes where none can see it, every frame of its motion
+ -- laying out the list again.)
local function quiet(): boolean
- return drag:peek() == nil and starting == nil
+ local away = not is_island and collapsed:peek() and shown_w:peek() <= 0
+ return drag:peek() == nil and starting == nil and not away
end
local function settled(it: Item, t: number): boolean
for _, f in it.chain do
diff --git a/apps/zgx/ui/ds/status.luau b/apps/zgx/ui/ds/status.luau
index 3f51f9497..d93a1cba3 100644
--- a/apps/zgx/ui/ds/status.luau
+++ b/apps/zgx/ui/ds/status.luau
@@ -78,12 +78,51 @@ M.ago = ago
-- in a binding moves on as the clock ticks, so "now" becomes "1m" without
-- anything else changing. One timer for every reader, sleeping between
-- ticks. (The clock is never behind the wall's: a test can set it ahead.)
+--
+-- It ticks only as a label read from it would change: each age read says
+-- when its label next steps (`ago`'s: "now" to "1m" at a minute, minutes
+-- to "1h" at an hour, hours to days, days to weeks), and the clock moves at
+-- the soonest of those, on a half-minute grid so that labels due within the
+-- same half minute move together, as late as the half-minute tick that
+-- once moved them all. Corners an hour old wake the window once an hour,
+-- not twice a minute.
local clock = ui.state("ds_status_clock", os.time())
-ui.every(30000, function()
- clock:set(os.time())
+-- When it next moves (`os.time()` seconds; none: nothing read).
+local due = ui.state("ds_status_clock_due", math.huge)
+ui.effect(function()
+ local at = due:get()
+ if at == math.huge then
+ return
+ end
+ -- (This run's: the next moves it, or cancels it.)
+ ui.after(math.max(1, at - os.time()) * 1000, function()
+ ui.batch(function()
+ due:set(math.huge)
+ -- (Readers run again and say when they next change.)
+ clock:set(os.time())
+ end)
+ end)
end)
+-- Seconds until an age's label (`ago`) next reads otherwise.
+local function next_step(age: number): number
+ local span = if age < 3600 then 60 elseif age < 86400 then 3600 elseif age < 7 * 86400 then 86400 else 7 * 86400
+ return span - age % span
+end
+local GRID = 30
function M.since(t: number): number
- return math.max(0, math.max(clock:get(), os.time()) - t)
+ local now = math.max(clock:get(), os.time())
+ local age = math.max(0, now - t)
+ local at = math.ceil((now + next_step(age)) / GRID) * GRID
+ if at < due:peek() then
+ -- (A binding reading the clock doesn't write state: the next turn
+ -- does. Should this run be replaced first, the next run asks again.)
+ ui.after(0, function()
+ if at < due:peek() then
+ due:set(at)
+ end
+ end)
+ end
+ return age
end
-- Working: the dashed ring (the glyph's eight dashes, on its 24-unit grid:
diff --git a/apps/zgx/ui/ds/transcript.luau b/apps/zgx/ui/ds/transcript.luau
index 05723704d..eddd3328d 100644
--- a/apps/zgx/ui/ds/transcript.luau
+++ b/apps/zgx/ui/ds/transcript.luau
@@ -82,6 +82,9 @@ export type Message = {
-- part), open while it is the tail of a reply being written. Given,
-- they are what shows (`text` and `tools` then only say what it holds).
blocks: { Block }?,
+ -- A long settled reply's runs, its blocks then the host's (src/chat.rs
+ -- `set_aside`, asked for a run at a time as it's built: `chat.reply_run`).
+ runs: { { key: string, n: number, guess: number, sum: string } }?,
-- Being written: the reply grows, its tools open.
streaming: boolean?,
-- When it began (`ui.now() / 1000`), and how long it worked, once done.
@@ -161,8 +164,16 @@ export type Props = {
foot: (() -> number)?,
-- Whether the view this one is made for rested at its end (a chat
-- switched back to: the session page keeps each chat's place); else the
- -- last transcript's, as a reload's rebuild has it.
- was_at_end: boolean?,
+ -- last transcript's, as a reload's rebuild has it. (With `session`, asked
+ -- of each chat as it's shown, by its id: nil, as without one.)
+ was_at_end: (boolean | (id: string) -> boolean?)?,
+ -- The chat it shows, for a transcript that stays as one chat after
+ -- another is shown in it (the session page's): another one swaps its
+ -- rows (its list, made for that chat, opening where it was left or at
+ -- its latest), and what stands round them (the scrollbar, the way back
+ -- to the latest, a selection's bar, its lightbox) stays as it is. Its
+ -- reading place, runway, glide and hover start again for each chat.
+ session: State?,
-- What a reply's pictures (``) are, read as they're asked
-- for (screens/chat/reply_images): without it, their alt text.
pictures: ReplyPicture.Pictures?,
@@ -228,6 +239,46 @@ export type Block = {
-- Rows not yet measured: about a short message.
local ESTIMATE = 96
+-- Rows not yet measured, as their messages make them (`ui.list`'s
+-- `estimate`, worked out in Rust from each row's data, no script a row):
+-- a prompt's words; a reply's blocks, its prose wrapped in the column
+-- (24-point lines; a paragraph's room, a code line's, a table row's), each
+-- group of tools a folded line; a long reply's runs at about what one
+-- holds. Measured, a row takes its real height; this keeps a chat opening
+-- from building rows it then finds are far out of view.
+local PROSE: any = {
+ field = "text",
+ size = 15,
+ line = 24,
+ most = 684,
+ markdown = { paragraph = 16, heading = 12, item = 4, code = 20, table = 37 },
+}
+local ROW_ESTIMATE: any = {
+ by = "role",
+ cases = {
+ user = { height = 64, text = { field = "text", size = 15, line = 24, most = 520 } },
+ assistant = {
+ height = 40,
+ has = {
+ blocks = {
+ each = "blocks",
+ item = {
+ by = "kind",
+ cases = {
+ text = { height = 12, text = PROSE },
+ tools = { height = 38 },
+ work = { height = 38 },
+ display_failed = { height = 36 },
+ },
+ default = { height = 320 },
+ },
+ },
+ runs = { each = "runs", item = { height = 3600 } },
+ },
+ },
+ },
+ default = { height = ESTIMATE },
+}
-- A selection's action: its words' height and its height round them (the
-- bar's even inset and its border, each side), what it keeps from the
-- selection and from the view's edges, and the room the way back to the end
@@ -246,10 +297,10 @@ local SEAM_GAP = 6
-- `ZERON_ZGX_TRACE_TRANSCRIPT=1`: the transcript's hover and layout, a line
-- each to the app's output (off, nothing is made or printed).
-local TRACING = ui.shared("debug.trace_transcript", false):peek() == true
+local TRACING = ui.shared("trace.transcript", false):peek() == true
local function trace(what: string, ...: any)
if TRACING then
- print(`[transcript] {math.floor(ui.now())} {what}`, ...)
+ print(`zeron-zgx: transcript {math.floor(ui.now())} {what}`, ...)
end
end
@@ -300,9 +351,11 @@ local function strip(m: Message, row: State, hovered: () -> boolean): N
justify = if mine then "end" else "start",
selectable = false,
ui.presence(function(): string?
- -- (Never while a reply is written: it has no time yet.)
+ -- (Never while a reply is written. A settled message shows it
+ -- with or without its time: a time missing, as on a platform
+ -- that couldn't read one, mustn't take Copy with it.)
local now = row:get()
- return if hovered() and now.at and not now.streaming then "shown" else nil
+ return if hovered() and (now.at or now.copy) and not now.streaming then "shown" else nil
end, function(): Node
return ui.row {
class = "message-actions",
@@ -652,9 +705,117 @@ local function thought_of(m: Message, now: () -> Message, draft: State?):
}
end
-local function blocks_of(list: () -> { Block }, m: Message, now: () -> Message, draft: State?, view: View?): Node
- local shown = ui.computed(list)
- return ui.each(shown, function(b: Block, _i: number, brow: State): Node
+-- A long reply's blocks are windowed, as a long text's are (ds/markdown's
+-- `window`): in runs of about RUN blocks, each run built while its reach
+-- (the run and RUN_OVERSCAN either side) touches the view; away, a box of its
+-- last height (a guess until it has been laid out). A reply of a thousand steps,
+-- each a text and a tool (ademark's A11 thread), otherwise built all its
+-- blocks' rows, texts and tools, every time it opened, though its end alone
+-- shows. Only a reply of more than LONG_REPLY blocks, or one being written.
+local RUN = 32
+local RUN_MOST = 64
+local RUN_OVERSCAN = 600
+local LONG_REPLY = 48
+-- How much of a long reply's end is built as it's first made, before the
+-- view has said what's near it (its runs' heights, kept or guessed, from its
+-- end): the view a transcript opens on, at its end, and RUN_OVERSCAN past
+-- it, so the first frame shows its end whole and nothing near it is built a
+-- frame later. (A view not laid out yet: about a tall window's.)
+local OPENING_VIEW = 1000
+-- What windowed runs keep by their reply and first block (`:`):
+-- each one's height as last laid out, and whether it was built when last
+-- judged, so a reply opened again holds its runs at their heights and builds
+-- the same ones. Plain tables a key at a time (ds/markdown's `kept`, the oldest half
+-- going as they fill).
+local KEPT_RUNS = 8192
+local function kept_runs(): { get: (string) -> T?, set: (string, T) -> () }
+ local now: { [string]: T }, older: { [string]: T }, count = {}, {}, 0
+ local function set(k: string, value: T)
+ if now[k] == nil then
+ if count >= KEPT_RUNS then
+ now, older, count = {}, now, 0
+ end
+ count += 1
+ end
+ now[k] = value
+ end
+ return {
+ get = function(k: string): T?
+ local value = now[k]
+ if value == nil then
+ value = older[k]
+ if value ~= nil then
+ set(k, value)
+ end
+ end
+ return value
+ end,
+ set = set,
+ }
+end
+local RUN_HEIGHTS = kept_runs() :: { get: (string) -> number?, set: (string, number) -> () }
+local RUN_NEAR = kept_runs() :: { get: (string) -> boolean?, set: (string, boolean) -> () }
+
+-- About how tall a block will be before it's laid out: a text's lines at a
+-- reply's width (about 85 characters a line) and its code blocks by their
+-- lines (ds/markdown's `estimate`), a group of tools its summary's line.
+local function guess_block(b: Block): number
+ if b.kind == "text" then
+ local h, chars, code, fenced = 0, 0, 0, false
+ local function paragraph()
+ if chars > 0 then
+ h += math.ceil(chars / 85) * 24 + 16
+ chars = 0
+ end
+ end
+ for line in string.gmatch((b.text or "") .. "\n", "(.-)\n") do
+ if string.match(line, "^%s*```") then
+ if fenced then
+ h += code * 19 + 56 + 16
+ code = 0
+ else
+ paragraph()
+ end
+ fenced = not fenced
+ elseif fenced then
+ code += 1
+ elseif string.match(line, "^%s*$") then
+ paragraph()
+ else
+ chars += #line + 1
+ end
+ end
+ paragraph()
+ return math.max(24, h - 16)
+ elseif b.kind == "tools" or b.kind == "work" then
+ return if b.live then 26 * math.max(1, #(b.tools or {})) else 26
+ end
+ return 240
+end
+local function guess_run(blocks: { Block }): number
+ local h = 0
+ for _, b in blocks do
+ h += guess_block(b) + 12
+ end
+ return math.max(0, h - 12)
+end
+
+-- A long settled reply's blocks are the host's (src/chat.rs `set_aside`): its
+-- row says its runs (`runs`: each `{ key, n, guess, sum }`) and a run's blocks
+-- are asked for as it's built (`chat.reply_run`), so opening it hands this
+-- script its end's blocks alone, not its thousands.
+local function run_blocks(id: string, key: string): { Block }
+ local ok, list = pcall(ui.call_sync, "chat.reply_run", { id = id, key = key })
+ return if ok and type(list) == "table" then list else {}
+end
+local function aside_blocks(id: string): { Block }
+ local ok, list = pcall(ui.call_sync, "chat.reply_blocks", id)
+ return if ok and type(list) == "table" then list else {}
+end
+
+-- (`aside`: the reply's blocks are the host's, its runs said by its row.)
+local function blocks_of(list: () -> { Block }, m: Message, now: () -> Message, draft: State?, view: View?, aside: boolean?): Node
+ local function block(b: Block, brow: State): Node
if b.kind == "tools" or b.kind == "work" then
return Activity {
key = `{m.id}:{b.id}`,
@@ -767,9 +928,256 @@ local function blocks_of(list: () -> { Block }, m: Message, now: () -> Message,
find = if view and view.find then view.find(`{m.id}:{b.id}`) else nil,
group = `reply:{m.id}`,
}
+ end
+ local function key(b: Block): string
+ return b.id
+ end
+ -- (A reply being written may grow long as it's watched: windowed from
+ -- the start, one run while it's short.)
+ if aside and not view then
+ list = function(): { Block }
+ local _ = now().runs
+ return aside_blocks(m.id)
+ end
+ end
+ if not view or (not aside and #(m.blocks or {}) <= LONG_REPLY and not m.streaming) then
+ return ui.each(ui.computed(list), function(b: Block, _i: number, brow: State): Node
+ return block(b, brow)
+ end, { key = key, w_full = true, gap = "$space.3" })
+ end
+ local w = view :: View
+ -- Its runs. Where one ends is said by its blocks' ids alone (a block
+ -- whose id falls on RUN starts a run; none runs past RUN_MOST), so blocks
+ -- coming before or after (the engine's opening tail, then the whole reply;
+ -- a reply being written) leave the runs they don't reach as they were.
+ -- Each is kept (its very table) while its blocks are the same ones, so
+ -- only a run whose blocks changed is looked at again; and keyed by its
+ -- first block.
+ local starts: { [string]: boolean } = {}
+ local function starts_run(id: string): boolean
+ local yes = starts[id]
+ if yes == nil then
+ local h = 0
+ for i = 1, #id do
+ h = (h * 31 + string.byte(id, i)) % 1000003
+ end
+ yes = h % RUN == 0
+ starts[id] = yes
+ end
+ return yes
+ end
+ type Run = { key: string, blocks: { Block }?, guess: number?, sum: string?, n: number? }
+ local made: { [string]: Run } = {}
+ -- (Set aside: a run's blocks as asked for, while it's the same run.)
+ local fetched: { [string]: { sum: string?, blocks: { Block } } } = {}
+ local function blocks_in(run: Run): { Block }
+ if run.blocks ~= nil then
+ return run.blocks :: { Block }
+ end
+ local got = fetched[run.key]
+ if got == nil or got.sum ~= run.sum then
+ got = { sum = run.sum, blocks = run_blocks(m.id, run.key) }
+ fetched[run.key] = got
+ end
+ return got.blocks
+ end
+ local function guess_of(run: Run): number
+ return run.guess or guess_run(run.blocks or {})
+ end
+ -- The runs within the opening's reach of its end (by their heights, kept or
+ -- guessed), as they last stood: one made there is built from the start.
+ local reach: { [string]: boolean } = {}
+ local runs = ui.computed(function(): { Run }
+ local out: { Run } = {}
+ local now_made: { [string]: Run } = {}
+ if aside then
+ -- As the host cut them: each kept (its very table, its blocks
+ -- if asked for) while it says the same run.
+ for _, r in now().runs or {} do
+ local was = made[r.key]
+ local run = if was and was.sum == r.sum and was.n == r.n
+ then was
+ else { key = r.key, guess = r.guess, sum = r.sum, n = r.n }
+ table.insert(out, run)
+ now_made[r.key] = run
+ end
+ end
+ local all = if aside then {} else list()
+ local function take(from: number, to: number)
+ local first = all[from].id
+ local was = made[first]
+ local same = was ~= nil and #was.blocks == to - from + 1
+ if same then
+ for i = from, to do
+ if (was :: Run).blocks[i - from + 1] ~= all[i] then
+ same = false
+ break
+ end
+ end
+ end
+ local run = if same then was :: Run else { key = first, blocks = table.move(all, from, to, 1, {}) }
+ table.insert(out, run)
+ now_made[first] = run
+ end
+ local from = 1
+ for i = 2, if aside then 0 else #all do
+ if i - from >= RUN_MOST or starts_run(all[i].id) then
+ take(from, i - 1)
+ from = i
+ end
+ end
+ if not aside and #all >= from then
+ take(from, #all)
+ end
+ made = now_made
+ reach = {}
+ local list_el = w.view:peek()
+ local opening = (if list_el and list_el.height and list_el.height > 0 then list_el.height else OPENING_VIEW) + RUN_OVERSCAN
+ local h = 0
+ for i = #out, 1, -1 do
+ if h > opening then
+ break
+ end
+ reach[out[i].key] = true
+ h += RUN_HEIGHTS.get(`{m.id}:{out[i].key}`) or guess_of(out[i])
+ end
+ return out
+ end)
+ -- A find's current match, if it's in this reply: the key of its text.
+ local found = if w.find then w.find("") else nil
+ local function current_key(): string?
+ local c = if found then found.current() else nil
+ return if c then c.key else nil
+ end
+ -- Each run's judge, by its key: all judged again as what holds one
+ -- built changes (a find's current match moving, the reply's writing
+ -- ending); each judges itself as it comes near the view or goes.
+ local judges: { [string]: () -> () } = {}
+ ui.effect(function()
+ current_key()
+ local _ = now().streaming
+ for _, judge in judges do
+ judge()
+ end
+ end)
+ return ui.each(runs, function(run: Run, _i: number, row: State): Node
+ local k = `{m.id}:{run.key}`
+ local was_near = RUN_NEAR.get(k)
+ -- Built if it was when last judged (a reply opened again where it was
+ -- read), and if it's near the reply's end (where a transcript opens,
+ -- and where a reply being written grows); else held at its height
+ -- until the view says it's near.
+ local near = ui.use_state(was_near == true or reach[run.key] == true)
+ local held = ui.use_state(RUN_HEIGHTS.get(k) or guess_of(run))
+ local r = ui.ref()
+ -- Built again after being held: its first layout makes up the
+ -- difference to the height it was held at, as ds/markdown's runs do.
+ local returning = false
+ -- Near the view, as zgx says (`on_visible`, its box grown by
+ -- `visible_margin`): nil until its first layout.
+ local seen: boolean? = nil
+ local function judge()
+ if seen == nil then
+ return
+ end
+ -- (Always built: the last run of a reply being written, where its
+ -- words arrive; and the run holding a find's current match.)
+ local all = runs:peek()
+ local live = now().streaming == true and #all > 0 and all[#all].key == run.key
+ local c = current_key()
+ local holds = false
+ if c and aside and string.sub(c, 1, #m.id + 1) == `{m.id}:` then
+ -- (Its blocks not asked for yet: the host says which run has it.)
+ local ok, at = pcall(ui.call_sync, "chat.reply_run_of", { id = m.id, block = string.sub(c, #m.id + 2) })
+ holds = ok and at == run.key
+ elseif c and not aside then
+ for _, b in row:peek().blocks do
+ if c == `{m.id}:{b.id}` then
+ holds = true
+ break
+ end
+ end
+ end
+ local shows = live or holds or seen :: boolean
+ if RUN_NEAR.get(k) ~= shows then
+ RUN_NEAR.set(k, shows)
+ end
+ if near:peek() ~= shows then
+ returning = shows
+ near:set(shows)
+ end
+ end
+ -- (Its blocks, made only once it's near: a component's body runs as it
+ -- mounts, so a run held away from the view asks for none of them.)
+ local Blocks = ui.component(function(_: {}): Node
+ return ui.each(ui.computed(function(): { Block }
+ local r = row:get()
+ return if aside then blocks_in(r) else r.blocks
+ end), function(b: Block, _j: number, brow: State): Node
+ return block(b, brow)
+ end, { key = key, w_full = true, gap = "$space.3" })
+ end)
+ judges[run.key] = judge
+ ui.on_cleanup(function()
+ if judges[run.key] == judge then
+ judges[run.key] = nil
+ end
+ end)
+ return ui.div {
+ ref = r,
+ w_full = true,
+ min_w = 0,
+ visible_margin = RUN_OVERSCAN,
+ on_visible = function(visible: boolean)
+ -- (Built as it was made, and not near at its first layout: kept
+ -- until the view has been near it and gone. Let go of at once,
+ -- it took a frame of its own after the one the reply opened in.)
+ if seen == nil and not visible and near:peek() then
+ seen = false
+ return
+ end
+ seen = visible
+ judge()
+ end,
+ on_resize = function(size: { w: number, h: number })
+ local before = held:peek()
+ local back = returning
+ returning = false
+ local last_height = RUN_HEIGHTS.get(k)
+ if last_height == nil or math.abs(size.h - last_height) >= 0.5 then
+ RUN_HEIGHTS.set(k, size.h)
+ end
+ if math.abs(size.h - before) < 0.5 then
+ return
+ end
+ held:set(size.h)
+ if not back or (w.at_end and w.at_end:peek()) then
+ return
+ end
+ -- Above the view's top (it came in from there): the view moves
+ -- with it, so what shows doesn't (ds/markdown's runs, the same).
+ local el, list_el = r:peek(), w.view:peek()
+ local outer = if w.row then w.row:peek() else nil
+ local row_above = outer ~= nil
+ and list_el ~= nil
+ and outer.y ~= nil
+ and outer.height ~= nil
+ and list_el.y ~= nil
+ and (outer.y :: number) + (outer.height :: number) <= (list_el.y :: number)
+ if el and list_el and el.y and list_el.y and (el.y :: number) < (list_el.y :: number) and not row_above then
+ w.offset:set(math.max(0, w.offset:peek() + size.h - before))
+ end
+ end,
+ -- Away from the view, this box alone, as tall as the run last was
+ -- (or its guess); near, its blocks.
+ min_h = function(): number
+ return if near:get() then 0 else held:get()
+ end,
+ ui.show(near, Blocks {}),
+ }
end, {
- key = function(b: Block): string
- return b.id
+ key = function(run: Run): string
+ return run.key
end,
w_full = true,
gap = "$space.3",
@@ -806,7 +1214,26 @@ local function reply(
provide = { message = m.id },
w_full = true,
gap = "$space.3",
- if m.blocks ~= nil
+ if m.runs ~= nil or (m.blocks ~= nil and m.streaming)
+ -- Its blocks set aside by the host (a long settled reply), or
+ -- soon may be (one being written, once it settles): as its row
+ -- says, laid out compact, from its runs, or from its blocks.
+ then ui.presence(function(): string
+ local n = now()
+ if compact and compact() and n.compact then
+ return "compact"
+ end
+ return if n.runs ~= nil then "runs" else "blocks"
+ end, function(kind: string): Node
+ return blocks_of(function(): { Block }
+ local n = now()
+ if kind == "compact" then
+ return n.compact or {}
+ end
+ return n.blocks or {}
+ end, m, now, draft, view, kind == "runs")
+ end, { w_full = true, min_w = 0 })
+ elseif m.blocks ~= nil
then blocks_of(function(): { Block }
local n = now()
if compact and compact() and n.compact then
@@ -835,7 +1262,7 @@ local function reply(
end,
}
),
- if m.blocks ~= nil then nil else Markdown {
+ if m.blocks ~= nil or m.runs ~= nil then nil else Markdown {
text = text,
-- Parsed incrementally only while it can grow.
key = if m.streaming then `reply:{m.id}` else nil,
@@ -971,10 +1398,22 @@ local function Transcript(props: Props): Node
return { key = key, query = f.query, current = f.current, reveal = reveal }
end
end
+ -- The chat shown (`session`): the one it's made for, then each shown in
+ -- it (`fresh`).
+ local showing: string? = if props.session then props.session:peek() else nil
-- Whether the transcript this one replaces rested at its end (kept
-- state: a reload's rebuild knows it; `keep` brings a view back only if
- -- it didn't). Then a new one starts at its end.
- local was_at_end = if props.was_at_end ~= nil then props.was_at_end else at_end:peek()
+ -- it didn't). Then a new one starts at its end. (Asked again of each
+ -- chat shown, by its id.)
+ local function was_at_end_of(id: string?): boolean
+ local given: any = props.was_at_end
+ if type(given) == "function" then
+ local said = if id ~= nil then given(id) else nil
+ return if said ~= nil then said else at_end:peek()
+ end
+ return if given ~= nil then given else at_end:peek()
+ end
+ local was_at_end = was_at_end_of(showing)
-- A new one starts at its end; one made again where the last was
-- scrolled up (a reload, `keep` holding its place) stays away from it,
-- its way back to the latest still out. (The list writes the state only
@@ -1073,6 +1512,9 @@ local function Transcript(props: Props): Node
local glide: any = nil
-- (Each send's turn: a later one takes over from one still on its way.)
local glides = 0
+ -- (Each chat shown in it, with `session`: a glide or a place being put
+ -- back for one leaves the next alone.)
+ local shown_turn = 0
local glide_from: (push: () -> (), from: number, last: Message, r: any, landing: string?) -> ()
local function send_here(push: () -> (), landing: string?)
waiting = nil
@@ -1095,7 +1537,14 @@ local function Transcript(props: Props): Node
if el then
el:scroll_to_row(n, { align = "end" })
end
+ local view = shown_turn
ui.after(16, function()
+ -- (Another chat shown meanwhile (`fresh`): the prompt goes, and
+ -- the view, now that chat's, stays where it opened.)
+ if shown_turn ~= view then
+ push()
+ return
+ end
local real = offset:peek()
if real >= PAST_END / 2 then
push()
@@ -1116,6 +1565,8 @@ local function Transcript(props: Props): Node
end
glides += 1
local turn = glides
+ -- (The chat it's in: another shown meanwhile (`fresh`) leaves it.)
+ local view = shown_turn
-- First a step clear of the end (the old last reply holding its
-- runway meanwhile, so nothing above moves): the list then no
-- longer rests at its end, and doesn't follow the new rows there.
@@ -1131,6 +1582,10 @@ local function Transcript(props: Props): Node
-- Nothing to glide to: the old reply lets go of its room, and the
-- view goes to the end.
local function let_go()
+ -- (Another chat shown meanwhile (`fresh`): its view is its own.)
+ if shown_turn ~= view then
+ return
+ end
ui.batch(function()
held:set { id = "", h = 0 }
gliding:set(false)
@@ -1144,6 +1599,11 @@ local function Transcript(props: Props): Node
-- taken meanwhile stays where it went.
local function rise(prompt: Message?)
ui.after(16, function()
+ -- (Another chat shown meanwhile (`fresh`), or scrolled meanwhile:
+ -- the view is that chat's, or the reader's, see `wheeled`.)
+ if shown_turn ~= view or glides ~= turn then
+ return
+ end
local row_el = prompt and tops[prompt.id] and tops[prompt.id]:peek()
local list_el = list:peek()
if not row_el or not list_el or row_el.y == nil or list_el.y == nil then
@@ -1156,6 +1616,9 @@ local function Transcript(props: Props): Node
duration = motion.ms(GLIDE_MS),
ease = "outQuad",
onComplete = function()
+ if glides ~= turn then
+ return
+ end
-- Landed: the old reply lets go of the room it held
-- (above the view, so nothing seen moves), and the
-- offset says where the list now rests, a real place
@@ -1442,6 +1905,18 @@ local function Transcript(props: Props): Node
-- (Taken somewhere of their own: a place still to come back to is
-- let go.)
waiting = nil
+ -- A send's glide under way (or its prompt still to land, a steer's):
+ -- the scroll is theirs, so the glide stops where it is rather than
+ -- pulling the view back to the end. The old reply keeps the room it
+ -- held until it's out of view (`rested`), so nothing shown moves.
+ if gliding:peek() then
+ glides += 1
+ if glide then
+ glide:pause()
+ glide = nil
+ end
+ gliding:set(false)
+ end
return nil
end
-- When focus last came to something in the list (Tab, ⇧Tab to a row's
@@ -1450,6 +1925,8 @@ local function Transcript(props: Props): Node
-- While the width is changing (and a moment after): the reading row
-- puts the place back as its lines rewrap, the frame they do.
local resizing_until = 0
+ -- When the view's size last changed.
+ local resized_at = -math.huge
local function find_reading()
reading = nil
local el = list:peek()
@@ -1531,9 +2008,32 @@ local function Transcript(props: Props): Node
local function rested()
remember()
find_reading()
- if not at_end:peek() and ui.now() >= resizing_until then
+ -- Resting away from the end: let go of it once no change of size is
+ -- under way, or at once if a person scrolled since the last one (a
+ -- scroll begun just after a resize is theirs; held, the next resize,
+ -- however much later, would pull the view back to the end).
+ if not at_end:peek() and (ui.now() >= resizing_until or wheeled_at >= resized_at) then
end_held = false
end
+ -- A send's glide a scroll stopped (`wheeled`): the old reply's held
+ -- room goes once that reply is out of view, where it moves nothing.
+ local h = held:peek()
+ if h.id ~= "" and not gliding:peek() then
+ local r = rows[h.id]
+ local row_el = r and r.outer:peek()
+ local el = list:peek()
+ local away_from_view = not row_el
+ or not el
+ or row_el.y == nil
+ or row_el.height == nil
+ or el.y == nil
+ or el.height == nil
+ or (row_el.y :: number) + (row_el.height :: number) <= (el.y :: number)
+ or (row_el.y :: number) >= (el.y :: number) + (el.height :: number)
+ if away_from_view then
+ held:set { id = "", h = 0 }
+ end
+ end
end
local rest = ui.debounced(offset, 150, { every = true })
-- (A view just made: its place told once it has stood 150 ms.)
@@ -1906,22 +2406,10 @@ local function Transcript(props: Props): Node
}
end
- return ui.overlay {
- w_full = true,
- h_full = true,
- -- The lightbox a message's pictures open in (one a window draws).
- Lightbox.Host(),
- on_hover = function(inside: boolean)
- if not inside then
- hover:set("")
- end
- end,
- ui.div { absolute = true, left = 0, right = 0, top = 0, bottom = 0, SelectionMenu { w_full = true, h_full = true, more = offers, on_release = if props.on_mention or props.on_attach
- then function()
- -- (A turn on: the release ends the gesture first.)
- ui.after(0, settle)
- end
- else nil, ui.list {
+ -- Its rows: the chat's messages, virtualized. With `session`, one list
+ -- for each chat shown (`fresh` first), the rest of the transcript staying.
+ local function List(): Node
+ return ui.list {
id = "transcript",
ref = list,
label = locale.t("ds.transcript.conversation"),
@@ -1992,7 +2480,8 @@ local function Transcript(props: Props): Node
ui.after(48, settle)
end
if changed then
- resizing_until = ui.now() + 300
+ resized_at = ui.now()
+ resizing_until = resized_at + 300
-- At the end: on it still, every frame of the change.
if end_held and not gliding:peek() then
-- (Asked of the list itself, which lands it as it lays
@@ -2041,6 +2530,7 @@ local function Transcript(props: Props): Node
follow = true,
at_end = at_end,
height = ESTIMATE,
+ estimate = ROW_ESTIMATE,
overscan = 3,
-- (Its scrollbar is the rail below, over it: a bar of its own
-- would fade at its edges with the rows.)
@@ -2064,13 +2554,99 @@ local function Transcript(props: Props): Node
-- On whole points, so a scroll moves its pixels rather than
-- painting them again (a view between device pixels can't).
snap = true,
- } } },
+ }
+ end
+ -- Another chat shown (`session`): its list is made for it, and what was
+ -- the last chat's own here goes, as a transcript made for this one would
+ -- start: where it opens (its place kept, or its latest), its runway and
+ -- glide, the hover and a selection's bar, the reading place and its
+ -- sizes. (The list's own `on_mount` then opens it where it should.)
+ -- (Each chat shown in it, for the scrollbar.)
+ local placed = ui.use_state(0)
+ local function fresh(id: string?)
+ if id == showing then
+ return
+ end
+ showing = id
+ shown_turn += 1
+ opened_at = ui.now()
+ -- (Its own list's: the last list, going, lets go of its own.)
+ if not props.ref then
+ list = ui.ref()
+ end
+ was_at_end = was_at_end_of(id)
+ restoring = props.keep ~= nil and props.keep:peek() ~= nil and not was_at_end
+ if glide then
+ glide:pause()
+ glide = nil
+ end
+ here, waiting, returning, reading = nil, nil, nil, nil
+ sizes, known, seen_n = {}, 0, 0
+ last_w, last_h = nil, nil
+ end_held = not restoring
+ wheeled_at, focused_at, resizing_until, resized_at = -math.huge, -math.huge, 0, -math.huge
+ ui.batch(function()
+ at_end:set(not restoring)
+ placing:set(restoring)
+ held:set { id = "", h = 0 }
+ gliding:set(false)
+ pin:set { id = "", h = 0 }
+ hover:set("")
+ spot:set(nil)
+ sized:set(sized:peek() + 1)
+ end)
+ -- (Its place told once it has stood 150 ms, as a view just made's.)
+ ui.after(150, rested)
+ -- (The scrollbar too: placing the next chat's rows is no scroll.)
+ placed:set(placed:peek() + 1)
+ end
+
+ return ui.overlay {
+ w_full = true,
+ h_full = true,
+ -- The lightbox a message's pictures open in (one a window draws).
+ Lightbox.Host(),
+ on_hover = function(inside: boolean)
+ if not inside then
+ hover:set("")
+ end
+ end,
+ ui.div {
+ absolute = true,
+ left = 0,
+ right = 0,
+ top = 0,
+ bottom = 0,
+ SelectionMenu {
+ w_full = true,
+ h_full = true,
+ more = offers,
+ on_release = if props.on_mention or props.on_attach
+ then function()
+ -- (A turn on: the release ends the gesture first.)
+ ui.after(0, settle)
+ end
+ else nil,
+ if props.session
+ then ui.presence(function(): string
+ return (props.session :: State):get() or ""
+ end, function(id: string): Node
+ fresh(if id == "" then nil else id)
+ return List()
+ end, { w_full = true, h_full = true })
+ else List(),
+ },
+ },
-- The scrollbar, over the list and never faded, running its whole
-- height: at the window's edge, beside the composer rather than
-- under it, so scrolled to the end it reaches the page's end.
Rail {
id = "transcript-rail",
offset = offset,
+ -- (Another chat's rows placing themselves: no scroll to show.)
+ settle = function(): number
+ return placed:get()
+ end,
extent = extent,
view = function(): number
return list.height or 0
diff --git a/apps/zgx/ui/locales/en.json b/apps/zgx/ui/locales/en.json
index 785f9a27b..d63b6be29 100644
--- a/apps/zgx/ui/locales/en.json
+++ b/apps/zgx/ui/locales/en.json
@@ -592,6 +592,8 @@
"edits_hint": "Apply edits, ask before other actions.",
"auto": "Auto",
"auto_hint": "The agent's reviewer approves safe actions; risky ones ask.",
+ "auto_unavailable": "Auto unavailable",
+ "auto_unavailable_hint": "This agent doesn't support Auto. Choose another access mode or agent.",
"full": "Full access",
"full_hint": "Run commands and edits without asking."
},
@@ -608,6 +610,13 @@
"worktree_hint": "An isolated copy, on a branch of its own."
},
"work_in": "Work in",
+ "reach": {
+ "label": "Reaches",
+ "devices": "All devices",
+ "devices_hint": "Works with your other devices: their chats, and commands on them.",
+ "isolated": "Isolated",
+ "isolated_hint": "Only its own machine and the chats it starts."
+ },
"project": {
"label": "Project",
"search": "Search projects…",
@@ -628,6 +637,7 @@
"dictate": "Dictate",
"queue_message": "Queue message",
"send_message": "Send message",
+ "send_auto_unavailable": "Auto isn't available for this agent. Choose another access mode to send.",
"stop": "Stop",
"back": "Back",
"next": "Next",
@@ -1163,6 +1173,11 @@
"description": "Blurred everywhere, for screen sharing. Click one to see it.",
"terms": "screen sharing recording blur blurred mosaic private censor redact"
},
+ "keep_chats_local": {
+ "label": "Keep chats on this device",
+ "description": "Stay signed in, but this device's chats, chat list and projects aren't synced to Zeron's servers. Your other devices won't see them, and this one won't see theirs. Zeron restarts its engine to switch.",
+ "terms": "sync synced local only offline private privacy server cloud upload chats transcripts devices"
+ },
"links_in": {
"external": "Your default browser.",
"tab": "A browser tab beside the conversation."
@@ -1195,6 +1210,12 @@
"terms": "co-author coauthor attribution bot commit message",
"cloud": "Always on for Cloud",
"on": "Agents' commits add zeronsh[bot] as a co-author"
+ },
+ "keep_running": {
+ "label": "Keep Zeron running after you quit",
+ "on": "Chats keep working, and other devices can reach them.",
+ "off": "When you quit, Zeron stops once its chats are done.",
+ "terms": "background quit close engine agents running stop memory battery"
}
},
"engine": {
@@ -1644,7 +1665,18 @@
},
"remove_row_description": "Chats that used it stay."
},
- "couldnt_switch": "Couldn't switch accounts"
+ "couldnt_switch": "Couldn't switch accounts",
+ "cloud": "Cloud",
+ "cloud_keys": {
+ "title": "API keys",
+ "section_description": "Instead of signing in, Cloud can use an API key. A key saved here becomes the account its agent uses on every Cloud machine, from its next turn.",
+ "anthropic": "Anthropic API key",
+ "openai": "OpenAI API key",
+ "description": "For {agent} on Cloud. Kept in Zeron's vault, never on this computer.",
+ "placeholder": "Paste a key",
+ "save": "Save",
+ "saved": "{agent} on Cloud now uses this key"
+ }
},
"devices": {
"title": "Devices",
@@ -2024,6 +2056,12 @@
"terms": "machine size vcpu memory disk credits rate xlarge large small standard",
"description": "The size new Cloud chats start on. Bigger machines use credits faster.",
"failed": "Couldn't change the default machine. Try again in a moment."
+ },
+ "reach": {
+ "title": "New chats reach",
+ "terms": "reach access devices isolated isolate remote commands security",
+ "description": "Whether new Cloud chats work with your other devices — their chats, and commands on them — or stay on their own machine. You can change it for each chat from its composer.",
+ "failed": "Couldn't change what new Cloud chats reach. Try again in a moment."
}
},
"billing": {
@@ -3233,7 +3271,8 @@
"show": "Show in Finder",
"dismiss": "Dismiss {name}",
"saving": "Saving…"
- }
+ },
+ "dismiss_error": "Dismiss"
},
"browser_api": {
"empty": "Enter a website or localhost address.",
@@ -3356,6 +3395,12 @@
"old": "This Zeron needs a newer engine",
"old_tip": "Its engine is older than this version needs. Open About & updates to go back to Stable.",
"short_old": "Needs a newer engine"
+ },
+ "quit": {
+ "working": "{n, plural, one {# chat is still working.} other {# chats are still working.}}",
+ "detail": "Keep running in the background until they finish, or stop them now?",
+ "keep": "Keep Running",
+ "stop": "Stop Them Now"
}
},
"account": {
@@ -3382,6 +3427,9 @@
"expired": "You were signed out. Sign in again to carry on.",
"failed": "Sign-in didn't finish. Try again."
}
+ },
+ "cloud": {
+ "reach_not_changed": "Couldn't change what this Cloud chat reaches."
}
},
"plugins": {
@@ -3497,7 +3545,11 @@
},
"compose": {
"title": "Put text in the message box",
- "detail": "You still send it."
+ "detail": "It can add to what you've written or replace it. You still send it."
+ },
+ "draft": {
+ "title": "Read what you type in the message box, and set it aside",
+ "detail": "It sees your words in any chat before you send them, and can take the draft away and put it back later. It never sends it."
},
"network": {
"title": "Connect to the internet",
diff --git a/apps/zgx/ui/locales/zh-Hans.json b/apps/zgx/ui/locales/zh-Hans.json
index f983f4087..39a2817de 100644
--- a/apps/zgx/ui/locales/zh-Hans.json
+++ b/apps/zgx/ui/locales/zh-Hans.json
@@ -592,6 +592,8 @@
"edits_hint": "应用编辑,执行其他操作前先询问。",
"auto": "自动",
"auto_hint": "由智能体自己的审查判断:安全的操作直接执行,有风险的会询问你。",
+ "auto_unavailable": "自动模式不可用",
+ "auto_unavailable_hint": "此智能体不支持自动模式。请选择其他访问模式或智能体。",
"full": "完全访问",
"full_hint": "运行命令和编辑时不询问。"
},
@@ -608,6 +610,13 @@
"worktree_hint": "拥有独立分支的隔离副本。"
},
"work_in": "工作位置",
+ "reach": {
+ "label": "访问范围",
+ "devices": "所有设备",
+ "devices_hint": "可与你的其他设备协作:访问它们的对话,并在其上运行命令。",
+ "isolated": "隔离",
+ "isolated_hint": "仅限其自身的机器及其启动的对话。"
+ },
"project": {
"label": "项目",
"search": "搜索项目…",
@@ -628,6 +637,7 @@
"dictate": "听写",
"queue_message": "将消息加入队列",
"send_message": "发送消息",
+ "send_auto_unavailable": "此智能体不支持自动模式。请选择其他访问模式后再发送。",
"stop": "停止",
"back": "返回",
"next": "下一步",
@@ -1163,6 +1173,11 @@
"description": "在所有位置模糊显示,方便共享屏幕。点按即可查看。",
"terms": "屏幕共享 录屏 模糊 马赛克 隐私 遮盖 screen sharing recording blur blurred mosaic private censor redact"
},
+ "keep_chats_local": {
+ "label": "将对话保留在此设备上",
+ "description": "保持登录,但此设备的对话、对话列表和项目不会同步到 Zeron 的服务器。你的其他设备看不到它们,此设备也看不到其他设备的。切换时 Zeron 会重启其引擎。",
+ "terms": "同步 本地 离线 隐私 服务器 云端 上传 对话 记录 设备 sync synced local only offline private privacy server cloud upload chats transcripts devices"
+ },
"links_in": {
"external": "默认浏览器。",
"tab": "对话旁边的浏览器标签页。"
@@ -1195,6 +1210,12 @@
"terms": "共同作者 署名 机器人 提交消息 co-author coauthor attribution bot commit message",
"cloud": "Cloud 始终启用",
"on": "智能体的提交会将 zeronsh[bot] 添加为共同作者"
+ },
+ "keep_running": {
+ "label": "退出后让 Zeron 继续运行",
+ "on": "对话会继续进行,其他设备也能访问它们。",
+ "off": "退出时,Zeron 会在对话完成后停止。",
+ "terms": "后台 退出 关闭 引擎 智能体 运行 停止 内存 电池 background quit close engine agents"
}
},
"engine": {
@@ -1644,7 +1665,18 @@
},
"remove_row_description": "使用过它的对话会保留。"
},
- "couldnt_switch": "无法切换账户"
+ "couldnt_switch": "无法切换账户",
+ "cloud": "云端",
+ "cloud_keys": {
+ "title": "API 密钥",
+ "section_description": "云端也可以使用 API 密钥,而不必登录。在此保存的密钥会成为该代理在每台云端机器上使用的账户,从下一轮开始生效。",
+ "anthropic": "Anthropic API 密钥",
+ "openai": "OpenAI API 密钥",
+ "description": "用于云端的 {agent}。保存在 Zeron 的密钥库中,不会存放在这台电脑上。",
+ "placeholder": "粘贴密钥",
+ "save": "保存",
+ "saved": "云端的 {agent} 现在使用此密钥"
+ }
},
"devices": {
"title": "设备",
@@ -2024,6 +2056,12 @@
"terms": "machine size vcpu memory disk credits rate xlarge large small standard 机器 规格 内存 磁盘 额度",
"description": "新 Cloud 对话使用的规格。更大的机器消耗额度更快。",
"failed": "无法更改默认机器。请稍后再试。"
+ },
+ "reach": {
+ "title": "新对话的访问范围",
+ "terms": "reach access devices isolated isolate remote commands security 访问 范围 设备 隔离 命令 安全",
+ "description": "新的 Cloud 对话是否可与你的其他设备协作(访问它们的对话并在其上运行命令),还是仅限于其自身的机器。你可以在每个对话的输入框中单独更改。",
+ "failed": "无法更改新 Cloud 对话的访问范围。请稍后再试。"
}
},
"billing": {
@@ -3233,7 +3271,8 @@
"show": "在访达中显示",
"dismiss": "关闭 {name}",
"saving": "正在保存…"
- }
+ },
+ "dismiss_error": "关闭"
},
"browser_api": {
"empty": "输入网站或 localhost 地址。",
@@ -3356,6 +3395,12 @@
"old": "此版本 Zeron 需要更新的引擎",
"old_tip": "引擎版本低于此版本的要求。打开“关于与更新”即可回到稳定版。",
"short_old": "需要更新的引擎"
+ },
+ "quit": {
+ "working": "{n, plural, other {还有 # 个对话正在进行。}}",
+ "detail": "要在后台继续运行直到完成,还是现在停止?",
+ "keep": "继续运行",
+ "stop": "立即停止"
}
},
"account": {
@@ -3382,6 +3427,9 @@
"expired": "你已退出登录。请重新登录以继续。",
"failed": "登录未完成。请重试。"
}
+ },
+ "cloud": {
+ "reach_not_changed": "无法更改此 Cloud 对话的访问范围。"
}
},
"plugins": {
@@ -3497,7 +3545,11 @@
},
"compose": {
"title": "在消息输入框中填写文本",
- "detail": "仍由你来发送。"
+ "detail": "它可以补充或替换你写的内容,仍由你来发送。"
+ },
+ "draft": {
+ "title": "读取你在消息输入框中输入的内容,并可暂存",
+ "detail": "它能在你发送前看到你在任意聊天中输入的文字,也能把草稿暂时取走、稍后放回。它不会替你发送。"
},
"network": {
"title": "连接互联网",
diff --git a/apps/zgx/ui/screens/chat/completions.luau b/apps/zgx/ui/screens/chat/completions.luau
index 298c9738c..fad3f77ec 100644
--- a/apps/zgx/ui/screens/chat/completions.luau
+++ b/apps/zgx/ui/screens/chat/completions.luau
@@ -20,6 +20,7 @@ local ChatLinks = require("@app/screens/chat/chat_links")
local locale = require("@ds/locale")
local route = require("@app/screens/shell/route")
local mentions = require("@ds/composer_mentions")
+local Draft = require("@ds/draft_text")
local prefs = require("@app/screens/settings/prefs")
local Invocations = require("@app/screens/chat/invocations")
local store = require("@app/screens/chat/store")
@@ -149,6 +150,13 @@ function M.bind(b: Bind): { [string]: any }
end
return out
end
+ -- Whether the draft has an `@` anywhere: `@`'s other chats are listed
+ -- only then. (They're made from every chat, and the chat list changes
+ -- every few seconds while chats work on any device: each change made
+ -- them all again for a list no one had open.)
+ local at_typed = ui.computed(function(): boolean
+ return Draft.holds(b.text, "@")
+ end)
local lists = ui.computed(function(): any
local given = table.clone(sources:get())
-- `@`: the files found, then the other chats, then what's carried.
@@ -158,8 +166,10 @@ function M.bind(b: Bind): { [string]: any }
item.section = "files"
table.insert(at, item)
end
- for _, c in chats() do
- table.insert(at, c)
+ if at_typed:get() then
+ for _, c in chats() do
+ table.insert(at, c)
+ end
end
for _, a in attachments() do
table.insert(at, a)
@@ -197,8 +207,8 @@ function M.bind(b: Bind): { [string]: any }
-- so a reload with it open reads nothing.
local invocations_open = ui.state(`{b.key}_invocations_open`, nil :: string?)
ui.effect(function()
- local text = b.text:get()
- local t = mentions.token(text, #text)
+ -- (At the draft's end, read there: a long draft isn't copied for it.)
+ local t = Draft.end_token(b.text)
local wanted = t ~= nil and (t.trigger == "/" or (t.trigger == "$" and prefs.completion(b.agent()).dollar))
local key = if wanted then invocation_key() else nil
if key == invocations_open:peek() then
@@ -213,8 +223,8 @@ function M.bind(b: Bind): { [string]: any }
-- What was last searched for: kept, so a reload doesn't search again.
local searched = ui.state(`{b.key}_mention_searched`, nil :: string?)
ui.effect(function()
- local text = b.text:get()
- local t = mentions.token(text, #text)
+ -- (At the draft's end, read there: a long draft isn't copied for it.)
+ local t = Draft.end_token(b.text)
if not t or t.trigger ~= "@" then
return
end
diff --git a/apps/zgx/ui/screens/chat/composer.luau b/apps/zgx/ui/screens/chat/composer.luau
index 7979b1eac..4e4af4688 100644
--- a/apps/zgx/ui/screens/chat/composer.luau
+++ b/apps/zgx/ui/screens/chat/composer.luau
@@ -17,6 +17,7 @@
-- it lays itself out.
local ds = require("@ds")
+local Draft = require("@ds/draft_text")
local Dictation = require("@app/screens/chat/dictation")
local motion = require("@ds/motion")
local Placement = require("@app/screens/chat/composer_place")
@@ -28,11 +29,13 @@ local route = require("@app/screens/shell/route")
local art = require("@app/screens/shell/art")
local shared = require("@app/screens/chat/shared")
local sessions = require("@account/sessions")
+local cloud = require("@account/cloud")
local LinkNotice = require("@app/screens/chat/link_notice")
local CloudTray = require("@app/screens/chat/cloud_tray")
local Held = require("@app/screens/chat/held")
local CloudMachine = require("@app/screens/chat/cloud_machine")
local Where = require("@app/screens/chat/where")
+local Warm = require("@app/screens/chat/warm")
local DropOverlay = require("@ds/drop_overlay")
local Asks = require("@app/screens/chat/asks")
local Invocations = require("@app/screens/chat/invocations")
@@ -189,6 +192,9 @@ local function Composer(): Node
local checkout = ui.state("chat_checkout", "worktree" :: string?)
local branch = ui.state("chat_branch", nil :: string?)
local project = ui.state("chat_project", nil :: string?)
+ -- On Cloud, what a new chat's machine reaches (nil: the account's
+ -- default, Settings → Cloud). Each new chat starts from the default.
+ local reach = ui.state("chat_reach", nil :: string?)
local locals: { [string]: State } =
{ model = model, effort = effort, fast = fast, options = options, access = access, plan = plan }
@@ -482,6 +488,58 @@ local function Composer(): Node
branch = branch,
active = new_chat,
}
+ -- A new chat's agent, started as the person opens it or types (see
+ -- screens/chat/warm), with the send's own choices.
+ local warm = Warm.bind {
+ session = function(): string?
+ return session_id:get()
+ end,
+ text = shared.text,
+ owner = shared.owner,
+ request = function(): any?
+ -- (Only a new chat's.)
+ if not new_chat() then
+ return nil
+ end
+ local req = {
+ model = model:get(),
+ effort = effort:get(),
+ fast = fast:get(),
+ options = options:get(),
+ access = access:get(),
+ plan = plan:get(),
+ }
+ -- (Heard when the place changes too.)
+ device:get()
+ project:get()
+ checkout:get()
+ branch:get()
+ if where.blocked:peek() then
+ return nil
+ end
+ local p = where.plan()
+ if p.cloud or p.worktree then
+ return nil
+ end
+ -- (Only for a chat that will run here: one on another device
+ -- would outlive this app's quit.)
+ local here = (sessions.now:peek() :: any).here
+ if p.device ~= nil and p.device ~= here then
+ return nil
+ end
+ for _, m in store.catalog:get().models do
+ if m.value == req.model then
+ (req :: any).harness = m.harness
+ end
+ end
+ if (req :: any).harness == nil then
+ return nil
+ end
+ (req :: any).cwd = p.cwd;
+ (req :: any).device = p.device
+ return req
+ end,
+ }
-- (A new chat's project, for what follows the route: its panel.)
ui.effect(function()
if new_chat() then
@@ -716,10 +774,10 @@ local function Composer(): Node
end
return LinkNotice.of {
connection = sessions.connection:get(),
- cloud = machine.cloud_link(string.find(shared.text:get(), "%S") ~= nil or #shared.cargo:get() > 0 or #queue:get() > 0),
+ cloud = machine.cloud_link(Draft.has_text(shared.text) or #shared.cargo:get() > 0 or #queue:get() > 0),
host_unreachable = host_unreachable,
host = host,
- intent = string.find(shared.text:get(), "%S") ~= nil or #shared.cargo:get() > 0 or #queue:get() > 0,
+ intent = Draft.has_text(shared.text) or #shared.cargo:get() > 0 or #queue:get() > 0,
}
end)
@@ -843,24 +901,38 @@ local function Composer(): Node
-- the focus; back from Settings): the composer takes the keys. Once
-- what brought it here is done (a palette closing
-- puts focus back where it was first), so this comes last; a field
- -- that takes the keys after (a rename) has them. (Kept: a reload, or
- -- the window opening, isn't an arrival.)
+ -- that takes the keys after (a rename) has them. The window opening on
+ -- a chat is an arrival too: what's typed from the launch on goes into
+ -- the composer, with no click first (Zeron's composer has the keys as it
+ -- opens; ademark's A1 types from the launch and timed out on every run
+ -- while they were nowhere). (Kept: a reload isn't one.)
local arrived = ui.state("chat_composer_arrived", "?")
ui.effect(function()
local now = route.current:get()
local pane = route.chat:get().session
local chat = now.name == "session" or now.name == "home"
- local at = `{now.name}|{now.session or ""}|{now.project or ""}|{pane or ""}`
- local was = arrived:peek()
- if was == at then
+ -- (A session's project is the chat's own, known once the engine
+ -- lists it: its coming isn't a move, and it took the keys from
+ -- whatever had them by then, a dialog opened at launch.)
+ local project = if now.name == "home" then now.project or "" else ""
+ local at = `{now.name}|{now.session or ""}|{project}|{pane or ""}`
+ if arrived:peek() == at then
return
end
- arrived:set(at)
-- (A tab strip's arrows keep the keys on the tab they chose.)
- if route.take_keys_kept() or was == "?" or not chat then
+ if route.take_keys_kept() or not chat then
+ arrived:set(at)
return
end
+ -- Marked arrived as the keys are given, not before: the window's
+ -- scripts loaded again meanwhile (the engine's plugins coming in as
+ -- the window opens) drop this turn's callback, and the scripts made
+ -- again give them instead.
ui.after(0, function()
+ if arrived:peek() == at then
+ return
+ end
+ arrived:set(at)
shared.focus:add(1)
end)
end)
@@ -1012,6 +1084,7 @@ local function Composer(): Node
-- steps are); Cloud makes it meanwhile, and the message goes once it
-- has. Refused, back to the new chat with the words and why.
if plan.cloud then
+ warm.stop()
local chat_id = store.new_id()
req.project = plan.project
req.device = plan.device
@@ -1028,10 +1101,12 @@ local function Composer(): Node
slide_to = chat_id
route.open_session(chat_id)
sessions
- .create({ id = chat_id, project = plan.project, branch = plan.branch, cloud = true })
+ .create({ id = chat_id, project = plan.project, branch = plan.branch, cloud = true, reach = reach:peek() })
:after(function(made: any)
local cwd = if type(made) == "table" then made.cwd else nil
req.cwd = if type(cwd) == "string" and cwd ~= "" then cwd else nil
+ -- (The next new chat starts from the default again.)
+ reach:set(nil)
store.created(chat_id)
store.send(req):after(function() end, function(_e: any) end)
end, function(e: any)
@@ -1063,8 +1138,12 @@ local function Composer(): Node
req.project = plan.project
req.device = plan.device
req.branch = plan.branch
+ -- (The id its agent was started early for, if it was: the send goes
+ -- into that agent.)
+ local warmed = warm.take()
sessions
.create({
+ id = warmed,
project = plan.project,
device = if plan.project then nil else plan.device,
branch = plan.branch,
@@ -1074,6 +1153,9 @@ local function Composer(): Node
:after(function(made: any)
local id = if plan.cloud and type(made) == "table" then made.id else made
if type(id) ~= "string" then
+ if warmed then
+ store.unwarm(warmed)
+ end
failed()
return
end
@@ -1101,6 +1183,10 @@ local function Composer(): Node
route.open_session(id)
store.send(req):after(function() end, function(_e: any) end)
end, function(e: any)
+ -- (Never made: the agent started for it goes.)
+ if warmed then
+ store.unwarm(warmed)
+ end
-- (A Cloud chat's reason is said in words; an outcome word isn't.)
local why = if plan.cloud and type(e) == "table" and type(e.message) == "string" and string.find(e.message, " ", 1, true)
then e.message
@@ -1163,9 +1249,13 @@ local function Composer(): Node
on = d.name
end
end
+ -- On Cloud: its machine's session (a side chat shares its parent's).
+ local machine = if cloud.on_device((s :: any).device) then cloud.session_for(s.id, (s :: any).device) else nil
return {
device = on,
name = name,
+ cloud = cloud.on_device((s :: any).device),
+ reach = if machine then machine.reach else nil,
worktree = path ~= nil and s.cwd ~= nil and s.cwd ~= path,
project = project,
hue = if project and s.project then (route.look(s.project) or { hue = route.hue(s.project) }).hue else nil,
@@ -1288,6 +1378,16 @@ local function Composer(): Node
branches = where.branches,
branches_empty = where.branches_empty,
branch_fixed = branch_fixed,
+ -- (Only ever the person's: the engine takes it from this app alone.)
+ on_reach = function(r: string)
+ local s = open()
+ local machine = if s then cloud.session_for(s.id, (s :: any).device) else nil
+ if machine then
+ cloud.set_session_reach(machine.chat, r)
+ end
+ end,
+ reach = reach,
+ reach_default = cloud.reach,
cargo = shared.cargo,
on_remove_cargo = shared.remove_cargo,
on_attach = function()
diff --git a/apps/zgx/ui/screens/chat/dictation.luau b/apps/zgx/ui/screens/chat/dictation.luau
index b443d0be4..75f61579c 100644
--- a/apps/zgx/ui/screens/chat/dictation.luau
+++ b/apps/zgx/ui/screens/chat/dictation.luau
@@ -204,7 +204,8 @@ function M.bind(value: any, key: () -> string, blocked: () -> boolean, id: strin
table.insert(bindings, own)
if binding == nil then binding = own end
ui.effect(function()
- value:get()
+ -- (Its edits followed, the draft not read.)
+ value:len()
key()
local no = blocked()
if pending and pending.binding == own and (no or not valid(pending)) then M.cancel() end
diff --git a/apps/zgx/ui/screens/chat/find.luau b/apps/zgx/ui/screens/chat/find.luau
index 6eb92451c..98ec29f80 100644
--- a/apps/zgx/ui/screens/chat/find.luau
+++ b/apps/zgx/ui/screens/chat/find.luau
@@ -36,9 +36,16 @@ local function sources(m: any): { { key: string, text: string, breaks: boolean?
if m.role ~= "assistant" then
return {}
end
- if m.blocks then
+ -- (A long reply's blocks set aside by the host: asked for as a find
+ -- reads them.)
+ local blocks = m.blocks
+ if blocks == nil and m.runs ~= nil then
+ local ok, list = pcall(ui.call_sync, "chat.reply_blocks", m.id)
+ blocks = if ok and type(list) == "table" then list else {}
+ end
+ if blocks then
local out = {}
- for _, b in m.blocks do
+ for _, b in blocks do
if b.kind == "text" and b.text then
table.insert(out, { key = `{m.id}:{b.id}`, text = b.text })
end
diff --git a/apps/zgx/ui/screens/chat/init.luau b/apps/zgx/ui/screens/chat/init.luau
index 8b3663a6f..d7f5134a7 100644
--- a/apps/zgx/ui/screens/chat/init.luau
+++ b/apps/zgx/ui/screens/chat/init.luau
@@ -27,7 +27,7 @@ local function part(path: string, what: string): any
if ok and loaded ~= nil then
return loaded
end
- print(`{path} didn't load: {loaded}`)
+ print(`zeron-zgx: {path} didn't load: {loaded}`)
return function(): Node
return ui.column {
w_full = true,
diff --git a/apps/zgx/ui/screens/chat/lane_tab.luau b/apps/zgx/ui/screens/chat/lane_tab.luau
index f98bcc328..ecc7ced2e 100644
--- a/apps/zgx/ui/screens/chat/lane_tab.luau
+++ b/apps/zgx/ui/screens/chat/lane_tab.luau
@@ -28,6 +28,7 @@ local LinkChips = require("@app/screens/chat/link_chips")
local LinkMenu = require("@app/screens/chat/link_menu")
local boundary = require("@app/screens/shell/boundary")
local Quote = require("@ds/quote")
+local Draft = require("@ds/draft_text")
-- (The chat page's places in its chats, which a split's panes share.)
local Shared = require("@app/screens/chat/shared")
local Asks = require("@app/screens/chat/asks")
@@ -250,22 +251,53 @@ local function composer(chat: string, view: any, name: string, focus: State 0 then
now = { text = text, cargo = cargo, quotes = quotes }
end
else
- local put = kept:get()[""]
+ local put = kept:peek()[""]
if put then
now = { text = put.text, cargo = put.cargo, quotes = put.quotes }
end
@@ -205,6 +213,34 @@ ui.effect(function()
if now ~= nil or saved_new:peek() ~= nil then
saved_new:set(now)
end
+end
+ui.effect(function()
+ -- What it's saved from, followed (the draft's edits, not the draft).
+ if here:get() == "" then
+ M.text:len()
+ M.cargo:get()
+ M.quotes:get()
+ else
+ kept:len()
+ end
+ -- (A run's timer goes as the next run begins: steady typing saves every
+ -- SAVE_EVERY, and the last keystroke's once it has waited that long.)
+ local wait = SAVE_EVERY - (ui.now() - saved_at)
+ if wait <= 0 then
+ save_new()
+ else
+ ui.after(wait, save_new)
+ end
+end)
+-- The window closing (the app quitting, or the window closed): Zeron's
+-- window sets `app.closing` (src/main.rs) before it writes what the scripts
+-- saved, and a save still waiting its turn goes now. (A timer never fires
+-- once the window has closed, and the last keystrokes were lost with it.)
+local closing = ui.shared("app.closing", false)
+ui.effect(function()
+ if closing:get() == true then
+ save_new()
+ end
end)
-- Whether a file's name is a picture the window can draw. (zgx decodes
@@ -228,6 +264,15 @@ function M.showing(): string
return here:peek()
end
+-- The chat the draft in `text` is (a new chat's ""), followed: it changes
+-- with `text` as a move puts one draft away and takes out the next.
+function M.owner(): string
+ return here:get()
+end
+
+-- `showing`, read as it changes.
+M.showing_now = M.owner
+
function M.show(key: string)
local was = here:peek()
if was == key then
@@ -261,9 +306,61 @@ function M.take(): (string, { any })
M.cargo:set({})
M.quotes:set({})
end)
+ -- A new chat's draft, sent: saved empty at once, not on the throttle's
+ -- next turn, which a quit in between would never reach (the message
+ -- coming back as the draft at the next launch).
+ if here:peek() == "" then
+ save_new()
+ end
return text, cargo
end
+-- The draft shown, lifted out whole to be put back later (a plugin's
+-- `zeron.take_draft`): its words as typed, its chips and the passages
+-- quoted in it, the composer cleared. Nil when there's nothing to lift.
+function M.lift(): { text: string, cargo: { any }, quotes: { [string]: string } }?
+ local text, cargo, quotes = M.text:peek(), M.cargo:peek(), M.quotes:peek()
+ if text == "" and #cargo == 0 then
+ return nil
+ end
+ ui.batch(function()
+ M.text:set("")
+ M.cargo:set({})
+ M.quotes:set({})
+ end)
+ return { text = text, cargo = cargo, quotes = quotes }
+end
+
+-- A lifted draft put back on the draft shown (`zeron.put_draft`). Onto an
+-- empty composer it's as it was; onto words already there, its words follow
+-- them after a blank line and its chips follow theirs, its files numbered
+-- after those there.
+function M.lay(d: { text: string, cargo: { any }, quotes: { [string]: string } })
+ local here_text, here_cargo = M.text:peek(), M.cargo:peek()
+ ui.batch(function()
+ if here_text == "" and #here_cargo == 0 then
+ M.text:set(d.text)
+ M.cargo:set(d.cargo)
+ M.quotes:set(d.quotes)
+ return
+ end
+ local quotes = table.clone(M.quotes:peek())
+ for line, passage in d.quotes do
+ quotes[line] = passage
+ end
+ M.quotes:set(quotes)
+ if d.text ~= "" then
+ M.text:set(if here_text == "" then d.text else `{here_text}\n\n{d.text}`)
+ end
+ for _, item in d.cargo do
+ local moved = table.clone(item)
+ moved.mention = nil
+ M.push_cargo(nil, moved)
+ end
+ end)
+ M.focus:add(1)
+end
+
-- A passage of the transcript, quoted into the draft (its line marks it)
-- or carried as a chip.
function M.mention(q: Quote.Quote)
@@ -893,6 +990,49 @@ function M.draft_of(key: string): { text: string, cargo: { any }, chosen: { [str
}
end
+-- Follows chat `key`'s draft as `draft_of` does, wherever it is, without
+-- reading its words (a long draft isn't copied for it): what follows it to
+-- learn that it changed reads it only then (a split pane's mirror of it).
+function M.track_draft_of(key: string)
+ if here:get() == key then
+ M.text:len()
+ M.cargo:get()
+ M.chosen:get()
+ else
+ kept:len()
+ end
+end
+
+-- The options picked in chat `key`'s question, as `draft_of` reads them,
+-- without its words.
+function M.chosen_of(key: string): { [string]: boolean }
+ if here:get() == key then
+ return M.chosen:get()
+ end
+ local d = kept:get()[key]
+ return if d and type(d.chosen) == "table" then d.chosen else {}
+end
+
+-- The length of chat `key`'s draft's words, in bytes, as `draft_of`
+-- reads them (out in the composer, its draft not copied for it).
+function M.draft_size_of(key: string): number
+ if here:peek() == key then
+ return Draft.size(M.text)
+ end
+ local d = kept:peek()[key]
+ return if d and type(d.text) == "string" then #d.text else 0
+end
+
+-- Chat `key`'s draft's words as they are, read without following them
+-- (`draft_of` follows them): what a plugin's `zeron.compose` adds to.
+function M.peek_text_of(key: string): string
+ if here:peek() == key then
+ return M.text:peek()
+ end
+ local d = kept:peek()[key]
+ return if d and type(d.text) == "string" then d.text else ""
+end
+
-- Chat `key`'s draft changed where it's shown by its id (`field`: "text"
-- or "chosen"): written wherever it is, as `draft_of` reads it.
function M.set_draft_of(key: string, field: string, value: any)
@@ -970,9 +1110,19 @@ local here_device = ui.computed(function(): string?
end)
-- The accounts' key for a device: "" for this one, whose engine answers
--- for itself.
+-- for itself; "cloud" for any of Cloud's (a chat's machine, or the
+-- account's Cloud device), whose accounts are the vault's, every Cloud
+-- machine's alike, as Settings → Providers shows them (this engine answers
+-- for "cloud": crates/engine cloud_accounts). A machine can't be asked:
+-- its accounts aren't its own, and asking would wake it.
local function account_key(device: string?): string
- return if device == nil or device == here_device:get() then "" else device
+ if device == nil or device == here_device:get() then
+ return ""
+ end
+ if cloud.on_device(device) or device == cloud.device() then
+ return "cloud"
+ end
+ return device
end
-- Models of Cursor's own pool (Composer, Grok), not the third-party one.
diff --git a/apps/zgx/ui/screens/chat/store.luau b/apps/zgx/ui/screens/chat/store.luau
index 18d56a071..f60b45989 100644
--- a/apps/zgx/ui/screens/chat/store.luau
+++ b/apps/zgx/ui/screens/chat/store.luau
@@ -120,10 +120,13 @@ M.draft = ui.shared("chat.draft", { id = "", text = "" } :: Draft)
M.catalog = ui.shared("chat.catalog", { state = "looking", harnesses = {}, models = {} } :: Catalog)
-- Whether the agent `model` ("/") runs on has an auto mode of
--- its own (the catalog's `auto`): the access picker offers Auto.
+-- its own (the catalog's `auto`): the access picker offers Auto, and the
+-- composer sends in it. An agent the catalog doesn't list yet (it's still
+-- loading) counts as having one, so a chat in Auto can send at once; the
+-- engine still refuses Auto where it can't run.
function M.offers_auto(model: string?): boolean
if not model then
- return false
+ return true
end
local harness = string.match(model, "^([^/]+)/")
for _, h in (M.catalog:get() :: any).harnesses do
@@ -131,7 +134,7 @@ function M.offers_auto(model: string?): boolean
return h.auto == true
end
end
- return false
+ return true
end
-- A call nothing waits on: its failure lands in the session's notice (the
-- host sets it), so the script needn't hear it.
@@ -152,6 +155,12 @@ function M.open(id: string?)
watching:set(key)
ui.invoke("chat.open", id)
end
+-- A session opened by the route: watched in the same step as the route
+-- moves to it (screens/shell/route `opening`), as the page would a moment
+-- later. (Looked up as it's called: what stands in for `open` then is what's told.)
+route.opening = function(id: string)
+ M.open(id)
+end
-- A new chat on Cloud, opened before Cloud has made it (`req`: the send it
-- will get, its `session` the id it's made with): known to the host as a chat
@@ -189,6 +198,27 @@ function M.send(req: Request): any
return ui.call("chat.send", req)
end
+-- A new chat's agent, started before its first message (screens/chat/warm),
+-- for the id the chat will be made with. A promise of the engine's word
+-- ("started", "renewed", "unsupported"; nil: none could start).
+function M.warm(id: string, req: Request, typed: boolean): any
+ local p = ui.call("chat.warm", { id = id, req = req, typed = typed })
+ quietly(p)
+ return p
+end
+-- Stop that agent.
+function M.unwarm(id: string)
+ quietly(ui.call("chat.unwarm", { id = id }))
+end
+-- Its draft was cleared: the host stops it if it stays so.
+function M.warm_cleared(id: string)
+ quietly(ui.call("chat.warm_cleared", { id = id }))
+end
+-- Its send took it: a start or stop still on its way for it is moot.
+function M.warm_taken(id: string)
+ ui.invoke("chat.warm_taken", id)
+end
+
-- A project's branch, as git where it lives has it: whether it's the
-- folder's current one, and the worktree it's checked out in.
export type Ref = { name: string, current: boolean, worktree: string? }
diff --git a/apps/zgx/ui/screens/chat/warm.luau b/apps/zgx/ui/screens/chat/warm.luau
new file mode 100644
index 000000000..8d3a20a46
--- /dev/null
+++ b/apps/zgx/ui/screens/chat/warm.luau
@@ -0,0 +1,177 @@
+-- A new chat's agent started while its first message is still being written
+-- (the engine's warm start, src/chat.rs `warm`), so Enter has it answering at
+-- once instead of first starting it. It is started for the id the chat will
+-- be made with; nothing of the chat exists until Enter (no chat, no
+-- transcript, no title). The agent asks its model nothing until Enter. Only
+-- a new chat's: an existing chat's agent is never started early.
+--
+-- Only the person's own typing starts one: the first key in a new chat's
+-- draft. Not opening a new chat (most are opened and left, or opened long
+-- before anything is written: an agent waiting meanwhile held some 100 MB),
+-- a launch, a window put back, a draft restored, or anything a plugin,
+-- template, link or agent does. Typing a message takes longer than the
+-- agent's start, so it is ready by Enter all the same. And never for a chat that will run on another device, on
+-- Cloud, or in a worktree made as it's sent (the composer's `request` is nil
+-- then).
+--
+-- It stops when:
+-- the draft is cleared and left empty for 10 s (the host's `warm_cleared`);
+-- the window moves on with that draft empty;
+-- another chat's draft is typed into (one per window);
+-- the window closes, or the app quits (the engine stops them all then);
+-- a typed draft is left alone (the engine's idle stop, 2 min after the
+-- last keystroke it heard of).
+-- A change of agent, model, effort, folder or access while it waits starts
+-- another in its place.
+--
+-- (No timers here: a timer an effect makes ends when that effect runs
+-- again, as these do on every key. The host keeps the time.)
+
+local store = require("@app/screens/chat/store")
+
+local M = {}
+
+-- While the person types, the engine hears of it this often at most.
+local RENEW_MS = 10000
+
+export type Bind = {
+ -- The chat the composer is on (nil: a new chat's).
+ session: () -> string?,
+ -- The draft, and the chat it is ("" a new chat's: it changes with the
+ -- text, after the route, as a move swaps drafts).
+ text: any,
+ owner: () -> string,
+ -- The send as it stands (`store.Request`'s fields: model, effort,
+ -- options, access, plan, cwd, device), read so a change to any is heard;
+ -- nil when it can't warm (an existing chat, on Cloud or another device,
+ -- in a worktree made as it's sent, no agent picked).
+ request: () -> any?,
+}
+
+export type Warm = {
+ -- The id the new chat is to be made with, taken by its send (nil: none).
+ take: () -> string?,
+ -- Stop it (a send that can't use it: Cloud; a send that failed).
+ stop: () -> (),
+}
+
+-- The draft's length, without copying it.
+local function length(s: any): number
+ if (s :: any).len ~= nil then
+ return s:len()
+ end
+ return #s:get()
+end
+
+function M.bind(b: Bind): Warm
+ -- (Per composer: plain values, not states, so nothing redraws for them.)
+ -- The id it's asked under (nil: none).
+ local id: string? = nil
+ local typed = false
+ -- The ask last sent, to send a changed one only; and when.
+ local sent = ""
+ local sent_at = 0
+ local cleared = false
+ -- The chat the draft's length was last seen on ("" a new chat's), and
+ -- that length: a key is a change of it on the same chat (a draft put
+ -- back is none).
+ local seen_on: string? = nil
+ local seen_len = 0
+
+ local function stop()
+ if id then
+ store.unwarm(id)
+ end
+ id, typed, sent, cleared = nil, false, "", false
+ end
+
+ -- Ask the host for it (again when the ask changed, to renew it, or when
+ -- it was first typed into).
+ local function ask(req: any, force: boolean)
+ if req == nil then
+ stop()
+ return
+ end
+ local key = `{req.model or ""}|{req.effort or ""}|{tostring(req.fast)}|{req.access or ""}|{tostring(req.plan)}|{req.cwd or ""}|{req.device or ""}`
+ local keys = {}
+ for k, v in (req.options or {}) :: { [string]: any } do
+ table.insert(keys, `{k}={tostring(v)}`)
+ end
+ table.sort(keys)
+ key ..= "|" .. table.concat(keys, ",")
+ if id ~= nil and key == sent and not force then
+ return
+ end
+ if id == nil then
+ id = store.new_id()
+ end
+ sent, sent_at = key, ui.now()
+ store.warm(id :: string, req, typed)
+ end
+
+ -- Typed into (a key), cleared, or left.
+ ui.effect(function()
+ local on = b.owner()
+ local n = length(b.text)
+ if on ~= seen_on then
+ -- Arrived (its draft as it was left): no key. Left the new chat
+ -- with its draft empty: its agent goes.
+ if id ~= nil and seen_on == "" and seen_len == 0 then
+ stop()
+ end
+ seen_on, seen_len = on, n
+ return
+ end
+ if n == seen_len then
+ return
+ end
+ seen_len = n
+ if on ~= "" then
+ -- Writing in another chat: the new chat's agent goes (one per
+ -- window, and only while its message is being written).
+ if id ~= nil then
+ stop()
+ end
+ return
+ end
+ if n > 0 then
+ local was_cleared = cleared
+ cleared = false
+ -- First typed, typed again after a clear (the host may have
+ -- stopped it), or the engine due to hear it's still typed into.
+ if id == nil or not typed or was_cleared or ui.now() - sent_at >= RENEW_MS then
+ local first = not typed or was_cleared
+ typed = true
+ ask(b.request(), first or id ~= nil)
+ end
+ elseif id ~= nil and not cleared then
+ cleared = true
+ store.warm_cleared(id :: string)
+ end
+ end)
+
+ -- A change of agent, model, effort, folder or access while it waits.
+ ui.effect(function()
+ local req = b.request()
+ if id ~= nil and b.session() == nil then
+ ask(req, false)
+ end
+ end)
+
+ ui.on_cleanup(stop)
+
+ return {
+ take = function(): string?
+ local taken = id
+ if taken ~= nil then
+ -- (A start or stop still on its way for it is moot now.)
+ store.warm_taken(taken)
+ end
+ id, typed, sent, cleared = nil, false, "", false
+ return taken
+ end,
+ stop = stop,
+ }
+end
+
+return M
diff --git a/apps/zgx/ui/screens/language.luau b/apps/zgx/ui/screens/language.luau
index adc609858..e81ba6783 100644
--- a/apps/zgx/ui/screens/language.luau
+++ b/apps/zgx/ui/screens/language.luau
@@ -43,6 +43,22 @@ end)
-- The choices as a select lists them, in the locale shown (a computed
-- reading their messages: they follow it).
+-- The question asked when the app quits with work still running and
+-- "Keep Zeron running after you quit" off (src/quit_prompt.rs), in the
+-- language shown: by then the scripts are gone, so the host keeps it.
+-- (Many chats are worded with 999999, which the host replaces.)
+ui.effect(function()
+ local words = {
+ one = ui.t("engine.quit.working", { n = 1 }):get(),
+ other = ui.t("engine.quit.working", { n = 999999 }):get(),
+ detail = ui.t("engine.quit.detail"):get(),
+ keep = ui.t("engine.quit.keep"):get(),
+ stop = ui.t("engine.quit.stop"):get(),
+ }
+ -- (A fixture or a test host has no such action.)
+ pcall(ui.invoke, "app.quit_words", words)
+end)
+
function M.options(): { { value: string, label: string } }
local out = {}
for _, l in M.LANGUAGES do
diff --git a/apps/zgx/ui/screens/panel/browser.luau b/apps/zgx/ui/screens/panel/browser.luau
index d204c8c90..6289bada6 100644
--- a/apps/zgx/ui/screens/panel/browser.luau
+++ b/apps/zgx/ui/screens/panel/browser.luau
@@ -433,6 +433,32 @@ Page = ui.component(function(props: Props): Node
-- Annotation mode, as the bar's toggle shows it.
local mode = ui.use_state(annotating:peek()[id] == true)
+ -- This navigation, as the page tells it: whether its own document came
+ -- (committed: the page's content, not the host's error page), whether
+ -- its process ended after, and whether its failure was dismissed. Each
+ -- starts over with the next navigation (a reload, Try again).
+ -- A failure after the page committed is no page missing: the page drew,
+ -- and it's what to show (a 429 or 5xx page, Google's "unusual traffic"
+ -- check: WebView2 calls a page with an error status a failed
+ -- navigation; WebKit a load interrupted once the page was in).
+ local committed = ui.use_state(false)
+ local crashed = ui.use_state(false)
+ local dismissed = ui.use_state(false)
+ -- The page that didn't load, over where it would be (`trouble`).
+ local function failed(): boolean
+ if not has_page(web) or web.error == nil or dismissed:get() then
+ return false
+ end
+ return crashed:get() or not committed:get()
+ end
+ local function dismiss(): boolean
+ if not failed() then
+ return false
+ end
+ dismissed:set(true)
+ return true
+ end
+
-- Made with an address and no page yet (a saved tab, a link opened):
-- the page loads. (A reload finds the page where it was: nothing moves.)
-- A new tab with a home page set opens on it (once: the start page is
@@ -556,7 +582,7 @@ Page = ui.component(function(props: Props): Node
end
end
local function start_annotating()
- if not has_page(web) or web.error then
+ if not has_page(web) or failed() then
if mode:peek() then
mode:set(false)
end
@@ -969,6 +995,11 @@ Page = ui.component(function(props: Props): Node
return true
end
if e.key == "Escape" then
+ -- (Nothing typed to take back: the failure over the page
+ -- dismissed, as from anywhere else in the tab.)
+ if address:peek() == last_url and dismiss() then
+ return true
+ end
-- (Back to the page's address, as a browser's.)
suggestions.quiet(last_url)
address:set(last_url)
@@ -1064,7 +1095,7 @@ Page = ui.component(function(props: Props): Node
tooltip = ui.t("panel.browser.annotate_tooltip", { key = ui.shortcut_text(if shell_keys then shell_keys.combo("panel.annotate") else "cmd+shift+i") }):get(),
tooltip_side = "bottom",
disabled = function(): boolean
- return not can_leave() or web.error ~= nil
+ return not can_leave() or failed()
end,
on_change = function(on: boolean)
if on then
@@ -1533,7 +1564,21 @@ Page = ui.component(function(props: Props): Node
on_state(value.state)
end
end,
+ on_error = function(url: string, _why: string)
+ -- (The page's process ended: no navigation's, and nothing left
+ -- drawn, committed or not.)
+ if url == "" then
+ crashed:set(true)
+ end
+ end,
on_navigate = function(e: any)
+ if type(e) == "table" and e.kind == "started" then
+ committed:set(false)
+ crashed:set(false)
+ dismissed:set(false)
+ elseif type(e) == "table" and e.kind == "committed" then
+ committed:set(true)
+ end
-- Another page: its picker is gone with the last, so the mode
-- ends (the shipping app's; its marks come back by restore).
if type(e) == "table" and e.kind == "committed" and annotating:peek()[id] then
@@ -1572,9 +1617,7 @@ Page = ui.component(function(props: Props): Node
or string.find(l, "internet connection", 1, true) ~= nil
or string.find(l, "not connected", 1, true) ~= nil
end
- local trouble = ui.show(function(): boolean
- return has_page(web) and web.error ~= nil
- end, ui.column {
+ local trouble = ui.show(failed, ui.column {
absolute = true,
left = 0,
right = 0,
@@ -1623,6 +1666,14 @@ Page = ui.component(function(props: Props): Node
web:reload()
end,
},
+ -- What the page drew anyway, under (Escape too): until the
+ -- next navigation.
+ secondary = {
+ label = ui.t("panel.browser.dismiss_error") :: any,
+ on_click = function()
+ dismiss()
+ end,
+ },
}
end, { w_full = true, grow = 1, min_h = 0 }),
})
@@ -1634,6 +1685,14 @@ Page = ui.component(function(props: Props): Node
w_full = true,
grow = 1,
min_h = 0,
+ -- A bare Escape nothing in the tab took (the error's buttons, the
+ -- bar's): the failure dismissed, the page under it shown.
+ on_key = function(e: any): boolean?
+ if e.key == "Escape" and not (e.shift or e.cmd or e.alt or e.ctrl) and dismiss() then
+ return true
+ end
+ return nil
+ end,
bar,
problem_line,
find_bar,
diff --git a/apps/zgx/ui/screens/panel/init.luau b/apps/zgx/ui/screens/panel/init.luau
index 62439e38f..5d71c8176 100644
--- a/apps/zgx/ui/screens/panel/init.luau
+++ b/apps/zgx/ui/screens/panel/init.luau
@@ -1501,9 +1501,23 @@ M.Panel = ui.component(function(props: Props): Node
return "none"
end
local a = active()
- return if a then `{k}\0{a}` else `{k}\0empty`
+ if a then
+ return `{k}\0{a}`
+ end
+ -- The home (no tab) is made only while the panel shows: shut, each
+ -- chat switched to would make another one nobody sees (about 2 ms
+ -- of every switch, and what it holds). It's quick to make as the
+ -- panel opens, and has nothing fetched to keep. (A tab stays made
+ -- shut, as above.)
+ if closed() then
+ return "shut"
+ end
+ return `{k}\0empty`
end, function(which: string): Node
local k = key:peek()
+ if which == "shut" then
+ return ui.div {}
+ end
if which == "none" or not k then
return ds.EmptyState {
icon = "split-columns",
diff --git a/apps/zgx/ui/screens/plugins/init.luau b/apps/zgx/ui/screens/plugins/init.luau
index 7d3cbb4b4..372587175 100644
--- a/apps/zgx/ui/screens/plugins/init.luau
+++ b/apps/zgx/ui/screens/plugins/init.luau
@@ -17,6 +17,8 @@
-- zeron.device { id, name } where you're working
-- zeron.devices { { id, name, here } } your devices
-- zeron.appearance "light" | "dark"
+-- zeron.draft { session?, text, attachments = { { kind, name } } }
+-- the composer's draft ("draft")
-- - **What records are made from**, for the host alone (no plugin reads
-- these; each reads its own `plugin..records`, holding only what it
-- was allowed, src/plugins/records.rs):
@@ -43,7 +45,6 @@ local store = require("@app/screens/settings/store")
local PrivateText = require("@ds/private_text")
local state = require("@app/screens/plugins/state")
local page = require("@app/screens/plugins/page")
-local chat = require("@app/screens/chat")
local ChatShared = require("@app/screens/chat/shared")
local Cargo = require("@ds/composer_cargo")
@@ -166,6 +167,128 @@ ui.effect(function()
put(out.appearance, if kind == "light" or kind == "high-contrast-light" then "light" else "dark")
end)
+-- What a draft carries, as plugins are told it: each chip's kind and name
+-- alone, never a file's path.
+local function attachments_of(cargo: { any }): { any }
+ local list = {}
+ for _, item in cargo do
+ table.insert(list, { kind = tostring(item.kind or "file"), name = tostring(item.name or "") })
+ end
+ return list
+end
+
+-- The composer's draft, for plugins allowed "draft" (`zeron.draft()`): the
+-- chat it's for (nil, a new chat), its words, and what it carries.
+-- Written only while a plugin that's on may read it: otherwise no key
+-- typed copies the draft (a long one, every key) for no one.
+local draft_out = ui.shared("zeron.draft", nil :: any)
+local draft_read = ui.computed(function(): boolean
+ for _, it in state.now:get().list or {} do
+ if it.status == "on" and table.find(it.permissions or {}, "draft") then
+ return true
+ end
+ end
+ return false
+end)
+ui.effect(function()
+ if not draft_read:get() then
+ if draft_out:peek() ~= nil then
+ put(draft_out, nil)
+ end
+ return
+ end
+ local key = ChatShared.showing_now()
+ put(draft_out, {
+ session = if key ~= "" then key else ui.null,
+ text = ChatShared.text:get(),
+ attachments = attachments_of(ChatShared.cargo:get()),
+ })
+end)
+
+-- The drafts plugins took (`zeron.take_draft`), each plugin's by its own
+-- keys, kept whole here so a plugin never holds its files' paths. Kept for
+-- the run, as chats' drafts are; a reload of the scripts keeps them.
+-- Each plugin is told what it keeps (`plugin..drafts`): by key, the
+-- chat it was taken from, its words, what it carries and when.
+local DRAFTS_KEPT = 16
+local shelves = ui.shared("plugins.drafts", {} :: { [string]: { [string]: any } })
+local shelves_told: { [string]: boolean } = {}
+ui.effect(function()
+ local all = shelves:get()
+ for plugin in all do
+ shelves_told[plugin] = true
+ end
+ for plugin in shelves_told do
+ local told: { [string]: any } = {}
+ for key, d in all[plugin] or {} do
+ told[key] = {
+ session = d.session or ui.null,
+ text = d.text,
+ attachments = attachments_of(d.cargo),
+ at = d.at,
+ }
+ end
+ ui.shared(`plugin.{plugin}.drafts`, {} :: any):set(told)
+ end
+end)
+
+-- A plugin's ask of the draft (the host checked "draft" and that it's
+-- take, put, swap or drop with a key).
+local function draft_asked(plugin: string, op: string, key: string)
+ local all = table.clone(shelves:peek())
+ local mine = table.clone(all[plugin] or {})
+ -- (Room for one more, unless it goes where that key kept one.)
+ local count = 0
+ for _ in mine do
+ count += 1
+ end
+ local full = mine[key] == nil and count >= DRAFTS_KEPT
+ local function kept_now(d: any, from: string): any
+ return { text = d.text, cargo = d.cargo, quotes = d.quotes, session = if from ~= "" then from else nil, at = os.time() }
+ end
+ if op == "take" then
+ if full then
+ return
+ end
+ local from = ChatShared.showing()
+ local d = ChatShared.lift()
+ if d == nil then
+ return
+ end
+ mine[key] = kept_now(d, from)
+ elseif op == "swap" then
+ -- The draft shown and what `key` kept, traded: either may be
+ -- nothing, so one call sets a draft aside, brings it back, or both.
+ local was = mine[key]
+ local from = ChatShared.showing()
+ if full then
+ return
+ end
+ local d = ChatShared.lift()
+ if d == nil and was == nil then
+ return
+ end
+ if was ~= nil then
+ ChatShared.lay(was)
+ end
+ mine[key] = if d ~= nil then kept_now(d, from) else nil
+ elseif op == "put" then
+ local d = mine[key]
+ if d == nil then
+ return
+ end
+ mine[key] = nil
+ ChatShared.lay(d)
+ elseif op == "drop" then
+ if mine[key] == nil then
+ return
+ end
+ mine[key] = nil
+ end
+ all[plugin] = if next(mine) ~= nil then mine else nil
+ shelves:set(all)
+end
+
-- What a failed plugin's notice offers (a toast's action: `ds/toast`).
ds.toast.action("plugins.open_folder", function(id: string)
state.open_folder(id)
@@ -185,8 +308,26 @@ local function run(r: any)
elseif type(to) == "table" and type(to.settings) == "string" and to.settings ~= "account" then
route.settings(to.settings)
end
- elseif r.kind == "compose" and type(r.value) == "string" then
- chat.store.insert(string.sub(r.value, 1, 20000))
+ elseif r.kind == "compose" and (type(r.value) == "string" or (type(r.value) == "table" and type(r.value.text) == "string")) then
+ -- `zeron.compose(text, { replace, session })` (the host checked
+ -- "compose"; its words alone come as a string): the words put in a
+ -- chat's draft, the one shown unless it names another ("" a new
+ -- chat's), in place of its words (its chips stay) or after them, on
+ -- a line of their own. Unsent: the person sends it. Shown, the
+ -- composer takes the keys.
+ local v = if type(r.value) == "string" then { text = r.value } else r.value
+ local words = string.sub(v.text, 1, 20000)
+ local shown = ChatShared.showing()
+ local key = if type(v.session) == "string" and #v.session <= 200 then v.session else shown
+ if v.replace ~= true then
+ local now = ChatShared.peek_text_of(key)
+ local sep = if now == "" or string.sub(now, -1) == "\n" then "" else "\n"
+ words = now .. sep .. words
+ end
+ ChatShared.set_draft_of(key, "text", words)
+ if key == shown then
+ ChatShared.focus:add(1)
+ end
elseif r.kind == "compose_comment" and type(r.value) == "table" and type(r.title) == "string" then
-- A plugin's review comment on a file or a diff (the host checked
-- "compose"): a comment chip on the session's draft, as the files
@@ -207,6 +348,13 @@ local function run(r: any)
session = if type(c.session) == "string" then c.session else nil,
}
end
+ elseif r.kind == "draft" and type(r.value) == "table" and type(r.title) == "string" and r.title ~= "" then
+ -- A plugin taking the draft, putting one back, swapping the two, or
+ -- letting one go.
+ local op, key = r.value.op, r.value.key
+ if type(op) == "string" and type(key) == "string" then
+ draft_asked(r.title, op, key)
+ end
elseif r.kind == "panel_tab" and type(r.value) == "table" then
-- A plugin's tab in a chat's panel (the host checked "panel.tabs").
local ok, Panel = pcall(require, "@app/screens/panel")
diff --git a/apps/zgx/ui/screens/plugins/words.luau b/apps/zgx/ui/screens/plugins/words.luau
index 911f70bd6..3e18ba196 100644
--- a/apps/zgx/ui/screens/plugins/words.luau
+++ b/apps/zgx/ui/screens/plugins/words.luau
@@ -298,6 +298,9 @@ function M.permission(item: any, permission: string): Line
return line(false, "map-arrow-right", "plugins.words.permission.navigate.title")
elseif permission == "compose" then
return line(false, "chat-round-line", "plugins.words.permission.compose.title", "plugins.words.permission.compose.detail")
+ elseif permission == "draft" then
+ -- (What you type, read as you type it: said plainly.)
+ return line(false, "pen", "plugins.words.permission.draft.title", "plugins.words.permission.draft.detail")
elseif permission == "network" then
-- The places it names (any site, with "*"), those on this device or
-- your network said so, and risky then.
diff --git a/apps/zgx/ui/screens/settings/chimes.luau b/apps/zgx/ui/screens/settings/chimes.luau
index 65f5cb1a8..6b8447374 100644
--- a/apps/zgx/ui/screens/settings/chimes.luau
+++ b/apps/zgx/ui/screens/settings/chimes.luau
@@ -1,9 +1,19 @@
-- The sessions' chimes, as the shipping app plays them (crates/ui
--- shell.rs, its one session detector): a chat turning done, waiting on you,
--- or failed plays its sound, if Settings → Notifications has it on. A
--- chat's first appearance only sets where it stands (a launch, a sync, a
--- hot reload never ring), and what it was is kept in state, so a reload
--- picks up where it was.
+-- shell.rs, its one session detector; crates/engine desktop_notify's
+-- `ping_since`): a chat waiting on you, or failed, plays its sound as its
+-- status turns so; a turn finished plays "done", if Settings →
+-- Notifications has it on. A chat's first appearance only sets where it
+-- stands (a launch, a sync, a hot reload never ring), and what it was is
+-- kept in state, so a reload picks up where it was.
+--
+-- "Finished" is the turn mark moving (`turn`, the session's
+-- `lastCompletedTurn`), never the status "done": that's only activity you
+-- haven't seen, and your own message makes it too (issue #1437). Nor does
+-- every move ring: one published with the next turn already running is
+-- your message carrying it on (a steer, a queued message taken), and a
+-- send that replaces the agent's runtime marks the old turn's end a moment
+-- before your turn starts, so a finish waits `SETTLE` to stand; a turn
+-- going on (or asking, or failing) meanwhile takes it with it.
--
-- And the window's focus, told to the engine (`SetViewportFocus`), which
-- holds its banners while Zeron is the app in front if Notifications says
@@ -16,39 +26,120 @@ local prefs = require("@app/screens/settings/prefs")
local M = {}
--- Each chat's status as last seen, by id ("" for idle).
-local seen = ui.state("settings_chimes_seen", {} :: { [string]: string })
+type Seen = { status: string, turn: string? }
--- What a status turning on plays.
+-- Each chat as last seen, by id: its status ("" for idle) and finished turn.
+local seen = ui.state("settings_chimes_seen_turns", {} :: { [string]: Seen })
+
+-- Finishes waiting to stand, by chat: the turn, and when it rings
+-- (`ui.now()`, ms).
+local settling = ui.state("settings_chimes_settling", {} :: { [string]: { turn: string, at: number } })
+
+-- How long a finish waits to stand before it rings (the engine's banners'
+-- `DONE_SETTLE`).
+local SETTLE = 2000
+
+-- What a status turning on plays. ("done" isn't one: see above.)
local SOUND: { [string]: string } = {
- done = "done",
input = "request",
failed = "attention",
}
+-- A turn going on, or asking, or failing: nothing has finished.
+local function busy(status: string): boolean
+ return status == "working" or status == "waiting" or status == "input" or status == "failed"
+end
+
+-- One chime for many at once: the most urgent.
+local function louder(ring: string?, sound: string): string
+ if ring == nil or sound == "attention" or (sound == "request" and ring == "done") then
+ return sound
+ end
+ return ring
+end
+
+local function play(ring: string?)
+ if ring and prefs.chimes(ring) then
+ host.invoke("sound.play", ring)
+ end
+end
+
ui.effect(function()
local now = sessions.now:get()
if now.state ~= "ready" then
return
end
local before = seen:peek()
- local after: { [string]: string } = {}
+ local after: { [string]: Seen } = {}
+ local waits = table.clone(settling:peek())
+ local moved = false
local ring: string? = nil
for _, c in now.chats do
local status = c.status or ""
- after[c.id] = status
local was = before[c.id]
- if was ~= nil and was ~= status and SOUND[status] then
- -- (One chime for many at once: the most urgent.)
- local sound = SOUND[status]
- if ring == nil or sound == "attention" or (sound == "request" and ring == "done") then
- ring = sound
+ -- (A session row gone for a while, a host restarting, keeps the turn
+ -- last seen: its coming back is no finish.)
+ after[c.id] = { status = status, turn = c.turn or (was and was.turn) }
+ if busy(status) and waits[c.id] then
+ waits[c.id] = nil
+ moved = true
+ end
+ if was ~= nil then
+ if was.status ~= status and SOUND[status] then
+ ring = louder(ring, SOUND[status])
+ end
+ if c.turn ~= nil and c.turn ~= was.turn and c.turn_fresh ~= false and not busy(status) then
+ waits[c.id] = { turn = c.turn, at = ui.now() + SETTLE }
+ moved = true
end
end
end
+ -- (A chat gone takes its finish with it.)
+ for id in waits do
+ if after[id] == nil then
+ waits[id] = nil
+ moved = true
+ end
+ end
seen:set(after)
- if ring and prefs.chimes(ring) then
- host.invoke("sound.play", ring)
+ if moved then
+ settling:set(waits)
+ end
+ play(ring)
+end)
+
+-- The finishes due by `upto` have stood: they ring, once each moment (one
+-- chime for many). (The timer that calls this is the deadline: its clock
+-- needn't be `ui.now()`'s, so that's never asked again here.)
+local function stand(upto: number)
+ local waits = settling:peek()
+ local left = {}
+ local ring: string? = nil
+ for id, w in waits do
+ if w.at <= upto then
+ local now = seen:peek()[id]
+ if now and now.turn == w.turn and not busy(now.status) then
+ ring = louder(ring, "done")
+ end
+ else
+ left[id] = w
+ end
+ end
+ settling:set(left)
+ play(ring)
+end
+ui.effect(function()
+ local soonest: number? = nil
+ for _, w in settling:get() do
+ soonest = if soonest then math.min(soonest, w.at) else w.at
+ end
+ -- (A timer made in an effect belongs to its run: a new finish, or one
+ -- taken, sets it again.)
+ if soonest then
+ local upto: number = soonest
+ ui.after(math.max(0, upto - ui.now()), function()
+ stand(upto)
+ end)
end
end)
diff --git a/apps/zgx/ui/screens/settings/cloud.luau b/apps/zgx/ui/screens/settings/cloud.luau
index e816e136b..a82ea536c 100644
--- a/apps/zgx/ui/screens/settings/cloud.luau
+++ b/apps/zgx/ui/screens/settings/cloud.luau
@@ -25,6 +25,7 @@ M.TITLE = "Cloud"
M.ROWS = {
{ key = "usage", title = ui.t("settings.cloud.usage.title"), terms = ui.t("settings.cloud.usage.terms") },
{ key = "machine", title = ui.t("settings.cloud.machine.title"), terms = ui.t("settings.cloud.machine.terms") },
+ { key = "reach", title = ui.t("settings.cloud.reach.title"), terms = ui.t("settings.cloud.reach.terms") },
{ key = "github", title = "GitHub", terms = ui.t("settings.cloud.github.terms") },
{ key = "repos", title = ui.t("settings.cloud.repos.title"), terms = ui.t("settings.cloud.repos.terms") },
}
@@ -398,6 +399,56 @@ local function default_machine(): Node
})
end
+-- What new chats' machines reach: your other devices, or only themselves
+-- (the composer's own row under Cloud changes one chat's). Chosen: shown at
+-- once, put back if refused (account/cloud). (An edge that predates choosing
+-- says none: no section.)
+local reach_chosen = ui.state("settings_cloud_reach", "devices" :: string?)
+local function default_reach(): Node
+ local chosen = reach_chosen
+ ui.effect(function()
+ local now = cloud.reach()
+ if chosen:peek() ~= now then
+ chosen:set(now)
+ end
+ end)
+ return ui.show(function(): boolean
+ local st = cloud.now:get().status
+ return st ~= nil and st.reach ~= nil
+ end, ds.Settings.Section {
+ title = ui.t("settings.cloud.reach.title"),
+ description = ui.t("settings.cloud.reach.description"),
+ row(
+ "reach",
+ ds.Settings.Group {
+ ds.Settings.Row {
+ label = ui.t("settings.cloud.reach.title"),
+ description = function(): string
+ return if cloud.now:get().reach_failure ~= nil
+ then ui.t("settings.cloud.reach.failed"):get()
+ elseif chosen:get() == "isolated" then ui.t("ds.composer.reach.isolated_hint"):get()
+ else ui.t("ds.composer.reach.devices_hint"):get()
+ end,
+ control = ds.Select {
+ value = chosen,
+ name = ui.t("settings.cloud.reach.title"),
+ w = 160,
+ options = function(): { { value: string, label: string } }
+ return {
+ { value = "devices", label = ui.t("ds.composer.reach.devices"):get() },
+ { value = "isolated", label = ui.t("ds.composer.reach.isolated"):get() },
+ }
+ end,
+ on_change = function(reach: any)
+ cloud.set_reach(reach)
+ end,
+ },
+ },
+ }
+ ),
+ })
+end
+
local function github_now(): github.Now
return github.now:get() :: github.Now
end
@@ -790,6 +841,7 @@ function M.view(): Node
gap = "$space.6",
usage(),
default_machine(),
+ default_reach(),
github_section(),
repositories(),
}),
diff --git a/apps/zgx/ui/screens/settings/devices.luau b/apps/zgx/ui/screens/settings/devices.luau
index 9a88ef06c..06637b28c 100644
--- a/apps/zgx/ui/screens/settings/devices.luau
+++ b/apps/zgx/ui/screens/settings/devices.luau
@@ -169,7 +169,9 @@ local icon_of = M.icon
-- choosing one calls `choose` with its id. Built once: its options follow
-- the devices as they come, go and are renamed, and the choice follows
-- `shown`.
-function M.picker(shown: () -> string?, choose: (id: string) -> ()): Node
+-- (`extra`: more choices after the computers, each `{ value, label, icon }`:
+-- Providers' Cloud, whose accounts every Cloud machine uses.)
+function M.picker(shown: () -> string?, choose: (id: string) -> (), extra: (() -> { any })?): Node
local function computers(): { sessions.Device }
return sessions.computers(sessions.devices:get(), true)
end
@@ -181,9 +183,12 @@ function M.picker(shown: () -> string?, choose: (id: string) -> ()): Node
end
return ""
end
+ local function extras(): { any }
+ return if extra then extra() else {}
+ end
return ui.show(
function(): boolean
- return #computers() > 1
+ return #computers() > 1 or #extras() > 0
end,
ui.component(function(): Node
local chosen = ui.use_state(shown() or here())
@@ -208,6 +213,9 @@ function M.picker(shown: () -> string?, choose: (id: string) -> ()): Node
description = if not d.here and d.online == false then ui.t("settings.devices.offline") else nil,
})
end
+ for _, e in extras() do
+ table.insert(options, e)
+ end
return options
end,
on_change = choose,
diff --git a/apps/zgx/ui/screens/settings/general.luau b/apps/zgx/ui/screens/settings/general.luau
index 98adcfc06..caa9a0285 100644
--- a/apps/zgx/ui/screens/settings/general.luau
+++ b/apps/zgx/ui/screens/settings/general.luau
@@ -28,7 +28,9 @@ search.index(M.ID, ui.t("settings.general.title"), ui.t("settings.general.terms"
{ key = "compact_mode", title = ui.t("settings.general.compact_mode.label"), terms = ui.t("settings.general.compact_mode.terms") },
{ key = "escape_stops", title = ui.t("settings.general.escape_stops.label"), terms = ui.t("settings.general.escape_stops.terms") },
{ key = "close_panel", title = ui.t("settings.general.close_panel.label"), terms = ui.t("settings.general.close_panel.terms") },
+ { key = "keep_running", title = ui.t("settings.general.keep_running.label"), terms = ui.t("settings.general.keep_running.terms") },
{ key = "hide_emails", title = ui.t("settings.general.hide_emails.label"), section = ui.t("settings.general.privacy"), terms = ui.t("settings.general.hide_emails.terms") },
+ { key = "keep_chats_local", title = ui.t("settings.general.keep_chats_local.label"), section = ui.t("settings.general.privacy"), terms = ui.t("settings.general.keep_chats_local.terms") },
{ key = "thread_naming", title = ui.t("settings.general.thread_naming.label"), terms = ui.t("settings.general.thread_naming.terms") },
{ key = "worktrees", title = ui.t("settings.general.worktrees.label"), section = ui.t("settings.general.git"), terms = ui.t("settings.general.worktrees.terms") },
{ key = "commit_credit", title = ui.t("settings.general.commit_credit.label"), section = ui.t("settings.general.git"), terms = ui.t("settings.general.commit_credit.terms") },
@@ -46,6 +48,9 @@ type Titles = { harness: string?, model: string? }
local credit = ui.state("settings_commit_credit", nil :: Credit?)
local worktrees = ui.state("settings_worktrees", nil :: Worktrees?)
local titles = ui.state("settings_titles", nil :: Titles?)
+-- Whether the engine outlives the app (src/quit_prompt.rs).
+type Background = { keepRunningAfterQuit: boolean }
+local background = ui.state("settings_background", nil :: Background?)
-- Why one couldn't be had (an outcome word), by name.
local failed = ui.state("settings_engine_failed", {} :: { [string]: string })
@@ -71,10 +76,28 @@ local function load(name: string, method: string, into: State)
end)
end
+-- Whether this device keeps its chats local while signed in (the host's,
+-- beside the engine: it decides which workspace the engine opens).
+local keep_local = ui.state("settings_keep_chats_local", nil :: boolean?)
+
+local function set_keep_local(on: boolean)
+ local before = keep_local:peek()
+ keep_local:set(on)
+ -- The engine starts again on the other workspace; the window reconnects.
+ host.call("account.keep_chats_local", on):after(function() end, function(err: any)
+ keep_local:set(before)
+ toast.show { title = ui.t("settings.engine.couldnt_save"):get(), body = says(err.message):get(), tone = "danger" }
+ end)
+end
+
local function load_all()
+ host.call("account.keeps_chats_local"):after(function(on: any)
+ keep_local:set(on == true)
+ end, function() end)
load("credit", "GetCommitCredit", credit)
load("worktrees", "GetWorktreeSettings", worktrees)
load("titles", "GetTitleSettings", titles)
+ load("background", "GetBackgroundSettings", background)
end
-- A change to the engine's: shown now, back as it was if refused.
@@ -254,6 +277,26 @@ function M.view(): Node
description = ui.t("settings.general.close_panel.description"),
control = ds.Switch { value = prefs.close_panel_with_last_tab, label = ui.t("settings.general.close_panel.label") },
}),
+ row("keep_running", {
+ label = ui.t("settings.general.keep_running.label"),
+ description = function()
+ if failed:get().background then
+ return says(failed:get().background):get()
+ end
+ local b = background:get()
+ return if b == nil or b.keepRunningAfterQuit
+ then ui.t("settings.general.keep_running.on"):get()
+ else ui.t("settings.general.keep_running.off"):get()
+ end,
+ control = engine_switch(ui.t("settings.general.keep_running.label"), function()
+ local b = background:get()
+ return if b then b.keepRunningAfterQuit else nil
+ end, function(on: boolean)
+ change("background", background, { keepRunningAfterQuit = on }, "SetBackgroundSettings", { keepRunningAfterQuit = on })
+ end, function()
+ return background:get() == nil
+ end),
+ }),
},
},
ds.Settings.Section {
@@ -264,6 +307,13 @@ function M.view(): Node
description = ui.t("settings.general.hide_emails.description"),
control = ds.Switch { value = prefs.hide_emails, label = ui.t("settings.general.hide_emails.label") },
}),
+ row("keep_chats_local", {
+ label = ui.t("settings.general.keep_chats_local.label"),
+ description = ui.t("settings.general.keep_chats_local.description"),
+ control = engine_switch(ui.t("settings.general.keep_chats_local.label"), function(): boolean?
+ return keep_local:get()
+ end, set_keep_local),
+ }),
},
},
ds.Settings.Section {
diff --git a/apps/zgx/ui/screens/settings/providers.luau b/apps/zgx/ui/screens/settings/providers.luau
index 2876379aa..d1e13d9a3 100644
--- a/apps/zgx/ui/screens/settings/providers.luau
+++ b/apps/zgx/ui/screens/settings/providers.luau
@@ -23,6 +23,7 @@ local prefs = require("@app/screens/settings/prefs")
local registry = require("@account/registry")
local add_agent = require("@app/screens/settings/add_agent")
local sign_in_terminal = require("@app/screens/settings/sign_in_terminal")
+local cloud = require("@account/cloud")
local M = {}
@@ -108,6 +109,20 @@ local function here(): string?
end
return nil
end
+-- Cloud, as one choice after the computers (never its machines): the
+-- accounts every Cloud machine uses, kept by the vault, which the engine
+-- answers for (crates/engine cloud_accounts: Claude Code and Codex, their
+-- logins and API keys). Offered while Cloud is on.
+local CLOUD = "cloud"
+local function on_cloud(): boolean
+ return now().target == CLOUD
+end
+local function cloud_choice(): { any }
+ if cloud.on() or on_cloud() then
+ return { { value = CLOUD, label = ui.t("settings.providers.cloud"):get(), icon = "cloud" } }
+ end
+ return {}
+end
-- The device shown: the engine's target, else this one.
local function shown_device(): string?
return now().target or here()
@@ -115,6 +130,9 @@ end
-- (In the locale shown: read where it's drawn.)
local function device_name(): string
local id = shown_device()
+ if id == CLOUD then
+ return ui.t("settings.providers.cloud"):get()
+ end
for _, d in computers() do
if d.id == id then
return if d.here then ui.t("settings.providers.this_mac"):get() else d.name
@@ -124,8 +142,11 @@ local function device_name(): string
end
local function choose_device(id: string)
agents.target(if id == here() then nil else id)
- -- (The registry as that device sees it: what it has added, its builds.)
- registry.load()
+ -- (The registry as that device sees it: what it has added, its builds.
+ -- Cloud runs only Zeron's own.)
+ if id ~= CLOUD then
+ registry.load()
+ end
end
-- Which of the page's views shows: the agents, the registry ("add"), or
@@ -152,7 +173,8 @@ local function kind(): string
if s == "looking" or s == "unavailable" then
return s
end
- return "found"
+ -- (Cloud's page is another: its accounts, its keys, nothing to add.)
+ return if now().target == "cloud" then "cloud" else "found"
end
-- Which agent's settings are open (none: "").
@@ -223,6 +245,9 @@ local function card(row: State): Node
-- no accounts, and signs in its own way. (Its updates come as any
-- agent's: the engine's update coordinator, the registry its feed.)
local from_registry = (first :: any).registry == true
+ -- Cloud's (made for it: the cards are keyed by the device shown): on
+ -- every Cloud machine, its accounts alone managed here.
+ local cloud_card = on_cloud()
-- The switch follows the engine; a flip goes to it, and its answer
-- comes back in the row.
local on = ui.use_state(first.enabled)
@@ -234,7 +259,7 @@ local function card(row: State): Node
if flipped ~= said then
on:set(said)
end
- elseif flipped ~= said then
+ elseif flipped ~= said and not cloud_card then
agents.set_enabled(id, flipped)
end
end)
@@ -250,6 +275,7 @@ local function card(row: State): Node
return (row:get() :: any).updating == true
end,
sign_in_only = from_registry,
+ fixed = cloud_card,
login_note = function(): string?
return (row:get() :: any).login_note
end,
@@ -329,7 +355,7 @@ local function card(row: State): Node
end
return nil
end,
- settings = true,
+ settings = not cloud_card,
on_settings = function()
load_subagents()
open_settings:set(id)
@@ -421,7 +447,13 @@ local function cards(): Node
gap = "$space.4",
ui.each(ui.computed(installed), function(_a: agents.Agent, _i: number, row: State): Node
return card(row)
- end, { key = by_id }),
+ end, {
+ -- (By the device shown too: a card is made for its device,
+ -- Cloud's unlike a computer's.)
+ key = function(a: agents.Agent): string
+ return `{now().target or ""}|{a.id}`
+ end,
+ }),
}
)
end
@@ -490,6 +522,85 @@ local function more(): Node
)
end
+-- Cloud's API keys: Anthropic's for Claude Code, OpenAI's for Codex, kept
+-- by the vault. A key saved becomes its agent's account in use, every Cloud
+-- machine's from its next turn (as signing in does).
+local CLOUD_KEYS = {
+ { provider = "anthropic-key", agent = "Claude Code", label = "settings.providers.cloud_keys.anthropic" },
+ { provider = "openai-key", agent = "Codex", label = "settings.providers.cloud_keys.openai" },
+}
+local function cloud_key_row(k: { provider: string, agent: string, label: string }): Node
+ return ui.component(function(): Node
+ local value = ui.use_state("")
+ local busy = ui.use_state(false)
+ local problem = ui.use_state("")
+ local function save()
+ local key = value:peek()
+ if busy:peek() or key == "" then
+ return
+ end
+ busy:set(true)
+ problem:set("")
+ host.call("agents.cloud_key", { provider = k.provider, key = key, device = cloud.device() or "" }):after(function()
+ busy:set(false)
+ value:set("")
+ toast.show { title = ui.t("settings.providers.cloud_keys.saved", { agent = k.agent }):get(), tone = "success" }
+ end, function(err: any)
+ busy:set(false)
+ problem:set(if type(err) == "table" and err.message then tostring(err.message) else tostring(err))
+ end)
+ end
+ return ds.Settings.Row {
+ label = ui.t(k.label),
+ description = function(): string
+ local p = problem:get()
+ return if p ~= "" then p else ui.t("settings.providers.cloud_keys.description", { agent = k.agent }):get()
+ end,
+ control = ui.row {
+ gap = "$space.2",
+ items = "center",
+ ds.TextField {
+ value = value,
+ password = true,
+ w = 220,
+ size = "sm",
+ name = ui.t(k.label),
+ placeholder = ui.t("settings.providers.cloud_keys.placeholder"),
+ on_commit = function()
+ save()
+ end,
+ },
+ ds.Button {
+ ui.t("settings.providers.cloud_keys.save"),
+ tone = "secondary",
+ size = "sm",
+ busy = function(): boolean
+ return busy:get()
+ end,
+ disabled = function(): boolean
+ return value:get() == ""
+ end,
+ on_click = save,
+ },
+ },
+ }
+ end)({})
+end
+local function cloud_keys(): Node
+ return ds.Settings.Section {
+ title = ui.t("settings.providers.cloud_keys.title"),
+ description = ui.t("settings.providers.cloud_keys.section_description"),
+ ds.Settings.Group {
+ ui.column {
+ w_full = true,
+ cloud_key_row(CLOUD_KEYS[1]),
+ ds.Settings.Rule(),
+ cloud_key_row(CLOUD_KEYS[2]),
+ },
+ },
+ }
+end
+
local function body(k: string): Node
if k == "looking" then
return ds.ProviderCard.Loading()
@@ -498,6 +609,9 @@ local function body(k: string): Node
return device_name()
end, agents.load)
end
+ if k == "cloud" then
+ return ui.column { w_full = true, gap = "$space.6", cards(), cloud_keys() }
+ end
return ui.column { w_full = true, gap = "$space.6", cards(), more() }
end
@@ -767,7 +881,7 @@ local function agents_page(): Node
-- Agents are per device: which one's (a choice once there's more
-- than this one).
-- (The same choice as Plugins': screens/settings/devices.)
- trail = devices_page.picker(shown_device, choose_device),
+ trail = devices_page.picker(shown_device, choose_device, cloud_choice),
-- (At the top right, on the title's line, as Plugins' is.)
trail_top = true,
ui.presence(kind, body, { w_full = true, enter = { opacity = { 0, 1 }, duration = 120 }, exit = { opacity = 0, duration = 60 }, mode = "wait" }),
@@ -792,6 +906,10 @@ function M.view(): Node
-- (Once a visit: a hot reload doesn't ask again.) The page opens on the
-- agents; the registry is looked at too, for what it has to add.
visits.once("providers", function()
+ -- (Whether Cloud is on, for its choice.)
+ if cloud.now:peek().phase == "unknown" then
+ cloud.load()
+ end
agents.load()
registry.load()
if view:peek() ~= "agents" then
diff --git a/apps/zgx/ui/screens/shell/init.luau b/apps/zgx/ui/screens/shell/init.luau
index a31ecb761..3b87f539f 100644
--- a/apps/zgx/ui/screens/shell/init.luau
+++ b/apps/zgx/ui/screens/shell/init.luau
@@ -127,8 +127,15 @@ return function(): Node
local find: any = boundary.load("@app/screens/chat/find")
return find ~= nil and find.open ~= nil and (find.open :: any)() == true
end
+ -- ⌘N: the new chat, its composer given the keys in the same step (one
+ -- composer, its draft now the new chat's), so a key typed straight after
+ -- is the new chat's, never the one left.
runs["shell.new_chat"] = function()
route.new_chat()
+ local shared: any = boundary.load("@app/screens/chat/shared")
+ if shared and shared.focus then
+ shared.focus:add(1)
+ end
end
runs["shell.palette"] = function()
view.palette:set(not view.palette:peek())
diff --git a/apps/zgx/ui/screens/shell/page.luau b/apps/zgx/ui/screens/shell/page.luau
index 255367fc0..fc37782b8 100644
--- a/apps/zgx/ui/screens/shell/page.luau
+++ b/apps/zgx/ui/screens/shell/page.luau
@@ -2023,6 +2023,7 @@ return function(props: Props): Node
-- width leaves, followed as the sidebar moves.)
return props.width() - (row_ref.width or props.width())
end,
+ width = props.width,
start = function(): number
local past = ds.TitleBar.last_control_end() + 8
if sidebar_settled() <= 0 then
diff --git a/apps/zgx/ui/screens/shell/route.luau b/apps/zgx/ui/screens/shell/route.luau
index 0a9aa2eb2..a05a3a45e 100644
--- a/apps/zgx/ui/screens/shell/route.luau
+++ b/apps/zgx/ui/screens/shell/route.luau
@@ -405,12 +405,28 @@ M.projects = steady(function(): { Choice }
return out
end)
+-- What a session opened here is told before the route moves (the chat page's
+-- store sets it: it watches that chat), in one step with the move: what
+-- follows both, the route and the chat shown (the composer, the page), then
+-- sees them change together and runs once, rather than once for the route and
+-- again as the chat follows it. (The page goes on watching what its route
+-- says: opened another way, back or by a link, the chat follows a step later.)
+M.opening = nil :: ((id: string) -> ())?
+
function M.open_session(id: string)
local r = at()
if r.name == "session" and r.params.id == id then
return
end
- go("session", { id = id })
+ local opening = M.opening
+ if not opening then
+ go("session", { id = id })
+ return
+ end
+ ui.batch(function()
+ opening(id)
+ go("session", { id = id })
+ end)
end
-- Launched (not the scripts reloaded), it starts where it was left (see
diff --git a/apps/zgx/ui/screens/shell/session_tabs.luau b/apps/zgx/ui/screens/shell/session_tabs.luau
index 59805f9a7..7093d6455 100644
--- a/apps/zgx/ui/screens/shell/session_tabs.luau
+++ b/apps/zgx/ui/screens/shell/session_tabs.luau
@@ -5,7 +5,7 @@
-- drag reorders them, its × closes the tab, and a split with it (the sessions go on,
-- in the sidebar).
--
--- session_tabs.Strip { left = fn, right = fn }
+-- session_tabs.Strip { window_x = fn, width = fn, start = fn, right = fn }
local ds = require("@ds")
local ContextMenu = require("@ds/context_menu")
@@ -527,13 +527,24 @@ local Tab = ui.component(function(props: { chat: string, strip: any }): Node
end)
-- `window_x`: how far the page's room stands from the window's left, followed
--- as the sidebar moves. `start`: where the tabs start in the window.
-function M.Strip(props: { window_x: () -> number, start: () -> number, right: () -> number }): Node
+-- as the sidebar moves. `width`: the window's. `start`: where the tabs start
+-- in the window. `right`: how far they keep from its right edge.
+function M.Strip(props: { window_x: () -> number, width: () -> number, start: () -> number, right: () -> number }): Node
-- Each edge fades in full as soon as tabs run a little past it: a band only
-- as wide as the overflow (`fade_overflow`) is a hard edge while that's a
-- few points. Over the last few, as the end comes to rest, it goes.
local offset = ui.state("shell_session_tabs_offset", 0)
- local view, content = ui.ref(), ui.ref()
+ local content = ui.ref()
+ local start_at = ui.computed(props.start)
+ -- The strip's room where it comes to rest: the window's width less where
+ -- the tabs start and what they keep clear of at its right (the strip runs
+ -- the window's width, `left = -window_x` to its right edge). From where
+ -- each is going, not the scroll view's width: that eases with the tabs'
+ -- start (the sidebar's "…", the controls' slide in and out of full
+ -- screen), and what read it would run each frame of the move.
+ local rest_room = ui.computed(function(): number
+ return math.max(0, props.width() - start_at:get() - props.right())
+ end)
local strip = TabStrip.new {
key = "session_tab",
items = function(): { string }
@@ -566,7 +577,7 @@ function M.Strip(props: { window_x: () -> number, start: () -> number, right: ()
}
local function bands(): { number }
local at = offset:get()
- local past = (content.width or 0) - (view.width or 0) - at
+ local past = (content.width or 0) - rest_room:get() - at
return { math.clamp(at * FADE_RATE, 0, FADE), math.clamp(past * FADE_RATE, 0, FADE) }
end
-- The tab showing, always clear of the overflow and its fade: as it's opened,
@@ -576,7 +587,7 @@ function M.Strip(props: { window_x: () -> number, start: () -> number, right: ()
local s = route.session:get()
local list = shown:get()
local total = content.width or 0
- local room = view.width or 0
+ local room = rest_room:get()
-- (Read so it runs again once a carried tab has landed.)
strip.order:get()
if not s or room <= 0 then
@@ -619,7 +630,7 @@ function M.Strip(props: { window_x: () -> number, start: () -> number, right: ()
end
end)
-- Where they start, eased as the sidebar's "…" before them comes and goes.
- local start = motion.tween(ui.computed(props.start), motion.sidebar)
+ local start = motion.tween(start_at, motion.sidebar)
-- From the window's left whatever the sidebar is doing, so they stay put as
-- it moves. (Only the tabs' own part takes the pointer: the sidebar's "…"
-- lies under the rest, past the margin.)
@@ -652,7 +663,6 @@ function M.Strip(props: { window_x: () -> number, start: () -> number, right: ()
end,
strip.Frame(ui.scroll_x {
id = "session-tabs-scroll",
- ref = view,
offset = offset,
grow = 1,
min_w = 0,
diff --git a/apps/zgx/ui/screens/shell/sidebar.luau b/apps/zgx/ui/screens/shell/sidebar.luau
index 731dff8b1..8e78daf1d 100644
--- a/apps/zgx/ui/screens/shell/sidebar.luau
+++ b/apps/zgx/ui/screens/shell/sidebar.luau
@@ -91,32 +91,6 @@ local shared = {
folded = ui.persist("shell_sidebar_folded", {} :: { [string]: boolean }),
}
--- Scroll probe (for now: "it jumps back a step every few steps"): the
--- list's offset moving back within a moment of moving down is printed
--- (`sidebar-probe:` on the app's stderr), with how often the sidebar was
--- built and the sessions changed. It reads and prints; it writes nothing.
-local probe = { last = 0, at = 0, dir = 0, builds = 0, built_at = 0, sessions_at = 0 }
-ui.effect(function()
- sessions.now:get()
- probe.sessions_at = ui.now()
-end)
-ui.effect(function()
- local offset = shared.offset:get()
- local t = ui.now()
- local d = offset - probe.last
- if d < -0.5 and probe.dir > 0 and t - probe.at < 300 then
- print(
- `sidebar-probe: back {math.floor(-d + 0.5)} pt to {math.floor(offset)} ({math.floor(t - probe.at)} ms after a step down);`
- .. ` sidebar built {probe.builds}x, last {math.floor(t - probe.built_at)} ms ago;`
- .. ` sessions changed {math.floor(t - probe.sessions_at)} ms ago`
- )
- end
- if math.abs(d) > 0.5 then
- probe.dir = if d > 0 then 1 else -1
- end
- probe.last, probe.at = offset, t
-end)
-
-- The same, field by field.
local function same(a: any, b: any): boolean
if type(a) ~= "table" or type(b) ~= "table" then
@@ -1586,8 +1560,6 @@ local function rename_dialog(): Node
end
M.Sidebar = ui.component(function(props: Props): Node
- probe.builds += 1
- probe.built_at = ui.now()
-- (Made again, a reload: no row is rested on yet.)
if not props.island then
M.card:set(nil)
diff --git a/apps/zgx/ui/settings_stub.luau b/apps/zgx/ui/settings_stub.luau
index e68bd3ff8..890c73593 100644
--- a/apps/zgx/ui/settings_stub.luau
+++ b/apps/zgx/ui/settings_stub.luau
@@ -124,6 +124,7 @@ local engine: { [string]: any } = {
},
GetTitleSettings = {},
GetNativeSubagents = { switchable = { "claude-code" }, off = {} },
+ GetBackgroundSettings = { keepRunningAfterQuit = true },
}
local banners = { desktop = true, background_only = true, agent_updates = true }
@@ -295,7 +296,7 @@ local answers: { [string]: (arg: any) -> any } = {
local w = table.clone(engine[get])
w.settings = arg.params
engine[get] = w
- elseif m == "SetTitleSettings" then
+ elseif m == "SetTitleSettings" or m == "SetBackgroundSettings" then
engine[get] = arg.params
end
return settled(engine[get])
@@ -432,6 +433,21 @@ end
-- a switch of device shows whose.
local agents = require("@account/agents")
local function agents_of(target: string?): any
+ -- Cloud (the engine answers for it from the vault): Claude Code and
+ -- Codex, always installed; Codex with an account, so on.
+ if target == "cloud" then
+ local function one(id: string, name: string, mark: string, accounts: { any }): any
+ return { id = id, name = name, mark = mark, installed = true, can_install = false, enabled = #accounts > 0, version = nil, installing = false, login = "idle", accounts = accounts }
+ end
+ return {
+ state = "ready",
+ target = target,
+ list = {
+ one("claude-code", "Claude Code", "claude", {}),
+ one("codex", "Codex", "openai", { { id = "c1", email = "ada@example.com", plan = "Pro", session = 0.1, week = 0.2, active = true } }),
+ },
+ }
+ end
local name = if target then "Codex" else "Claude Code"
local id = if target then "codex" else "claude-code"
return {
diff --git a/apps/zgx/ui/shell_fixture.luau b/apps/zgx/ui/shell_fixture.luau
index 955d0f0e3..23268be4f 100644
--- a/apps/zgx/ui/shell_fixture.luau
+++ b/apps/zgx/ui/shell_fixture.luau
@@ -595,10 +595,20 @@ end
-- and the project made arriving a beat after the answer, as the engine
-- tells the sessions.
local projects_stub = require("@account/projects") :: any
+-- How long the engine takes to answer (`fixture.slow_folders`: as a real
+-- one listing a big folder, long enough for a page's loading rows to show).
+local answer_ms = 0
+ui.command {
+ id = "fixture.slow_folders",
+ title = "Fixture: an engine slow to list folders",
+ run = function()
+ answer_ms = 600
+ end,
+}
local function answer(value: any): any
return {
after = function(_, ok: (any) -> (), fail: ((any) -> ())?)
- ui.after(0, function()
+ ui.after(answer_ms, function()
if type(value) == "table" and value.refused then
if fail then
fail(value.refused)
diff --git a/apps/zgx/ui/templates/zeron-v2/.base.json b/apps/zgx/ui/templates/zeron-v2/.base.json
index 9f28e1fc7..5dedae288 100644
--- a/apps/zgx/ui/templates/zeron-v2/.base.json
+++ b/apps/zgx/ui/templates/zeron-v2/.base.json
@@ -1,10 +1,10 @@
{
- "ds/sidebar.luau": "f2abf7b60b5f4d00",
+ "ds/sidebar.luau": "6d5d8113d5768620",
"ds/tokens.luau": "296d1ea72675de0c",
- "screens/chat/composer.luau": "5a4b142a88915b87",
- "screens/chat/lane_tab.luau": "43f35502c5d8818d",
- "screens/panel/init.luau": "3d5e0c712c4dda56",
- "screens/shell/init.luau": "c7b26c3a1ccf9a32",
- "screens/shell/page.luau": "c1debbce640a5d45",
+ "screens/chat/composer.luau": "7d4cc540ce993b96",
+ "screens/chat/lane_tab.luau": "c73af1b7c16fd56e",
+ "screens/panel/init.luau": "a0df0db6e977845f",
+ "screens/shell/init.luau": "302aa5fc3350cd0a",
+ "screens/shell/page.luau": "c60a2e8010d8068e",
"screens/shell/view.luau": "95dec891b31add1d"
}
diff --git a/apps/zgx/ui/templates/zeron-v2/ds/sidebar.luau b/apps/zgx/ui/templates/zeron-v2/ds/sidebar.luau
index 75a83175e..20434b8e7 100644
--- a/apps/zgx/ui/templates/zeron-v2/ds/sidebar.luau
+++ b/apps/zgx/ui/templates/zeron-v2/ds/sidebar.luau
@@ -3498,8 +3498,12 @@ local places: State = props.places or ui.use_state({ pinned = pinned_ids
local going: { [string]: { it: Item, after: string? } } = {}
local pending: { [string]: number }? = nil
local GLIDES: { [string]: boolean } = { session = true, group = true, pager = true, empties = true }
+ -- (Folded away, it takes each new shape at once: no row glides,
+ -- comes or goes where none can see it, every frame of its motion
+ -- laying out the list again.)
local function quiet(): boolean
- return drag:peek() == nil and starting == nil
+ local away = not is_island and collapsed:peek() and shown_w:peek() <= 0
+ return drag:peek() == nil and starting == nil and not away
end
local function settled(it: Item, t: number): boolean
for _, f in it.chain do
diff --git a/apps/zgx/ui/templates/zeron-v2/screens/chat/composer.luau b/apps/zgx/ui/templates/zeron-v2/screens/chat/composer.luau
index 0a8589c60..09932f33f 100644
--- a/apps/zgx/ui/templates/zeron-v2/screens/chat/composer.luau
+++ b/apps/zgx/ui/templates/zeron-v2/screens/chat/composer.luau
@@ -30,13 +30,16 @@ local route = require("@app/screens/shell/route")
local art = require("@app/screens/shell/art")
local shared = require("@app/screens/chat/shared")
local sessions = require("@account/sessions")
+local cloud = require("@account/cloud")
local LinkNotice = require("@app/screens/chat/link_notice")
local CloudTray = require("@app/screens/chat/cloud_tray")
local CloudMachine = require("@app/screens/chat/cloud_machine")
local files = require("@app/screens/files/api")
local Where = require("@app/screens/chat/where")
+local Warm = require("@app/screens/chat/warm")
local DropOverlay = require("@ds/drop_overlay")
local mentions = require("@ds/composer_mentions")
+local Draft = require("@ds/draft_text")
local Invocations = require("@app/screens/chat/invocations")
local Completions = require("@app/screens/chat/completions")
local ZeronCommands = require("@app/screens/chat/zeron_commands")
@@ -189,6 +192,9 @@ local function Composer(): Node
local checkout = ui.state("chat_checkout", "worktree" :: string?)
local branch = ui.state("chat_branch", nil :: string?)
local project = ui.state("chat_project", nil :: string?)
+ -- On Cloud, what a new chat's machine reaches (nil: the account's
+ -- default, Settings → Cloud). Each new chat starts from the default.
+ local reach = ui.state("chat_reach", nil :: string?)
local locals: { [string]: State } =
{ model = model, effort = effort, fast = fast, options = options, access = access, plan = plan }
@@ -482,6 +488,58 @@ local function Composer(): Node
branch = branch,
active = new_chat,
}
+ -- A new chat's agent, started as the person opens it or types (see
+ -- screens/chat/warm), with the send's own choices.
+ local warm = Warm.bind {
+ session = function(): string?
+ return session_id:get()
+ end,
+ text = shared.text,
+ owner = shared.owner,
+ request = function(): any?
+ -- (Only a new chat's.)
+ if not new_chat() then
+ return nil
+ end
+ local req = {
+ model = model:get(),
+ effort = effort:get(),
+ fast = fast:get(),
+ options = options:get(),
+ access = access:get(),
+ plan = plan:get(),
+ }
+ -- (Heard when the place changes too.)
+ device:get()
+ project:get()
+ checkout:get()
+ branch:get()
+ if where.blocked:peek() then
+ return nil
+ end
+ local p = where.plan()
+ if p.cloud or p.worktree then
+ return nil
+ end
+ -- (Only for a chat that will run here: one on another device
+ -- would outlive this app's quit.)
+ local here = (sessions.now:peek() :: any).here
+ if p.device ~= nil and p.device ~= here then
+ return nil
+ end
+ for _, m in store.catalog:get().models do
+ if m.value == req.model then
+ (req :: any).harness = m.harness
+ end
+ end
+ if (req :: any).harness == nil then
+ return nil
+ end
+ (req :: any).cwd = p.cwd;
+ (req :: any).device = p.device
+ return req
+ end,
+ }
local running = ui.computed(function(): boolean
local s = open()
@@ -586,10 +644,10 @@ local function Composer(): Node
end
return LinkNotice.of {
connection = sessions.connection:get(),
- cloud = machine.cloud_link(string.find(shared.text:get(), "%S") ~= nil or #shared.cargo:get() > 0 or #queue:get() > 0),
+ cloud = machine.cloud_link(Draft.has_text(shared.text) or #shared.cargo:get() > 0 or #queue:get() > 0),
host_unreachable = host_unreachable,
host = host,
- intent = string.find(shared.text:get(), "%S") ~= nil or #shared.cargo:get() > 0 or #queue:get() > 0,
+ intent = Draft.has_text(shared.text) or #shared.cargo:get() > 0 or #queue:get() > 0,
}
end)
@@ -824,24 +882,38 @@ local function Composer(): Node
-- the focus; back from Settings): the composer takes the keys. Once
-- what brought it here is done (a palette closing
-- puts focus back where it was first), so this comes last; a field
- -- that takes the keys after (a rename) has them. (Kept: a reload, or
- -- the window opening, isn't an arrival.)
+ -- that takes the keys after (a rename) has them. The window opening on
+ -- a chat is an arrival too: what's typed from the launch on goes into
+ -- the composer, with no click first (Zeron's composer has the keys as it
+ -- opens; ademark's A1 types from the launch and timed out on every run
+ -- while they were nowhere). (Kept: a reload isn't one.)
local arrived = ui.state("chat_composer_arrived", "?")
ui.effect(function()
local now = route.current:get()
local pane = route.chat:get().session
local chat = now.name == "session" or now.name == "home"
- local at = `{now.name}|{now.session or ""}|{now.project or ""}|{pane or ""}`
- local was = arrived:peek()
- if was == at then
+ -- (A session's project is the chat's own, known once the engine
+ -- lists it: its coming isn't a move, and it took the keys from
+ -- whatever had them by then, a dialog opened at launch.)
+ local project = if now.name == "home" then now.project or "" else ""
+ local at = `{now.name}|{now.session or ""}|{project}|{pane or ""}`
+ if arrived:peek() == at then
return
end
- arrived:set(at)
-- (A tab strip's arrows keep the keys on the tab they chose.)
- if route.take_keys_kept() or was == "?" or not chat then
+ if route.take_keys_kept() or not chat then
+ arrived:set(at)
return
end
+ -- Marked arrived as the keys are given, not before: the window's
+ -- scripts loaded again meanwhile (the engine's plugins coming in as
+ -- the window opens) drop this turn's callback, and the scripts made
+ -- again give them instead.
ui.after(0, function()
+ if arrived:peek() == at then
+ return
+ end
+ arrived:set(at)
shared.focus:add(1)
end)
end)
@@ -1008,6 +1080,7 @@ local function Composer(): Node
-- steps are); Cloud makes it meanwhile, and the message goes once it
-- has. Refused, back to the new chat with the words and why.
if plan.cloud then
+ warm.stop()
local chat_id = store.new_id()
req.project = plan.project
req.device = plan.device
@@ -1024,10 +1097,12 @@ local function Composer(): Node
slide_to = chat_id
route.open_session(chat_id)
sessions
- .create({ id = chat_id, project = plan.project, branch = plan.branch, cloud = true })
+ .create({ id = chat_id, project = plan.project, branch = plan.branch, cloud = true, reach = reach:peek() })
:after(function(made: any)
local cwd = if type(made) == "table" then made.cwd else nil
req.cwd = if type(cwd) == "string" and cwd ~= "" then cwd else nil
+ -- (The next new chat starts from the default again.)
+ reach:set(nil)
store.created(chat_id)
store.send(req):after(function() end, function(_e: any) end)
end, function(e: any)
@@ -1059,8 +1134,12 @@ local function Composer(): Node
req.project = plan.project
req.device = plan.device
req.branch = plan.branch
+ -- (The id its agent was started early for, if it was: the send goes
+ -- into that agent.)
+ local warmed = warm.take()
sessions
.create({
+ id = warmed,
project = plan.project,
device = if plan.project then nil else plan.device,
branch = plan.branch,
@@ -1070,6 +1149,9 @@ local function Composer(): Node
:after(function(made: any)
local id = if plan.cloud and type(made) == "table" then made.id else made
if type(id) ~= "string" then
+ if warmed then
+ store.unwarm(warmed)
+ end
failed()
return
end
@@ -1097,6 +1179,10 @@ local function Composer(): Node
route.open_session(id)
store.send(req):after(function() end, function(_e: any) end)
end, function(e: any)
+ -- (Never made: the agent started for it goes.)
+ if warmed then
+ store.unwarm(warmed)
+ end
-- (A Cloud chat's reason is said in words; an outcome word isn't.)
local why = if plan.cloud and type(e) == "table" and type(e.message) == "string" and string.find(e.message, " ", 1, true)
then e.message
@@ -1159,9 +1245,13 @@ local function Composer(): Node
on = d.name
end
end
+ -- On Cloud: its machine's session (a side chat shares its parent's).
+ local machine = if cloud.on_device((s :: any).device) then cloud.session_for(s.id, (s :: any).device) else nil
return {
device = on,
name = name,
+ cloud = cloud.on_device((s :: any).device),
+ reach = if machine then machine.reach else nil,
worktree = path ~= nil and s.cwd ~= nil and s.cwd ~= path,
project = project,
hue = if project and s.project then (route.look(s.project) or { hue = route.hue(s.project) }).hue else nil,
@@ -1283,6 +1373,16 @@ local function Composer(): Node
branches = where.branches,
branches_empty = where.branches_empty,
branch_fixed = branch_fixed,
+ -- (Only ever the person's: the engine takes it from this app alone.)
+ on_reach = function(r: string)
+ local s = open()
+ local machine = if s then cloud.session_for(s.id, (s :: any).device) else nil
+ if machine then
+ cloud.set_session_reach(machine.chat, r)
+ end
+ end,
+ reach = reach,
+ reach_default = cloud.reach,
cargo = shared.cargo,
on_remove_cargo = shared.remove_cargo,
on_attach = function()
diff --git a/apps/zgx/ui/templates/zeron-v2/screens/chat/lane_tab.luau b/apps/zgx/ui/templates/zeron-v2/screens/chat/lane_tab.luau
index 4e963de97..40655ffd9 100644
--- a/apps/zgx/ui/templates/zeron-v2/screens/chat/lane_tab.luau
+++ b/apps/zgx/ui/templates/zeron-v2/screens/chat/lane_tab.luau
@@ -29,6 +29,7 @@ local LinkMenu = require("@app/screens/chat/link_menu")
local Shared = require("@app/screens/chat/shared")
local boundary = require("@app/screens/shell/boundary")
local Quote = require("@ds/quote")
+local Draft = require("@ds/draft_text")
local Carried = require("@app/screens/chat/carried")
local Completions = require("@app/screens/chat/completions")
local Invocations = require("@app/screens/chat/invocations")
@@ -508,7 +509,7 @@ local function composer(chat: string, view: any, name: string, focus: State boolean, ms: number?): boolean
+ for _ = 1, math.ceil((ms or 5000) / 50) do
+ if ok() then
+ return true
+ end
+ app:wait('"never shown, only waited past"', { timeout_ms = 50 })
+ end
+ return ok()
+end
+
+local function panel(): any
+ local app = mount("panel_fixture.luau")
+ app:resize(900, 640)
+ app:frames(10)
+ expect(app:error()).to_be_nil()
+ expect(app:wait("#panel-empty", { timeout_ms = 15000 })).to_be(true)
+ app:click("#panel-open-browser")
+ expect(app:wait(FIELD, { timeout_ms = 15000 })).to_be(true)
+ return app
+end
+
+local function calls(app: any): string
+ return app:state("test_web_calls") or ""
+end
+
+-- To google.com/sorry, the page loaded (the field shows its address).
+local URL = "https://www.google.com/sorry/index"
+local function go(app: any): string
+ app:click("#outside")
+ app:frames(2)
+ app:type(FIELD, URL)
+ app:key("Enter")
+ app:frames(10)
+ expect(eventually(app, function(): boolean
+ return app:tree(FIELD):find(`="{string.sub(URL, 1, 36)}`, 1, true) ~= nil
+ end)).to_be(true)
+ app:frames(5)
+ return app:state("test_web_last_id")
+end
+
+-- The page moving on, as the host tells it (`started`, `committed`).
+local function navigate(app: any, kind: string)
+ app:set_state("test_web_nav_kind", kind)
+ app:command("test.web_navigate")
+ app:frames(5)
+end
+
+-- The load failing, as the host has it: the error on the page's state.
+local function fail(app: any, id: string, why: string)
+ app:set_state(`test_web_error_{id}`, why)
+ app:frames(10)
+end
+
+-- The page under the overlay is the fixture's stand-in (`page `).
+local function page_shown(app: any): boolean
+ return app:has("#stub-web")
+end
+
+test("browser load error: a page that never came shows the failure, Try again and Dismiss", function()
+ local app = panel()
+ local id = go(app)
+ navigate(app, "started")
+ fail(app, id, "A server with the specified hostname could not be found.")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+ expect(app:has(RETRY)).to_be(true)
+ expect(app:has(DISMISS)).to_be(true)
+ expect(app:tree('role:checkbox "Annotate"')).to_contain("disabled")
+end)
+
+test("browser load error: Dismiss hides the failure and the page stays", function()
+ local app = panel()
+ local id = go(app)
+ navigate(app, "started")
+ fail(app, id, "The page could not be loaded.")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+ app:click(DISMISS)
+ app:frames(10)
+ expect(app:has(FAILED)).to_be(false)
+ expect(app:has(RETRY)).to_be(false)
+ expect(page_shown(app)).to_be(true)
+ expect(app:has(`"page {URL}"`)).to_be(true)
+ -- Only this navigation's: the next one's failure shows again.
+ navigate(app, "started")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+end)
+
+test("browser load error: Escape dismisses", function()
+ local app = panel()
+ local id = go(app)
+ navigate(app, "started")
+ fail(app, id, "The page could not be loaded.")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+ -- (From the address field, nothing typed in it to take back.)
+ app:click(FIELD)
+ app:frames(2)
+ app:key("Escape")
+ app:frames(10)
+ expect(app:has(FAILED)).to_be(false)
+ expect(page_shown(app)).to_be(true)
+end)
+
+test("browser load error: Escape from the failure's own buttons dismisses", function()
+ local app = panel()
+ local id = go(app)
+ navigate(app, "started")
+ fail(app, id, "The page could not be loaded.")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+ -- (Tab from the field: past the bar's ⋯ to Try again.)
+ app:click(FIELD)
+ app:frames(2)
+ for _ = 1, 4 do
+ if app:tree(RETRY):find("focused", 1, true) then
+ break
+ end
+ app:key("Tab")
+ app:frames(2)
+ end
+ expect(app:tree(RETRY)).to_contain("focused")
+ app:key("Escape")
+ app:frames(10)
+ expect(app:has(FAILED)).to_be(false)
+ expect(page_shown(app)).to_be(true)
+ expect(calls(app)).never.to_contain("reload")
+end)
+
+test("browser load error: Try again reloads the page", function()
+ local app = panel()
+ local id = go(app)
+ navigate(app, "started")
+ fail(app, id, "Could not connect to the server.")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+ app:click(RETRY)
+ app:frames(5)
+ expect(calls(app)).to_contain("reload")
+end)
+
+test("browser load error: a page that came and drew, with an error status, shows no failure", function()
+ local app = panel()
+ local id = go(app)
+ -- WebView2: the server's own page (a 429) committed, then the
+ -- navigation reported failed, in the default words.
+ navigate(app, "started")
+ navigate(app, "committed")
+ fail(app, id, "The page could not be loaded.")
+ expect(app:has(FAILED)).to_be(false)
+ expect(app:has(RETRY)).to_be(false)
+ expect(page_shown(app)).to_be(true)
+ -- (And the page's controls are the page's: annotate isn't held off.)
+ expect(app:tree('role:checkbox "Annotate"')).never.to_contain("disabled")
+ -- A reload that never commits is a failure again.
+ navigate(app, "started")
+ expect(app:wait(FAILED, { timeout_ms = 3000 })).to_be(true)
+end)
+
+test("browser load error: no network still says offline, with Dismiss", function()
+ local app = panel()
+ local id = go(app)
+ navigate(app, "started")
+ fail(app, id, "The internet connection appears to be offline.")
+ expect(app:wait("\"You're offline\"", { timeout_ms = 3000 })).to_be(true)
+ expect(app:has(RETRY)).to_be(true)
+ expect(app:has(DISMISS)).to_be(true)
+end)
diff --git a/apps/zgx/ui/tests/chat_draft_lift.test.luau b/apps/zgx/ui/tests/chat_draft_lift.test.luau
new file mode 100644
index 000000000..1c17c1924
--- /dev/null
+++ b/apps/zgx/ui/tests/chat_draft_lift.test.luau
@@ -0,0 +1,60 @@
+-- A plugin allowed "draft" takes the composer's draft whole and puts it back
+-- (`zeron.take_draft`, `put_draft`, `swap_draft`: screens/plugins keeps it
+-- between, through screens/chat/shared's `lift` and `lay`). Taken, the
+-- composer is clear; put back in another chat, its words and its chips are
+-- as they were and go with the message; put back over words already there,
+-- they follow those.
+
+local function open(app: any, chat: string)
+ app:command(`go_{chat}`)
+ app:frames(30)
+end
+
+test("a draft taken in one chat is put back in another whole, chips and all", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s2")
+ app:type('role:textbox "Message"', "Wrong chat prompt")
+ app:command("mention_s1")
+ app:frames(10)
+ app:command("draft_lift")
+ app:frames(10)
+ expect(app:state("test_lifted")).to_be("Wrong chat prompt|1")
+ -- Taken: nothing left on this chat's draft.
+ expect(app:has('#chat-composer >> role:button "Long chat"')).to_be(false)
+ expect(app:has('#chat-composer >> ~"Wrong chat prompt"')).to_be(false)
+ -- Put back in another chat, and sent from there.
+ open(app, "s3")
+ app:command("draft_lay")
+ app:frames(30)
+ expect(app:has('#chat-composer >> ~"Wrong chat prompt"')).to_be(true)
+ app:key("Enter")
+ app:frames(30)
+ expect(app:state("calls")).to_contain("send:s3:Wrong chat prompt\n\nChats attached:\n- [Long chat](zeron-chat:s1)")
+ expect(app:error()).to_be(nil)
+end)
+
+test("an empty draft isn't taken", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s2")
+ app:command("draft_lift")
+ app:frames(10)
+ expect(app:state("test_lifted")).to_be("nothing")
+end)
+
+test("a draft put back over words already there follows them", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s2")
+ app:type('role:textbox "Message"', "Second")
+ app:command("draft_lift")
+ app:frames(10)
+ app:type('role:textbox "Message"', "First")
+ app:command("draft_lay")
+ app:frames(30)
+ app:key("Enter")
+ app:frames(30)
+ expect(app:state("calls")).to_contain("send:s2:First\n\nSecond")
+ expect(app:error()).to_be(nil)
+end)
diff --git a/apps/zgx/ui/tests/chat_find.test.luau b/apps/zgx/ui/tests/chat_find.test.luau
index a43ec658e..6793bcf05 100644
--- a/apps/zgx/ui/tests/chat_find.test.luau
+++ b/apps/zgx/ui/tests/chat_find.test.luau
@@ -97,3 +97,29 @@ test("the newest match shows where it is, not at its reply's start", function()
expect(y_of(app, "Part 1 explains")).to_be(nil)
expect(app:error()).to_be(nil)
end)
+
+-- One reply of a thousand steps (ademark's A11 thread): its blocks are held
+-- in runs away from the view, and a match far up it is found all the same,
+-- its run built and scrolled into view.
+test("a match far up a long thread's one reply is found, built and scrolled into view", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(960, 700)
+ app:frames(20)
+ app:command("long_thread")
+ app:command("go_s7")
+ app:frames(40)
+ settle(app)
+ expect(y_of(app, "Step 3 of 1000.")).to_be(nil)
+ app:command("find_open")
+ settle(app)
+ app:type('role:textbox "Find"', "step 3 needs")
+ settle(app)
+ expect(tally(app)).to_be("1 of 1")
+ local y = y_of(app, "Step 3 of 1000.")
+ expect(y ~= nil).to_be(true)
+ local first = app:tree("#transcript"):match("[^\n]+") or ""
+ local top, h = first:match(" %-?%d+,(%-?%d+) %d+x(%d+)")
+ top, h = tonumber(top), tonumber(h)
+ expect((y :: number) >= (top :: number) and (y :: number) < (top :: number) + (h :: number)).to_be(true)
+ expect(app:error()).to_be(nil)
+end)
diff --git a/apps/zgx/ui/tests/chat_in_place.test.luau b/apps/zgx/ui/tests/chat_in_place.test.luau
index e9a495c75..241dcefaa 100644
--- a/apps/zgx/ui/tests/chat_in_place.test.luau
+++ b/apps/zgx/ui/tests/chat_in_place.test.luau
@@ -708,6 +708,21 @@ test("a move to another agent shows its seam over the prompt that moved it", fun
expect(app:count('"Codex"')).to_be(1)
end)
+test("a settled reply with no time still shows Copy under the pointer", function()
+ -- (Windows gave every message no time, and the strip went with it.)
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s1")
+ app:command("reply_without_time")
+ settle(app)
+ app:hover('~"Answered with no clock"')
+ settle(app)
+ expect(app:count('role:button "Copy message"')).to_be(1)
+ app:click('role:button "Copy message"')
+ settle(app)
+ expect(app:error()).to_be(nil)
+end)
+
test("a reply being written shows no time or Copy, even under the pointer", function()
local app = mount("chat_fixture.luau")
app:resize(900, 700)
diff --git a/apps/zgx/ui/tests/chat_switch.test.luau b/apps/zgx/ui/tests/chat_switch.test.luau
new file mode 100644
index 000000000..753746986
--- /dev/null
+++ b/apps/zgx/ui/tests/chat_switch.test.luau
@@ -0,0 +1,211 @@
+-- Switching chats on the session page (ui/chat_fixture.luau, the engine
+-- stubbed): the transcript stays, only its rows are made for each chat
+-- shown; and everything that is one chat's own stays that chat's across
+-- switch after switch, back and forth: where it was read, the way back to
+-- its latest, its draft, its model, and where a send goes.
+
+local function settle(app: any)
+ app:frames(30)
+end
+
+local function open(app: any, id: string)
+ app:command(`go_{id}`)
+ settle(app)
+end
+
+-- A node's identity in the tree, by a pattern on its line: `@id`.
+local function node(app: any, pattern: string): string?
+ for line in app:tree():gmatch("[^\n]+") do
+ if line:find(pattern, 1, true) then
+ return line:match("@(%d+)")
+ end
+ end
+ return nil
+end
+
+-- The first message's words at the view's top, and where (as
+-- chat_in_place.test.luau reads it).
+local function top(app: any): string
+ for line in app:tree("#transcript"):gmatch("[^\n]+") do
+ local y = tonumber(line:match(" %-?%d+,(%-?%d+) "))
+ if line:find('text "', 1, true) and y and y >= 38 then
+ return `{line:match('text "([^"]*)"')} @{y}`
+ end
+ end
+ return "?"
+end
+
+-- The chip's words, as they show (chat_catalog_device.test.luau's).
+local function chip_text(app: any, name: string): string
+ local out = {}
+ for line in app:tree(`role:button "{name}"`):gmatch("[^\n]+") do
+ if not line:find(" hidden", 1, true) then
+ local text = line:match('text "([^"]+)"') or line:match('#[%w%-]+ "([^"]+)"')
+ if text then
+ table.insert(out, text)
+ end
+ end
+ end
+ return table.concat(out, " ")
+end
+
+-- (Where a scroll settles is written once it has rested: let it.)
+local function rest(app: any)
+ app:wait("#never-shown", { timeout_ms = 400 })
+end
+
+test("another chat swaps the transcript's rows; the transcript itself stays", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s1")
+ expect(app:wait('~"Question number 30"', { timeout_ms = 2000 })).to_be(true)
+ local rail = node(app, "#transcript-rail")
+ local list = node(app, "#transcript ")
+ expect(rail).never.to_be_nil()
+ expect(list).never.to_be_nil()
+ open(app, "s2")
+ expect(app:wait('~"Hi! What shall we work on?"', { timeout_ms = 2000 })).to_be(true)
+ expect(app:has('~"Question number 30"')).to_be(false)
+ -- The same scrollbar; a list of its own for the chat shown.
+ expect(`rail @{node(app, "#transcript-rail")}`).to_be(`rail @{rail}`)
+ expect(`list @{node(app, "#transcript ")}`).never.to_be(`list @{list}`)
+ open(app, "s1")
+ expect(app:wait('~"Question number 30"', { timeout_ms = 2000 })).to_be(true)
+ expect(app:has('~"Hi! What shall we work on?"')).to_be(false)
+ expect(`rail @{node(app, "#transcript-rail")}`).to_be(`rail @{rail}`)
+ expect(app:error()).to_be(nil)
+end)
+
+test("each chat keeps where it was read and its way back, switch after switch", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ -- s1 read partway up, s7 (tall replies) further up, s2 at its end.
+ open(app, "s1")
+ app:scroll("#transcript", -900)
+ settle(app)
+ rest(app)
+ local s1 = top(app)
+ expect(s1).never.to_be("?")
+ open(app, "s7")
+ app:scroll("#transcript", -2500)
+ settle(app)
+ rest(app)
+ local s7 = top(app)
+ expect(s7).never.to_be("?")
+ open(app, "s2")
+ rest(app)
+ for round = 1, 6 do
+ open(app, "s1")
+ rest(app)
+ expect(`{round}: s1 {top(app)}`).to_be(`{round}: s1 {s1}`)
+ expect(app:wait('role:button "Jump to latest"', { timeout_ms = 1000 })).to_be(true)
+ open(app, "s7")
+ rest(app)
+ expect(`{round}: s7 {top(app)}`).to_be(`{round}: s7 {s7}`)
+ expect(app:wait('role:button "Jump to latest"', { timeout_ms = 1000 })).to_be(true)
+ open(app, "s2")
+ rest(app)
+ -- At its end, all of it shown, with no way back to show.
+ expect(app:has('~"Hi! What shall we work on?"')).to_be(true)
+ expect(app:wait('role:button "Jump to latest"', { gone = true, timeout_ms = 1000 })).to_be(true)
+ end
+ -- Taking s1's way back there leaves s7's place as it was.
+ open(app, "s1")
+ app:click('role:button "Jump to latest"')
+ settle(app)
+ expect(app:wait('~"Question number 30"', { timeout_ms = 2000 })).to_be(true)
+ rest(app)
+ open(app, "s7")
+ rest(app)
+ expect(top(app)).to_be(s7)
+ open(app, "s1")
+ rest(app)
+ expect(app:has('~"Question number 30"')).to_be(true)
+ expect(app:wait('role:button "Jump to latest"', { gone = true, timeout_ms = 1000 })).to_be(true)
+ expect(app:error()).to_be(nil)
+end)
+
+test("drafts, models and sends stay with their chat, back and forth", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s1")
+ app:type('role:textbox "Message"', "Draft for one")
+ settle(app)
+ open(app, "s2")
+ app:type('role:textbox "Message"', "Draft for two")
+ settle(app)
+ for round = 1, 6 do
+ open(app, "s1")
+ expect(`{round}: {app:text('role:textbox "Message"')}`).to_be(`{round}: Draft for one`)
+ expect(chip_text(app, "Model")).to_contain("Opus")
+ open(app, "s2")
+ expect(`{round}: {app:text('role:textbox "Message"')}`).to_be(`{round}: Draft for two`)
+ expect(chip_text(app, "Model")).to_contain("Sonnet")
+ end
+ -- Sent from s2, after all that: to s2, shown in s2, and s1's draft stays.
+ app:key("Enter")
+ settle(app)
+ app:wait("#never-shown", { timeout_ms = 700 })
+ local calls = app:state("calls")
+ expect(calls).to_contain("send:s2:Draft for two")
+ expect(calls).never.to_contain("send:s1:")
+ expect(app:has('~"Draft for two"')).to_be(true)
+ open(app, "s1")
+ expect(app:text('role:textbox "Message"')).to_be("Draft for one")
+ expect(app:has('~"Draft for two"')).to_be(false)
+ expect(app:error()).to_be(nil)
+end)
+
+test("a chat left mid-glide: its prompt goes to it, the next chat's view stays its own", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ open(app, "s7")
+ app:scroll("#transcript", -2500)
+ settle(app)
+ rest(app)
+ local s7 = top(app)
+ open(app, "s1")
+ app:type('role:textbox "Message"', "Sent as I left")
+ app:key("Enter")
+ -- Away before its prompt has glided to the top.
+ app:frames(1)
+ app:command("go_s7")
+ settle(app)
+ app:wait("#never-shown", { timeout_ms = 700 })
+ expect(app:state("calls")).to_contain("send:s1:Sent as I left")
+ -- s7 opens where it was read, not moved by s1's glide.
+ expect(top(app)).to_be(s7)
+ expect(app:has('~"Sent as I left"')).to_be(false)
+ -- And back again: each its own still.
+ open(app, "s1")
+ open(app, "s7")
+ rest(app)
+ expect(top(app)).to_be(s7)
+ expect(app:error()).to_be(nil)
+end)
+
+-- The scrollbar shows while the view is scrolled, not as another chat's
+-- rows place themselves: the transcript staying, a switch was taken for a
+-- scroll, and the bar lit and faded over some 60 frames after every one.
+test("a switch doesn't show the scrollbar; a scroll does", function()
+ local app = mount("chat_fixture.luau")
+ app:resize(900, 700)
+ local function rail_shows(): boolean
+ local line = app:tree("#transcript-rail"):match("[^\n]+") or ""
+ return not line:find(" hidden", 1, true)
+ end
+ open(app, "s1")
+ rest(app)
+ expect(rail_shows()).to_be(false)
+ for _, id in { "s7", "s1", "s7", "s2", "s1" } do
+ app:command(`go_{id}`)
+ app:frames(3)
+ expect(`{id}: {rail_shows()}`).to_be(`{id}: false`)
+ rest(app)
+ expect(`{id}: {rail_shows()}`).to_be(`{id}: false`)
+ end
+ app:scroll("#transcript", -300)
+ app:frames(3)
+ expect(rail_shows()).to_be(true)
+ expect(app:error()).to_be(nil)
+end)
diff --git a/apps/zgx/ui/tests/chat_warm.test.luau b/apps/zgx/ui/tests/chat_warm.test.luau
new file mode 100644
index 000000000..f5ad424ba
--- /dev/null
+++ b/apps/zgx/ui/tests/chat_warm.test.luau
@@ -0,0 +1,255 @@
+-- A new chat's agent started while its first message is still being written
+-- (screens/chat/warm): only by the person's own new chat or keys, never a
+-- page merely shown or an existing chat; the send takes it, under its id;
+-- and leaving, clearing or writing elsewhere ends it. Never for a chat on
+-- another device, on Cloud, or in a worktree made as it's sent. On
+-- ui/chat_fixture.luau, which notes `warm::`,
+-- `warm_ask:|||`, `warm_taken:`, `unwarm:…` and
+-- `warm_cleared:…`.
+
+local BOX = 'role:textbox "Message"'
+
+local function settle(app: any)
+ app:frames(30)
+end
+
+local function calls(app: any): string
+ return app:state("calls") or ""
+end
+
+local function fresh(): any
+ local app = mount("chat_fixture.luau")
+ app:resize(1200, 800)
+ settle(app)
+ return app
+end
+
+-- The ids warm starts were asked under, in order.
+local function warm_ids(app: any): { string }
+ local ids = {}
+ for id in string.gmatch(calls(app), "warm_ask:([%w%-]+)|") do
+ if ids[#ids] ~= id then
+ table.insert(ids, id)
+ end
+ end
+ return ids
+end
+
+local function count(app: any, word: string): number
+ local n = 0
+ for _ in string.gmatch(calls(app), word) do
+ n += 1
+ end
+ return n
+end
+
+local function pick(app: any, row: string, option: string)
+ app:click('role:button "Branch"')
+ settle(app)
+ app:click(`role:menuitem "{row}"`)
+ settle(app)
+ app:click(`role:option ~"{option}"`)
+ settle(app)
+ app:key("Escape")
+ app:key("Escape")
+ settle(app)
+end
+
+-- A new chat in the project's own folder (a new worktree is made as a chat
+-- is sent: nothing to start in before).
+local function local_checkout(app: any)
+ app:command("go_home")
+ settle(app)
+ pick(app, "Checkout", "Local checkout Work in")
+ -- (A chat shown between, so the next new chat is an arrival.)
+ app:command("go_s2")
+ settle(app)
+end
+
+test("opening a new chat starts no agent: only typing in it does", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_home")
+ settle(app)
+ expect(calls(app)).never.to_contain("warm:new")
+ app:command("go_s2")
+ settle(app)
+ app:command("go_new_by_hand")
+ settle(app)
+ expect(calls(app)).never.to_contain("warm:new")
+ app:type(BOX, "F")
+ settle(app)
+ expect(calls(app)).to_contain("warm:new:typed")
+ expect(calls(app)).never.to_contain("warm:new:open")
+ expect(#warm_ids(app)).to_be(1)
+end)
+
+test("typing into a new chat warms it, and the send goes into that agent, as typed", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_home")
+ settle(app)
+ app:type(BOX, "Fix the parser")
+ settle(app)
+ expect(calls(app)).to_contain("warm:new:typed")
+ local ids = warm_ids(app)
+ expect(#ids).to_be(1)
+ app:key("Enter")
+ settle(app)
+ -- (Made with the warm start's id, not one of its own, and its message
+ -- what was typed.)
+ expect(calls(app)).to_contain(`warm_taken:{ids[1]}`)
+ expect(calls(app)).to_contain(`send:{ids[1]}:Fix the parser`)
+ expect(calls(app)).never.to_contain("unwarm:")
+ -- One agent for the whole draft: renewed, never restarted per key.
+ expect(#warm_ids(app)).to_be(1)
+end)
+
+test("an existing chat's agent never starts early, viewed or typed into", function()
+ local app = fresh()
+ app:command("go_s1")
+ settle(app)
+ app:type(BOX, "And the lexer")
+ settle(app)
+ expect(calls(app)).never.to_contain("warm")
+end)
+
+test("writing in another chat stops the new chat's agent (one per window)", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_home")
+ settle(app)
+ app:type(BOX, "Draft")
+ settle(app)
+ expect(calls(app)).to_contain("warm:new:typed")
+ app:command("go_s1")
+ settle(app)
+ expect(calls(app)).never.to_contain("unwarm:")
+ app:type(BOX, "x")
+ settle(app)
+ expect(calls(app)).to_contain("unwarm:new")
+end)
+
+test("leaving a new chat with its draft empty stops its agent", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_new_by_hand")
+ settle(app)
+ app:type(BOX, "F")
+ settle(app)
+ expect(calls(app)).to_contain("warm:new:typed")
+ app:key("Backspace")
+ settle(app)
+ app:command("go_s1")
+ settle(app)
+ expect(calls(app)).to_contain("unwarm:new")
+end)
+
+test("a cleared draft is handed to the host to stop, and typing again asks again", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_home")
+ settle(app)
+ app:type(BOX, "x")
+ settle(app)
+ app:key("Backspace")
+ settle(app)
+ expect(calls(app)).to_contain("warm_cleared:new")
+ local before = count(app, "warm_ask:")
+ app:type(BOX, "y")
+ settle(app)
+ -- (The host may have stopped it meanwhile: asked again at once.)
+ expect(count(app, "warm_ask:") > before).to_be(true)
+end)
+
+test("a change of model while it waits starts another with it", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_home")
+ settle(app)
+ app:type(BOX, "Draft")
+ settle(app)
+ local first = string.match(calls(app), "warm_ask:[%w%-]+|([^|]*)|")
+ local other = if first == "opus" then "sonnet" else "opus"
+ app:set_state("chat_model", other)
+ settle(app)
+ local models = {}
+ for model in string.gmatch(calls(app), "warm_ask:[%w%-]+|([^|]*)|") do
+ models[model] = true
+ end
+ expect(models[first]).to_be(true)
+ expect(models[other]).to_be(true)
+ -- (The same id: one new chat, its agent replaced.)
+ expect(#warm_ids(app)).to_be(1)
+end)
+
+test("a new chat in a worktree made as it's sent starts nothing early", function()
+ local app = fresh()
+ app:command("go_new_by_hand")
+ settle(app)
+ app:type(BOX, "Branch off")
+ settle(app)
+ expect(calls(app)).never.to_contain("warm:new")
+end)
+
+test("a new chat that will run on another device starts nothing early", function()
+ local app = fresh()
+ app:command("go_home")
+ settle(app)
+ pick(app, "Device", "Build box")
+ pick(app, "Checkout", "Local checkout Work in")
+ app:type(BOX, "On the box")
+ settle(app)
+ -- (Typed into a local checkout there: only the device keeps it cold.)
+ expect(calls(app)).to_contain("refs:/srv/borealis:box")
+ expect(calls(app)).never.to_contain("warm_ask:")
+end)
+
+test("a new chat on Cloud starts nothing early", function()
+ local app = fresh()
+ app:command("cloud_stub.offer")
+ settle(app)
+ app:command("go_home")
+ settle(app)
+ pick(app, "Device", "Cloud")
+ app:type(BOX, "On Cloud")
+ settle(app)
+ expect(calls(app)).never.to_contain("warm_ask:")
+end)
+
+test("a send whose chat isn't made stops the agent started for it", function()
+ local app = fresh()
+ local_checkout(app)
+ app:command("go_home")
+ settle(app)
+ app:type(BOX, "Fix the parser")
+ settle(app)
+ local ids = warm_ids(app)
+ app:command("create_fails")
+ app:key("Enter")
+ settle(app)
+ expect(calls(app)).to_contain(`create_failed_for:{ids[1]}`)
+ expect(calls(app)).to_contain("unwarm:new")
+end)
+
+test("a new chat in no project warms its agent here, in its own folder", function()
+ local app = fresh()
+ app:command("go_home")
+ settle(app)
+ app:click('role:button "Branch"')
+ settle(app)
+ app:click('role:menuitem "Project"')
+ settle(app)
+ app:click('~"Don\'t work in a project"')
+ settle(app)
+ app:key("Escape")
+ app:key("Escape")
+ settle(app)
+ app:type(BOX, "Just a question")
+ settle(app)
+ expect(calls(app)).to_contain("warm:new:typed")
+ local ids = warm_ids(app)
+ app:key("Enter")
+ settle(app)
+ expect(calls(app)).to_contain(`send:{ids[1]}:Just a question`)
+end)
diff --git a/apps/zgx/ui/tests/chimes.test.luau b/apps/zgx/ui/tests/chimes.test.luau
new file mode 100644
index 000000000..2b4716acb
--- /dev/null
+++ b/apps/zgx/ui/tests/chimes.test.luau
@@ -0,0 +1,114 @@
+-- The session chimes (screens/settings/chimes, issue #1437): "done" rings
+-- when a turn finishes (its `turn` mark moving and standing a moment), never
+-- for a chat turning "done" alone, which is only activity you haven't seen
+-- and your own send makes too. Questions and failures ring at once.
+
+local function chat(id: string, status: string?, turn: string?, fresh: boolean?): any
+ return {
+ id = id,
+ title = id,
+ device = "here",
+ status = status,
+ updated = 0,
+ created = 0,
+ turn = turn,
+ turn_fresh = if fresh == nil then true else fresh,
+ }
+end
+
+local function publish(app: any, chats: { any })
+ app:set_state("sessions", {
+ state = "ready",
+ devices = {},
+ projects = {},
+ chats = chats,
+ archived = {},
+ places = { pinned = {}, sections = {} },
+ places_ready = true,
+ })
+ app:frames(2)
+end
+
+local function played(app: any): { string }
+ local out = {}
+ for _, c in (app:state("settings_stub_calls") :: any) or {} do
+ local sound = string.match(c, "^sound%.play:(.+)$")
+ if sound then
+ table.insert(out, sound)
+ end
+ end
+ return out
+end
+
+-- Long enough for a finish to stand (chimes' SETTLE, 2 s).
+local function settle(app: any)
+ app:wait("#never-shown", { timeout_ms = 2400 })
+ app:frames(3)
+end
+
+local function open(chats: { any }): any
+ local app = mount("chimes_fixture.luau")
+ publish(app, chats)
+ return app
+end
+
+test("chimes: your own send never rings done", function()
+ local app = open({ chat("a", nil, "t1") })
+ -- The send lands: your message makes the chat unseen ("done") before the
+ -- live row says it's working; the turn mark hasn't moved.
+ publish(app, { chat("a", "done", "t1") })
+ publish(app, { chat("a", "working", "t1") })
+ -- A steer, or a queued message taken, as a turn ends: the end is
+ -- published with the next turn already running.
+ publish(app, { chat("a", "working", "t2") })
+ -- A send that replaces the runtime: the old turn's end lands idle, then
+ -- your turn starts a moment later.
+ publish(app, { chat("a", "done", "t3") })
+ publish(app, { chat("a", "working", "t3") })
+ settle(app)
+ expect(#played(app)).to_be(0)
+
+ -- The turn your message started finishing: that rings, once.
+ publish(app, { chat("a", "done", "t4") })
+ expect(#played(app)).to_be(0)
+ settle(app)
+ expect(table.concat(played(app), ",")).to_be("done")
+ settle(app)
+ expect(#played(app)).to_be(1)
+end)
+
+test("chimes: a chat's first turn finishing rings done", function()
+ local app = open({ chat("new", "working", nil) })
+ publish(app, { chat("new", "done", "t1") })
+ settle(app)
+ expect(table.concat(played(app), ",")).to_be("done")
+end)
+
+test("chimes: an old row coming back, or a session row returning, never rings", function()
+ local app = open({ chat("a", nil, "t1") })
+ -- A sync brings back an end published long ago.
+ publish(app, { chat("a", "done", "t2", false) })
+ -- The row goes away (a host restarting) and comes back as it was.
+ publish(app, { chat("a", nil, nil) })
+ publish(app, { chat("a", nil, "t2") })
+ settle(app)
+ expect(#played(app)).to_be(0)
+end)
+
+test("chimes: questions and failures ring at once", function()
+ local app = open({ chat("q", "working", "t1"), chat("f", "working", "t1") })
+ publish(app, { chat("q", "input", "t1"), chat("f", "working", "t1") })
+ expect(table.concat(played(app), ",")).to_be("request")
+ publish(app, { chat("q", "input", "t1"), chat("f", "failed", "t1") })
+ expect(table.concat(played(app), ",")).to_be("request,attention")
+end)
+
+test("chimes: Task completed off keeps done quiet, the rest still ring", function()
+ local app = open({ chat("a", "working", "t1") })
+ app:set_state("settings_sound_done", false)
+ publish(app, { chat("a", "done", "t2") })
+ settle(app)
+ expect(#played(app)).to_be(0)
+ publish(app, { chat("a", "input", "t2") })
+ expect(table.concat(played(app), ",")).to_be("request")
+end)
diff --git a/apps/zgx/ui/tests/cloud_machine.test.luau b/apps/zgx/ui/tests/cloud_machine.test.luau
index 17dd759b6..94eaa3bf2 100644
--- a/apps/zgx/ui/tests/cloud_machine.test.luau
+++ b/apps/zgx/ui/tests/cloud_machine.test.luau
@@ -1535,6 +1535,25 @@ test("a size the edge refuses goes back, and says so", function()
expect(app:has(`{PAGE} >> ~"Couldn't change the default machine."`)).to_be(true)
end)
+test("what new chats reach is the person's pick in Settings → Cloud, and sticks", function()
+ local app = settings()
+ local select = `{PAGE} >> role:button "New chats reach"`
+ expect(app:has(select)).to_be(true)
+ expect(app:has(`{PAGE} >> ~"Works with your other devices"`)).to_be(true)
+ app:click(select)
+ app:frames(20)
+ app:click('role:menuitem "Isolated"')
+ app:frames(30)
+ expect(asked(app, "cloud.set_reach:isolated")).to_be(true)
+ expect(app:has(`{PAGE} >> ~"Only its own machine"`)).to_be(true)
+ expect(app:error()).to_be(nil)
+end)
+
+test("an old edge says nothing of reach, and shows no choice of it", function()
+ local app = settings(true)
+ expect(showing(app, `{PAGE} >> role:button "New chats reach"`)).to_be(false)
+end)
+
test("an old edge offers no choice, and no section", function()
local app = settings(true)
expect(showing(app, `{PAGE} >> role:radiogroup "Default machine"`)).to_be(false)
diff --git a/apps/zgx/ui/tests/composer_focus.test.luau b/apps/zgx/ui/tests/composer_focus.test.luau
index f0704ea2b..f8e90c6d1 100644
--- a/apps/zgx/ui/tests/composer_focus.test.luau
+++ b/apps/zgx/ui/tests/composer_focus.test.luau
@@ -185,3 +185,35 @@ test("a rename's field opened on another chat keeps the keys", function()
app:frames(60)
expect(has_keys(app)).to_be(false)
end)
+
+-- ⌘N and a key typed straight after it, before any frame: in ⌘N's own
+-- handling the new chat's composer has the keys and its draft is the new
+-- chat's (empty), so the key is the new chat's; the chat left keeps its draft
+-- as it was. Whether the composer had the keys before ⌘N or not.
+test("a key typed straight after ⌘N goes to the new chat, never the one left", function()
+ for _, had_keys in { true, false } do
+ local app = shell()
+ app:type(BOX, "Left as it was")
+ settle(app)
+ if not had_keys then
+ away(app)
+ end
+ app:command("shell.new_chat")
+ -- (No frame yet, no timer run: what ⌘N's handling did, alone.)
+ expect(`{had_keys}: {has_keys(app)}`).to_be(`{had_keys}: true`)
+ expect(`{had_keys}: {app:text(BOX)}`).to_be(`{had_keys}: `)
+ expect(app:state("shell_route_path")).never.to_contain("/session/")
+ app:type(BOX, "xy")
+ settle(app)
+ expect(`{had_keys}: {app:text(BOX)}`).to_be(`{had_keys}: xy`)
+ app:click(`{SIDE} >> role:button "Fix the build"`)
+ settle(app)
+ expect(`{had_keys}: {app:text(BOX)}`).to_be(`{had_keys}: Left as it was`)
+ app:command("shell.new_chat")
+ settle(app)
+ expect(`{had_keys}: {app:text(BOX)}`).to_be(`{had_keys}: xy`)
+ -- (A new chat's draft is kept across launches: emptied for the next.)
+ app:fill(BOX, "")
+ settle(app)
+ end
+end)
diff --git a/apps/zgx/ui/tests/composer_place.test.luau b/apps/zgx/ui/tests/composer_place.test.luau
index 8aa35a243..ced576b23 100644
--- a/apps/zgx/ui/tests/composer_place.test.luau
+++ b/apps/zgx/ui/tests/composer_place.test.luau
@@ -346,3 +346,100 @@ test("composer place: hover submenus close after leaving the row and panel", fun
expect(showing(app, '"Search branches…"')).to_be(true)
expect(app:error()).to_be(nil)
end)
+
+test("composer place: on Cloud, what its machine reaches stands in the checkout's place", function()
+ local app = mounted()
+ app:set_state("test_place_devices", {
+ { value = "fedora", label = "fedora", you = true },
+ { value = "cloud", label = "Cloud", cloud = true },
+ })
+ app:set_state("test_place_device", "fedora")
+ settle(app)
+ app:click('role:button "Branch"')
+ settle(app)
+ -- On a computer: a checkout, nothing of reach.
+ expect(app:has('role:menuitem "Checkout"')).to_be(true)
+ expect(app:has('role:menuitem "Reaches"')).to_be(false)
+ -- On Cloud: its machine's reach instead, the account's default shown.
+ app:set_state("test_place_device", "cloud")
+ settle(app)
+ expect(showing(app, 'role:menuitem "Checkout"')).to_be(false)
+ expect(showing(app, 'role:menuitem "Reaches"')).to_be(true)
+ expect(app:has('"All devices"')).to_be(true)
+ expect(app:has("#composer-place-lead >> .place-lead-cloud")).to_be(true)
+ -- Picked: the new chat's own.
+ app:hover('role:menuitem "Reaches"')
+ expect(app:has('"Only its own machine and the chats it starts."')).to_be(true)
+ app:click('role:option "Isolated Only its own machine and the chats it starts."')
+ settle(app)
+ expect(app:state("test_place_reach")).to_be("isolated")
+ expect(app:error()).to_be(nil)
+end)
+
+test("composer place: a new Cloud chat shows the account's default reach until one is picked", function()
+ local app = mounted()
+ app:set_state("test_place_devices", { { value = "cloud", label = "Cloud", cloud = true } })
+ app:set_state("test_place_device", "cloud")
+ app:set_state("test_place_reach_default", "isolated")
+ settle(app)
+ app:click('role:button "Branch"')
+ settle(app)
+ expect(showing(app, 'role:menuitem "Reaches"')).to_be(true)
+ expect(app:has('"Isolated"')).to_be(true)
+ expect(app:state("test_place_reach")).to_be(nil)
+ expect(app:error()).to_be(nil)
+end)
+
+test("composer place: an existing chat's chip opens where it works, with nothing to change", function()
+ local app = mounted()
+ app:set_state("test_place_fixed", { device = "Mac", name = "main", worktree = true, project = "zeron", hue = "violet" })
+ rested(app)
+ expect(app:has("#composer-place-lead >> .place-lead-worktree")).to_be(true)
+ app:click('role:button "Branch main"')
+ settle(app)
+ expect(app:has('"Work in"')).to_be(true)
+ expect(app:has('role:menuitem "Device"')).to_be(true)
+ expect(app:has('role:menuitem "Project"')).to_be(true)
+ expect(app:has('role:menuitem "Checkout"')).to_be(true)
+ -- Its rows open nothing: a chat can't move.
+ app:hover('role:menuitem "Device"')
+ app:click('role:menuitem "Device"')
+ settle(app)
+ expect(app:has('"Search devices…"')).to_be(false)
+ app:hover('role:menuitem "Project"')
+ expect(app:has('"Search projects…"')).to_be(false)
+ -- And no branches to pick, nor a reach off Cloud.
+ expect(app:has('"Search branches…"')).to_be(false)
+ expect(app:has('role:menuitem "Reaches"')).to_be(false)
+ expect(app:error()).to_be(nil)
+end)
+
+test("composer place: an existing Cloud chat leads with Cloud's glyph, and its reach can change", function()
+ local app = mounted()
+ app:set_state("test_place_fixed", { device = "Cloud", name = "main", worktree = false, project = "zeron", cloud = true, reach = "devices" })
+ rested(app)
+ expect(app:has("#composer-place-lead >> .place-lead-cloud")).to_be(true)
+ app:click('role:button "Branch main"')
+ settle(app)
+ expect(app:has('role:menuitem "Checkout"')).to_be(false)
+ expect(showing(app, 'role:menuitem "Reaches"')).to_be(true)
+ expect(app:has('"All devices"')).to_be(true)
+ app:hover('role:menuitem "Reaches"')
+ app:click('role:option "Isolated Only its own machine and the chats it starts."')
+ settle(app)
+ expect(app:state("test_place_reach_picked")).to_be("isolated")
+ expect(app:error()).to_be(nil)
+end)
+
+test("composer place: an edge that can't keep a reach offers no choice of it", function()
+ local app = mounted()
+ app:set_state("test_place_devices", { { value = "cloud", label = "Cloud", cloud = true } })
+ app:set_state("test_place_device", "cloud")
+ app:set_state("test_place_reach_default", nil)
+ settle(app)
+ app:click('role:button "Branch"')
+ settle(app)
+ expect(app:has('role:menuitem "Device"')).to_be(true)
+ expect(showing(app, 'role:menuitem "Reaches"')).to_be(false)
+ expect(app:error()).to_be(nil)
+end)
diff --git a/apps/zgx/ui/tests/keep_running.test.luau b/apps/zgx/ui/tests/keep_running.test.luau
new file mode 100644
index 000000000..ff703efed
--- /dev/null
+++ b/apps/zgx/ui/tests/keep_running.test.luau
@@ -0,0 +1,50 @@
+-- Settings → General → "Keep Zeron running after you quit": the engine's
+-- own setting (crates/engine/src/keep_running.rs), on until turned off; a
+-- flip goes to the engine and the row says what quitting does now. The
+-- question asked on quitting with work running is the host's
+-- (src/quit_prompt.rs), in the app's words: handed over as the language
+-- changes. On the shell in ui/shell_fixture.luau.
+
+local PAGE = "#settings-page"
+local LABEL = "Keep Zeron running after you quit"
+
+local function shows(app: any, scope: string, text: string): boolean
+ return app:tree(scope):find(text, 1, true) ~= nil
+end
+
+local function asked(app: any, entry: string): boolean
+ for _, c in (app:state("settings_stub_calls") :: any) or {} do
+ if c == entry then
+ return true
+ end
+ end
+ return false
+end
+
+local function open(): any
+ local app = mount("shell_fixture.luau")
+ app:resize(1200, 900)
+ app:frames(30)
+ app:command("settings_stub.sign_in")
+ app:command("shell.settings")
+ app:frames(20)
+ return app
+end
+
+test("on until turned off, and the row says what quitting does", function()
+ local app = open()
+ local switch = `{PAGE} >> role:switch "{LABEL}"`
+ expect(asked(app, "settings.engine:GetBackgroundSettings")).to_be(true)
+ expect(app:tree(switch)).never.to_contain("unchecked")
+ expect(shows(app, PAGE, "Chats keep working, and other devices can reach them.")).to_be(true)
+ app:click(switch)
+ app:frames(10)
+ expect(asked(app, "settings.engine:SetBackgroundSettings")).to_be(true)
+ expect(app:tree(switch)).to_contain("unchecked")
+ expect(shows(app, PAGE, "When you quit, Zeron stops once its chats are done.")).to_be(true)
+ -- Refused: it goes back as it was.
+ app:command("settings_stub.refuse_next")
+ app:click(switch)
+ app:frames(10)
+ expect(app:tree(switch)).to_contain("unchecked")
+end)
diff --git a/apps/zgx/ui/tests/launch_keys.test.luau b/apps/zgx/ui/tests/launch_keys.test.luau
new file mode 100644
index 000000000..629c1224e
--- /dev/null
+++ b/apps/zgx/ui/tests/launch_keys.test.luau
@@ -0,0 +1,48 @@
+-- A launch gives the composer the keys: what's typed as the window opens
+-- goes into it, with no click first, whether the window opens on a new chat
+-- or on the session it was left on. (ademark's A1 types from the launch and
+-- reads the composer; with the keys nowhere, every run timed out.) On the
+-- shell in ui/shell_fixture.luau; a second `mount` is the next launch.
+
+local BOX = 'role:textbox "Message"'
+local SIDE = "#shell-sidebar"
+
+local function focused(app: any): string
+ for line in app:tree():gmatch("[^\n]+") do
+ if line:find(" focused", 1, true) then
+ return line
+ end
+ end
+ return ""
+end
+
+local function has_keys(app: any): boolean
+ return focused(app):find('textbox "Message"', 1, true) ~= nil
+end
+
+local function launch(): any
+ local app = mount("shell_fixture.luau")
+ app:resize(1600, 1000)
+ return app
+end
+
+test("a launch on a new chat: the composer has the keys from the first frame", function()
+ local app = launch()
+ app:frames(1)
+ expect(has_keys(app)).to_be(true)
+ app:frames(30)
+ expect(has_keys(app)).to_be(true)
+end)
+
+test("a launch on the session it was left on: its composer has the keys", function()
+ local first = launch()
+ first:frames(30)
+ first:click(`{SIDE} >> role:button "Fix the build"`)
+ first:frames(30)
+ local app = launch()
+ app:frames(1)
+ expect(app:tree()).to_contain("Fix the build")
+ expect(has_keys(app)).to_be(true)
+ app:frames(30)
+ expect(has_keys(app)).to_be(true)
+end)
diff --git a/apps/zgx/ui/tests/markdown_edit.test.luau b/apps/zgx/ui/tests/markdown_edit.test.luau
new file mode 100644
index 000000000..f6a8aee05
--- /dev/null
+++ b/apps/zgx/ui/tests/markdown_edit.test.luau
@@ -0,0 +1,33 @@
+-- The composer's markdown typing (ds/markdown_edit): what a line break does
+-- in a list item. Run with `zgx test ui`.
+
+local markdown = require("@ds/markdown_edit")
+
+test("a break in a list item continues it, however long the draft above", function()
+ local head = string.rep("a line of the draft before it\n", 3000)
+ local text = head .. "- one"
+ local from, to, put = markdown.newline(text, #text, #text)
+ expect(from).to_be(#text)
+ expect(to).to_be(#text)
+ expect(put).to_be("\n- ")
+ -- An empty item: undone, its marker gone.
+ local empty = text .. "\n- "
+ local f, t, p = markdown.newline(empty, #empty, #empty)
+ expect(f).to_be(#text + 1)
+ expect(t).to_be(#empty)
+ expect(p).to_be("")
+ -- A plain line, or a selection: a plain break.
+ expect(markdown.newline(head .. "plain", #head + 5, #head + 5)).to_be(nil)
+ expect(markdown.newline(text, #text - 1, #text)).to_be(nil)
+end)
+
+test("a break in a fenced block is plain, and the list goes on after it", function()
+ local head = string.rep("a line of the draft before it\n", 3000)
+ local fenced = head .. " ```lua\n- one"
+ expect(markdown.newline(fenced, #fenced, #fenced)).to_be(nil)
+ local tilde = head .. "~~~\n- one"
+ expect(markdown.newline(tilde, #tilde, #tilde)).to_be(nil)
+ local closed = fenced .. "\nnot a ``` fence\n```\n- two"
+ local _, _, put = markdown.newline(closed, #closed, #closed)
+ expect(put).to_be("\n- ")
+end)
diff --git a/apps/zgx/ui/tests/mention_launcher.test.luau b/apps/zgx/ui/tests/mention_launcher.test.luau
index d829033dc..a33222516 100644
--- a/apps/zgx/ui/tests/mention_launcher.test.luau
+++ b/apps/zgx/ui/tests/mention_launcher.test.luau
@@ -111,6 +111,23 @@ test("Tab and Shift+Tab go through the scopes, each listing its own kind; the ar
expect(app:text(BOX)).to_contain("@photo.heic")
end)
+test("an `@` before what's written, the caret back past it, lists the other chats too; a draft with none lists them once one is typed", function()
+ local app = chat()
+ -- (The caret put back just past an `@` at its start.)
+ app:fill(BOX, "@ please look")
+ settle(app)
+ app:key("cmd+ArrowUp")
+ app:key("ArrowRight")
+ settle(app)
+ expect(rows(app)).to_contain("# Chats")
+ expect(rows(app)).to_contain("Long chat")
+ app:fill(BOX, "")
+ settle(app)
+ app:type(BOX, "see @")
+ settle(app)
+ expect(rows(app)).to_contain("Long chat")
+end)
+
test("what's typed narrows every section at once", function()
local app = chat()
app:command("drop_pictures")
diff --git a/apps/zgx/ui/tests/mention_sessions.test.luau b/apps/zgx/ui/tests/mention_sessions.test.luau
index 0a3f464fd..bfda72342 100644
--- a/apps/zgx/ui/tests/mention_sessions.test.luau
+++ b/apps/zgx/ui/tests/mention_sessions.test.luau
@@ -255,3 +255,25 @@ test("the lit row follows the list as it narrows, and the arrows move it", funct
settle(app)
expect(takes()).to_be("/review ")
end)
+
+-- A closed code block longer than the composer's first look around the
+-- caret (ds/draft_text, 1 KB each way): that look sees only its closing
+-- fence, which read as one still open. Every trigger after it opens its
+-- list; one inside a block still open never does.
+test("after a closed code block over 1 KB long, each trigger opens its list", function()
+ local app = chat()
+ local code = string.rep("let value = compute(input);\n", 60)
+ expect(#code > 1024).to_be(true)
+ -- (Filled, trigger and all, so the caret is at its end: typing clicks
+ -- the box first, mid-draft in one this tall.)
+ for _, t in TRIGGERS do
+ fresh(app, "Look at this:\n```rust\n" .. code .. "```\n" .. t.trigger)
+ expect(`{t.trigger} after a closed block: {shown(app)}`).to_be(`{t.trigger} after a closed block: true`)
+ -- (Closed, so it covers no part of the box.)
+ app:key("Escape")
+ settle(app)
+ -- Still inside one: nothing.
+ fresh(app, "Look at this:\n```rust\n" .. code .. t.trigger)
+ expect(`{t.trigger} inside an open block: {shown(app)}`).to_be(`{t.trigger} inside an open block: false`)
+ end
+end)
diff --git a/apps/zgx/ui/tests/mentions.test.luau b/apps/zgx/ui/tests/mentions.test.luau
index 4a044737c..885592a0d 100644
--- a/apps/zgx/ui/tests/mentions.test.luau
+++ b/apps/zgx/ui/tests/mentions.test.luau
@@ -68,6 +68,26 @@ test("commands and skills replace to their end too", function()
expect(mentions.token("costs $12", 7)).to_be_nil()
end)
+test("a token on a draft's later line, and none in a fence, however long the draft", function()
+ local head = string.rep("a line of the draft before it\n", 3000)
+ local text = head .. "Compare @queue.rs with"
+ local t = mentions.token(text, #head + 12)
+ assert(t, "no token at the caret")
+ expect(t.query).to_be("que")
+ expect(t.from).to_be(#head + 8)
+ expect(t.to).to_be(#head + 17)
+ expect(picked(text, #head + 12, MESSAGE_QUEUE)).to_be(head .. "Compare @message_queue.rs with")
+ -- A fence opened (after blanks): nothing in it; closed, a token again.
+ local fence = head .. " ```lua\n@queue"
+ expect(mentions.token(fence, #fence)).to_be_nil()
+ local closed = fence .. "\nnot a ``` fence\n```\n/com"
+ local c = mentions.token(closed, #closed)
+ assert(c, "no command after the fence")
+ expect(c.trigger).to_be("/")
+ expect(c.query).to_be("com")
+ expect(c.from).to_be(#closed - 4)
+end)
+
test("a file is named by the shortest end of its path that is its own", function()
expect(mentions.short(FILES, FILES[1])).to_be("queue.rs")
expect(mentions.short(FILES, FILES[2])).to_be("message_queue.rs")
diff --git a/apps/zgx/ui/tests/model_accounts.test.luau b/apps/zgx/ui/tests/model_accounts.test.luau
index 3ea1abea1..a79be2447 100644
--- a/apps/zgx/ui/tests/model_accounts.test.luau
+++ b/apps/zgx/ui/tests/model_accounts.test.luau
@@ -91,6 +91,33 @@ test("a chat on another computer reads that computer's accounts", function()
expect(app:state("calls")).to_contain("switch_on:box:claude-code:b2")
end)
+-- A chat on a Cloud machine: its accounts are Cloud's, the vault's (as
+-- Settings → Providers shows them under Cloud), never the machine's own,
+-- which isn't asked (it would be woken).
+test("a chat on a Cloud machine reads and switches Cloud's accounts", function()
+ local app = with_accounts({
+ [""] = { ["claude-code"] = accounts() },
+ cloud = {
+ ["claude-code"] = {
+ { id = "v1", email = "team@example.test", plan = "Max", active = true, can_switch = true, windows = { window("Week", 0.4) } },
+ { id = "v2", email = "spare@example.test", plan = "Pro", active = false, can_switch = true, windows = {} },
+ },
+ },
+ })
+ app:set_state("chat_device", "cloud-f60cde46")
+ app:frames(10)
+ expect(app:state("calls")).to_contain("watch_device:cloud")
+ expect(string.find(app:state("calls"), "watch_device:cloud-f60cde46", 1, true)).to_be(nil)
+ app:click('role:button "Model"')
+ app:frames(30)
+ expect(app:tree("#model-picker-account")).to_contain("team@example.test")
+ app:click("#model-picker-account")
+ app:frames(30)
+ app:click('~"spare@example.test"')
+ app:frames(30)
+ expect(app:state("calls")).to_contain("switch_on:cloud:claude-code:v2")
+end)
+
test("a computer whose accounts haven't come has neither, and is asked", function()
local app = with_accounts(here(accounts()))
app:set_state("chat_device", "somewhere-else")
diff --git a/apps/zgx/ui/tests/new_chat_remembers.test.luau b/apps/zgx/ui/tests/new_chat_remembers.test.luau
index 634623179..612f9937b 100644
--- a/apps/zgx/ui/tests/new_chat_remembers.test.luau
+++ b/apps/zgx/ui/tests/new_chat_remembers.test.luau
@@ -91,7 +91,8 @@ test("a chat made from the new page leaves the new page's settings as they were"
app:type('role:textbox "Message"', "Start something")
app:key("Enter")
settle(app)
- expect(app:state("calls")).to_contain("send:new1:Start something")
+ -- (Made under its own new id: the one its agent started early for.)
+ expect(string.find(app:state("calls"), "send:[%w%-]+:Start something") ~= nil).to_be(true)
-- The chat made: picked differently in it, and another chat seen.
app:set_state("chat_model", "opus")
app:set_state("chat_access", "full")
@@ -153,3 +154,39 @@ test("the new page's settings, draft and what it carries survive a relaunch", fu
expect(app:text('role:textbox "Message"')).to_be("Half a thought")
expect(#(app:state("chat.composer.cargo") or {})).to_be(cargo)
end)
+
+-- The page's draft is saved at most every 250 ms (screens/chat/shared):
+-- what was typed since the last save waits on a timer, which never fires
+-- once the window has closed. Closing (quitting, or the window closed),
+-- Zeron's window sets `app.closing` (src/main.rs) before it writes what was
+-- saved: the waiting save goes then, the last keystrokes with it.
+local function saved_text(app: any): string?
+ local saved = app:state("chat_new_draft")
+ return if type(saved) == "table" then saved.text else nil
+end
+
+test("the new page's last keystrokes are saved as the window closes", function()
+ local app = open()
+ app:fill('role:textbox "Message"', "Half")
+ settle(app)
+ expect(saved_text(app)).to_be("Half")
+ -- Typed on at once: its save waits its turn.
+ app:fill('role:textbox "Message"', "Half a thought")
+ expect(saved_text(app)).to_be("Half")
+ app:set_state("app.closing", true)
+ expect(saved_text(app)).to_be("Half a thought")
+end)
+
+test("a message sent from the new page is no longer its saved draft, at once", function()
+ local app = open()
+ app:fill('role:textbox "Message"', "Start something")
+ settle(app)
+ expect(saved_text(app)).to_be("Start something")
+ app:key("Enter")
+ -- (Before the throttle's next turn: a quit now keeps what's saved.)
+ expect(saved_text(app)).to_be_nil()
+ settle(app)
+ -- (Made under its own new id: the one its agent started early for.)
+ expect(string.find(app:state("calls"), "send:[%w%-]+:Start something") ~= nil).to_be(true)
+ expect(saved_text(app)).to_be_nil()
+end)
diff --git a/apps/zgx/ui/tests/panel_shell.test.luau b/apps/zgx/ui/tests/panel_shell.test.luau
index 8320afd38..12a326fa8 100644
--- a/apps/zgx/ui/tests/panel_shell.test.luau
+++ b/apps/zgx/ui/tests/panel_shell.test.luau
@@ -179,6 +179,38 @@ test("a closed panel leaves nothing to Tab to: its tabs and choices come back as
expect(tab_reaches_panel(app, 60)).to_be(false)
end)
+-- Whether the window holds the panel's home at all, shown or hidden.
+local function home_made(app: any): boolean
+ return app:tree("#shell", { all = true }):find("#panel-home-block", 1, true) ~= nil
+end
+
+test("a shut panel makes no home for the chats switched to; opened, its home is there at once", function()
+ local app = mount("shell_fixture.luau")
+ app:resize(1200, 800)
+ app:frames(30)
+ show_chat(app, "Fix the build")
+ expect(panel_open(app, "a1")).to_be(false)
+ expect(eventually(app, function(): boolean
+ app:frames(5)
+ return panel_width(app) == 0
+ end)).to_be(true)
+ -- (Each chat switched to would otherwise make a home nobody sees.)
+ expect(home_made(app)).to_be(false)
+ show_chat(app, "Write the docs")
+ expect(home_made(app)).to_be(false)
+ -- Opened: its home, in the frame the panel opens in.
+ app:click('#titlebar >> role:button "Panel"')
+ app:frames(1)
+ expect(home_made(app)).to_be(true)
+ expect(app:wait("#panel-empty", { timeout_ms = 15000 })).to_be(true)
+ -- Shut again, once it has eased shut: let go of.
+ app:click('#titlebar >> role:button "Panel"')
+ expect(eventually(app, function(): boolean
+ app:frames(5)
+ return panel_width(app) == 0 and not home_made(app)
+ end)).to_be(true)
+end)
+
test("closing a chat's last tab, the panel shuts on what it showed: no frame of its home", function()
local app = mount("shell_fixture.luau")
app:resize(1200, 800)
diff --git a/apps/zgx/ui/tests/plugin_compose_replace.test.luau b/apps/zgx/ui/tests/plugin_compose_replace.test.luau
new file mode 100644
index 000000000..e91e12e8a
--- /dev/null
+++ b/apps/zgx/ui/tests/plugin_compose_replace.test.luau
@@ -0,0 +1,54 @@
+-- What a plugin allowed "compose" puts in a chat's draft
+-- (`zeron.compose(text, opts)`, handed on by screens/plugins as the host
+-- asks it): after what's there, or in place of its words with its chips
+-- kept (`replace`), in the chat shown or another (`session`), never sent.
+-- On the shell in ui/shell_fixture.luau, the host's asks made here.
+
+local seq = 0
+local function ask(app: any, value: any)
+ seq += 1
+ app:set_state("plugins.request", { { seq = 1000 + seq, kind = "compose", title = "", value = value } })
+ app:frames(10)
+end
+
+local function open(): any
+ seq = 0
+ local app = mount("shell_fixture.luau")
+ app:resize(1400, 800)
+ app:set_state("shell_fixture.plugins", true)
+ app:frames(30)
+ app:click('#shell-sidebar >> role:button "Fix the build"')
+ app:frames(30)
+ return app
+end
+
+local BOX = "#chat-composer >> role:textbox"
+
+test("a plugin's words replace the draft's, or follow them on a line of their own", function()
+ local app = open()
+ app:type(BOX, "fix teh bulid pls")
+ app:frames(5)
+ ask(app, { text = "Please fix the build.", replace = true })
+ expect(app:text(BOX)).to_be("Please fix the build.")
+ ask(app, { text = "It fails on main." })
+ expect(app:text(BOX)).to_be("Please fix the build.\nIt fails on main.")
+ -- Words alone, as ever: after what's there.
+ ask(app, "Thanks.")
+ expect(app:text(BOX)).to_be("Please fix the build.\nIt fails on main.\nThanks.")
+ -- Nothing sent.
+ expect(app:state("calls")).never.to_contain("send:a1")
+end)
+
+test("a plugin's words go in another chat's draft, which shows them when it's opened", function()
+ local app = open()
+ app:type(BOX, "here, untouched")
+ app:frames(5)
+ ask(app, { text = "for the docs", replace = true, session = "a2" })
+ expect(app:text(BOX)).to_be("here, untouched")
+ app:click('#shell-sidebar >> role:button "Write the docs"')
+ app:frames(30)
+ expect(app:text(BOX)).to_be("for the docs")
+ app:click('#shell-sidebar >> role:button "Fix the build"')
+ app:frames(30)
+ expect(app:text(BOX)).to_be("here, untouched")
+end)
diff --git a/apps/zgx/ui/tests/plugin_draft_read.test.luau b/apps/zgx/ui/tests/plugin_draft_read.test.luau
new file mode 100644
index 000000000..76e9bc044
--- /dev/null
+++ b/apps/zgx/ui/tests/plugin_draft_read.test.luau
@@ -0,0 +1,49 @@
+-- The composer's draft as plugins read it (`zeron.draft`, "draft"): written
+-- only while a plugin that's on may read it, so with none no key typed
+-- copies the draft for no one; with one, it follows what's typed, its chat
+-- and its chips by kind and name. On the shell in ui/shell_fixture.luau.
+
+local function open(): any
+ local app = mount("shell_fixture.luau")
+ app:resize(1400, 800)
+ app:set_state("shell_fixture.plugins", true)
+ app:frames(30)
+ app:click('#shell-sidebar >> role:button "Fix the build"')
+ app:frames(30)
+ return app
+end
+
+local function with_plugin(app: any, status: string)
+ app:set_state("plugins", {
+ state = "ready",
+ list = { { id = "stash", name = "Stash", status = status, permissions = { "ui.add", "draft" }, allowed = { "ui.add", "draft" } } },
+ })
+ app:frames(5)
+end
+
+test("with no plugin that reads the draft, typing publishes nothing", function()
+ local app = open()
+ app:type("#chat-composer >> role:textbox", "a private thought")
+ app:frames(5)
+ expect(app:state("zeron.draft")).to_be_nil()
+ -- One that's off reads nothing either.
+ with_plugin(app, "off")
+ app:type("#chat-composer >> role:textbox", "still private")
+ app:frames(5)
+ expect(app:state("zeron.draft")).to_be_nil()
+end)
+
+test("with a plugin on that reads the draft, it follows what's typed, and goes with the plugin", function()
+ local app = open()
+ with_plugin(app, "on")
+ app:type("#chat-composer >> role:textbox", "first words")
+ app:frames(5)
+ local d = app:state("zeron.draft")
+ expect(d).never.to_be_nil()
+ expect(d.text).to_be("first words")
+ expect(type(d.session)).to_be("string")
+ expect(#d.attachments).to_be(0)
+ -- Turned off: nothing kept out for it.
+ with_plugin(app, "off")
+ expect(app:state("zeron.draft")).to_be_nil()
+end)
diff --git a/apps/zgx/ui/tests/providers_cloud.test.luau b/apps/zgx/ui/tests/providers_cloud.test.luau
new file mode 100644
index 000000000..b6b696335
--- /dev/null
+++ b/apps/zgx/ui/tests/providers_cloud.test.luau
@@ -0,0 +1,77 @@
+-- Settings → Providers offers Cloud as one more choice after the computers,
+-- while Cloud is on: its agents' accounts (the vault's, every Cloud machine
+-- uses them), with no switch, no settings and nothing to install, and API
+-- keys to save for it. Without Cloud, no such choice. On the shell in
+-- ui/shell_fixture.luau, Cloud from ui/cloud_stub.luau.
+
+local PAGE = "#settings-page"
+local NAV = "#settings-nav"
+
+local function shows(app: any, scope: string, text: string): boolean
+ return app:tree(scope):find(text, 1, true) ~= nil
+end
+
+local function asked(app: any, entry: string): boolean
+ for _, c in (app:state("settings_stub_calls") :: any) or {} do
+ if c == entry then
+ return true
+ end
+ end
+ return false
+end
+
+local function open(with_cloud: boolean): any
+ local app = mount("shell_fixture.luau")
+ app:resize(1200, 900)
+ app:frames(30)
+ app:command("settings_stub.sign_in")
+ if with_cloud then
+ app:command("cloud_stub.offer")
+ end
+ app:command("shell.settings")
+ app:frames(20)
+ app:click(`{NAV} >> role:tab "Providers"`)
+ app:frames(30)
+ return app
+end
+
+test("with Cloud on, Providers offers Cloud: its agents' accounts, no switch or settings, and its API keys", function()
+ local app = open(true)
+ app:click(`{PAGE} >> role:button "Device"`)
+ app:frames(10)
+ expect(app:has('role:menuitem "Cloud"')).to_be(true)
+ app:click('role:menuitem "Cloud"')
+ app:frames(30)
+ expect(asked(app, "agents.target:cloud")).to_be(true)
+ expect(shows(app, PAGE, "Claude Code")).to_be(true)
+ expect(shows(app, PAGE, "Codex")).to_be(true)
+ expect(shows(app, PAGE, "ada@example.com")).to_be(true)
+ -- Nothing to switch, set or install: its accounts alone.
+ expect(app:has(`{PAGE} >> role:switch "Codex on"`)).to_be(false)
+ expect(app:has(`{PAGE} >> role:button "Codex settings"`)).to_be(false)
+ expect(shows(app, PAGE, "Add another agent")).to_be(false)
+ -- Its API keys, saved for Cloud.
+ expect(shows(app, PAGE, "Anthropic API key")).to_be(true)
+ expect(shows(app, PAGE, "OpenAI API key")).to_be(true)
+ app:type(`{PAGE} >> role:textbox "OpenAI API key"`, "sk-test-123")
+ app:frames(5)
+ app:click(`{PAGE} >> role:button "Save" [2]`)
+ app:frames(10)
+ expect(asked(app, "agents.cloud_key")).to_be(true)
+ expect(app:error()).to_be_nil()
+ -- Back to this computer: its agents as they were, with their switches.
+ app:click(`{PAGE} >> role:button "Device"`)
+ app:frames(10)
+ app:click('role:menuitem "MacBook Pro"')
+ app:frames(30)
+ expect(asked(app, "agents.target:")).to_be(true)
+ expect(app:has(`{PAGE} >> role:switch "Claude Code on"`)).to_be(true)
+ expect(shows(app, PAGE, "Anthropic API key")).to_be(false)
+end)
+
+test("without Cloud, Providers offers no Cloud", function()
+ local app = open(false)
+ app:click(`{PAGE} >> role:button "Device"`)
+ app:frames(10)
+ expect(app:has('role:menuitem "Cloud"')).to_be(false)
+end)
diff --git a/apps/zgx/ui/tests/sidebar_motion.test.luau b/apps/zgx/ui/tests/sidebar_motion.test.luau
index 663047cbf..f6cfa44b1 100644
--- a/apps/zgx/ui/tests/sidebar_motion.test.luau
+++ b/apps/zgx/ui/tests/sidebar_motion.test.luau
@@ -97,6 +97,27 @@ test("with motion reduced, a group going first is there at once", function()
expect(landed < top(app, "Atlas")).to_be(true)
end)
+test("folded away, a group going first is there at once: opened, it's where it ends, ⌘1–9 following meanwhile", function()
+ local app = open()
+ local before = (app:state("shell_sidebar_order") :: any)[1]
+ app:click('#titlebar >> role:button "Toggle sidebar"')
+ app:frames(60)
+ expect(app:state("shell_collapsed")).to_be(true)
+ app:command("borealis_moves")
+ app:frames(2)
+ -- (⌘1–9 and the next session read its order: it follows while away.)
+ local first = (app:state("shell_sidebar_order") :: any)[1]
+ expect(first).never.to_be(before)
+ app:click('#titlebar >> role:button "Toggle sidebar"')
+ app:frames(1)
+ -- Nothing glides as it comes back: every row is where it lands.
+ local landed, atlas = top(app, "Borealis"), top(app, "Atlas")
+ app:frames(40)
+ expect(top(app, "Borealis")).to_be(landed)
+ expect(top(app, "Atlas")).to_be(atlas)
+ expect(landed < atlas).to_be(true)
+end)
+
-- A row's y through `n` frames (one a frame), as `act` folds or opens.
local function track(app: any, scope: string, label: string, act: () -> (), n: number): { number }
act()
diff --git a/apps/zgx/ui/tests/time_ago.test.luau b/apps/zgx/ui/tests/time_ago.test.luau
index 4e11731e1..875e15b03 100644
--- a/apps/zgx/ui/tests/time_ago.test.luau
+++ b/apps/zgx/ui/tests/time_ago.test.luau
@@ -25,3 +25,34 @@ test("a row's time moves on as the clock does, with nothing else changing", func
expect(after:find('text "1h"', 1, true) == nil).to_be(true)
expect(app:error()).to_be_nil()
end)
+
+local DUE = "ds/status.luau::ds_status_clock_due"
+
+test("the clock moves as a corner would read otherwise, and no sooner", function()
+ local app = mount("shell_fixture.luau")
+ app:resize(1200, 900)
+ app:frames(30)
+ -- The newest corner reads "1h" ("Write the docs"): it reads "2h" within
+ -- the hour, and nothing changes before (once, every half minute).
+ local due = app:state(DUE)
+ expect(type(due)).to_be("number")
+ expect(due > os.time() + 30).to_be(true)
+ expect(due <= os.time() + 3600 + 30).to_be(true)
+end)
+
+test("corners hours old don't move the clock for most of an hour", function()
+ local app = mount("shell_fixture.luau")
+ app:resize(1200, 900)
+ app:frames(30)
+ -- Two hours on: every corner reads hours, the next a whole hour away
+ -- (once, it moved every half minute, to find nothing changed).
+ -- (As the clock's own tick moves it: what was due is done.)
+ local at = os.time() + 2 * 3600
+ app:set_state(DUE, math.huge)
+ app:set_state(CLOCK, at)
+ app:frames(5)
+ expect(corner(app)).to_contain('text "3h"')
+ local due = app:state(DUE)
+ expect(due - at >= 30 * 60).to_be(true)
+ expect(app:error()).to_be_nil()
+end)
diff --git a/apps/zgx/ui/tests/transcript_scroll_away.test.luau b/apps/zgx/ui/tests/transcript_scroll_away.test.luau
new file mode 100644
index 000000000..a4dddd99a
--- /dev/null
+++ b/apps/zgx/ui/tests/transcript_scroll_away.test.luau
@@ -0,0 +1,84 @@
+-- Scrolled away from the end, the view stays where the person took it: it
+-- isn't pulled back to the end. (Nov 14: "scrolling gets stuck to the
+-- bottom; scroll away and it scrolls you back down".) Two ways it was:
+-- - a scroll during a send's glide (the prompt rising to the view's top, or
+-- a steer's waiting to land): the glide went on to the end over it;
+-- - a scroll begun within moments of the view's size changing: the end
+-- stayed held, and the next resize, however much later (the sidebar, a
+-- panel, the window), went back to it.
+-- On chat_fixture's `long_chat` (ui/long_chat_fixture.luau).
+
+local function settle(app: any)
+ app:wait("#never-shown", { timeout_ms = 250 })
+ app:frames(10)
+end
+
+local function offset(app: any): number
+ return app:state("chat.transcript.offset")
+end
+
+-- How far the view is from its end, measured by going there (which holds
+-- the end again: only at the close of a test).
+local function from_end(app: any): number
+ local at = offset(app)
+ app:scroll("#transcript", 1e6)
+ app:frames(4)
+ return offset(app) - at
+end
+
+local function open(): any
+ local app = mount("chat_fixture.luau")
+ app:resize(960, 700)
+ app:frames(20)
+ app:command("long_chat_sent")
+ app:command("go_s7")
+ app:frames(30)
+ settle(app)
+ return app
+end
+
+local function send(app: any)
+ app:type("role:textbox", "three and one sounds like the most optional option")
+ app:key("Enter")
+end
+
+local function scroll_up(app: any)
+ for _ = 1, 10 do
+ app:wheel("#transcript", { dy = -40 })
+ app:frames(1)
+ end
+end
+
+test("scrolled up while a send glides, the view stays where it was taken", function()
+ local app = open()
+ send(app)
+ app:frames(3)
+ scroll_up(app)
+ settle(app)
+ settle(app)
+ expect(from_end(app) > 100).to_be(true)
+end)
+
+test("scrolled up just after a resize, a later resize leaves the view where it was", function()
+ local app = open()
+ send(app)
+ app:frames(40)
+ settle(app)
+ for _ = 1, 60 do
+ app:command("long_chat_streams")
+ app:frames(2)
+ end
+ app:frames(10)
+ app:resize(940, 700)
+ app:frames(2)
+ scroll_up(app)
+ -- (It rests inside the resize's moment, then a while.)
+ settle(app)
+ app:wait("#never-shown", { timeout_ms = 800 })
+ local at = offset(app)
+ app:resize(900, 700)
+ app:frames(10)
+ settle(app)
+ expect(math.abs(offset(app) - at) < 1).to_be(true)
+ expect(from_end(app) > 100).to_be(true)
+end)
diff --git a/crates/ui/assets/file-icons/LICENSE.symbols b/assets/file-icons/LICENSE.symbols
similarity index 100%
rename from crates/ui/assets/file-icons/LICENSE.symbols
rename to assets/file-icons/LICENSE.symbols
diff --git a/crates/ui/assets/file-icons/README.md b/assets/file-icons/README.md
similarity index 100%
rename from crates/ui/assets/file-icons/README.md
rename to assets/file-icons/README.md
diff --git a/crates/ui/assets/file-icons/files/angular-component.svg b/assets/file-icons/files/angular-component.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular-component.svg
rename to assets/file-icons/files/angular-component.svg
diff --git a/crates/ui/assets/file-icons/files/angular-directive.svg b/assets/file-icons/files/angular-directive.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular-directive.svg
rename to assets/file-icons/files/angular-directive.svg
diff --git a/crates/ui/assets/file-icons/files/angular-guard.svg b/assets/file-icons/files/angular-guard.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular-guard.svg
rename to assets/file-icons/files/angular-guard.svg
diff --git a/crates/ui/assets/file-icons/files/angular-module.svg b/assets/file-icons/files/angular-module.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular-module.svg
rename to assets/file-icons/files/angular-module.svg
diff --git a/crates/ui/assets/file-icons/files/angular-pipe.svg b/assets/file-icons/files/angular-pipe.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular-pipe.svg
rename to assets/file-icons/files/angular-pipe.svg
diff --git a/crates/ui/assets/file-icons/files/angular-service.svg b/assets/file-icons/files/angular-service.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular-service.svg
rename to assets/file-icons/files/angular-service.svg
diff --git a/crates/ui/assets/file-icons/files/angular.svg b/assets/file-icons/files/angular.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/angular.svg
rename to assets/file-icons/files/angular.svg
diff --git a/crates/ui/assets/file-icons/files/animate.svg b/assets/file-icons/files/animate.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/animate.svg
rename to assets/file-icons/files/animate.svg
diff --git a/crates/ui/assets/file-icons/files/astro.svg b/assets/file-icons/files/astro.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/astro.svg
rename to assets/file-icons/files/astro.svg
diff --git a/crates/ui/assets/file-icons/files/audio.svg b/assets/file-icons/files/audio.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/audio.svg
rename to assets/file-icons/files/audio.svg
diff --git a/crates/ui/assets/file-icons/files/babel.svg b/assets/file-icons/files/babel.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/babel.svg
rename to assets/file-icons/files/babel.svg
diff --git a/crates/ui/assets/file-icons/files/biome.svg b/assets/file-icons/files/biome.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/biome.svg
rename to assets/file-icons/files/biome.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-blue.svg b/assets/file-icons/files/brackets-blue.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-blue.svg
rename to assets/file-icons/files/brackets-blue.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-gray.svg b/assets/file-icons/files/brackets-gray.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-gray.svg
rename to assets/file-icons/files/brackets-gray.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-green.svg b/assets/file-icons/files/brackets-green.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-green.svg
rename to assets/file-icons/files/brackets-green.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-orange.svg b/assets/file-icons/files/brackets-orange.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-orange.svg
rename to assets/file-icons/files/brackets-orange.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-pink.svg b/assets/file-icons/files/brackets-pink.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-pink.svg
rename to assets/file-icons/files/brackets-pink.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-purple.svg b/assets/file-icons/files/brackets-purple.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-purple.svg
rename to assets/file-icons/files/brackets-purple.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-red.svg b/assets/file-icons/files/brackets-red.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-red.svg
rename to assets/file-icons/files/brackets-red.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-sky.svg b/assets/file-icons/files/brackets-sky.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-sky.svg
rename to assets/file-icons/files/brackets-sky.svg
diff --git a/crates/ui/assets/file-icons/files/brackets-yellow.svg b/assets/file-icons/files/brackets-yellow.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/brackets-yellow.svg
rename to assets/file-icons/files/brackets-yellow.svg
diff --git a/crates/ui/assets/file-icons/files/browserslist.svg b/assets/file-icons/files/browserslist.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/browserslist.svg
rename to assets/file-icons/files/browserslist.svg
diff --git a/crates/ui/assets/file-icons/files/bruno.svg b/assets/file-icons/files/bruno.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/bruno.svg
rename to assets/file-icons/files/bruno.svg
diff --git a/crates/ui/assets/file-icons/files/bun.svg b/assets/file-icons/files/bun.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/bun.svg
rename to assets/file-icons/files/bun.svg
diff --git a/crates/ui/assets/file-icons/files/c.svg b/assets/file-icons/files/c.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/c.svg
rename to assets/file-icons/files/c.svg
diff --git a/crates/ui/assets/file-icons/files/caddy.svg b/assets/file-icons/files/caddy.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/caddy.svg
rename to assets/file-icons/files/caddy.svg
diff --git a/crates/ui/assets/file-icons/files/capacitor.svg b/assets/file-icons/files/capacitor.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/capacitor.svg
rename to assets/file-icons/files/capacitor.svg
diff --git a/crates/ui/assets/file-icons/files/clapper.svg b/assets/file-icons/files/clapper.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/clapper.svg
rename to assets/file-icons/files/clapper.svg
diff --git a/crates/ui/assets/file-icons/files/claude.svg b/assets/file-icons/files/claude.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/claude.svg
rename to assets/file-icons/files/claude.svg
diff --git a/crates/ui/assets/file-icons/files/clojure.svg b/assets/file-icons/files/clojure.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/clojure.svg
rename to assets/file-icons/files/clojure.svg
diff --git a/crates/ui/assets/file-icons/files/cloudflare-workers.svg b/assets/file-icons/files/cloudflare-workers.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cloudflare-workers.svg
rename to assets/file-icons/files/cloudflare-workers.svg
diff --git a/crates/ui/assets/file-icons/files/cmake.svg b/assets/file-icons/files/cmake.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cmake.svg
rename to assets/file-icons/files/cmake.svg
diff --git a/crates/ui/assets/file-icons/files/code-blue.svg b/assets/file-icons/files/code-blue.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-blue.svg
rename to assets/file-icons/files/code-blue.svg
diff --git a/crates/ui/assets/file-icons/files/code-gray.svg b/assets/file-icons/files/code-gray.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-gray.svg
rename to assets/file-icons/files/code-gray.svg
diff --git a/crates/ui/assets/file-icons/files/code-green.svg b/assets/file-icons/files/code-green.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-green.svg
rename to assets/file-icons/files/code-green.svg
diff --git a/crates/ui/assets/file-icons/files/code-orange.svg b/assets/file-icons/files/code-orange.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-orange.svg
rename to assets/file-icons/files/code-orange.svg
diff --git a/crates/ui/assets/file-icons/files/code-pink.svg b/assets/file-icons/files/code-pink.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-pink.svg
rename to assets/file-icons/files/code-pink.svg
diff --git a/crates/ui/assets/file-icons/files/code-purple.svg b/assets/file-icons/files/code-purple.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-purple.svg
rename to assets/file-icons/files/code-purple.svg
diff --git a/crates/ui/assets/file-icons/files/code-red.svg b/assets/file-icons/files/code-red.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-red.svg
rename to assets/file-icons/files/code-red.svg
diff --git a/crates/ui/assets/file-icons/files/code-sky.svg b/assets/file-icons/files/code-sky.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-sky.svg
rename to assets/file-icons/files/code-sky.svg
diff --git a/crates/ui/assets/file-icons/files/code-yellow.svg b/assets/file-icons/files/code-yellow.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/code-yellow.svg
rename to assets/file-icons/files/code-yellow.svg
diff --git a/crates/ui/assets/file-icons/files/coffeescript.svg b/assets/file-icons/files/coffeescript.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/coffeescript.svg
rename to assets/file-icons/files/coffeescript.svg
diff --git a/crates/ui/assets/file-icons/files/coldfusion.svg b/assets/file-icons/files/coldfusion.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/coldfusion.svg
rename to assets/file-icons/files/coldfusion.svg
diff --git a/crates/ui/assets/file-icons/files/compressed.svg b/assets/file-icons/files/compressed.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/compressed.svg
rename to assets/file-icons/files/compressed.svg
diff --git a/crates/ui/assets/file-icons/files/contentlayer.svg b/assets/file-icons/files/contentlayer.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/contentlayer.svg
rename to assets/file-icons/files/contentlayer.svg
diff --git a/crates/ui/assets/file-icons/files/cplus.svg b/assets/file-icons/files/cplus.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cplus.svg
rename to assets/file-icons/files/cplus.svg
diff --git a/crates/ui/assets/file-icons/files/crystal.svg b/assets/file-icons/files/crystal.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/crystal.svg
rename to assets/file-icons/files/crystal.svg
diff --git a/crates/ui/assets/file-icons/files/csharp.svg b/assets/file-icons/files/csharp.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/csharp.svg
rename to assets/file-icons/files/csharp.svg
diff --git a/crates/ui/assets/file-icons/files/csv.svg b/assets/file-icons/files/csv.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/csv.svg
rename to assets/file-icons/files/csv.svg
diff --git a/crates/ui/assets/file-icons/files/cucumber.svg b/assets/file-icons/files/cucumber.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cucumber.svg
rename to assets/file-icons/files/cucumber.svg
diff --git a/crates/ui/assets/file-icons/files/cuda.svg b/assets/file-icons/files/cuda.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cuda.svg
rename to assets/file-icons/files/cuda.svg
diff --git a/crates/ui/assets/file-icons/files/cursor.svg b/assets/file-icons/files/cursor.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cursor.svg
rename to assets/file-icons/files/cursor.svg
diff --git a/crates/ui/assets/file-icons/files/cypress.svg b/assets/file-icons/files/cypress.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/cypress.svg
rename to assets/file-icons/files/cypress.svg
diff --git a/crates/ui/assets/file-icons/files/dart.svg b/assets/file-icons/files/dart.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/dart.svg
rename to assets/file-icons/files/dart.svg
diff --git a/crates/ui/assets/file-icons/files/database.svg b/assets/file-icons/files/database.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/database.svg
rename to assets/file-icons/files/database.svg
diff --git a/crates/ui/assets/file-icons/files/deno.svg b/assets/file-icons/files/deno.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/deno.svg
rename to assets/file-icons/files/deno.svg
diff --git a/crates/ui/assets/file-icons/files/docker-green.svg b/assets/file-icons/files/docker-green.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker-green.svg
rename to assets/file-icons/files/docker-green.svg
diff --git a/crates/ui/assets/file-icons/files/docker-orange.svg b/assets/file-icons/files/docker-orange.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker-orange.svg
rename to assets/file-icons/files/docker-orange.svg
diff --git a/crates/ui/assets/file-icons/files/docker-pink.svg b/assets/file-icons/files/docker-pink.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker-pink.svg
rename to assets/file-icons/files/docker-pink.svg
diff --git a/crates/ui/assets/file-icons/files/docker-purple.svg b/assets/file-icons/files/docker-purple.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker-purple.svg
rename to assets/file-icons/files/docker-purple.svg
diff --git a/crates/ui/assets/file-icons/files/docker-red.svg b/assets/file-icons/files/docker-red.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker-red.svg
rename to assets/file-icons/files/docker-red.svg
diff --git a/crates/ui/assets/file-icons/files/docker-yellow.svg b/assets/file-icons/files/docker-yellow.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker-yellow.svg
rename to assets/file-icons/files/docker-yellow.svg
diff --git a/crates/ui/assets/file-icons/files/docker.svg b/assets/file-icons/files/docker.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docker.svg
rename to assets/file-icons/files/docker.svg
diff --git a/crates/ui/assets/file-icons/files/document.svg b/assets/file-icons/files/document.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/document.svg
rename to assets/file-icons/files/document.svg
diff --git a/crates/ui/assets/file-icons/files/docusaurus.svg b/assets/file-icons/files/docusaurus.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/docusaurus.svg
rename to assets/file-icons/files/docusaurus.svg
diff --git a/crates/ui/assets/file-icons/files/drawio.svg b/assets/file-icons/files/drawio.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/drawio.svg
rename to assets/file-icons/files/drawio.svg
diff --git a/crates/ui/assets/file-icons/files/drizzle.svg b/assets/file-icons/files/drizzle.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/drizzle.svg
rename to assets/file-icons/files/drizzle.svg
diff --git a/crates/ui/assets/file-icons/files/dts.svg b/assets/file-icons/files/dts.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/dts.svg
rename to assets/file-icons/files/dts.svg
diff --git a/crates/ui/assets/file-icons/files/dune.svg b/assets/file-icons/files/dune.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/dune.svg
rename to assets/file-icons/files/dune.svg
diff --git a/crates/ui/assets/file-icons/files/earthfile.svg b/assets/file-icons/files/earthfile.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/earthfile.svg
rename to assets/file-icons/files/earthfile.svg
diff --git a/crates/ui/assets/file-icons/files/editorconfig.svg b/assets/file-icons/files/editorconfig.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/editorconfig.svg
rename to assets/file-icons/files/editorconfig.svg
diff --git a/crates/ui/assets/file-icons/files/elixir.svg b/assets/file-icons/files/elixir.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/elixir.svg
rename to assets/file-icons/files/elixir.svg
diff --git a/crates/ui/assets/file-icons/files/erlang.svg b/assets/file-icons/files/erlang.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/erlang.svg
rename to assets/file-icons/files/erlang.svg
diff --git a/crates/ui/assets/file-icons/files/eslint.svg b/assets/file-icons/files/eslint.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/eslint.svg
rename to assets/file-icons/files/eslint.svg
diff --git a/crates/ui/assets/file-icons/files/exe.svg b/assets/file-icons/files/exe.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/exe.svg
rename to assets/file-icons/files/exe.svg
diff --git a/crates/ui/assets/file-icons/files/expressive-code.svg b/assets/file-icons/files/expressive-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/expressive-code.svg
rename to assets/file-icons/files/expressive-code.svg
diff --git a/crates/ui/assets/file-icons/files/firebase.svg b/assets/file-icons/files/firebase.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/firebase.svg
rename to assets/file-icons/files/firebase.svg
diff --git a/crates/ui/assets/file-icons/files/font.svg b/assets/file-icons/files/font.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/font.svg
rename to assets/file-icons/files/font.svg
diff --git a/crates/ui/assets/file-icons/files/fortran.svg b/assets/file-icons/files/fortran.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/fortran.svg
rename to assets/file-icons/files/fortran.svg
diff --git a/crates/ui/assets/file-icons/files/fresh.svg b/assets/file-icons/files/fresh.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/fresh.svg
rename to assets/file-icons/files/fresh.svg
diff --git a/crates/ui/assets/file-icons/files/fsharp.svg b/assets/file-icons/files/fsharp.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/fsharp.svg
rename to assets/file-icons/files/fsharp.svg
diff --git a/crates/ui/assets/file-icons/files/func.svg b/assets/file-icons/files/func.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/func.svg
rename to assets/file-icons/files/func.svg
diff --git a/crates/ui/assets/file-icons/files/gatsby.svg b/assets/file-icons/files/gatsby.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gatsby.svg
rename to assets/file-icons/files/gatsby.svg
diff --git a/crates/ui/assets/file-icons/files/gdextension.svg b/assets/file-icons/files/gdextension.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gdextension.svg
rename to assets/file-icons/files/gdextension.svg
diff --git a/crates/ui/assets/file-icons/files/gdignore.svg b/assets/file-icons/files/gdignore.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gdignore.svg
rename to assets/file-icons/files/gdignore.svg
diff --git a/crates/ui/assets/file-icons/files/gdproject.svg b/assets/file-icons/files/gdproject.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gdproject.svg
rename to assets/file-icons/files/gdproject.svg
diff --git a/crates/ui/assets/file-icons/files/gdscript.svg b/assets/file-icons/files/gdscript.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gdscript.svg
rename to assets/file-icons/files/gdscript.svg
diff --git a/crates/ui/assets/file-icons/files/gdshader.svg b/assets/file-icons/files/gdshader.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gdshader.svg
rename to assets/file-icons/files/gdshader.svg
diff --git a/crates/ui/assets/file-icons/files/gear.svg b/assets/file-icons/files/gear.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gear.svg
rename to assets/file-icons/files/gear.svg
diff --git a/crates/ui/assets/file-icons/files/gif.svg b/assets/file-icons/files/gif.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gif.svg
rename to assets/file-icons/files/gif.svg
diff --git a/crates/ui/assets/file-icons/files/git.svg b/assets/file-icons/files/git.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/git.svg
rename to assets/file-icons/files/git.svg
diff --git a/crates/ui/assets/file-icons/files/github.svg b/assets/file-icons/files/github.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/github.svg
rename to assets/file-icons/files/github.svg
diff --git a/crates/ui/assets/file-icons/files/gitlab.svg b/assets/file-icons/files/gitlab.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gitlab.svg
rename to assets/file-icons/files/gitlab.svg
diff --git a/crates/ui/assets/file-icons/files/gleam.svg b/assets/file-icons/files/gleam.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gleam.svg
rename to assets/file-icons/files/gleam.svg
diff --git a/crates/ui/assets/file-icons/files/globe.svg b/assets/file-icons/files/globe.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/globe.svg
rename to assets/file-icons/files/globe.svg
diff --git a/crates/ui/assets/file-icons/files/go-green.svg b/assets/file-icons/files/go-green.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go-green.svg
rename to assets/file-icons/files/go-green.svg
diff --git a/crates/ui/assets/file-icons/files/go-orange.svg b/assets/file-icons/files/go-orange.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go-orange.svg
rename to assets/file-icons/files/go-orange.svg
diff --git a/crates/ui/assets/file-icons/files/go-pink.svg b/assets/file-icons/files/go-pink.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go-pink.svg
rename to assets/file-icons/files/go-pink.svg
diff --git a/crates/ui/assets/file-icons/files/go-purple.svg b/assets/file-icons/files/go-purple.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go-purple.svg
rename to assets/file-icons/files/go-purple.svg
diff --git a/crates/ui/assets/file-icons/files/go-red.svg b/assets/file-icons/files/go-red.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go-red.svg
rename to assets/file-icons/files/go-red.svg
diff --git a/crates/ui/assets/file-icons/files/go-yellow.svg b/assets/file-icons/files/go-yellow.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go-yellow.svg
rename to assets/file-icons/files/go-yellow.svg
diff --git a/crates/ui/assets/file-icons/files/go.svg b/assets/file-icons/files/go.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/go.svg
rename to assets/file-icons/files/go.svg
diff --git a/crates/ui/assets/file-icons/files/gradle.svg b/assets/file-icons/files/gradle.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gradle.svg
rename to assets/file-icons/files/gradle.svg
diff --git a/crates/ui/assets/file-icons/files/graphql.svg b/assets/file-icons/files/graphql.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/graphql.svg
rename to assets/file-icons/files/graphql.svg
diff --git a/crates/ui/assets/file-icons/files/gulp.svg b/assets/file-icons/files/gulp.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/gulp.svg
rename to assets/file-icons/files/gulp.svg
diff --git a/crates/ui/assets/file-icons/files/h.svg b/assets/file-icons/files/h.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/h.svg
rename to assets/file-icons/files/h.svg
diff --git a/crates/ui/assets/file-icons/files/haml.svg b/assets/file-icons/files/haml.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/haml.svg
rename to assets/file-icons/files/haml.svg
diff --git a/crates/ui/assets/file-icons/files/haskell.svg b/assets/file-icons/files/haskell.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/haskell.svg
rename to assets/file-icons/files/haskell.svg
diff --git a/crates/ui/assets/file-icons/files/http.svg b/assets/file-icons/files/http.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/http.svg
rename to assets/file-icons/files/http.svg
diff --git a/crates/ui/assets/file-icons/files/hugo.svg b/assets/file-icons/files/hugo.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/hugo.svg
rename to assets/file-icons/files/hugo.svg
diff --git a/crates/ui/assets/file-icons/files/i18n.svg b/assets/file-icons/files/i18n.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/i18n.svg
rename to assets/file-icons/files/i18n.svg
diff --git a/crates/ui/assets/file-icons/files/ignore.svg b/assets/file-icons/files/ignore.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ignore.svg
rename to assets/file-icons/files/ignore.svg
diff --git a/crates/ui/assets/file-icons/files/illustrator.svg b/assets/file-icons/files/illustrator.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/illustrator.svg
rename to assets/file-icons/files/illustrator.svg
diff --git a/crates/ui/assets/file-icons/files/image.svg b/assets/file-icons/files/image.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/image.svg
rename to assets/file-icons/files/image.svg
diff --git a/crates/ui/assets/file-icons/files/ionic.svg b/assets/file-icons/files/ionic.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ionic.svg
rename to assets/file-icons/files/ionic.svg
diff --git a/crates/ui/assets/file-icons/files/java.svg b/assets/file-icons/files/java.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/java.svg
rename to assets/file-icons/files/java.svg
diff --git a/crates/ui/assets/file-icons/files/jenkins.svg b/assets/file-icons/files/jenkins.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/jenkins.svg
rename to assets/file-icons/files/jenkins.svg
diff --git a/crates/ui/assets/file-icons/files/jest.svg b/assets/file-icons/files/jest.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/jest.svg
rename to assets/file-icons/files/jest.svg
diff --git a/crates/ui/assets/file-icons/files/js-test.svg b/assets/file-icons/files/js-test.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/js-test.svg
rename to assets/file-icons/files/js-test.svg
diff --git a/crates/ui/assets/file-icons/files/js.svg b/assets/file-icons/files/js.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/js.svg
rename to assets/file-icons/files/js.svg
diff --git a/crates/ui/assets/file-icons/files/julia-markdown.svg b/assets/file-icons/files/julia-markdown.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/julia-markdown.svg
rename to assets/file-icons/files/julia-markdown.svg
diff --git a/crates/ui/assets/file-icons/files/julia.svg b/assets/file-icons/files/julia.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/julia.svg
rename to assets/file-icons/files/julia.svg
diff --git a/crates/ui/assets/file-icons/files/keystatic.svg b/assets/file-icons/files/keystatic.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/keystatic.svg
rename to assets/file-icons/files/keystatic.svg
diff --git a/crates/ui/assets/file-icons/files/knip.svg b/assets/file-icons/files/knip.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/knip.svg
rename to assets/file-icons/files/knip.svg
diff --git a/crates/ui/assets/file-icons/files/kotlin.svg b/assets/file-icons/files/kotlin.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/kotlin.svg
rename to assets/file-icons/files/kotlin.svg
diff --git a/crates/ui/assets/file-icons/files/kubb.svg b/assets/file-icons/files/kubb.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/kubb.svg
rename to assets/file-icons/files/kubb.svg
diff --git a/crates/ui/assets/file-icons/files/laravel.svg b/assets/file-icons/files/laravel.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/laravel.svg
rename to assets/file-icons/files/laravel.svg
diff --git a/crates/ui/assets/file-icons/files/license.svg b/assets/file-icons/files/license.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/license.svg
rename to assets/file-icons/files/license.svg
diff --git a/crates/ui/assets/file-icons/files/link.svg b/assets/file-icons/files/link.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/link.svg
rename to assets/file-icons/files/link.svg
diff --git a/crates/ui/assets/file-icons/files/liquid.svg b/assets/file-icons/files/liquid.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/liquid.svg
rename to assets/file-icons/files/liquid.svg
diff --git a/crates/ui/assets/file-icons/files/lock.svg b/assets/file-icons/files/lock.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/lock.svg
rename to assets/file-icons/files/lock.svg
diff --git a/crates/ui/assets/file-icons/files/lua.svg b/assets/file-icons/files/lua.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/lua.svg
rename to assets/file-icons/files/lua.svg
diff --git a/crates/ui/assets/file-icons/files/luau.svg b/assets/file-icons/files/luau.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/luau.svg
rename to assets/file-icons/files/luau.svg
diff --git a/crates/ui/assets/file-icons/files/lunaria.svg b/assets/file-icons/files/lunaria.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/lunaria.svg
rename to assets/file-icons/files/lunaria.svg
diff --git a/crates/ui/assets/file-icons/files/markdoc.svg b/assets/file-icons/files/markdoc.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/markdoc.svg
rename to assets/file-icons/files/markdoc.svg
diff --git a/crates/ui/assets/file-icons/files/markdown.svg b/assets/file-icons/files/markdown.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/markdown.svg
rename to assets/file-icons/files/markdown.svg
diff --git a/crates/ui/assets/file-icons/files/maven.svg b/assets/file-icons/files/maven.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/maven.svg
rename to assets/file-icons/files/maven.svg
diff --git a/crates/ui/assets/file-icons/files/mdx.svg b/assets/file-icons/files/mdx.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/mdx.svg
rename to assets/file-icons/files/mdx.svg
diff --git a/crates/ui/assets/file-icons/files/minecraft.svg b/assets/file-icons/files/minecraft.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/minecraft.svg
rename to assets/file-icons/files/minecraft.svg
diff --git a/crates/ui/assets/file-icons/files/mongo.svg b/assets/file-icons/files/mongo.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/mongo.svg
rename to assets/file-icons/files/mongo.svg
diff --git a/crates/ui/assets/file-icons/files/nest-controller.svg b/assets/file-icons/files/nest-controller.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nest-controller.svg
rename to assets/file-icons/files/nest-controller.svg
diff --git a/crates/ui/assets/file-icons/files/nest-decorator.svg b/assets/file-icons/files/nest-decorator.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nest-decorator.svg
rename to assets/file-icons/files/nest-decorator.svg
diff --git a/crates/ui/assets/file-icons/files/nest-guard.svg b/assets/file-icons/files/nest-guard.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nest-guard.svg
rename to assets/file-icons/files/nest-guard.svg
diff --git a/crates/ui/assets/file-icons/files/nest-middleware.svg b/assets/file-icons/files/nest-middleware.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nest-middleware.svg
rename to assets/file-icons/files/nest-middleware.svg
diff --git a/crates/ui/assets/file-icons/files/nest-service.svg b/assets/file-icons/files/nest-service.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nest-service.svg
rename to assets/file-icons/files/nest-service.svg
diff --git a/crates/ui/assets/file-icons/files/nest.svg b/assets/file-icons/files/nest.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nest.svg
rename to assets/file-icons/files/nest.svg
diff --git a/crates/ui/assets/file-icons/files/netlify.svg b/assets/file-icons/files/netlify.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/netlify.svg
rename to assets/file-icons/files/netlify.svg
diff --git a/crates/ui/assets/file-icons/files/next.svg b/assets/file-icons/files/next.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/next.svg
rename to assets/file-icons/files/next.svg
diff --git a/crates/ui/assets/file-icons/files/nim.svg b/assets/file-icons/files/nim.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nim.svg
rename to assets/file-icons/files/nim.svg
diff --git a/crates/ui/assets/file-icons/files/nix.svg b/assets/file-icons/files/nix.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nix.svg
rename to assets/file-icons/files/nix.svg
diff --git a/crates/ui/assets/file-icons/files/node.svg b/assets/file-icons/files/node.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/node.svg
rename to assets/file-icons/files/node.svg
diff --git a/crates/ui/assets/file-icons/files/nodemon.svg b/assets/file-icons/files/nodemon.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nodemon.svg
rename to assets/file-icons/files/nodemon.svg
diff --git a/crates/ui/assets/file-icons/files/notebook.svg b/assets/file-icons/files/notebook.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/notebook.svg
rename to assets/file-icons/files/notebook.svg
diff --git a/crates/ui/assets/file-icons/files/npm.svg b/assets/file-icons/files/npm.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/npm.svg
rename to assets/file-icons/files/npm.svg
diff --git a/crates/ui/assets/file-icons/files/nunjucks.svg b/assets/file-icons/files/nunjucks.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nunjucks.svg
rename to assets/file-icons/files/nunjucks.svg
diff --git a/crates/ui/assets/file-icons/files/nuxt.png b/assets/file-icons/files/nuxt.png
similarity index 100%
rename from crates/ui/assets/file-icons/files/nuxt.png
rename to assets/file-icons/files/nuxt.png
diff --git a/crates/ui/assets/file-icons/files/nuxt.svg b/assets/file-icons/files/nuxt.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nuxt.svg
rename to assets/file-icons/files/nuxt.svg
diff --git a/crates/ui/assets/file-icons/files/nx.svg b/assets/file-icons/files/nx.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/nx.svg
rename to assets/file-icons/files/nx.svg
diff --git a/crates/ui/assets/file-icons/files/ocaml.svg b/assets/file-icons/files/ocaml.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ocaml.svg
rename to assets/file-icons/files/ocaml.svg
diff --git a/crates/ui/assets/file-icons/files/orval.svg b/assets/file-icons/files/orval.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/orval.svg
rename to assets/file-icons/files/orval.svg
diff --git a/crates/ui/assets/file-icons/files/oxc.svg b/assets/file-icons/files/oxc.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/oxc.svg
rename to assets/file-icons/files/oxc.svg
diff --git a/crates/ui/assets/file-icons/files/panda.svg b/assets/file-icons/files/panda.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/panda.svg
rename to assets/file-icons/files/panda.svg
diff --git a/crates/ui/assets/file-icons/files/patch.svg b/assets/file-icons/files/patch.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/patch.svg
rename to assets/file-icons/files/patch.svg
diff --git a/crates/ui/assets/file-icons/files/pdf.svg b/assets/file-icons/files/pdf.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/pdf.svg
rename to assets/file-icons/files/pdf.svg
diff --git a/crates/ui/assets/file-icons/files/perl.svg b/assets/file-icons/files/perl.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/perl.svg
rename to assets/file-icons/files/perl.svg
diff --git a/crates/ui/assets/file-icons/files/photoshop.svg b/assets/file-icons/files/photoshop.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/photoshop.svg
rename to assets/file-icons/files/photoshop.svg
diff --git a/crates/ui/assets/file-icons/files/php.svg b/assets/file-icons/files/php.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/php.svg
rename to assets/file-icons/files/php.svg
diff --git a/crates/ui/assets/file-icons/files/pkl.svg b/assets/file-icons/files/pkl.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/pkl.svg
rename to assets/file-icons/files/pkl.svg
diff --git a/crates/ui/assets/file-icons/files/pnpm.svg b/assets/file-icons/files/pnpm.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/pnpm.svg
rename to assets/file-icons/files/pnpm.svg
diff --git a/crates/ui/assets/file-icons/files/postcss.svg b/assets/file-icons/files/postcss.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/postcss.svg
rename to assets/file-icons/files/postcss.svg
diff --git a/crates/ui/assets/file-icons/files/prettier.svg b/assets/file-icons/files/prettier.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/prettier.svg
rename to assets/file-icons/files/prettier.svg
diff --git a/crates/ui/assets/file-icons/files/prisma.svg b/assets/file-icons/files/prisma.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/prisma.svg
rename to assets/file-icons/files/prisma.svg
diff --git a/crates/ui/assets/file-icons/files/proto.svg b/assets/file-icons/files/proto.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/proto.svg
rename to assets/file-icons/files/proto.svg
diff --git a/crates/ui/assets/file-icons/files/pug.svg b/assets/file-icons/files/pug.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/pug.svg
rename to assets/file-icons/files/pug.svg
diff --git a/crates/ui/assets/file-icons/files/pulumi.svg b/assets/file-icons/files/pulumi.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/pulumi.svg
rename to assets/file-icons/files/pulumi.svg
diff --git a/crates/ui/assets/file-icons/files/puppeteer.svg b/assets/file-icons/files/puppeteer.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/puppeteer.svg
rename to assets/file-icons/files/puppeteer.svg
diff --git a/crates/ui/assets/file-icons/files/puzzle.svg b/assets/file-icons/files/puzzle.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/puzzle.svg
rename to assets/file-icons/files/puzzle.svg
diff --git a/crates/ui/assets/file-icons/files/python.svg b/assets/file-icons/files/python.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/python.svg
rename to assets/file-icons/files/python.svg
diff --git a/crates/ui/assets/file-icons/files/r.svg b/assets/file-icons/files/r.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/r.svg
rename to assets/file-icons/files/r.svg
diff --git a/crates/ui/assets/file-icons/files/razor.svg b/assets/file-icons/files/razor.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/razor.svg
rename to assets/file-icons/files/razor.svg
diff --git a/crates/ui/assets/file-icons/files/react-test.svg b/assets/file-icons/files/react-test.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/react-test.svg
rename to assets/file-icons/files/react-test.svg
diff --git a/crates/ui/assets/file-icons/files/react-ts.svg b/assets/file-icons/files/react-ts.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/react-ts.svg
rename to assets/file-icons/files/react-ts.svg
diff --git a/crates/ui/assets/file-icons/files/react.svg b/assets/file-icons/files/react.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/react.svg
rename to assets/file-icons/files/react.svg
diff --git a/crates/ui/assets/file-icons/files/redux-actions.svg b/assets/file-icons/files/redux-actions.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/redux-actions.svg
rename to assets/file-icons/files/redux-actions.svg
diff --git a/crates/ui/assets/file-icons/files/redux-effects.svg b/assets/file-icons/files/redux-effects.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/redux-effects.svg
rename to assets/file-icons/files/redux-effects.svg
diff --git a/crates/ui/assets/file-icons/files/redux-facade.svg b/assets/file-icons/files/redux-facade.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/redux-facade.svg
rename to assets/file-icons/files/redux-facade.svg
diff --git a/crates/ui/assets/file-icons/files/redux-reducer.svg b/assets/file-icons/files/redux-reducer.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/redux-reducer.svg
rename to assets/file-icons/files/redux-reducer.svg
diff --git a/crates/ui/assets/file-icons/files/redux-selector.svg b/assets/file-icons/files/redux-selector.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/redux-selector.svg
rename to assets/file-icons/files/redux-selector.svg
diff --git a/crates/ui/assets/file-icons/files/rescript-interface.svg b/assets/file-icons/files/rescript-interface.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rescript-interface.svg
rename to assets/file-icons/files/rescript-interface.svg
diff --git a/crates/ui/assets/file-icons/files/rescript.svg b/assets/file-icons/files/rescript.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rescript.svg
rename to assets/file-icons/files/rescript.svg
diff --git a/crates/ui/assets/file-icons/files/resource.svg b/assets/file-icons/files/resource.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/resource.svg
rename to assets/file-icons/files/resource.svg
diff --git a/crates/ui/assets/file-icons/files/robot.svg b/assets/file-icons/files/robot.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/robot.svg
rename to assets/file-icons/files/robot.svg
diff --git a/crates/ui/assets/file-icons/files/rolldown.svg b/assets/file-icons/files/rolldown.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rolldown.svg
rename to assets/file-icons/files/rolldown.svg
diff --git a/crates/ui/assets/file-icons/files/rome.svg b/assets/file-icons/files/rome.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rome.svg
rename to assets/file-icons/files/rome.svg
diff --git a/crates/ui/assets/file-icons/files/rsbuild.svg b/assets/file-icons/files/rsbuild.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rsbuild.svg
rename to assets/file-icons/files/rsbuild.svg
diff --git a/crates/ui/assets/file-icons/files/rslib.svg b/assets/file-icons/files/rslib.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rslib.svg
rename to assets/file-icons/files/rslib.svg
diff --git a/crates/ui/assets/file-icons/files/rspack.svg b/assets/file-icons/files/rspack.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rspack.svg
rename to assets/file-icons/files/rspack.svg
diff --git a/crates/ui/assets/file-icons/files/ruby.svg b/assets/file-icons/files/ruby.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ruby.svg
rename to assets/file-icons/files/ruby.svg
diff --git a/crates/ui/assets/file-icons/files/rust.svg b/assets/file-icons/files/rust.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/rust.svg
rename to assets/file-icons/files/rust.svg
diff --git a/crates/ui/assets/file-icons/files/sanity.svg b/assets/file-icons/files/sanity.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/sanity.svg
rename to assets/file-icons/files/sanity.svg
diff --git a/crates/ui/assets/file-icons/files/sass.svg b/assets/file-icons/files/sass.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/sass.svg
rename to assets/file-icons/files/sass.svg
diff --git a/crates/ui/assets/file-icons/files/sbt.svg b/assets/file-icons/files/sbt.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/sbt.svg
rename to assets/file-icons/files/sbt.svg
diff --git a/crates/ui/assets/file-icons/files/scala.svg b/assets/file-icons/files/scala.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/scala.svg
rename to assets/file-icons/files/scala.svg
diff --git a/crates/ui/assets/file-icons/files/severless.svg b/assets/file-icons/files/severless.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/severless.svg
rename to assets/file-icons/files/severless.svg
diff --git a/crates/ui/assets/file-icons/files/shadcn.svg b/assets/file-icons/files/shadcn.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/shadcn.svg
rename to assets/file-icons/files/shadcn.svg
diff --git a/crates/ui/assets/file-icons/files/shell.svg b/assets/file-icons/files/shell.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/shell.svg
rename to assets/file-icons/files/shell.svg
diff --git a/crates/ui/assets/file-icons/files/slint.svg b/assets/file-icons/files/slint.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/slint.svg
rename to assets/file-icons/files/slint.svg
diff --git a/crates/ui/assets/file-icons/files/solidity.svg b/assets/file-icons/files/solidity.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/solidity.svg
rename to assets/file-icons/files/solidity.svg
diff --git a/crates/ui/assets/file-icons/files/statamic-antlers.svg b/assets/file-icons/files/statamic-antlers.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/statamic-antlers.svg
rename to assets/file-icons/files/statamic-antlers.svg
diff --git a/crates/ui/assets/file-icons/files/storybook.svg b/assets/file-icons/files/storybook.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/storybook.svg
rename to assets/file-icons/files/storybook.svg
diff --git a/crates/ui/assets/file-icons/files/stylelint.svg b/assets/file-icons/files/stylelint.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/stylelint.svg
rename to assets/file-icons/files/stylelint.svg
diff --git a/crates/ui/assets/file-icons/files/stylus.svg b/assets/file-icons/files/stylus.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/stylus.svg
rename to assets/file-icons/files/stylus.svg
diff --git a/crates/ui/assets/file-icons/files/supabase.svg b/assets/file-icons/files/supabase.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/supabase.svg
rename to assets/file-icons/files/supabase.svg
diff --git a/crates/ui/assets/file-icons/files/svelte-service.svg b/assets/file-icons/files/svelte-service.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/svelte-service.svg
rename to assets/file-icons/files/svelte-service.svg
diff --git a/crates/ui/assets/file-icons/files/svelte-ts.svg b/assets/file-icons/files/svelte-ts.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/svelte-ts.svg
rename to assets/file-icons/files/svelte-ts.svg
diff --git a/crates/ui/assets/file-icons/files/svelte.svg b/assets/file-icons/files/svelte.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/svelte.svg
rename to assets/file-icons/files/svelte.svg
diff --git a/crates/ui/assets/file-icons/files/svg.svg b/assets/file-icons/files/svg.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/svg.svg
rename to assets/file-icons/files/svg.svg
diff --git a/crates/ui/assets/file-icons/files/svx.svg b/assets/file-icons/files/svx.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/svx.svg
rename to assets/file-icons/files/svx.svg
diff --git a/crates/ui/assets/file-icons/files/swc.svg b/assets/file-icons/files/swc.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/swc.svg
rename to assets/file-icons/files/swc.svg
diff --git a/crates/ui/assets/file-icons/files/swift.svg b/assets/file-icons/files/swift.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/swift.svg
rename to assets/file-icons/files/swift.svg
diff --git a/crates/ui/assets/file-icons/files/tailwind.svg b/assets/file-icons/files/tailwind.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/tailwind.svg
rename to assets/file-icons/files/tailwind.svg
diff --git a/crates/ui/assets/file-icons/files/taskfile.svg b/assets/file-icons/files/taskfile.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/taskfile.svg
rename to assets/file-icons/files/taskfile.svg
diff --git a/crates/ui/assets/file-icons/files/tauri.svg b/assets/file-icons/files/tauri.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/tauri.svg
rename to assets/file-icons/files/tauri.svg
diff --git a/crates/ui/assets/file-icons/files/terraform.svg b/assets/file-icons/files/terraform.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/terraform.svg
rename to assets/file-icons/files/terraform.svg
diff --git a/crates/ui/assets/file-icons/files/tex.svg b/assets/file-icons/files/tex.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/tex.svg
rename to assets/file-icons/files/tex.svg
diff --git a/crates/ui/assets/file-icons/files/text.svg b/assets/file-icons/files/text.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/text.svg
rename to assets/file-icons/files/text.svg
diff --git a/crates/ui/assets/file-icons/files/ts-test.svg b/assets/file-icons/files/ts-test.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ts-test.svg
rename to assets/file-icons/files/ts-test.svg
diff --git a/crates/ui/assets/file-icons/files/ts-types.svg b/assets/file-icons/files/ts-types.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ts-types.svg
rename to assets/file-icons/files/ts-types.svg
diff --git a/crates/ui/assets/file-icons/files/ts.svg b/assets/file-icons/files/ts.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/ts.svg
rename to assets/file-icons/files/ts.svg
diff --git a/crates/ui/assets/file-icons/files/tsconfig.svg b/assets/file-icons/files/tsconfig.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/tsconfig.svg
rename to assets/file-icons/files/tsconfig.svg
diff --git a/crates/ui/assets/file-icons/files/turborepo.svg b/assets/file-icons/files/turborepo.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/turborepo.svg
rename to assets/file-icons/files/turborepo.svg
diff --git a/crates/ui/assets/file-icons/files/twig.svg b/assets/file-icons/files/twig.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/twig.svg
rename to assets/file-icons/files/twig.svg
diff --git a/crates/ui/assets/file-icons/files/typst.svg b/assets/file-icons/files/typst.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/typst.svg
rename to assets/file-icons/files/typst.svg
diff --git a/crates/ui/assets/file-icons/files/unocss.svg b/assets/file-icons/files/unocss.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/unocss.svg
rename to assets/file-icons/files/unocss.svg
diff --git a/crates/ui/assets/file-icons/files/uv.svg b/assets/file-icons/files/uv.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/uv.svg
rename to assets/file-icons/files/uv.svg
diff --git a/crates/ui/assets/file-icons/files/v.svg b/assets/file-icons/files/v.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/v.svg
rename to assets/file-icons/files/v.svg
diff --git a/crates/ui/assets/file-icons/files/vanilla-extract.svg b/assets/file-icons/files/vanilla-extract.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/vanilla-extract.svg
rename to assets/file-icons/files/vanilla-extract.svg
diff --git a/crates/ui/assets/file-icons/files/vercel.svg b/assets/file-icons/files/vercel.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/vercel.svg
rename to assets/file-icons/files/vercel.svg
diff --git a/crates/ui/assets/file-icons/files/video.svg b/assets/file-icons/files/video.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/video.svg
rename to assets/file-icons/files/video.svg
diff --git a/crates/ui/assets/file-icons/files/visual-studio.svg b/assets/file-icons/files/visual-studio.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/visual-studio.svg
rename to assets/file-icons/files/visual-studio.svg
diff --git a/crates/ui/assets/file-icons/files/vite.svg b/assets/file-icons/files/vite.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/vite.svg
rename to assets/file-icons/files/vite.svg
diff --git a/crates/ui/assets/file-icons/files/vitest.svg b/assets/file-icons/files/vitest.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/vitest.svg
rename to assets/file-icons/files/vitest.svg
diff --git a/crates/ui/assets/file-icons/files/vue.svg b/assets/file-icons/files/vue.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/vue.svg
rename to assets/file-icons/files/vue.svg
diff --git a/crates/ui/assets/file-icons/files/webgpu.svg b/assets/file-icons/files/webgpu.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/webgpu.svg
rename to assets/file-icons/files/webgpu.svg
diff --git a/crates/ui/assets/file-icons/files/webpack.svg b/assets/file-icons/files/webpack.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/webpack.svg
rename to assets/file-icons/files/webpack.svg
diff --git a/crates/ui/assets/file-icons/files/xml.svg b/assets/file-icons/files/xml.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/xml.svg
rename to assets/file-icons/files/xml.svg
diff --git a/crates/ui/assets/file-icons/files/yaml.svg b/assets/file-icons/files/yaml.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/yaml.svg
rename to assets/file-icons/files/yaml.svg
diff --git a/crates/ui/assets/file-icons/files/yarn.svg b/assets/file-icons/files/yarn.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/yarn.svg
rename to assets/file-icons/files/yarn.svg
diff --git a/crates/ui/assets/file-icons/files/yummacss.svg b/assets/file-icons/files/yummacss.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/yummacss.svg
rename to assets/file-icons/files/yummacss.svg
diff --git a/crates/ui/assets/file-icons/files/zig.svg b/assets/file-icons/files/zig.svg
similarity index 100%
rename from crates/ui/assets/file-icons/files/zig.svg
rename to assets/file-icons/files/zig.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-actions.svg b/assets/file-icons/folders/folder-actions.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-actions.svg
rename to assets/file-icons/folders/folder-actions.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-android.svg b/assets/file-icons/folders/folder-android.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-android.svg
rename to assets/file-icons/folders/folder-android.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-angular.svg b/assets/file-icons/folders/folder-angular.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-angular.svg
rename to assets/file-icons/folders/folder-angular.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-app.svg b/assets/file-icons/folders/folder-app.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-app.svg
rename to assets/file-icons/folders/folder-app.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-assets.svg b/assets/file-icons/folders/folder-assets.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-assets.svg
rename to assets/file-icons/folders/folder-assets.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-aws.svg b/assets/file-icons/folders/folder-aws.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-aws.svg
rename to assets/file-icons/folders/folder-aws.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-azure.svg b/assets/file-icons/folders/folder-azure.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-azure.svg
rename to assets/file-icons/folders/folder-azure.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-blue-code.svg b/assets/file-icons/folders/folder-blue-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-blue-code.svg
rename to assets/file-icons/folders/folder-blue-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-blue-outline.svg b/assets/file-icons/folders/folder-blue-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-blue-outline.svg
rename to assets/file-icons/folders/folder-blue-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-blue.svg b/assets/file-icons/folders/folder-blue.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-blue.svg
rename to assets/file-icons/folders/folder-blue.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-bruno.svg b/assets/file-icons/folders/folder-bruno.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-bruno.svg
rename to assets/file-icons/folders/folder-bruno.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-build.svg b/assets/file-icons/folders/folder-build.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-build.svg
rename to assets/file-icons/folders/folder-build.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-changeset.svg b/assets/file-icons/folders/folder-changeset.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-changeset.svg
rename to assets/file-icons/folders/folder-changeset.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-claude.svg b/assets/file-icons/folders/folder-claude.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-claude.svg
rename to assets/file-icons/folders/folder-claude.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-config.svg b/assets/file-icons/folders/folder-config.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-config.svg
rename to assets/file-icons/folders/folder-config.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-constants.svg b/assets/file-icons/folders/folder-constants.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-constants.svg
rename to assets/file-icons/folders/folder-constants.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-context.svg b/assets/file-icons/folders/folder-context.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-context.svg
rename to assets/file-icons/folders/folder-context.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-core.svg b/assets/file-icons/folders/folder-core.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-core.svg
rename to assets/file-icons/folders/folder-core.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-cursor.svg b/assets/file-icons/folders/folder-cursor.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-cursor.svg
rename to assets/file-icons/folders/folder-cursor.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-cypress.svg b/assets/file-icons/folders/folder-cypress.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-cypress.svg
rename to assets/file-icons/folders/folder-cypress.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-database.svg b/assets/file-icons/folders/folder-database.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-database.svg
rename to assets/file-icons/folders/folder-database.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-docker.svg b/assets/file-icons/folders/folder-docker.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-docker.svg
rename to assets/file-icons/folders/folder-docker.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-documents.svg b/assets/file-icons/folders/folder-documents.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-documents.svg
rename to assets/file-icons/folders/folder-documents.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-drizzle.svg b/assets/file-icons/folders/folder-drizzle.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-drizzle.svg
rename to assets/file-icons/folders/folder-drizzle.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-effects.svg b/assets/file-icons/folders/folder-effects.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-effects.svg
rename to assets/file-icons/folders/folder-effects.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-expo.svg b/assets/file-icons/folders/folder-expo.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-expo.svg
rename to assets/file-icons/folders/folder-expo.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-facade.svg b/assets/file-icons/folders/folder-facade.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-facade.svg
rename to assets/file-icons/folders/folder-facade.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-firebase.svg b/assets/file-icons/folders/folder-firebase.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-firebase.svg
rename to assets/file-icons/folders/folder-firebase.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-fonts.svg b/assets/file-icons/folders/folder-fonts.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-fonts.svg
rename to assets/file-icons/folders/folder-fonts.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-github.svg b/assets/file-icons/folders/folder-github.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-github.svg
rename to assets/file-icons/folders/folder-github.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-gitlab.svg b/assets/file-icons/folders/folder-gitlab.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-gitlab.svg
rename to assets/file-icons/folders/folder-gitlab.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-globe.svg b/assets/file-icons/folders/folder-globe.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-globe.svg
rename to assets/file-icons/folders/folder-globe.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-godot.svg b/assets/file-icons/folders/folder-godot.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-godot.svg
rename to assets/file-icons/folders/folder-godot.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-gradle.svg b/assets/file-icons/folders/folder-gradle.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-gradle.svg
rename to assets/file-icons/folders/folder-gradle.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-graphql.svg b/assets/file-icons/folders/folder-graphql.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-graphql.svg
rename to assets/file-icons/folders/folder-graphql.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-gray-code.svg b/assets/file-icons/folders/folder-gray-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-gray-code.svg
rename to assets/file-icons/folders/folder-gray-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-gray-outline.svg b/assets/file-icons/folders/folder-gray-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-gray-outline.svg
rename to assets/file-icons/folders/folder-gray-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-gray.svg b/assets/file-icons/folders/folder-gray.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-gray.svg
rename to assets/file-icons/folders/folder-gray.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-green-code.svg b/assets/file-icons/folders/folder-green-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-green-code.svg
rename to assets/file-icons/folders/folder-green-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-green-outline.svg b/assets/file-icons/folders/folder-green-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-green-outline.svg
rename to assets/file-icons/folders/folder-green-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-green.svg b/assets/file-icons/folders/folder-green.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-green.svg
rename to assets/file-icons/folders/folder-green.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-helpers.svg b/assets/file-icons/folders/folder-helpers.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-helpers.svg
rename to assets/file-icons/folders/folder-helpers.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-hooks.svg b/assets/file-icons/folders/folder-hooks.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-hooks.svg
rename to assets/file-icons/folders/folder-hooks.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-i18n.svg b/assets/file-icons/folders/folder-i18n.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-i18n.svg
rename to assets/file-icons/folders/folder-i18n.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-images.svg b/assets/file-icons/folders/folder-images.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-images.svg
rename to assets/file-icons/folders/folder-images.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-interceptors.svg b/assets/file-icons/folders/folder-interceptors.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-interceptors.svg
rename to assets/file-icons/folders/folder-interceptors.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-interfaces.svg b/assets/file-icons/folders/folder-interfaces.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-interfaces.svg
rename to assets/file-icons/folders/folder-interfaces.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-ios.svg b/assets/file-icons/folders/folder-ios.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-ios.svg
rename to assets/file-icons/folders/folder-ios.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-js.svg b/assets/file-icons/folders/folder-js.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-js.svg
rename to assets/file-icons/folders/folder-js.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-layout.svg b/assets/file-icons/folders/folder-layout.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-layout.svg
rename to assets/file-icons/folders/folder-layout.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-lock.svg b/assets/file-icons/folders/folder-lock.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-lock.svg
rename to assets/file-icons/folders/folder-lock.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-mail.svg b/assets/file-icons/folders/folder-mail.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-mail.svg
rename to assets/file-icons/folders/folder-mail.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-maven.svg b/assets/file-icons/folders/folder-maven.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-maven.svg
rename to assets/file-icons/folders/folder-maven.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-middleware.svg b/assets/file-icons/folders/folder-middleware.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-middleware.svg
rename to assets/file-icons/folders/folder-middleware.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-models.svg b/assets/file-icons/folders/folder-models.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-models.svg
rename to assets/file-icons/folders/folder-models.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-modules.svg b/assets/file-icons/folders/folder-modules.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-modules.svg
rename to assets/file-icons/folders/folder-modules.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-mongo.svg b/assets/file-icons/folders/folder-mongo.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-mongo.svg
rename to assets/file-icons/folders/folder-mongo.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-netlify.svg b/assets/file-icons/folders/folder-netlify.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-netlify.svg
rename to assets/file-icons/folders/folder-netlify.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-next.svg b/assets/file-icons/folders/folder-next.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-next.svg
rename to assets/file-icons/folders/folder-next.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-nginx.svg b/assets/file-icons/folders/folder-nginx.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-nginx.svg
rename to assets/file-icons/folders/folder-nginx.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-node-modules.svg b/assets/file-icons/folders/folder-node-modules.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-node-modules.svg
rename to assets/file-icons/folders/folder-node-modules.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-open.svg b/assets/file-icons/folders/folder-open.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-open.svg
rename to assets/file-icons/folders/folder-open.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange-code-1.svg b/assets/file-icons/folders/folder-orange-code-1.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange-code-1.svg
rename to assets/file-icons/folders/folder-orange-code-1.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange-code-2.svg b/assets/file-icons/folders/folder-orange-code-2.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange-code-2.svg
rename to assets/file-icons/folders/folder-orange-code-2.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange-code-3.svg b/assets/file-icons/folders/folder-orange-code-3.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange-code-3.svg
rename to assets/file-icons/folders/folder-orange-code-3.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange-code-4.svg b/assets/file-icons/folders/folder-orange-code-4.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange-code-4.svg
rename to assets/file-icons/folders/folder-orange-code-4.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange-code.svg b/assets/file-icons/folders/folder-orange-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange-code.svg
rename to assets/file-icons/folders/folder-orange-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange-outline.svg b/assets/file-icons/folders/folder-orange-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange-outline.svg
rename to assets/file-icons/folders/folder-orange-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-orange.svg b/assets/file-icons/folders/folder-orange.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-orange.svg
rename to assets/file-icons/folders/folder-orange.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-pink-code.svg b/assets/file-icons/folders/folder-pink-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-pink-code.svg
rename to assets/file-icons/folders/folder-pink-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-pink-outline.svg b/assets/file-icons/folders/folder-pink-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-pink-outline.svg
rename to assets/file-icons/folders/folder-pink-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-pink.svg b/assets/file-icons/folders/folder-pink.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-pink.svg
rename to assets/file-icons/folders/folder-pink.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-pipes.svg b/assets/file-icons/folders/folder-pipes.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-pipes.svg
rename to assets/file-icons/folders/folder-pipes.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-prisma.svg b/assets/file-icons/folders/folder-prisma.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-prisma.svg
rename to assets/file-icons/folders/folder-prisma.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-providers.svg b/assets/file-icons/folders/folder-providers.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-providers.svg
rename to assets/file-icons/folders/folder-providers.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-purple-code.svg b/assets/file-icons/folders/folder-purple-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-purple-code.svg
rename to assets/file-icons/folders/folder-purple-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-purple-outline.svg b/assets/file-icons/folders/folder-purple-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-purple-outline.svg
rename to assets/file-icons/folders/folder-purple-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-purple.svg b/assets/file-icons/folders/folder-purple.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-purple.svg
rename to assets/file-icons/folders/folder-purple.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-react.svg b/assets/file-icons/folders/folder-react.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-react.svg
rename to assets/file-icons/folders/folder-react.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-red-code.svg b/assets/file-icons/folders/folder-red-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-red-code.svg
rename to assets/file-icons/folders/folder-red-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-red-outline.svg b/assets/file-icons/folders/folder-red-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-red-outline.svg
rename to assets/file-icons/folders/folder-red-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-red.svg b/assets/file-icons/folders/folder-red.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-red.svg
rename to assets/file-icons/folders/folder-red.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-redis.svg b/assets/file-icons/folders/folder-redis.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-redis.svg
rename to assets/file-icons/folders/folder-redis.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-reducer.svg b/assets/file-icons/folders/folder-reducer.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-reducer.svg
rename to assets/file-icons/folders/folder-reducer.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-router.svg b/assets/file-icons/folders/folder-router.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-router.svg
rename to assets/file-icons/folders/folder-router.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-sass.svg b/assets/file-icons/folders/folder-sass.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-sass.svg
rename to assets/file-icons/folders/folder-sass.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-selector.svg b/assets/file-icons/folders/folder-selector.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-selector.svg
rename to assets/file-icons/folders/folder-selector.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-services.svg b/assets/file-icons/folders/folder-services.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-services.svg
rename to assets/file-icons/folders/folder-services.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-shared.svg b/assets/file-icons/folders/folder-shared.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-shared.svg
rename to assets/file-icons/folders/folder-shared.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-sky-code.svg b/assets/file-icons/folders/folder-sky-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-sky-code.svg
rename to assets/file-icons/folders/folder-sky-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-sky-outline.svg b/assets/file-icons/folders/folder-sky-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-sky-outline.svg
rename to assets/file-icons/folders/folder-sky-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-sky.svg b/assets/file-icons/folders/folder-sky.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-sky.svg
rename to assets/file-icons/folders/folder-sky.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-src.svg b/assets/file-icons/folders/folder-src.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-src.svg
rename to assets/file-icons/folders/folder-src.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-supabase.svg b/assets/file-icons/folders/folder-supabase.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-supabase.svg
rename to assets/file-icons/folders/folder-supabase.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-target.svg b/assets/file-icons/folders/folder-target.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-target.svg
rename to assets/file-icons/folders/folder-target.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-tauri.svg b/assets/file-icons/folders/folder-tauri.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-tauri.svg
rename to assets/file-icons/folders/folder-tauri.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-tina.svg b/assets/file-icons/folders/folder-tina.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-tina.svg
rename to assets/file-icons/folders/folder-tina.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-utils.svg b/assets/file-icons/folders/folder-utils.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-utils.svg
rename to assets/file-icons/folders/folder-utils.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-vercel.svg b/assets/file-icons/folders/folder-vercel.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-vercel.svg
rename to assets/file-icons/folders/folder-vercel.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-vscode.svg b/assets/file-icons/folders/folder-vscode.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-vscode.svg
rename to assets/file-icons/folders/folder-vscode.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-yellow-code.svg b/assets/file-icons/folders/folder-yellow-code.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-yellow-code.svg
rename to assets/file-icons/folders/folder-yellow-code.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-yellow-outline.svg b/assets/file-icons/folders/folder-yellow-outline.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-yellow-outline.svg
rename to assets/file-icons/folders/folder-yellow-outline.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-yellow.svg b/assets/file-icons/folders/folder-yellow.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-yellow.svg
rename to assets/file-icons/folders/folder-yellow.svg
diff --git a/crates/ui/assets/file-icons/folders/folder-zed.svg b/assets/file-icons/folders/folder-zed.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder-zed.svg
rename to assets/file-icons/folders/folder-zed.svg
diff --git a/crates/ui/assets/file-icons/folders/folder.svg b/assets/file-icons/folders/folder.svg
similarity index 100%
rename from crates/ui/assets/file-icons/folders/folder.svg
rename to assets/file-icons/folders/folder.svg
diff --git a/crates/ui/assets/fonts/Geist-Bold.ttf b/assets/fonts/Geist-Bold.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-Bold.ttf
rename to assets/fonts/Geist-Bold.ttf
diff --git a/crates/ui/assets/fonts/Geist-BoldItalic.ttf b/assets/fonts/Geist-BoldItalic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-BoldItalic.ttf
rename to assets/fonts/Geist-BoldItalic.ttf
diff --git a/crates/ui/assets/fonts/Geist-Italic.ttf b/assets/fonts/Geist-Italic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-Italic.ttf
rename to assets/fonts/Geist-Italic.ttf
diff --git a/crates/ui/assets/fonts/Geist-Medium.ttf b/assets/fonts/Geist-Medium.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-Medium.ttf
rename to assets/fonts/Geist-Medium.ttf
diff --git a/crates/ui/assets/fonts/Geist-MediumItalic.ttf b/assets/fonts/Geist-MediumItalic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-MediumItalic.ttf
rename to assets/fonts/Geist-MediumItalic.ttf
diff --git a/crates/ui/assets/fonts/Geist-SemiBold.ttf b/assets/fonts/Geist-SemiBold.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-SemiBold.ttf
rename to assets/fonts/Geist-SemiBold.ttf
diff --git a/crates/ui/assets/fonts/Geist-SemiBoldItalic.ttf b/assets/fonts/Geist-SemiBoldItalic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist-SemiBoldItalic.ttf
rename to assets/fonts/Geist-SemiBoldItalic.ttf
diff --git a/crates/ui/assets/fonts/Geist.ttf b/assets/fonts/Geist.ttf
similarity index 100%
rename from crates/ui/assets/fonts/Geist.ttf
rename to assets/fonts/Geist.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-Bold.ttf b/assets/fonts/GeistMono-Bold.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-Bold.ttf
rename to assets/fonts/GeistMono-Bold.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-BoldItalic.ttf b/assets/fonts/GeistMono-BoldItalic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-BoldItalic.ttf
rename to assets/fonts/GeistMono-BoldItalic.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-Italic.ttf b/assets/fonts/GeistMono-Italic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-Italic.ttf
rename to assets/fonts/GeistMono-Italic.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-Medium.ttf b/assets/fonts/GeistMono-Medium.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-Medium.ttf
rename to assets/fonts/GeistMono-Medium.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-MediumItalic.ttf b/assets/fonts/GeistMono-MediumItalic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-MediumItalic.ttf
rename to assets/fonts/GeistMono-MediumItalic.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-SemiBold.ttf b/assets/fonts/GeistMono-SemiBold.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-SemiBold.ttf
rename to assets/fonts/GeistMono-SemiBold.ttf
diff --git a/crates/ui/assets/fonts/GeistMono-SemiBoldItalic.ttf b/assets/fonts/GeistMono-SemiBoldItalic.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono-SemiBoldItalic.ttf
rename to assets/fonts/GeistMono-SemiBoldItalic.ttf
diff --git a/crates/ui/assets/fonts/GeistMono.ttf b/assets/fonts/GeistMono.ttf
similarity index 100%
rename from crates/ui/assets/fonts/GeistMono.ttf
rename to assets/fonts/GeistMono.ttf
diff --git a/crates/ui/assets/fonts/licenses/Geist-OFL.txt b/assets/fonts/licenses/Geist-OFL.txt
similarity index 100%
rename from crates/ui/assets/fonts/licenses/Geist-OFL.txt
rename to assets/fonts/licenses/Geist-OFL.txt
diff --git a/crates/ui/assets/fonts/licenses/THIRD_PARTY_NOTICES.md b/assets/fonts/licenses/THIRD_PARTY_NOTICES.md
similarity index 100%
rename from crates/ui/assets/fonts/licenses/THIRD_PARTY_NOTICES.md
rename to assets/fonts/licenses/THIRD_PARTY_NOTICES.md
diff --git a/crates/ui/assets/icons/action-build.svg b/assets/icons/action-build.svg
similarity index 100%
rename from crates/ui/assets/icons/action-build.svg
rename to assets/icons/action-build.svg
diff --git a/crates/ui/assets/icons/action-configure.svg b/assets/icons/action-configure.svg
similarity index 100%
rename from crates/ui/assets/icons/action-configure.svg
rename to assets/icons/action-configure.svg
diff --git a/crates/ui/assets/icons/action-debug.svg b/assets/icons/action-debug.svg
similarity index 100%
rename from crates/ui/assets/icons/action-debug.svg
rename to assets/icons/action-debug.svg
diff --git a/crates/ui/assets/icons/action-lint.svg b/assets/icons/action-lint.svg
similarity index 100%
rename from crates/ui/assets/icons/action-lint.svg
rename to assets/icons/action-lint.svg
diff --git a/crates/ui/assets/icons/action-play.svg b/assets/icons/action-play.svg
similarity index 100%
rename from crates/ui/assets/icons/action-play.svg
rename to assets/icons/action-play.svg
diff --git a/crates/ui/assets/icons/action-test.svg b/assets/icons/action-test.svg
similarity index 100%
rename from crates/ui/assets/icons/action-test.svg
rename to assets/icons/action-test.svg
diff --git a/crates/ui/assets/icons/add-circle.svg b/assets/icons/add-circle.svg
similarity index 100%
rename from crates/ui/assets/icons/add-circle.svg
rename to assets/icons/add-circle.svg
diff --git a/crates/ui/assets/icons/alt-arrow-down.svg b/assets/icons/alt-arrow-down.svg
similarity index 100%
rename from crates/ui/assets/icons/alt-arrow-down.svg
rename to assets/icons/alt-arrow-down.svg
diff --git a/crates/ui/assets/icons/alt-arrow-left.svg b/assets/icons/alt-arrow-left.svg
similarity index 100%
rename from crates/ui/assets/icons/alt-arrow-left.svg
rename to assets/icons/alt-arrow-left.svg
diff --git a/crates/ui/assets/icons/alt-arrow-right.svg b/assets/icons/alt-arrow-right.svg
similarity index 100%
rename from crates/ui/assets/icons/alt-arrow-right.svg
rename to assets/icons/alt-arrow-right.svg
diff --git a/crates/ui/assets/icons/alt-arrow-up.svg b/assets/icons/alt-arrow-up.svg
similarity index 100%
rename from crates/ui/assets/icons/alt-arrow-up.svg
rename to assets/icons/alt-arrow-up.svg
diff --git a/crates/ui/assets/icons/antigravity-mark.svg b/assets/icons/antigravity-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/antigravity-mark.svg
rename to assets/icons/antigravity-mark.svg
diff --git a/crates/ui/assets/icons/archive-minimalistic.svg b/assets/icons/archive-minimalistic.svg
similarity index 100%
rename from crates/ui/assets/icons/archive-minimalistic.svg
rename to assets/icons/archive-minimalistic.svg
diff --git a/crates/ui/assets/icons/archive-up-minimalistic.svg b/assets/icons/archive-up-minimalistic.svg
similarity index 100%
rename from crates/ui/assets/icons/archive-up-minimalistic.svg
rename to assets/icons/archive-up-minimalistic.svg
diff --git a/apps/landing/public/assets/icons/native/arrow-down.svg b/assets/icons/arrow-down.svg
similarity index 100%
rename from apps/landing/public/assets/icons/native/arrow-down.svg
rename to assets/icons/arrow-down.svg
diff --git a/crates/ui/assets/icons/arrow-left.svg b/assets/icons/arrow-left.svg
similarity index 100%
rename from crates/ui/assets/icons/arrow-left.svg
rename to assets/icons/arrow-left.svg
diff --git a/crates/ui/assets/icons/arrow-right.svg b/assets/icons/arrow-right.svg
similarity index 100%
rename from crates/ui/assets/icons/arrow-right.svg
rename to assets/icons/arrow-right.svg
diff --git a/apps/landing/public/assets/icons/native/arrow-up-right.svg b/assets/icons/arrow-up-right.svg
similarity index 100%
rename from apps/landing/public/assets/icons/native/arrow-up-right.svg
rename to assets/icons/arrow-up-right.svg
diff --git a/crates/ui/assets/icons/arrow-up.svg b/assets/icons/arrow-up.svg
similarity index 100%
rename from crates/ui/assets/icons/arrow-up.svg
rename to assets/icons/arrow-up.svg
diff --git a/crates/ui/assets/icons/bell.svg b/assets/icons/bell.svg
similarity index 100%
rename from crates/ui/assets/icons/bell.svg
rename to assets/icons/bell.svg
diff --git a/crates/ui/assets/icons/bot.svg b/assets/icons/bot.svg
similarity index 100%
rename from crates/ui/assets/icons/bot.svg
rename to assets/icons/bot.svg
diff --git a/crates/ui/assets/icons/calendar.svg b/assets/icons/calendar.svg
similarity index 100%
rename from crates/ui/assets/icons/calendar.svg
rename to assets/icons/calendar.svg
diff --git a/crates/ui/assets/icons/chat-round-line.svg b/assets/icons/chat-round-line.svg
similarity index 100%
rename from crates/ui/assets/icons/chat-round-line.svg
rename to assets/icons/chat-round-line.svg
diff --git a/crates/ui/assets/icons/check.svg b/assets/icons/check.svg
similarity index 100%
rename from crates/ui/assets/icons/check.svg
rename to assets/icons/check.svg
diff --git a/crates/ui/assets/icons/checklist.svg b/assets/icons/checklist.svg
similarity index 100%
rename from crates/ui/assets/icons/checklist.svg
rename to assets/icons/checklist.svg
diff --git a/crates/ui/assets/icons/claude-mark.svg b/assets/icons/claude-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/claude-mark.svg
rename to assets/icons/claude-mark.svg
diff --git a/crates/ui/assets/icons/clock-circle.svg b/assets/icons/clock-circle.svg
similarity index 100%
rename from crates/ui/assets/icons/clock-circle.svg
rename to assets/icons/clock-circle.svg
diff --git a/crates/ui/assets/icons/close-circle.svg b/assets/icons/close-circle.svg
similarity index 100%
rename from crates/ui/assets/icons/close-circle.svg
rename to assets/icons/close-circle.svg
diff --git a/crates/ui/assets/icons/close.svg b/assets/icons/close.svg
similarity index 100%
rename from crates/ui/assets/icons/close.svg
rename to assets/icons/close.svg
diff --git a/crates/ui/assets/icons/cloud.svg b/assets/icons/cloud.svg
similarity index 100%
rename from crates/ui/assets/icons/cloud.svg
rename to assets/icons/cloud.svg
diff --git a/crates/ui/assets/icons/collapse-arrows.svg b/assets/icons/collapse-arrows.svg
similarity index 100%
rename from crates/ui/assets/icons/collapse-arrows.svg
rename to assets/icons/collapse-arrows.svg
diff --git a/crates/ui/assets/icons/command.svg b/assets/icons/command.svg
similarity index 100%
rename from crates/ui/assets/icons/command.svg
rename to assets/icons/command.svg
diff --git a/crates/ui/assets/icons/copy.svg b/assets/icons/copy.svg
similarity index 100%
rename from crates/ui/assets/icons/copy.svg
rename to assets/icons/copy.svg
diff --git a/crates/ui/assets/icons/cursor-mark.svg b/assets/icons/cursor-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/cursor-mark.svg
rename to assets/icons/cursor-mark.svg
diff --git a/crates/ui/assets/icons/cursor-square.svg b/assets/icons/cursor-square.svg
similarity index 100%
rename from crates/ui/assets/icons/cursor-square.svg
rename to assets/icons/cursor-square.svg
diff --git a/crates/ui/assets/icons/cursor.svg b/assets/icons/cursor.svg
similarity index 100%
rename from crates/ui/assets/icons/cursor.svg
rename to assets/icons/cursor.svg
diff --git a/crates/ui/assets/icons/danger-triangle.svg b/assets/icons/danger-triangle.svg
similarity index 100%
rename from crates/ui/assets/icons/danger-triangle.svg
rename to assets/icons/danger-triangle.svg
diff --git a/crates/ui/assets/icons/devin-mark.svg b/assets/icons/devin-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/devin-mark.svg
rename to assets/icons/devin-mark.svg
diff --git a/crates/ui/assets/icons/document-add.svg b/assets/icons/document-add.svg
similarity index 100%
rename from crates/ui/assets/icons/document-add.svg
rename to assets/icons/document-add.svg
diff --git a/crates/ui/assets/icons/document.svg b/assets/icons/document.svg
similarity index 100%
rename from crates/ui/assets/icons/document.svg
rename to assets/icons/document.svg
diff --git a/crates/ui/assets/icons/drag-handle.svg b/assets/icons/drag-handle.svg
similarity index 100%
rename from crates/ui/assets/icons/drag-handle.svg
rename to assets/icons/drag-handle.svg
diff --git a/crates/ui/assets/icons/expand-arrows.svg b/assets/icons/expand-arrows.svg
similarity index 100%
rename from crates/ui/assets/icons/expand-arrows.svg
rename to assets/icons/expand-arrows.svg
diff --git a/crates/ui/assets/icons/eye-closed.svg b/assets/icons/eye-closed.svg
similarity index 100%
rename from crates/ui/assets/icons/eye-closed.svg
rename to assets/icons/eye-closed.svg
diff --git a/crates/ui/assets/icons/eye.svg b/assets/icons/eye.svg
similarity index 100%
rename from crates/ui/assets/icons/eye.svg
rename to assets/icons/eye.svg
diff --git a/crates/ui/assets/icons/fast-tier-bold.svg b/assets/icons/fast-tier-bold.svg
similarity index 100%
rename from crates/ui/assets/icons/fast-tier-bold.svg
rename to assets/icons/fast-tier-bold.svg
diff --git a/crates/ui/assets/icons/fast-tier.svg b/assets/icons/fast-tier.svg
similarity index 100%
rename from crates/ui/assets/icons/fast-tier.svg
rename to assets/icons/fast-tier.svg
diff --git a/crates/ui/assets/icons/file-code.svg b/assets/icons/file-code.svg
similarity index 100%
rename from crates/ui/assets/icons/file-code.svg
rename to assets/icons/file-code.svg
diff --git a/crates/ui/assets/icons/file-data.svg b/assets/icons/file-data.svg
similarity index 100%
rename from crates/ui/assets/icons/file-data.svg
rename to assets/icons/file-data.svg
diff --git a/crates/ui/assets/icons/file-image.svg b/assets/icons/file-image.svg
similarity index 100%
rename from crates/ui/assets/icons/file-image.svg
rename to assets/icons/file-image.svg
diff --git a/crates/ui/assets/icons/file-markdown.svg b/assets/icons/file-markdown.svg
similarity index 100%
rename from crates/ui/assets/icons/file-markdown.svg
rename to assets/icons/file-markdown.svg
diff --git a/crates/ui/assets/icons/file-style.svg b/assets/icons/file-style.svg
similarity index 100%
rename from crates/ui/assets/icons/file-style.svg
rename to assets/icons/file-style.svg
diff --git a/crates/ui/assets/icons/file-tree.svg b/assets/icons/file-tree.svg
similarity index 100%
rename from crates/ui/assets/icons/file-tree.svg
rename to assets/icons/file-tree.svg
diff --git a/crates/ui/assets/icons/floppy-disk.svg b/assets/icons/floppy-disk.svg
similarity index 100%
rename from crates/ui/assets/icons/floppy-disk.svg
rename to assets/icons/floppy-disk.svg
diff --git a/crates/ui/assets/icons/fold-vertical.svg b/assets/icons/fold-vertical.svg
similarity index 100%
rename from crates/ui/assets/icons/fold-vertical.svg
rename to assets/icons/fold-vertical.svg
diff --git a/crates/ui/assets/icons/folder-tree.svg b/assets/icons/folder-tree.svg
similarity index 100%
rename from crates/ui/assets/icons/folder-tree.svg
rename to assets/icons/folder-tree.svg
diff --git a/crates/ui/assets/icons/folder-with-files.svg b/assets/icons/folder-with-files.svg
similarity index 100%
rename from crates/ui/assets/icons/folder-with-files.svg
rename to assets/icons/folder-with-files.svg
diff --git a/crates/ui/assets/icons/folder.svg b/assets/icons/folder.svg
similarity index 100%
rename from crates/ui/assets/icons/folder.svg
rename to assets/icons/folder.svg
diff --git a/crates/ui/assets/icons/fork.svg b/assets/icons/fork.svg
similarity index 100%
rename from crates/ui/assets/icons/fork.svg
rename to assets/icons/fork.svg
diff --git a/crates/ui/assets/icons/fx-mark.svg b/assets/icons/fx-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/fx-mark.svg
rename to assets/icons/fx-mark.svg
diff --git a/crates/ui/assets/icons/gallery.svg b/assets/icons/gallery.svg
similarity index 100%
rename from crates/ui/assets/icons/gallery.svg
rename to assets/icons/gallery.svg
diff --git a/crates/ui/assets/icons/git-branch.svg b/assets/icons/git-branch.svg
similarity index 100%
rename from crates/ui/assets/icons/git-branch.svg
rename to assets/icons/git-branch.svg
diff --git a/crates/ui/assets/icons/github-mark.svg b/assets/icons/github-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/github-mark.svg
rename to assets/icons/github-mark.svg
diff --git a/crates/ui/assets/icons/global.svg b/assets/icons/global.svg
similarity index 100%
rename from crates/ui/assets/icons/global.svg
rename to assets/icons/global.svg
diff --git a/crates/ui/assets/icons/globe.svg b/assets/icons/globe.svg
similarity index 100%
rename from crates/ui/assets/icons/globe.svg
rename to assets/icons/globe.svg
diff --git a/crates/ui/assets/icons/grok-mark.svg b/assets/icons/grok-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/grok-mark.svg
rename to assets/icons/grok-mark.svg
diff --git a/crates/ui/assets/icons/hard-drive.svg b/assets/icons/hard-drive.svg
similarity index 100%
rename from crates/ui/assets/icons/hard-drive.svg
rename to assets/icons/hard-drive.svg
diff --git a/crates/ui/assets/icons/hermes-mark.svg b/assets/icons/hermes-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/hermes-mark.svg
rename to assets/icons/hermes-mark.svg
diff --git a/crates/ui/assets/icons/home.svg b/assets/icons/home.svg
similarity index 100%
rename from crates/ui/assets/icons/home.svg
rename to assets/icons/home.svg
diff --git a/crates/ui/assets/icons/info-circle.svg b/assets/icons/info-circle.svg
similarity index 100%
rename from crates/ui/assets/icons/info-circle.svg
rename to assets/icons/info-circle.svg
diff --git a/crates/ui/assets/icons/key-minimalistic.svg b/assets/icons/key-minimalistic.svg
similarity index 100%
rename from crates/ui/assets/icons/key-minimalistic.svg
rename to assets/icons/key-minimalistic.svg
diff --git a/crates/ui/assets/icons/keyboard.svg b/assets/icons/keyboard.svg
similarity index 100%
rename from crates/ui/assets/icons/keyboard.svg
rename to assets/icons/keyboard.svg
diff --git a/crates/ui/assets/icons/laptop.svg b/assets/icons/laptop.svg
similarity index 100%
rename from crates/ui/assets/icons/laptop.svg
rename to assets/icons/laptop.svg
diff --git a/crates/ui/assets/icons/list.svg b/assets/icons/list.svg
similarity index 100%
rename from crates/ui/assets/icons/list.svg
rename to assets/icons/list.svg
diff --git a/crates/ui/assets/icons/logout-2.svg b/assets/icons/logout-2.svg
similarity index 100%
rename from crates/ui/assets/icons/logout-2.svg
rename to assets/icons/logout-2.svg
diff --git a/crates/ui/assets/icons/magic-stick-3.svg b/assets/icons/magic-stick-3.svg
similarity index 100%
rename from crates/ui/assets/icons/magic-stick-3.svg
rename to assets/icons/magic-stick-3.svg
diff --git a/crates/ui/assets/icons/magnifer.svg b/assets/icons/magnifer.svg
similarity index 100%
rename from crates/ui/assets/icons/magnifer.svg
rename to assets/icons/magnifer.svg
diff --git a/crates/ui/assets/icons/microphone-off.svg b/assets/icons/microphone-off.svg
similarity index 100%
rename from crates/ui/assets/icons/microphone-off.svg
rename to assets/icons/microphone-off.svg
diff --git a/crates/ui/assets/icons/microphone.svg b/assets/icons/microphone.svg
similarity index 100%
rename from crates/ui/assets/icons/microphone.svg
rename to assets/icons/microphone.svg
diff --git a/crates/ui/assets/icons/minus.svg b/assets/icons/minus.svg
similarity index 100%
rename from crates/ui/assets/icons/minus.svg
rename to assets/icons/minus.svg
diff --git a/crates/ui/assets/icons/monitor.svg b/assets/icons/monitor.svg
similarity index 100%
rename from crates/ui/assets/icons/monitor.svg
rename to assets/icons/monitor.svg
diff --git a/crates/ui/assets/icons/moon.svg b/assets/icons/moon.svg
similarity index 100%
rename from crates/ui/assets/icons/moon.svg
rename to assets/icons/moon.svg
diff --git a/crates/ui/assets/icons/more-horizontal.svg b/assets/icons/more-horizontal.svg
similarity index 100%
rename from crates/ui/assets/icons/more-horizontal.svg
rename to assets/icons/more-horizontal.svg
diff --git a/crates/ui/assets/icons/muse-mark.svg b/assets/icons/muse-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/muse-mark.svg
rename to assets/icons/muse-mark.svg
diff --git a/crates/ui/assets/icons/openai-mark.svg b/assets/icons/openai-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/openai-mark.svg
rename to assets/icons/openai-mark.svg
diff --git a/crates/ui/assets/icons/opencode-mark.svg b/assets/icons/opencode-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/opencode-mark.svg
rename to assets/icons/opencode-mark.svg
diff --git a/crates/ui/assets/icons/palette-search.svg b/assets/icons/palette-search.svg
similarity index 100%
rename from crates/ui/assets/icons/palette-search.svg
rename to assets/icons/palette-search.svg
diff --git a/crates/ui/assets/icons/paperclip.svg b/assets/icons/paperclip.svg
similarity index 100%
rename from crates/ui/assets/icons/paperclip.svg
rename to assets/icons/paperclip.svg
diff --git a/crates/ui/assets/icons/pen-new-square.svg b/assets/icons/pen-new-square.svg
similarity index 100%
rename from crates/ui/assets/icons/pen-new-square.svg
rename to assets/icons/pen-new-square.svg
diff --git a/crates/ui/assets/icons/pen.svg b/assets/icons/pen.svg
similarity index 100%
rename from crates/ui/assets/icons/pen.svg
rename to assets/icons/pen.svg
diff --git a/crates/ui/assets/icons/phone-hang-up.svg b/assets/icons/phone-hang-up.svg
similarity index 100%
rename from crates/ui/assets/icons/phone-hang-up.svg
rename to assets/icons/phone-hang-up.svg
diff --git a/crates/ui/assets/icons/pi-mark.svg b/assets/icons/pi-mark.svg
similarity index 100%
rename from crates/ui/assets/icons/pi-mark.svg
rename to assets/icons/pi-mark.svg
diff --git a/crates/ui/assets/icons/pin.svg b/assets/icons/pin.svg
similarity index 100%
rename from crates/ui/assets/icons/pin.svg
rename to assets/icons/pin.svg
diff --git a/crates/ui/assets/icons/plus.svg b/assets/icons/plus.svg
similarity index 100%
rename from crates/ui/assets/icons/plus.svg
rename to assets/icons/plus.svg
diff --git a/crates/ui/assets/icons/project-default.svg b/assets/icons/project-default.svg
similarity index 100%
rename from crates/ui/assets/icons/project-default.svg
rename to assets/icons/project-default.svg
diff --git a/crates/ui/assets/icons/pull-request-draft.svg b/assets/icons/pull-request-draft.svg
similarity index 100%
rename from crates/ui/assets/icons/pull-request-draft.svg
rename to assets/icons/pull-request-draft.svg
diff --git a/crates/ui/assets/icons/pull-request.svg b/assets/icons/pull-request.svg
similarity index 100%
rename from crates/ui/assets/icons/pull-request.svg
rename to assets/icons/pull-request.svg
diff --git a/crates/ui/assets/icons/queue-check.svg b/assets/icons/queue-check.svg
similarity index 100%
rename from crates/ui/assets/icons/queue-check.svg
rename to assets/icons/queue-check.svg
diff --git a/crates/ui/assets/icons/queue-close.svg b/assets/icons/queue-close.svg
similarity index 100%
rename from crates/ui/assets/icons/queue-close.svg
rename to assets/icons/queue-close.svg
diff --git a/crates/ui/assets/icons/queue-drag-handle.svg b/assets/icons/queue-drag-handle.svg
similarity index 100%
rename from crates/ui/assets/icons/queue-drag-handle.svg
rename to assets/icons/queue-drag-handle.svg
diff --git a/crates/ui/assets/icons/queue-paperclip.svg b/assets/icons/queue-paperclip.svg
similarity index 100%
rename from crates/ui/assets/icons/queue-paperclip.svg
rename to assets/icons/queue-paperclip.svg
diff --git a/crates/ui/assets/icons/queue-send.svg b/assets/icons/queue-send.svg
similarity index 100%
rename from crates/ui/assets/icons/queue-send.svg
rename to assets/icons/queue-send.svg
diff --git a/crates/ui/assets/icons/refresh.svg b/assets/icons/refresh.svg
similarity index 100%
rename from crates/ui/assets/icons/refresh.svg
rename to assets/icons/refresh.svg
diff --git a/crates/ui/assets/icons/remote-server.svg b/assets/icons/remote-server.svg
similarity index 100%
rename from crates/ui/assets/icons/remote-server.svg
rename to assets/icons/remote-server.svg
diff --git a/crates/ui/assets/icons/restart.svg b/assets/icons/restart.svg
similarity index 100%
rename from crates/ui/assets/icons/restart.svg
rename to assets/icons/restart.svg
diff --git a/crates/ui/assets/icons/return.svg b/assets/icons/return.svg
similarity index 100%
rename from crates/ui/assets/icons/return.svg
rename to assets/icons/return.svg
diff --git a/crates/ui/assets/icons/settings-minimalistic.svg b/assets/icons/settings-minimalistic.svg
similarity index 100%
rename from crates/ui/assets/icons/settings-minimalistic.svg
rename to assets/icons/settings-minimalistic.svg
diff --git a/crates/ui/assets/icons/settings.svg b/assets/icons/settings.svg
similarity index 100%
rename from crates/ui/assets/icons/settings.svg
rename to assets/icons/settings.svg
diff --git a/crates/ui/assets/icons/smartphone.svg b/assets/icons/smartphone.svg
similarity index 100%
rename from crates/ui/assets/icons/smartphone.svg
rename to assets/icons/smartphone.svg
diff --git a/crates/ui/assets/icons/sort-vertical.svg b/assets/icons/sort-vertical.svg
similarity index 100%
rename from crates/ui/assets/icons/sort-vertical.svg
rename to assets/icons/sort-vertical.svg
diff --git a/crates/ui/assets/icons/sort.svg b/assets/icons/sort.svg
similarity index 100%
rename from crates/ui/assets/icons/sort.svg
rename to assets/icons/sort.svg
diff --git a/crates/ui/assets/icons/split-columns.svg b/assets/icons/split-columns.svg
similarity index 100%
rename from crates/ui/assets/icons/split-columns.svg
rename to assets/icons/split-columns.svg
diff --git a/crates/ui/assets/icons/star-bold.svg b/assets/icons/star-bold.svg
similarity index 100%
rename from crates/ui/assets/icons/star-bold.svg
rename to assets/icons/star-bold.svg
diff --git a/crates/ui/assets/icons/star.svg b/assets/icons/star.svg
similarity index 100%
rename from crates/ui/assets/icons/star.svg
rename to assets/icons/star.svg
diff --git a/crates/ui/assets/icons/stop.svg b/assets/icons/stop.svg
similarity index 100%
rename from crates/ui/assets/icons/stop.svg
rename to assets/icons/stop.svg
diff --git a/crates/ui/assets/icons/sun.svg b/assets/icons/sun.svg
similarity index 100%
rename from crates/ui/assets/icons/sun.svg
rename to assets/icons/sun.svg
diff --git a/crates/ui/assets/icons/tag.svg b/assets/icons/tag.svg
similarity index 100%
rename from crates/ui/assets/icons/tag.svg
rename to assets/icons/tag.svg
diff --git a/crates/ui/assets/icons/terminal.svg b/assets/icons/terminal.svg
similarity index 100%
rename from crates/ui/assets/icons/terminal.svg
rename to assets/icons/terminal.svg
diff --git a/crates/ui/assets/icons/trash-bin-minimalistic.svg b/assets/icons/trash-bin-minimalistic.svg
similarity index 100%
rename from crates/ui/assets/icons/trash-bin-minimalistic.svg
rename to assets/icons/trash-bin-minimalistic.svg
diff --git a/crates/ui/assets/icons/tuning.svg b/assets/icons/tuning.svg
similarity index 100%
rename from crates/ui/assets/icons/tuning.svg
rename to assets/icons/tuning.svg
diff --git a/crates/ui/assets/icons/volume-loud.svg b/assets/icons/volume-loud.svg
similarity index 100%
rename from crates/ui/assets/icons/volume-loud.svg
rename to assets/icons/volume-loud.svg
diff --git a/crates/ui/assets/icons/wallet.svg b/assets/icons/wallet.svg
similarity index 100%
rename from crates/ui/assets/icons/wallet.svg
rename to assets/icons/wallet.svg
diff --git a/crates/ui/assets/icons/widget.svg b/assets/icons/widget.svg
similarity index 100%
rename from crates/ui/assets/icons/widget.svg
rename to assets/icons/widget.svg
diff --git a/crates/ui/assets/icons/wifi-off.svg b/assets/icons/wifi-off.svg
similarity index 100%
rename from crates/ui/assets/icons/wifi-off.svg
rename to assets/icons/wifi-off.svg
diff --git a/crates/ui/assets/icons/window-maximize.svg b/assets/icons/window-maximize.svg
similarity index 100%
rename from crates/ui/assets/icons/window-maximize.svg
rename to assets/icons/window-maximize.svg
diff --git a/crates/ui/assets/icons/window-minimize.svg b/assets/icons/window-minimize.svg
similarity index 100%
rename from crates/ui/assets/icons/window-minimize.svg
rename to assets/icons/window-minimize.svg
diff --git a/crates/ui/assets/icons/window-restore.svg b/assets/icons/window-restore.svg
similarity index 100%
rename from crates/ui/assets/icons/window-restore.svg
rename to assets/icons/window-restore.svg
diff --git a/crates/ui/assets/icons/worktree.svg b/assets/icons/worktree.svg
similarity index 100%
rename from crates/ui/assets/icons/worktree.svg
rename to assets/icons/worktree.svg
diff --git a/crates/ui/assets/icons/wrap-text.svg b/assets/icons/wrap-text.svg
similarity index 100%
rename from crates/ui/assets/icons/wrap-text.svg
rename to assets/icons/wrap-text.svg
diff --git a/crates/ui/assets/icons/zeron-logo.svg b/assets/icons/zeron-logo.svg
similarity index 100%
rename from crates/ui/assets/icons/zeron-logo.svg
rename to assets/icons/zeron-logo.svg
diff --git a/crates/ui/assets/sounds/appshot.wav b/assets/sounds/appshot.wav
similarity index 100%
rename from crates/ui/assets/sounds/appshot.wav
rename to assets/sounds/appshot.wav
diff --git a/crates/ui/assets/sounds/attention.wav b/assets/sounds/attention.wav
similarity index 100%
rename from crates/ui/assets/sounds/attention.wav
rename to assets/sounds/attention.wav
diff --git a/crates/ui/assets/sounds/done.wav b/assets/sounds/done.wav
similarity index 100%
rename from crates/ui/assets/sounds/done.wav
rename to assets/sounds/done.wav
diff --git a/crates/ui/assets/sounds/request.wav b/assets/sounds/request.wav
similarity index 100%
rename from crates/ui/assets/sounds/request.wav
rename to assets/sounds/request.wav
diff --git a/crates/ui/assets/sounds/voice-end.wav b/assets/sounds/voice-end.wav
similarity index 100%
rename from crates/ui/assets/sounds/voice-end.wav
rename to assets/sounds/voice-end.wav
diff --git a/crates/ui/assets/sounds/voice-start.wav b/assets/sounds/voice-start.wav
similarity index 100%
rename from crates/ui/assets/sounds/voice-start.wav
rename to assets/sounds/voice-start.wav
diff --git a/crates/doc/src/parts.rs b/crates/doc/src/parts.rs
index c29fc07ea..2ea5cc2c3 100644
--- a/crates/doc/src/parts.rs
+++ b/crates/doc/src/parts.rs
@@ -5,8 +5,9 @@
use serde::{Deserialize, Serialize};
-use zeron_proto::{ToolReview,
- AgentEvent, SUBAGENT_INPUT_KEEP, ToolCall, ToolDiff, UserInputAnswer, UserInputQuestion,
+use zeron_proto::{
+ AgentEvent, SUBAGENT_INPUT_KEEP, ToolCall, ToolDiff, ToolReview, UserInputAnswer,
+ UserInputQuestion,
};
use crate::constants::MSG_INLINE_MAX;
@@ -966,20 +967,43 @@ mod tests {
fn a_review_folds_onto_its_call_and_a_later_one_replaces_it() {
use zeron_proto::ToolReviewStatus;
let mut parts = Vec::new();
- fold_event_into_parts(&mut parts, &AgentEvent::ToolCall { id: "c1".into(), call: ToolCall::Exec { command: "rm -rf x".into() } });
+ fold_event_into_parts(
+ &mut parts,
+ &AgentEvent::ToolCall {
+ id: "c1".into(),
+ call: ToolCall::Exec {
+ command: "rm -rf x".into(),
+ },
+ },
+ );
let review = |status| AgentEvent::ToolReviewed {
id: "c1".into(),
- review: ToolReview { status, risk: Some("high".into()), reason: Some("outside the workspace".into()) },
+ review: ToolReview {
+ status,
+ risk: Some("high".into()),
+ reason: Some("outside the workspace".into()),
+ },
};
fold_event_into_parts(&mut parts, &review(ToolReviewStatus::Reviewing));
fold_event_into_parts(&mut parts, &review(ToolReviewStatus::Denied));
// One for a call that isn't shown changes nothing.
- fold_event_into_parts(&mut parts, &AgentEvent::ToolReviewed {
- id: "elsewhere".into(),
- review: ToolReview { status: ToolReviewStatus::Approved, risk: None, reason: None },
- });
+ fold_event_into_parts(
+ &mut parts,
+ &AgentEvent::ToolReviewed {
+ id: "elsewhere".into(),
+ review: ToolReview {
+ status: ToolReviewStatus::Approved,
+ risk: None,
+ reason: None,
+ },
+ },
+ );
match &parts[..] {
- [MessagePart::Tool { review: Some(r), .. }] => {
+ [
+ MessagePart::Tool {
+ review: Some(r), ..
+ },
+ ] => {
assert_eq!(r.status, ToolReviewStatus::Denied);
assert_eq!(r.reason.as_deref(), Some("outside the workspace"));
}
diff --git a/crates/doc/src/schema.rs b/crates/doc/src/schema.rs
index 58014384c..475a36b88 100644
--- a/crates/doc/src/schema.rs
+++ b/crates/doc/src/schema.rs
@@ -337,7 +337,9 @@ fn from_doc_part(p: DocPartJson) -> MessagePart {
exit_code: p.exit_code,
output_truncated: p.output_truncated.unwrap_or(false),
output_lines: p.output_lines,
- review: p.review.and_then(|value| serde_json::from_value(value).ok()),
+ review: p
+ .review
+ .and_then(|value| serde_json::from_value(value).ok()),
},
None => MessagePart::Text {
id: p.id,
@@ -1151,6 +1153,69 @@ impl SessionDoc {
Ok(join_continuation_entries(entries))
}
+ /// The transcript's newest entries, each WHOLE and as [`Self::read_entries`]
+ /// then [`join_continuation_entries`] give it, read from their containers
+ /// without reading the rest of the list: up to `max_entries`, and only
+ /// while the parts read stay within `max_parts` (one turn can have tens of
+ /// thousands; none is read in part). A continuation comes only with its
+ /// root (read on past `max_entries` to find it, a little way); one whose
+ /// root lies further back is left out, as is an entry that can't be read.
+ ///
+ /// Unlike [`Self::read_opening_tail`], nothing here is cut short: a reader
+ /// may take these entries for the transcript's own. What's left out comes
+ /// with the whole read that must follow.
+ pub fn read_newest_entries(
+ &self,
+ max_entries: usize,
+ max_parts: usize,
+ ) -> Result, DocError> {
+ use loro::{Container, ValueOrContainer};
+ let messages = self.doc.get_list("messages");
+ // How far back a continuation's root is looked for.
+ let reach = max_entries.saturating_mul(4).max(max_entries + 16);
+ let mut parts_read = 0usize;
+ let mut entries = Vec::new();
+ let mut roots = std::collections::HashSet::new();
+ let mut missing = std::collections::HashSet::new();
+ for (scanned, index) in (0..messages.len()).rev().enumerate() {
+ if scanned >= reach || (entries.len() >= max_entries && missing.is_empty()) {
+ break;
+ }
+ let value = match messages.get(index) {
+ Some(ValueOrContainer::Container(Container::Map(map))) => {
+ let parts = match map.get("parts") {
+ Some(ValueOrContainer::Container(Container::List(parts))) => parts.len(),
+ _ => 0,
+ };
+ if parts_read + parts > max_parts {
+ break;
+ }
+ parts_read += parts;
+ map.get_deep_value().to_json_value()
+ }
+ Some(ValueOrContainer::Value(value)) => value.to_json_value(),
+ _ => continue,
+ };
+ let Some(entry) = self.parse_entry(value) else { continue };
+ match &entry.continuation_of {
+ Some(root) if !roots.contains(root) => {
+ missing.insert(root.clone());
+ }
+ Some(_) => {}
+ None => {
+ missing.remove(&entry.id);
+ roots.insert(entry.id.clone());
+ }
+ }
+ entries.push(entry);
+ }
+ entries.reverse();
+ // (A continuation without its root here would show as an entry of
+ // its own; the whole read joins it into its root.)
+ entries.retain(|e| e.continuation_of.as_ref().is_none_or(|root| roots.contains(root)));
+ Ok(join_continuation_entries(entries))
+ }
+
/// Read the commands ledger.
///
/// Same skip-not-fail policy as `read_entries`: any device can append
@@ -2769,6 +2834,53 @@ mod tests {
);
}
+ /// The newest entries, whole and joined as the whole read joins them:
+ /// a continuation with its root, or not at all; never an entry in part.
+ #[test]
+ fn newest_entries_are_whole_and_joined_as_the_whole_read_joins_them() {
+ let doc = SessionDoc::init("tail").unwrap();
+ let push = |id: &str, parts: usize, continuation_of: Option<&str>| {
+ doc.push_message(&SessionMessageEntry {
+ id: id.into(),
+ role: MessageRole::Assistant,
+ parts: (0..parts)
+ .map(|part| MessagePart::Text { id: format!("{id}-{part}"), text: "body".into() })
+ .collect(),
+ created_at: 0,
+ device_id: "device".into(),
+ status: Some(MessageStatus::Complete),
+ continuation_of: continuation_of.map(Into::into),
+ duration_ms: None,
+ })
+ .unwrap();
+ };
+ for i in 0..10 {
+ push(&format!("e{i}"), 2, None);
+ }
+ // A turn in three segments, a prompt between its second and third.
+ push("turn", 3, None);
+ push("turn-1", 3, Some("turn"));
+ push("prompt", 1, None);
+ push("turn-2", 3, Some("turn"));
+ let whole = join_continuation_entries(doc.read_entries().unwrap());
+ let newest = |entries, parts| doc.read_newest_entries(entries, parts).unwrap();
+ // Everything: the whole read's entries.
+ assert_eq!(newest(100, 1_000), whole);
+ // Two entries asked for: read on back to the turn's root, so it
+ // comes joined (the whole read's turn, then the prompt).
+ assert_eq!(newest(2, 1_000), whole[whole.len() - 2..]);
+ // Too few parts to reach its root: the segments are left out.
+ assert_eq!(newest(2, 7).iter().map(|e| e.id.as_str()).collect::>(), ["prompt"]);
+ // The newest alone more than the parts allowed: nothing.
+ assert!(newest(1, 2).is_empty());
+ // A segment whose root is gone shows as the whole read shows it.
+ push("orphan", 1, Some("nowhere"));
+ let whole = join_continuation_entries(doc.read_entries().unwrap());
+ assert_eq!(whole.last().unwrap().id, "orphan");
+ assert!(newest(100, 1_000).iter().all(|e| e.id != "orphan"), "left out, for the whole read");
+ assert_eq!(newest(100, 1_000), whole[..whole.len() - 1]);
+ }
+
#[test]
fn generated_image_persists_updates_and_salvages() {
let doc = SessionDoc::init("images").unwrap();
@@ -3531,7 +3643,12 @@ mod tests {
let mut folded = Vec::new();
fold_event_into_parts(
&mut folded,
- &AgentEvent::ToolCall { id: "c1".into(), call: ToolCall::Exec { command: "rm -rf ~/x".into() } },
+ &AgentEvent::ToolCall {
+ id: "c1".into(),
+ call: ToolCall::Exec {
+ command: "rm -rf ~/x".into(),
+ },
+ },
);
writer.sync(&folded).unwrap();
for status in [ToolReviewStatus::Reviewing, ToolReviewStatus::Denied] {
@@ -3539,7 +3656,11 @@ mod tests {
&mut folded,
&AgentEvent::ToolReviewed {
id: "c1".into(),
- review: ToolReview { status, risk: Some("high".into()), reason: Some("outside the workspace".into()) },
+ review: ToolReview {
+ status,
+ risk: Some("high".into()),
+ reason: Some("outside the workspace".into()),
+ },
},
);
writer.sync(&folded).unwrap();
@@ -3548,9 +3669,15 @@ mod tests {
let snapshot = doc.export_snapshot().unwrap();
let replica = loro::LoroDoc::new();
replica.import(&snapshot).unwrap();
- for entries in [doc.read_entries().unwrap(), SessionDoc::from_doc(replica).read_entries().unwrap()] {
+ for entries in [
+ doc.read_entries().unwrap(),
+ SessionDoc::from_doc(replica).read_entries().unwrap(),
+ ] {
match &entries[0].parts[0] {
- MessagePart::Tool { review: Some(review), .. } => {
+ MessagePart::Tool {
+ review: Some(review),
+ ..
+ } => {
assert_eq!(review.status, ToolReviewStatus::Denied);
assert_eq!(review.risk.as_deref(), Some("high"));
assert_eq!(review.reason.as_deref(), Some("outside the workspace"));
diff --git a/crates/doc/src/transcript_delta.rs b/crates/doc/src/transcript_delta.rs
index 6b0570f41..18cf1407f 100644
--- a/crates/doc/src/transcript_delta.rs
+++ b/crates/doc/src/transcript_delta.rs
@@ -554,6 +554,57 @@ pub fn delta_from_known>(
TranscriptFrame::Delta { upsert, append: Vec::new(), remove, parts: Vec::new(), count: next.len() }
}
+/// For a reader holding `known` (as [`delta_from_known`] takes it), what it
+/// can be sent from the transcript's newest entries alone (`tail`: whole
+/// entries, a suffix of the transcript) before the rest is read: the entries
+/// it holds that changed, and the new ones after the last of `tail` it holds
+/// (in order, newest last). Sent as an opening tail (`historyPending`), which
+/// a reader holding rows takes into them: each it holds replaced where it
+/// is, each new one put after them all. (A new entry before one it holds
+/// would land out of place: it's left for the whole delta.)
+///
+/// Returns them, and `known` as the reader holds it once it has taken them:
+/// what the whole delta that follows is measured from.
+pub fn tail_since_known>(
+ known: &[(String, u64)],
+ tail: &[E],
+) -> (Vec, Vec<(String, u64)>) {
+ let tail: Vec<&SessionMessageEntry> = tail.iter().map(Borrow::borrow).collect();
+ // (The reader takes a tail entry into the first row with its id.)
+ let mut known_at: HashMap<&str, usize> = HashMap::with_capacity(known.len());
+ for (i, (id, _)) in known.iter().enumerate() {
+ known_at.entry(id.as_str()).or_insert(i);
+ }
+ let last_held = tail.iter().rposition(|e| known_at.contains_key(e.id.as_str()));
+ let mut sent = Vec::new();
+ let mut changed: Vec<(usize, u64)> = Vec::new();
+ let mut added: Vec<(String, u64)> = Vec::new();
+ for (i, entry) in tail.iter().copied().enumerate() {
+ match known_at.get(entry.id.as_str()) {
+ Some(&at) => {
+ let sum = entry_sum_of(entry);
+ if sum != known[at].1 {
+ changed.push((at, sum));
+ sent.push(entry.clone());
+ }
+ }
+ None if last_held.is_none_or(|held| i > held)
+ && !added.iter().any(|(id, _)| *id == entry.id) =>
+ {
+ added.push((entry.id.clone(), entry_sum_of(entry)));
+ sent.push(entry.clone());
+ }
+ None => {}
+ }
+ }
+ let mut holds = known.to_vec();
+ for (at, sum) in changed {
+ holds[at].1 = sum;
+ }
+ holds.extend(added);
+ (sent, holds)
+}
+
/// A frame that could not be applied cleanly — the consumer's copy has
/// diverged (skew, missed frame) and it should resubscribe for a reset.
#[derive(Debug, thiserror::Error)]
@@ -1182,4 +1233,88 @@ mod context_update_tests {
.is_none()
);
}
+
+ /// A reader holding rows, sent first what changed among the newest
+ /// entries (taken as the app takes an opening tail: in place, new ones
+ /// after all it holds), then the delta from what it then holds, lands on
+ /// the transcript: whatever changed, wherever, and whatever changed
+ /// between the two reads.
+ #[test]
+ fn a_reader_takes_the_tail_then_the_rest_and_lands_on_the_transcript() {
+ let entry = |id: &str, text: &str| SessionMessageEntry {
+ id: id.into(),
+ role: crate::schema::MessageRole::Assistant,
+ parts: vec![MessagePart::Text { id: "t0".into(), text: text.into() }],
+ created_at: 0,
+ device_id: "dev".into(),
+ status: None,
+ continuation_of: None,
+ duration_ms: None,
+ };
+ let held: Vec<_> = (0..30).map(|i| entry(&format!("e{i}"), "done")).collect();
+ let known: Vec<(String, u64)> = held.iter().map(|e| (e.id.clone(), entry_sum_of(e))).collect();
+ // The app's `heard_frame` with rows held and `historyPending`.
+ let take_tail = |rows: &mut Vec, sent: Vec| {
+ for entry in sent {
+ match rows.iter_mut().find(|e| e.id == entry.id) {
+ Some(row) => *row = entry,
+ None => rows.push(entry),
+ }
+ }
+ };
+ // `first`: the transcript as the tail is read; `then`: as the whole
+ // read finds it.
+ let check = |first: &[SessionMessageEntry], then: &[SessionMessageEntry], tail: usize| {
+ let (sent, holds) = tail_since_known(&known, &first[first.len() - tail..]);
+ let mut rows = held.clone();
+ take_tail(&mut rows, sent.clone());
+ assert_eq!(
+ holds,
+ rows.iter().map(|e| (e.id.clone(), entry_sum_of(e))).collect::>(),
+ "holds is what the reader holds"
+ );
+ let frame = delta_from_known(&holds, then);
+ let json = serde_json::to_value(&frame).unwrap();
+ apply_transcript_frame(&mut rows, serde_json::from_value(json).unwrap()).unwrap();
+ assert_eq!(rows, then);
+ (sent.into_iter().map(|e| e.id).collect::>(), frame)
+ };
+ // Away: e27 changed, e30 and e31 came, e5 changed, e9 went.
+ let mut now = held.clone();
+ now[27] = entry("e27", "changed");
+ now[5] = entry("e5", "changed");
+ now.remove(9);
+ now.push(entry("e30", "new"));
+ now.push(entry("e31", "new"));
+ let (sent, frame) = check(&now, &now, 8);
+ assert_eq!(sent, ["e27", "e30", "e31"], "only what changed in the tail");
+ let TranscriptFrame::Delta { upsert, remove, .. } = frame else { panic!("a delta") };
+ assert_eq!(upsert.iter().map(|u| u.entry.id.as_str()).collect::>(), ["e5", "e10"]);
+ assert_eq!(remove, ["e9"]);
+ // Nothing changed: nothing first, and the delta is empty.
+ let (sent, frame) = check(&held, &held, 8);
+ assert!(sent.is_empty() && frame.is_empty_delta());
+ // A new entry before one held (a provider switch's seam, written
+ // before the unanswered prompt): left for the delta, which places it.
+ let mut seam = held.clone();
+ seam.insert(29, entry("switch", "seam"));
+ let (sent, _) = check(&seam, &seam, 8);
+ assert!(sent.is_empty());
+ // More new than the tail reads: all of the tail is new, after it all.
+ let mut many = held.clone();
+ many.extend((30..50).map(|i| entry(&format!("e{i}"), "new")));
+ let (sent, _) = check(&many, &many, 8);
+ assert_eq!(sent.len(), 8);
+ // Changed between the reads: a new entry gone, a change undone, a
+ // change changed again.
+ let mut then = now.clone();
+ then.retain(|e| e.id != "e31");
+ let at = then.iter().position(|e| e.id == "e27").unwrap();
+ then[at] = entry("e27", "done");
+ check(&now, &then, 8);
+ let mut then = now.clone();
+ let at = then.iter().position(|e| e.id == "e30").unwrap();
+ then[at] = entry("e30", "grew more");
+ check(&now, &then, 8);
+ }
}
diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml
index 8dd3b8719..b7469e281 100644
--- a/crates/engine/Cargo.toml
+++ b/crates/engine/Cargo.toml
@@ -28,6 +28,8 @@ tokio.workspace = true
futures.workspace = true
zeron-term-link.workspace = true
async-trait.workspace = true
+# Agents' Zeron MCP tools, served by the engine itself (`zeron_mcp::http`).
+zeron-mcp.workspace = true
serde.workspace = true
serde_json.workspace = true
rusqlite.workspace = true
@@ -74,7 +76,6 @@ windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Securit
[dev-dependencies]
tracing-subscriber.workspace = true
-zeron-mcp.workspace = true
zeron-harness = { workspace = true, features = ["installer-fixture"] }
# Paused-clock tests (the 30-minute idle reaper).
tokio = { workspace = true, features = ["test-util"] }
diff --git a/crates/engine/src/agent_accounts.rs b/crates/engine/src/agent_accounts.rs
index 8bd8fcdb5..a00af2a4e 100644
--- a/crates/engine/src/agent_accounts.rs
+++ b/crates/engine/src/agent_accounts.rs
@@ -1974,7 +1974,7 @@ impl AgentAccounts {
.stdin(zeron_harness::process::Stdio::null())
.stdout(zeron_harness::process::Stdio::piped())
.stderr(zeron_harness::process::Stdio::piped());
- let child = match command.spawn() {
+ let child = match zeron_harness::process::spawn_agent(&mut command) {
Ok(child) => child,
Err(err) => {
let _ = std::fs::remove_dir_all(&home);
@@ -2149,7 +2149,7 @@ impl AgentAccounts {
if let Some(noop_browser) = ensure_noop_browser(&self.inner.config.root_dir()) {
command.env("BROWSER", noop_browser);
}
- let child = command.spawn().map_err(|err| {
+ let child = zeron_harness::process::spawn_agent(&mut command).map_err(|err| {
EngineError::Other(if err.kind() == std::io::ErrorKind::NotFound {
"The `codex` CLI was not found on this device — install it first.".into()
} else {
diff --git a/crates/engine/src/agent_accounts/stores.rs b/crates/engine/src/agent_accounts/stores.rs
index 623d6bc83..c5f919c94 100644
--- a/crates/engine/src/agent_accounts/stores.rs
+++ b/crates/engine/src/agent_accounts/stores.rs
@@ -1506,10 +1506,10 @@ fn hermes_env_secret(var: &str, hermes_home: &Path) -> bool {
!value.is_empty()
};
// (Only a regular file of a sane size: no FIFO or runaway file is read
- // while the accounts are listed.)
+ // while the accounts are listed; checked on the open file, so one
+ // swapped in after a check of the path is refused too.)
let env_file = hermes_home.join(".env");
- let readable = std::fs::metadata(&env_file).is_ok_and(|m| m.is_file() && m.len() <= 1 << 20);
- if readable && let Ok(text) = std::fs::read_to_string(&env_file) {
+ if let Ok(text) = zeron_harness::bounded_file::read_to_string(&env_file, 1 << 20) {
for line in text.lines() {
let line = line.trim();
let line = line.strip_prefix("export ").unwrap_or(line);
diff --git a/crates/engine/src/auth.rs b/crates/engine/src/auth.rs
index 32d02022d..18c1b8ce8 100644
--- a/crates/engine/src/auth.rs
+++ b/crates/engine/src/auth.rs
@@ -558,6 +558,13 @@ impl Auth {
self.inner.loaded_workos_session
}
+ /// Whether this device keeps its chats local while signed in
+ /// ([`zeron_proto::KEEP_CHATS_LOCAL_FILE`] in the data dir). Only
+ /// [`crate::Engine::initial_workspace_scope`] should act on it, once.
+ pub fn keeps_chats_local(&self) -> bool {
+ zeron_proto::keeps_chats_local(&self.inner.config.data_dir)
+ }
+
/// Live auth status (current value + changes).
pub fn watch_state(&self) -> watch::Receiver {
self.inner.state_tx.subscribe()
diff --git a/crates/engine/src/change_requests.rs b/crates/engine/src/change_requests.rs
index b4a28ec3f..f3576e826 100644
--- a/crates/engine/src/change_requests.rs
+++ b/crates/engine/src/change_requests.rs
@@ -1,4 +1,10 @@
-//! Demand-driven checkout change-request cache and polling streams.
+//! Demand-driven checkout change-request cache and streams.
+//!
+//! A watched checkout's Git state (its branch, upstream, remotes) is read
+//! again only when the files Git reads it from change: file-system events on
+//! its git directories ([`GitWatch`]), gated by a cheap fingerprint of those
+//! files ([`GitFingerprint`]), so a checkout left alone runs no Git at all.
+//! The provider (GitHub) is asked again on its own schedule (`refresh`).
use std::collections::HashMap;
use std::path::{Path, PathBuf};
@@ -9,12 +15,13 @@ use std::time::Duration;
use futures::future::{BoxFuture, Shared};
use futures::stream::BoxStream;
use futures::{FutureExt, StreamExt};
-use tokio::sync::Mutex as AsyncMutex;
+use tokio::sync::{Mutex as AsyncMutex, watch};
use tokio::time::Instant;
use tokio_util::sync::CancellationToken;
use zeron_proto::CheckoutChangeRequestStatus;
+use crate::fs_watch::{FsWatch, FsWatchHub};
use crate::repos::{CheckoutIdentity, Repos};
use crate::source_control::{
BranchHeadContext, ChangeRequestError, ChangeRequestResolver, CheckoutChangeRequestLookup,
@@ -25,7 +32,12 @@ const WITH_CHANGE_REQUEST_TTL: Duration = Duration::from_secs(2 * 60);
const WITHOUT_CHANGE_REQUEST_TTL: Duration = Duration::from_secs(45);
const FAILURE_INITIAL_BACKOFF: Duration = Duration::from_secs(20);
const FAILURE_MAX_BACKOFF: Duration = Duration::from_secs(15 * 60);
+/// How often a checkout whose git directories aren't watched (the watch
+/// failed, or isn't live yet) is inspected again, as every checkout once was.
const CONTEXT_POLL_INTERVAL: Duration = Duration::from_secs(15);
+/// Git changes several of its files at once (a checkout writes HEAD, the
+/// index and a reflog): a burst of events is one look, this long after it.
+const GIT_EVENT_SETTLE: Duration = Duration::from_millis(250);
/// A checkout on its repository's default branch: a pull request whose head
/// is that branch is rare (a release pull request), so it is asked about
/// seldom. Every chat started in a project's main folder sits there, and each
@@ -53,6 +65,7 @@ struct Timing {
failure_max_backoff: Duration,
context_poll_interval: Duration,
default_branch_ttl: Duration,
+ git_event_settle: Duration,
}
impl Default for Timing {
@@ -64,6 +77,7 @@ impl Default for Timing {
failure_max_backoff: FAILURE_MAX_BACKOFF,
context_poll_interval: CONTEXT_POLL_INTERVAL,
default_branch_ttl: DEFAULT_BRANCH_TTL,
+ git_event_settle: GIT_EVENT_SETTLE,
}
}
}
@@ -94,11 +108,16 @@ struct CacheState {
type InspectionRun = Shared>>;
/// The latest Git inspection of one watched path. Every subscription on the
-/// path shares it, so a project with many chats runs Git once per poll
-/// interval instead of once per chat. Any waiter can drive the shared run,
-/// so a subscription that stops being polled mid-inspection blocks no one.
+/// path shares it, so a project with many chats runs Git once per change
+/// instead of once per chat. Any waiter can drive the shared run, so a
+/// subscription that stops being polled mid-inspection blocks no one.
struct Inspection {
started: Instant,
+ /// What the checkout's Git files were as it started: while they stay so
+ /// it answers (for a poll interval, if they aren't watched).
+ inputs: Option,
+ /// The watch of the subscription that started it: kept while that lasts.
+ watch: Weak,
run: InspectionRun,
}
@@ -108,10 +127,142 @@ struct Inner {
lookup: Arc,
entries: Mutex>>,
inspections: Mutex>,
+ /// Each watched git dir's events, shared by its subscriptions.
+ git_watches: Mutex>>,
timing: Timing,
shutdown: CancellationToken,
}
+/// File-system events on one checkout's git directories, for as long as a
+/// subscription holds it: `changed` ticks on each. Watched: the git dir
+/// (HEAD; a worktree's own config), the common dir (config, packed-refs) and
+/// its `refs` (an upstream's remote-tracking branch, `/HEAD`).
+struct GitWatch {
+ git_dir: PathBuf,
+ changed: watch::Receiver,
+ watches: Vec,
+}
+
+impl GitWatch {
+ /// Blocking (the hub canonicalizes): from the blocking pool.
+ fn start(git_dir: &Path) -> Self {
+ let (tx, changed) = watch::channel(0_u64);
+ let tx = Arc::new(tx);
+ let hub = FsWatchHub::global();
+ let common = common_dir(git_dir);
+ let mut dirs = vec![(git_dir.to_path_buf(), notify::RecursiveMode::NonRecursive)];
+ if common != git_dir {
+ dirs.push((common.clone(), notify::RecursiveMode::NonRecursive));
+ }
+ dirs.push((common.join("refs"), notify::RecursiveMode::Recursive));
+ let watches = dirs
+ .into_iter()
+ .map(|(dir, mode)| {
+ let tx = tx.clone();
+ hub.watch(&dir, mode, move |_event| {
+ // Any event, and the rescan a watch sends as it goes
+ // live: the fingerprint says whether it mattered.
+ tx.send_modify(|n| *n = n.wrapping_add(1));
+ })
+ })
+ .collect();
+ Self {
+ git_dir: git_dir.to_path_buf(),
+ changed,
+ watches,
+ }
+ }
+
+ /// Whether every directory's watch is installed: events then say when
+ /// Git's state can have changed.
+ fn live(&self) -> bool {
+ self.watches.iter().all(FsWatch::is_live)
+ }
+}
+
+/// The git dir's common dir (a linked worktree's main `.git`): `commondir`
+/// names it, relative to the git dir or absolute.
+fn common_dir(git_dir: &Path) -> PathBuf {
+ match std::fs::read_to_string(git_dir.join("commondir")) {
+ Ok(common) => git_dir.join(common.trim()),
+ Err(_) => git_dir.to_path_buf(),
+ }
+}
+
+/// What a checkout inspection reads from Git, cheaply (a few `stat`s and
+/// HEAD): its answer can't change while this doesn't. HEAD's content (the
+/// branch), the configs (upstream, remotes, push default; system and global
+/// ones too), packed refs, and every remote-tracking ref (an upstream
+/// resolves once its branch is pushed; `/HEAD` names the default
+/// branch). A commit, `git status`, an index write: none of these.
+#[derive(Debug, Clone, PartialEq, Eq)]
+struct GitFingerprint {
+ head: Option>,
+ stamps: Vec<(PathBuf, Option<(u64, i128, u64)>)>,
+}
+
+impl GitFingerprint {
+ /// Blocking: from the blocking pool.
+ fn read(git_dir: &Path) -> Self {
+ fn stamp(path: &Path) -> Option<(u64, i128, u64)> {
+ #[cfg(unix)]
+ use std::os::unix::fs::MetadataExt;
+ let meta = std::fs::metadata(path).ok()?;
+ let mtime = meta
+ .modified()
+ .ok()
+ .and_then(|t| t.duration_since(std::time::UNIX_EPOCH).ok())
+ .map_or(0, |d| d.as_nanos() as i128);
+ #[cfg(unix)]
+ let inode = meta.ino();
+ #[cfg(not(unix))]
+ let inode = 0;
+ Some((inode, mtime, meta.len()))
+ }
+ let common = common_dir(git_dir);
+ let mut paths = vec![
+ common.join("config"),
+ git_dir.join("config.worktree"),
+ common.join("packed-refs"),
+ "/etc/gitconfig".into(),
+ ];
+ if let Some(home) = std::env::var_os("HOME").map(PathBuf::from) {
+ let xdg = std::env::var_os("XDG_CONFIG_HOME")
+ .map(PathBuf::from)
+ .unwrap_or_else(|| home.join(".config"));
+ paths.push(home.join(".gitconfig"));
+ paths.push(xdg.join("git/config"));
+ }
+ // Remote-tracking refs, walked (a handful of folders; refs a fetch
+ // packed are in packed-refs).
+ let mut dirs = vec![common.join("refs/remotes")];
+ while let Some(dir) = dirs.pop() {
+ let Ok(entries) = std::fs::read_dir(&dir) else {
+ continue;
+ };
+ for entry in entries.flatten() {
+ let path = entry.path();
+ if entry.file_type().is_ok_and(|t| t.is_dir()) {
+ dirs.push(path);
+ } else {
+ paths.push(path);
+ }
+ }
+ }
+ paths.sort();
+ Self {
+ head: std::fs::read(git_dir.join("HEAD")).ok(),
+ stamps: paths
+ .into_iter()
+ .map(|path| {
+ let stamp = stamp(&path);
+ (path, stamp)
+ })
+ .collect(),
+ }
+ }
+}
+
/// Shared host-side cache. It owns no polling task: a stream drives refreshes only
/// while it is actively polled, so dropping the last RPC subscription stops work.
#[derive(Clone)]
@@ -145,6 +296,7 @@ impl CheckoutChangeRequests {
lookup,
entries: Mutex::new(HashMap::new()),
inspections: Mutex::new(HashMap::new()),
+ git_watches: Mutex::new(HashMap::new()),
timing,
shutdown: CancellationToken::new(),
}),
@@ -197,20 +349,28 @@ impl CheckoutChangeRequests {
requested_branch,
lease: None,
last_emitted: None,
+ git: None,
};
futures::stream::unfold(state, |mut state| async move {
+ if state.git.is_none() {
+ let git = state.service.git_watch(&state.identity.git_dir).await;
+ // Events from here on: the first inspection reads the files
+ // as they are now.
+ let mut changed = git.changed.clone();
+ changed.borrow_and_update();
+ state.git = Some((git, changed));
+ }
loop {
if state.service.inner.shutdown.is_cancelled() {
return None;
}
- let mut source = match state.service.inspect(&state.cwd).await {
+ let mut source = match state.service.inspect(&state).await {
Ok(source) => source,
Err(error) => {
tracing::debug!(%error, "change request checkout inspection unavailable");
- if !state
- .sleep(state.service.inner.timing.context_poll_interval)
- .await
- {
+ // Until Git's files change (a branch checked out
+ // again, a repository made).
+ if !state.wait(None).await {
return None;
}
continue;
@@ -244,9 +404,7 @@ impl CheckoutChangeRequests {
}
}
- let until_refresh = next_refresh.saturating_duration_since(Instant::now());
- let delay = until_refresh.min(state.service.inner.timing.context_poll_interval);
- if !state.sleep(delay).await {
+ if !state.wait(next_refresh).await {
return None;
}
}
@@ -254,10 +412,61 @@ impl CheckoutChangeRequests {
.boxed()
}
- /// Inspect `cwd`, joining an inspection started less than a poll
- /// interval ago. Concurrent callers for one path share one run instead of
- /// each starting their own Git processes.
- async fn inspect(&self, cwd: &Path) -> Result {
+ /// The watch on `git_dir`, shared with every subscription on it.
+ async fn git_watch(&self, git_dir: &Path) -> Arc {
+ let shared = |watches: &HashMap>| {
+ watches.get(git_dir).and_then(Weak::upgrade)
+ };
+ if let Some(watch) = shared(
+ &self
+ .inner
+ .git_watches
+ .lock()
+ .unwrap_or_else(PoisonError::into_inner),
+ ) {
+ return watch;
+ }
+ let dir = git_dir.to_owned();
+ let started = tokio::task::spawn_blocking(move || GitWatch::start(&dir))
+ .await
+ .unwrap_or_else(|_| GitWatch {
+ // (Never live: the subscription polls.)
+ git_dir: git_dir.to_owned(),
+ changed: watch::channel(0).1,
+ watches: Vec::new(),
+ });
+ let mut watches = self
+ .inner
+ .git_watches
+ .lock()
+ .unwrap_or_else(PoisonError::into_inner);
+ // (Another subscription may have started one meanwhile.)
+ if let Some(watch) = shared(&watches) {
+ return watch;
+ }
+ watches.retain(|_, watch| watch.strong_count() > 0);
+ let watch = Arc::new(started);
+ watches.insert(watch.git_dir.clone(), Arc::downgrade(&watch));
+ watch
+ }
+
+ /// Inspect the subscription's path, joining the inspection of it that
+ /// still answers: one taken with Git's files as they are now (watched,
+ /// any time ago; unwatched, less than a poll interval ago). Concurrent
+ /// callers for one path share one run instead of each starting their own
+ /// Git processes.
+ async fn inspect(
+ &self,
+ state: &SubscriptionState,
+ ) -> Result {
+ let cwd = state.cwd.as_path();
+ let live = state.git.as_ref().is_some_and(|(git, _)| git.live());
+ // Read before Git runs: a change made while it runs shows up as a
+ // different fingerprint next time.
+ let git_dir = state.identity.git_dir.clone();
+ let inputs = tokio::task::spawn_blocking(move || GitFingerprint::read(&git_dir))
+ .await
+ .ok();
let max_age = self.inner.timing.context_poll_interval;
let run = {
let mut inspections = self
@@ -265,10 +474,17 @@ impl CheckoutChangeRequests {
.inspections
.lock()
.unwrap_or_else(PoisonError::into_inner);
- // Forget paths no subscription has inspected for two intervals.
- inspections.retain(|_, inspection| inspection.started.elapsed() < max_age * 2);
+ // Forget paths no subscription watches any more, once two
+ // intervals old.
+ inspections.retain(|_, inspection| {
+ inspection.watch.strong_count() > 0 || inspection.started.elapsed() < max_age * 2
+ });
match inspections.get(cwd) {
- Some(inspection) if inspection.started.elapsed() < max_age => {
+ Some(inspection)
+ if inputs.is_some()
+ && inspection.inputs == inputs
+ && (live || inspection.started.elapsed() < max_age) =>
+ {
inspection.run.clone()
}
_ => {
@@ -281,6 +497,11 @@ impl CheckoutChangeRequests {
cwd.to_owned(),
Inspection {
started: Instant::now(),
+ inputs,
+ watch: state
+ .git
+ .as_ref()
+ .map_or_else(Weak::new, |(git, _)| Arc::downgrade(git)),
run: run.clone(),
},
);
@@ -335,7 +556,7 @@ impl CheckoutChangeRequests {
&self,
key: &ChangeRequestCacheKey,
source: &CheckoutSourceContext,
- ) -> (Option, Instant) {
+ ) -> (Option, Option) {
let entry = {
let entries = self
.inner
@@ -347,7 +568,11 @@ impl CheckoutChangeRequests {
let mut state = entry.state.lock().await;
let now = Instant::now();
if now < state.next_refresh {
- return (state.last_success.clone(), state.next_refresh);
+ let unsupported = state.last_error == Some(ChangeRequestError::UnsupportedRepository);
+ return (
+ state.last_success.clone(),
+ (!unsupported).then_some(state.next_refresh),
+ );
}
match self.inner.lookup.resolve_github_source(source).await {
@@ -374,22 +599,34 @@ impl CheckoutChangeRequests {
*entry.stale_at.lock().unwrap_or_else(PoisonError::into_inner) = state.next_refresh;
state.failures = 0;
state.last_error = None;
- (Some(snapshot), state.next_refresh)
+ (Some(snapshot), Some(state.next_refresh))
}
Err(error) => {
state.failures = state.failures.saturating_add(1);
- let delay = failure_backoff(
- self.inner.timing.failure_initial_backoff,
- self.inner.timing.failure_max_backoff,
- state.failures,
- );
+ // A remote GitHub can't be asked about (none, or another
+ // host's) stays so until the checkout's Git files change,
+ // which inspects it again (and keys another entry): nothing
+ // to ask meanwhile.
+ let unsupported = error == ChangeRequestError::UnsupportedRepository;
+ let delay = if unsupported {
+ self.inner.timing.failure_max_backoff
+ } else {
+ failure_backoff(
+ self.inner.timing.failure_initial_backoff,
+ self.inner.timing.failure_max_backoff,
+ state.failures,
+ )
+ };
state.next_refresh = Instant::now() + delay;
*entry.stale_at.lock().unwrap_or_else(PoisonError::into_inner) = state.next_refresh;
if state.last_error != Some(error) {
tracing::warn!(%error, "change request refresh failed; retaining last success");
state.last_error = Some(error);
}
- (state.last_success.clone(), state.next_refresh)
+ (
+ state.last_success.clone(),
+ (!unsupported).then_some(state.next_refresh),
+ )
}
}
}
@@ -435,13 +672,48 @@ struct SubscriptionState {
requested_branch: Option,
lease: Option,
last_emitted: Option,
+ /// The checkout's git dirs, watched while this lasts, and the events
+ /// this subscription has seen.
+ git: Option<(Arc, watch::Receiver)>,
}
impl SubscriptionState {
- async fn sleep(&self, duration: Duration) -> bool {
+ /// Until Git's files change (events on the git dirs, then a settle),
+ /// the provider is due (`refresh_at`), or, while the git dirs aren't
+ /// watched, a poll interval. False at shutdown.
+ async fn wait(&mut self, refresh_at: Option) -> bool {
+ let timing = self.service.inner.timing;
+ let shutdown = self.service.inner.shutdown.clone();
+ let Some((git, changed)) = self.git.as_mut() else {
+ return false;
+ };
+ let poll_at = (!git.live()).then(|| Instant::now() + timing.context_poll_interval);
+ let wake_at = match (refresh_at, poll_at) {
+ (Some(a), Some(b)) => Some(a.min(b)),
+ (a, b) => a.or(b),
+ };
+ let deadline = async {
+ match wake_at {
+ Some(at) => tokio::time::sleep_until(at).await,
+ None => std::future::pending().await,
+ }
+ };
tokio::select! {
- _ = self.service.inner.shutdown.cancelled() => false,
- _ = tokio::time::sleep(duration) => true,
+ _ = shutdown.cancelled() => false,
+ () = deadline => true,
+ changed_ = changed.changed() => {
+ if changed_.is_err() {
+ // (Can't be while the watch is held; were it gone, a
+ // poll interval, as unwatched.)
+ tokio::time::sleep(timing.context_poll_interval).await;
+ return !shutdown.is_cancelled();
+ }
+ // Let the burst finish: one look after it.
+ while let Ok(Ok(())) =
+ tokio::time::timeout(timing.git_event_settle, changed.changed()).await
+ {}
+ !shutdown.is_cancelled()
+ }
}
}
}
@@ -617,6 +889,7 @@ mod tests {
failure_max_backoff: Duration::from_secs(2),
context_poll_interval: Duration::from_millis(5),
default_branch_ttl: Duration::from_secs(60),
+ git_event_settle: Duration::from_millis(5),
}
}
@@ -794,6 +1067,7 @@ mod tests {
failure_max_backoff: Duration::from_millis(1),
context_poll_interval: Duration::from_millis(1),
default_branch_ttl: Duration::from_millis(1),
+ git_event_settle: Duration::from_millis(1),
};
let service = service(lookup.clone(), timing);
let key = cache_key("checkout-1", &source);
@@ -915,4 +1189,131 @@ mod tests {
assert!(stream.next().await.is_none());
}
+
+ /// A checkout on disk: its git dir with HEAD on `branch` and a config.
+ fn checkout_on_disk(branch: &str) -> (tempfile::TempDir, CheckoutIdentity) {
+ let dir = tempfile::tempdir().unwrap();
+ let root = std::fs::canonicalize(dir.path()).unwrap();
+ let git_dir = root.join(".git");
+ std::fs::create_dir_all(git_dir.join("refs/heads")).unwrap();
+ std::fs::write(git_dir.join("HEAD"), format!("ref: refs/heads/{branch}\n")).unwrap();
+ std::fs::write(git_dir.join("config"), "[core]\n").unwrap();
+ let identity = CheckoutIdentity {
+ id: "checkout-1".into(),
+ root,
+ git_dir,
+ };
+ (dir, identity)
+ }
+
+ /// Until the subscription's git dir watch is installed.
+ async fn until_watched(service: &CheckoutChangeRequests) {
+ tokio::time::timeout(Duration::from_secs(10), async {
+ loop {
+ let live = service
+ .inner
+ .git_watches
+ .lock()
+ .unwrap()
+ .values()
+ .filter_map(Weak::upgrade)
+ .any(|git| git.live());
+ if live {
+ return;
+ }
+ tokio::time::sleep(Duration::from_millis(10)).await;
+ }
+ })
+ .await
+ .expect("the git dir's watch goes live");
+ }
+
+ /// A checkout left alone runs no Git: it is inspected again when its
+ /// git files change (a branch checked out), not on a timer, however
+ /// short the poll interval, and not for files that don't decide the
+ /// answer (the index).
+ #[tokio::test]
+ async fn a_watched_checkout_runs_git_again_only_when_its_git_files_change() {
+ let (_dir, identity) = checkout_on_disk("feature/one");
+ let git_dir = identity.git_dir.clone();
+ let lookup = FakeLookup::new(
+ source("feature/one"),
+ [Ok(Some(pull_request(1))), Ok(Some(pull_request(2)))],
+ );
+ let timing = Timing {
+ with_change_request_ttl: Duration::from_secs(60),
+ without_change_request_ttl: Duration::from_secs(60),
+ git_event_settle: Duration::from_millis(20),
+ ..fast_timing()
+ };
+ let service = service(lookup.clone(), timing);
+ let mut stream = service.watch_checkout(identity.root.clone(), identity);
+ assert_eq!(stream.next().await.unwrap().branch, "feature/one");
+ until_watched(&service).await;
+ // (The watch's own rescan as it went live settles first.)
+ tokio::time::sleep(Duration::from_millis(200)).await;
+
+ let inspected = lookup.inspect_count();
+ assert!(
+ tokio::time::timeout(Duration::from_millis(300), stream.next())
+ .await
+ .is_err()
+ );
+ assert_eq!(
+ lookup.inspect_count(),
+ inspected,
+ "no Git while nothing changed"
+ );
+
+ std::fs::write(git_dir.join("index"), "staged").unwrap();
+ assert!(
+ tokio::time::timeout(Duration::from_millis(500), stream.next())
+ .await
+ .is_err()
+ );
+ assert_eq!(
+ lookup.inspect_count(),
+ inspected,
+ "the index decides nothing here"
+ );
+
+ lookup.set_source(source("feature/two"));
+ std::fs::write(git_dir.join("HEAD"), "ref: refs/heads/feature/two\n").unwrap();
+ let switched = tokio::time::timeout(Duration::from_secs(10), stream.next())
+ .await
+ .expect("inspected again as HEAD changed")
+ .unwrap();
+ assert_eq!(switched.branch, "feature/two");
+ assert_eq!(switched.change_request.unwrap().number, 2);
+ }
+
+ /// A remote GitHub can't be asked about is asked nothing more until the
+ /// checkout's Git files change: no retry timer.
+ #[tokio::test]
+ async fn an_unsupported_repository_is_not_asked_again_on_a_timer() {
+ let (_dir, identity) = checkout_on_disk("feature/one");
+ let lookup = FakeLookup::new(
+ source("feature/one"),
+ [Err(ChangeRequestError::UnsupportedRepository)],
+ );
+ let timing = Timing {
+ // (A retry would come at the first backoff.)
+ failure_initial_backoff: Duration::from_millis(10),
+ failure_max_backoff: Duration::from_secs(60),
+ ..fast_timing()
+ };
+ let service = service(lookup.clone(), timing);
+ let mut stream = service.watch_checkout(identity.root.clone(), identity);
+ // (Nothing to emit: driven by a task of its own.)
+ let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel();
+ tokio::spawn(async move {
+ while let Some(status) = stream.next().await {
+ let _ = tx.send(status);
+ }
+ });
+ until_watched(&service).await;
+ tokio::time::sleep(Duration::from_millis(400)).await;
+ assert!(rx.try_recv().is_err());
+ assert_eq!(lookup.resolve_count(), 1);
+ }
}
diff --git a/crates/engine/src/cloud_client.rs b/crates/engine/src/cloud_client.rs
index 15d28065e..7a8bcc04d 100644
--- a/crates/engine/src/cloud_client.rs
+++ b/crates/engine/src/cloud_client.rs
@@ -19,7 +19,7 @@ use std::time::Duration;
use serde::Deserialize;
use serde::de::DeserializeOwned;
use zeron_proto::{
- BillingLink, BillingStatus, CloudSession, CloudSessions, CloudStatus, CloudUsage,
+ BillingLink, BillingStatus, CloudReach, CloudSession, CloudSessions, CloudStatus, CloudUsage,
GithubConnectProgress, GithubDeviceFlow, GithubRepo, HarnessId, VaultAccount,
VaultAccountProfile, VaultProvider, VaultStatus,
};
@@ -249,14 +249,16 @@ impl CloudClient {
}
}
- /// `POST /cloud/{orgId}/sessions` with `{chatId, spaceId, repo, branch?}` — idempotent
- /// per chat; mints the session device and starts provisioning.
+ /// `POST /cloud/{orgId}/sessions` with `{chatId, spaceId, repo, branch?,
+ /// reach?}` — idempotent per chat; mints the session device and starts
+ /// provisioning. No `reach`: the account's default.
pub async fn create_session(
&self,
chat_id: &str,
space_id: &str,
repo: &GithubRepo,
branch: Option<&str>,
+ reach: Option,
) -> Result {
let mut body = serde_json::json!({
"chatId": chat_id,
@@ -270,6 +272,9 @@ impl CloudClient {
if let Some(branch) = branch {
body["branch"] = serde_json::Value::String(branch.to_owned());
}
+ if let Some(reach) = reach {
+ body["reach"] = reach.as_str().into();
+ }
self.target()?
.call::(
reqwest::Method::POST,
@@ -297,6 +302,39 @@ impl CloudClient {
.map_err(Failure::into_error)
}
+ /// `PUT /cloud/{orgId}/reach`: the reach new sessions start with.
+ pub async fn set_reach(&self, reach: CloudReach) -> Result {
+ self.target()?
+ .call::(
+ reqwest::Method::PUT,
+ &["cloud", "reach"],
+ &[],
+ Some(serde_json::json!({ "reach": reach })),
+ "Set what Cloud chats reach",
+ )
+ .await
+ .map_err(Failure::into_error)
+ }
+
+ /// `POST /cloud/{orgId}/sessions/{chatId}/reach {reach}`.
+ pub async fn set_session_reach(
+ &self,
+ chat_id: &str,
+ reach: CloudReach,
+ ) -> Result {
+ require_id(chat_id, "chatId")?;
+ self.target()?
+ .call::(
+ reqwest::Method::POST,
+ &["cloud", "sessions", chat_id, "reach"],
+ &[],
+ Some(serde_json::json!({ "reach": reach })),
+ "Change what this Cloud chat reaches",
+ )
+ .await
+ .map_err(Failure::into_error)
+ }
+
/// `POST /cloud/{orgId}/sessions/{chatId}/wake {machine?, wake?}`.
pub async fn wake_session(
&self,
@@ -896,6 +934,8 @@ pub(crate) fn handles(method: &str) -> bool {
| methods::BILLING_PORTAL
| methods::CLOUD_SESSIONS
| methods::CLOUD_SET_MACHINE
+ | methods::CLOUD_SET_REACH
+ | methods::CLOUD_SESSION_SET_REACH
| methods::CLOUD_SESSION_WAKE
| methods::CLOUD_SESSION_SLEEP
| methods::CLOUD_SESSION_RETRY
@@ -920,6 +960,18 @@ struct MachineParams {
machine: String,
}
+#[derive(Deserialize)]
+struct ReachParams {
+ reach: CloudReach,
+}
+
+#[derive(Deserialize)]
+#[serde(rename_all = "camelCase")]
+struct ChatReachParams {
+ chat_id: String,
+ reach: CloudReach,
+}
+
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
struct SizedChatParams {
@@ -1041,6 +1093,19 @@ pub(crate) async fn dispatch(
let p: MachineParams = params(raw)?;
RpcReply::value(&cloud.set_machine(&p.machine).await.map_err(failed)?)
}
+ methods::CLOUD_SET_REACH => {
+ let p: ReachParams = params(raw)?;
+ RpcReply::value(&cloud.set_reach(p.reach).await.map_err(failed)?)
+ }
+ methods::CLOUD_SESSION_SET_REACH => {
+ let p: ChatReachParams = params(raw)?;
+ RpcReply::value(
+ &cloud
+ .set_session_reach(&p.chat_id, p.reach)
+ .await
+ .map_err(failed)?,
+ )
+ }
methods::CLOUD_SESSION_WAKE => {
let p: SizedChatParams = params(raw)?;
RpcReply::value(
@@ -1584,6 +1649,7 @@ mod tests {
assert_eq!(body["branch"], "feature/x");
assert_eq!(body["repo"]["fullName"], "acme/app");
assert_eq!(body["repo"]["defaultBranch"], "main");
+ assert_eq!(body["reach"], "isolated");
(
200,
serde_json::json!({"chatId": "chat-2", "deviceId": "cloud-s2",
@@ -1719,6 +1785,7 @@ mod tests {
..Default::default()
},
Some("feature/x"),
+ Some(CloudReach::Isolated),
)
.await
.unwrap();
@@ -1761,6 +1828,26 @@ mod tests {
assert_eq!(sent[1].1, serde_json::json!({ "machine": "large" }));
assert!(sent[0].0.ends_with("/machine"), "{}", sent[0].0);
assert_eq!(sent[0].1, serde_json::json!({ "machine": "small" }));
+ // A reach, the account's and one session's, as the person picked it.
+ let _ = client.set_reach(CloudReach::Isolated).await;
+ let _ = client
+ .set_session_reach("chat-1", CloudReach::Devices)
+ .await;
+ let sent: Vec<(String, serde_json::Value)> = edge
+ .requests()
+ .into_iter()
+ .rev()
+ .take(2)
+ .map(|r| (r.target.clone(), r.body.clone()))
+ .collect();
+ assert!(sent[1].0.ends_with("/cloud/org_1/reach"), "{}", sent[1].0);
+ assert_eq!(sent[1].1, serde_json::json!({ "reach": "isolated" }));
+ assert!(
+ sent[0].0.ends_with("/sessions/chat-1/reach"),
+ "{}",
+ sent[0].0
+ );
+ assert_eq!(sent[0].1, serde_json::json!({ "reach": "devices" }));
// A malformed chat id never reaches the edge.
assert!(
client
diff --git a/crates/engine/src/commands.rs b/crates/engine/src/commands.rs
new file mode 100644
index 000000000..2272d30fd
--- /dev/null
+++ b/crates/engine/src/commands.rs
@@ -0,0 +1,1355 @@
+//! Shell commands for agents, on this device or another of the person's
+//! (Zeron MCP's `run_command` & co., forwarded by `targetDeviceId`): what an
+//! agent's own shell tool does on its machine, on any of them. Owned by the
+//! engine ([`crate::EngineCore`]) like its terminals, and shut down with it.
+//!
+//! - [`Commands::run`] (`RunCommand`): one command run to its end. Its
+//! output and exit code come back, and the folder it ended in (`cwd`, from
+//! a POSIX shell), so an agent's `cd` carries over to its next command.
+//! - [`Commands::start`] (`RunCommand {background}`): one left running (a dev
+//! server, a watcher, a long build), read with [`Commands::read`], stopped
+//! with [`Commands::stop`], listed with [`Commands::list`] and watched with
+//! [`Commands::watch`] (`WatchBackgroundCommands`: how the chat's host
+//! keeps its background band current, wherever the command runs).
+//!
+//! No PTY and no session. The user's shell runs the command (`-c`;
+//! PowerShell or cmd on Windows) with the PATH and variables their login
+//! shell sets, captured once per process ([`zeron_harness::compose_user_path`]),
+//! and empty stdin, so a prompt for input ends instead of hanging. Each runs
+//! as an owned process ([`zeron_harness::process::owned`]): a process group
+//! (Job Object on Windows) of its own, without the markers of a Claude
+//! session Zeron may itself run in. What it costs is bounded:
+//!
+//! - **Memory**: a run keeps at most [`HEAD`] + [`TAIL`] bytes of output (its
+//! start and end); a background command its newest [`RING`] bytes. What's
+//! left out is counted, not kept. At most [`MAX_ENDED`] ended background
+//! commands are remembered, none for longer than [`KEEP_ENDED`].
+//! - **Processes**: when a command ends, so does everything it started. At
+//! its timeout, on a stop, when the chat that started it is archived or
+//! deleted ([`Commands::follow_chats`]), and at engine shutdown, its group
+//! is asked to stop and killed after [`GRACE`]; a call abandoned mid-run
+//! kills it at once.
+//! - **Concurrency**: at most [`MAX_RUNNING`] runs and [`MAX_BACKGROUND`]
+//! background commands at once per device; past that, refused, not queued.
+//!
+//! Running commands count as work ([`Commands::running`]): a Cloud machine
+//! stays awake for them, and an update waits for them.
+
+use std::collections::{HashMap, VecDeque};
+use std::sync::{Arc, Mutex, Weak};
+use std::time::{Duration, Instant};
+
+use futures::StreamExt as _;
+use futures::stream::BoxStream;
+use serde::Serialize;
+use tokio::io::{AsyncRead, AsyncReadExt};
+use tokio::sync::{Notify, Semaphore, watch};
+use zeron_harness::process::{Command, Stdio, owned};
+
+pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(120);
+pub const MAX_TIMEOUT: Duration = Duration::from_secs(600);
+/// Output a run keeps from its start, and from its end.
+const HEAD: usize = 16 * 1024;
+const TAIL: usize = 48 * 1024;
+/// Output a background command keeps (its newest), and the most one read
+/// returns.
+const RING: usize = 128 * 1024;
+const MAX_READ: usize = 48 * 1024;
+/// How long output is still read once a shell has exited: a process that
+/// left the group (`setsid`) may hold the pipes open for good.
+const DRAIN: Duration = Duration::from_millis(250);
+/// Between asking a command's processes to stop and killing them.
+pub const GRACE: Duration = Duration::from_secs(2);
+pub const MAX_RUNNING: usize = 16;
+pub const MAX_BACKGROUND: usize = 32;
+const MAX_ENDED: usize = 32;
+const KEEP_ENDED: Duration = Duration::from_secs(60 * 60);
+
+fn lock(mutex: &Mutex) -> std::sync::MutexGuard<'_, T> {
+ mutex
+ .lock()
+ .unwrap_or_else(std::sync::PoisonError::into_inner)
+}
+
+/// This engine's agents' commands. Cheap to clone (shared state).
+#[derive(Clone)]
+pub struct Commands {
+ inner: Arc,
+}
+
+struct Inner {
+ shell: String,
+ kind: ShellKind,
+ running: Semaphore,
+ background: Mutex>>,
+ /// Bumped when a background command starts, ends or is forgotten.
+ changes: watch::Sender,
+ /// Commands shown on chats hosted here, followed wherever they run: one
+ /// task per (chat, device), `None` being this one ([`Commands::show`]).
+ followers: Mutex