diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aa35c4..dfbd693 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,8 @@ jobs: timeout-minutes: 5 outputs: code: ${{ steps.diff.outputs.code }} + web_playwright: ${{ steps.playwright.outputs.web }} + app_playwright: ${{ steps.playwright.outputs.app }} steps: # Full history: the diff is taken from a merge base - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -67,6 +69,17 @@ jobs: env: BASE: ${{ github.event.pull_request.base.sha || github.event.before }} + # The browser suites run in Playwright's image, whose browsers only work with the Playwright + # that matches its tag. Read from the lockfiles, so a Dependabot bump moves the image with it + - name: Playwright versions + id: playwright + run: | + for suite in web=web app=crates/luxe-remote/app-tests; do + version=$(jq -r '.packages["node_modules/playwright"].version // empty' "${suite#*=}/package-lock.json") + [ -n "$version" ] || { echo "::error::no playwright in ${suite#*=}/package-lock.json"; exit 1; } + echo "${suite%%=*}=$version" >> "$GITHUB_OUTPUT" + done + gate: name: build · test · clippy · fmt needs: changes @@ -165,18 +178,24 @@ jobs: # made `target/debug/luxe`: a job of its own would compile the workspace a second time, and # the binary is too large to hand between jobs cheaply. The app's types and unit tests need # no Rust, so they stay in `remote-app`. - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version: 24 - cache: npm - cache-dependency-path: crates/luxe-remote/app-tests/package-lock.json - + # + # In Playwright's image, which has WebKit and the Ubuntu libraries it loads, rather than + # fetching those from Ubuntu's mirror on every run, where a slow mirror ran the job out of + # time. The workspace is mounted at its own path, so the test finds `target/debug/luxe` + # where it expects it, and runs as the runner's user, so what it writes stays cleanable. + # + # The build and test binaries leave the disk all but full, too full for the image, and + # `target/` can't give any back because the cache step saves it after this. The Android SDK + # the runner image ships is about 10 GB that nothing here uses. - name: Phone app end to end (WebKit) - working-directory: crates/luxe-remote/app-tests run: | - npm ci - npx playwright install --with-deps webkit - npm run e2e + sudo rm -rf /usr/local/lib/android + df -h / | tail -1 + docker run --rm --ipc=host --user "$(id -u):$(id -g)" -e HOME=/tmp/home \ + -v "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" -w "$GITHUB_WORKSPACE/crates/luxe-remote/app-tests" \ + "mcr.microsoft.com/playwright:v$PLAYWRIGHT-noble" sh -c 'npm ci && npm run e2e' + env: + PLAYWRIGHT: ${{ needs.changes.outputs.app_playwright }} # Does it build and pass on the platforms nobody develops on? Linux above is the canonical gate — # `fmt` is an answer about the source, not about the OS, so running it three times would only @@ -337,15 +356,41 @@ jobs: - name: Render check run: ./scripts/site-check.sh --no-build - # One engine is not coverage. The render check above drives Chrome, and the site has since - # shipped two defects that Chrome could not see — a demo player whose dynamic import Firefox - # refused outright, and a layout that only Chrome's box metrics agreed with. WebKit is here - # for Safari, which nothing else in this pipeline speaks for. - # - # `--with-deps` because the WebKit build wants Ubuntu's ICU and libxml2 sonames; a rolling - # distro cannot supply them, which is why a contributor's local run skips it and CI does not. - - name: Install browsers - run: npx playwright install --with-deps chromium firefox webkit + # One engine is not coverage. The render check above drives Chrome, and the site has since shipped + # two defects that Chrome could not see — a demo player whose dynamic import Firefox refused + # outright, and a layout that only Chrome's box metrics agreed with. WebKit is here for Safari, + # which nothing else in this pipeline speaks for. + # + # Inside Playwright's own image, which carries all three browsers and the Ubuntu libraries they + # load (WebKit wants Ubuntu's ICU and libxml2 sonames). `playwright install --with-deps` fetched + # those from Ubuntu's mirror on every run, about 120 MB, and a slow mirror held the job past its + # timeout. Its own job because the render check needs the runner's system Chrome, which the + # image doesn't have. + website-cross: + name: web cross-browser + needs: changes + if: needs.changes.outputs.code == 'true' + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v${{ needs.changes.outputs.web_playwright }}-noble + # Firefox won't run as root in a home it doesn't own, and Actions' home is the runner user's + options: --user 1001 + timeout-minutes: 15 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: 24 + cache: npm + cache-dependency-path: web/package-lock.json + + - name: Install + run: npm ci + working-directory: web + + - name: Build + run: npm run build working-directory: web # The built site first — that is what a reader gets — then the dev server, which is where the @@ -393,7 +438,7 @@ jobs: # was cancelled, `changes` included, and passes when each one passed or had nothing to check. passed: name: CI passed - needs: [changes, gate, portability, msrv, supply-chain, website, remote-app] + needs: [changes, gate, portability, msrv, supply-chain, website, website-cross, remote-app] if: always() runs-on: ubuntu-latest timeout-minutes: 5 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c33dbd..333c24a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,8 +17,17 @@ changes add to that section until it ships; `scripts/version-check.py` holds the matches the window's title first, then its app's name, and with no title it takes the frontmost window. A miss lists the windows it saw. +### Changed + +- The activity bar above the composer sweeps in plan's color while the session plans. A switch + mid-turn recolors it once luxe has made the switch, the moment the agent's next tool call is held + to the new mode. + ### Fixed +- The `git` tool's `checks` reads another repository's pull request when given `-R owner/name`. + It used to drop the flag and answer with this checkout's pull request of the same number. It now + refuses any argument it doesn't understand instead of skipping it. - On Windows, a pasted line break no longer sends the message. The console types a paste out one key at a time, so luxe gathers a burst of keys back into one paste. - On a scaled Windows display, `screenshot` captures the whole screen instead of its top-left @@ -26,6 +35,12 @@ changes add to that section until it ships; `scripts/version-check.py` holds the - On a Mac with fontconfig installed, the OpenAI and Claude marks fall back to the robot and cloud when no font has them, instead of drawing a box with a question mark. +### Security + +- `clipboard-win` 5.4.3, since earlier releases were yanked: reading an HTML fragment with a bad + offset from the Windows clipboard could read past the end of a buffer. luxe reads only text and + images from the clipboard, so it never reached that code. + ## [0.1.5] ### Added diff --git a/Cargo.lock b/Cargo.lock index 9c76965..2c1cf9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -408,9 +408,9 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "clipboard-win" -version = "5.4.1" +version = "5.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03770d3df201d4fb868f2c9c59e66a3e4e2bd06692a0fe701e7103c7e84d4" +checksum = "052af7878466feccda12ba7a6a67d019d712f296809559b47c12c8cc196d3a9a" dependencies = [ "error-code", ] diff --git a/crates/luxe-tools/src/git.rs b/crates/luxe-tools/src/git.rs index 4511927..8395aaf 100644 --- a/crates/luxe-tools/src/git.rs +++ b/crates/luxe-tools/src/git.rs @@ -78,7 +78,7 @@ impl Tool for GitTool { "args": { "type": "array", "items": {"type": "string"}, - "description": "What the action operates on: paths for `add`, a branch for `checkout`, a subcommand for `stash`, a `gh pr` command line for `pr` (e.g. [\"create\", \"--title\", \"...\", \"--body\", \"...\"]; the branch is pushed for you if it has no upstream), a `gh issue` command line for `issue` (e.g. [\"view\", \"12\", \"--comments\"]), a PR number for `checks` (default: this branch's), otherwise git's own flags. Never the commit message." + "description": "What the action operates on: paths for `add`, a branch for `checkout`, a subcommand for `stash`, a `gh pr` command line for `pr` (e.g. [\"create\", \"--title\", \"...\", \"--body\", \"...\"]; the branch is pushed for you if it has no upstream), a `gh issue` command line for `issue` (e.g. [\"view\", \"12\", \"--comments\"]), a PR number for `checks` (default: this branch's), with `-R owner/name` for another repository's, otherwise git's own flags. Never the commit message." } }, "required": ["action"] diff --git a/crates/luxe-tools/src/git/checks.rs b/crates/luxe-tools/src/git/checks.rs index dc3f518..85b1b6e 100644 --- a/crates/luxe-tools/src/git/checks.rs +++ b/crates/luxe-tools/src/git/checks.rs @@ -7,7 +7,7 @@ //! cannot see. Reading only; re-running a job stays behind the permission engine's `ask`. use luxe_core::github::{ - Branches, CheckLog, Checks, Discovery, FailingCheck, GitHubError, PullRequests, + Branches, CheckLog, Checks, Discovery, FailingCheck, GitHubError, PullRequests, Repository, }; use std::path::Path; @@ -27,27 +27,23 @@ struct Target { pending: Option, } +/// What `checks` was asked about, read from its `args`. +#[derive(Debug, PartialEq, Eq)] +struct Request { + /// Pull request named, when one was + number: Option, + /// Repository named with `-R`, when it isn't this checkout's + repository: Option, +} + /// Why checks are failing on the branch's pull request, on pull request `#n` when `args` names one, -/// or on `HEAD` when the branch has no pull request. +/// or on `HEAD` when the branch has no pull request. `-R owner/name` reads another repository's. pub(super) async fn checks( github: &(impl Discovery + PullRequests + Branches + Checks + ?Sized), cwd: &Path, args: &[String], ) -> Result { - let repository = github.repository(cwd).await.map_err(|error| failure(&error))?; - let target = match args.first().map(|arg| arg.trim_start_matches('#')) { - Some(number) => { - let number: u64 = - number.parse().map_err(|_| format!("`{number}` is not a pull request number."))?; - let pr = github.pull_request(&repository, number).await.map_err(|e| failure(&e))?; - Target { - oid: pr.head_oid, - name: format!("#{} · {}", pr.number, luxe_core::github::untrusted(&pr.title, 120)), - pending: Some(pr.checks.pending), - } - } - None => branch_target(github, cwd, &repository).await?, - }; + let (repository, target) = resolve(github, cwd, parse_request(args)?).await?; let failing = github .failing_checks(&repository, &target.oid, LOG_TAIL) .await @@ -55,11 +51,120 @@ pub(super) async fn checks( Ok(render(&target, &failing)) } +/// Why `-R` alone is refused: the branch-to-pull-request lookup only knows this checkout. +const REPO_NEEDS_NUMBER: &str = "Name the pull request as well as `-R`: the branch here belongs \ + to this checkout, not that repository."; + +/// The repository and commit `request` asks about. A repository named with `-R` is named in the +/// answer too, so it can't be mistaken for this checkout's. +async fn resolve( + github: &(impl Discovery + PullRequests + Branches + ?Sized), + cwd: &Path, + request: Request, +) -> Result<(Repository, Target), String> { + if let Some(repository) = request.repository { + let number = request.number.ok_or(REPO_NEEDS_NUMBER)?; + let mut target = named_target(github, &repository, number).await?; + target.name = format!("{}{}", repository.slug(), target.name); + return Ok((repository, target)); + } + let repository = github.repository(cwd).await.map_err(|error| failure(&error))?; + let target = match request.number { + Some(number) => named_target(github, &repository, number).await?, + None => branch_target(github, cwd, &repository).await?, + }; + Ok((repository, target)) +} + +/// The pull request number and `-R` repository in `args`. Anything else is refused rather than +/// dropped: an argument skipped in silence answers a different question than the one asked. +fn parse_request(args: &[String]) -> Result { + let mut request = Request { number: None, repository: None }; + let mut args = args.iter().map(String::as_str); + while let Some(arg) = args.next() { + if let Some(slug) = repo_flag(arg, &mut args)? { + request.repository = Some(repository_from_slug(slug)?); + } else if request.number.replace(pull_request_number(arg)?).is_some() { + return Err("`checks` reads one pull request at a time.".into()); + } + } + Ok(request) +} + +/// The repository `arg` names when it is `-R`/`--repo` (taking the next argument) or `--repo=`. +fn repo_flag<'a>( + arg: &'a str, + rest: &mut impl Iterator, +) -> Result, String> { + match arg { + "-R" | "--repo" => { + rest.next().map(Some).ok_or_else(|| "`-R` needs a repository: `-R owner/name`.".into()) + } + other => Ok(other.strip_prefix("--repo=")), + } +} + +/// `arg` as a pull request number, `#` or not; a flag `checks` doesn't know is refused by name. +fn pull_request_number(arg: &str) -> Result { + if arg.starts_with('-') { + return Err(format!( + "`checks` doesn't take `{arg}`. It takes a pull request number, and `-R owner/name` \ + for a repository other than this checkout's." + )); + } + let number = arg.trim_start_matches('#'); + number.parse().map_err(|_| format!("`{number}` is not a pull request number.")) +} + +/// The repository `owner/name` names on github.com, or `host/owner/name` on another host, as +/// `gh -R` reads it. +fn repository_from_slug(slug: &str) -> Result { + let (host, owner, name) = slug_parts(slug) + .ok_or_else(|| format!("`{slug}` is not a repository: `-R` takes owner/name."))?; + Ok(Repository { + host: host.to_ascii_lowercase(), + owner: owner.to_string(), + name: name.to_string(), + // Reading a pull request's checks never consults either, so neither is looked up + default_branch: String::new(), + remote: None, + }) +} + +/// Host, owner and name, when each part of `slug` is one GitHub would accept. +fn slug_parts(slug: &str) -> Option<(&str, &str, &str)> { + let valid = |part: &str| { + !part.is_empty() + && part.chars().all(|c| c.is_ascii_alphanumeric() || matches!(c, '-' | '_' | '.')) + }; + let parts: Vec<&str> = slug.split('/').collect(); + let (host, owner, name) = match parts.as_slice() { + [owner, name] => ("github.com", *owner, *name), + [host, owner, name] => (*host, *owner, *name), + _ => return None, + }; + [host, owner, name].into_iter().all(valid).then_some((host, owner, name)) +} + +/// Pull request `number`'s head, by its number and title. +async fn named_target( + github: &(impl PullRequests + ?Sized), + repository: &Repository, + number: u64, +) -> Result { + let pr = github.pull_request(repository, number).await.map_err(|e| failure(&e))?; + Ok(Target { + oid: pr.head_oid, + name: format!("#{} · {}", pr.number, luxe_core::github::untrusted(&pr.title, 120)), + pending: Some(pr.checks.pending), + }) +} + /// The branch's pull request head, or `HEAD` when there is no pull request to ask about. async fn branch_target( github: &(impl Branches + ?Sized), cwd: &Path, - repository: &luxe_core::github::Repository, + repository: &Repository, ) -> Result { let head = luxe_core::github::branch_head(cwd).await; if let Some(head) = head { diff --git a/crates/luxe-tools/src/git/checks/tests.rs b/crates/luxe-tools/src/git/checks/tests.rs index 91cbda6..df782d8 100644 --- a/crates/luxe-tools/src/git/checks/tests.rs +++ b/crates/luxe-tools/src/git/checks/tests.rs @@ -108,7 +108,8 @@ fn a_short_oid_is_seven_characters_or_all_of_it() { assert_eq!(short("abc"), "abc"); } -/// A GitHub double with one pull request, #7, whose head has one failing Actions job. +/// A GitHub double for this checkout's `me/app`, whose pull request #7 has one failing Actions job, +/// and for `other/site`, whose #19 has one too: reachable only by naming that repository. struct Scripted { signed_in: bool, /// Whether the branch has a pull request @@ -148,15 +149,17 @@ impl luxe_core::github::Discovery for Scripted { impl luxe_core::github::PullRequests for Scripted { async fn pull_request( &self, - _: &luxe_core::github::Repository, + repository: &luxe_core::github::Repository, number: u64, ) -> Result { - if number != 7 { - return Err(GitHubError::NotFound); - } + let (title, head_oid) = match (repository.slug().as_str(), number) { + ("me/app", 7) => ("Topic", "7777777aaaa"), + ("other/site", 19) => ("Site", "1919191bbbb"), + _ => return Err(GitHubError::NotFound), + }; Ok(luxe_core::github::PullRequest { - number: 7, - title: "Topic".into(), + number, + title: title.into(), body: String::new(), url: String::new(), author: luxe_core::github::Author { login: "me".into(), bot: false }, @@ -165,7 +168,7 @@ impl luxe_core::github::PullRequests for Scripted { base_ref: "main".into(), base_oid: "b".into(), head_ref: "topic".into(), - head_oid: "7777777aaaa".into(), + head_oid: head_oid.into(), cross_repository: false, review_decision: None, checks: luxe_core::github::CheckRollup { pending: 1, ..Default::default() }, @@ -261,14 +264,17 @@ impl luxe_core::github::Branches for Scripted { impl luxe_core::github::Checks for Scripted { async fn failing_checks( &self, - _: &luxe_core::github::Repository, + repository: &luxe_core::github::Repository, head_oid: &str, log_tail: usize, ) -> Result, GitHubError> { assert_eq!(log_tail, LOG_TAIL); - if head_oid != "7777777aaaa" { - return Ok(Vec::new()); - } + let owner = match head_oid { + "7777777aaaa" => "me/app", + "1919191bbbb" => "other/site", + _ => return Ok(Vec::new()), + }; + assert_eq!(repository.slug(), owner, "checks are read where the pull request lives"); Ok(vec![check("test", CheckLog::NotRead)]) } } @@ -292,6 +298,67 @@ async fn a_named_pull_request_reads_its_head() { assert!(error.contains("gh auth login"), "{error}"); } +/// The break this catches: `-R` dropped in silence, which reads the same number in this checkout's +/// repository instead, a different pull request entirely or none at all. +#[tokio::test] +async fn a_repository_named_with_r_is_the_one_read() { + let github = Scripted { signed_in: true, pull_request: true }; + let spellings: [&[&str]; 3] = [ + &["19", "-R", "other/site"], + &["--repo", "other/site", "#19"], + &["--repo=other/site", "19"], + ]; + for args in spellings { + let args: Vec = args.iter().map(|arg| arg.to_string()).collect(); + let text = checks(&github, Path::new("."), &args).await.unwrap(); + assert!(text.starts_with("1 check failing on other/site#19 · Site (1919191)."), "{text}"); + } + + let error = checks(&github, Path::new("."), &["19".into()]).await.unwrap_err(); + assert!(error.contains("never pushed has no checks"), "#19 isn't this checkout's: {error}"); +} + +/// The break this catches: an argument `checks` doesn't understand skipped rather than refused. +#[tokio::test] +async fn an_argument_checks_does_not_take_is_refused() { + let github = Scripted { signed_in: true, pull_request: true }; + let refused = |args: &[&str]| { + let args: Vec = args.iter().map(|arg| arg.to_string()).collect(); + let github = &github; + async move { checks(github, Path::new("."), &args).await.unwrap_err() } + }; + + let error = refused(&["7", "--json"]).await; + assert!(error.contains("doesn't take `--json`"), "{error}"); + let error = refused(&["7", "8"]).await; + assert!(error.contains("one pull request at a time"), "{error}"); + let error = refused(&["7", "-R"]).await; + assert!(error.contains("`-R` needs a repository"), "{error}"); + let error = refused(&["-R", "other/site"]).await; + assert_eq!(error, REPO_NEEDS_NUMBER, "no branch here belongs to that repository"); + let error = refused(&["7", "-R", "luxe"]).await; + assert!(error.contains("`luxe` is not a repository"), "{error}"); +} + +/// `-R` reads a repository the way `gh -R` does, and refuses what GitHub couldn't name. +#[test] +fn a_repository_is_owner_and_name_or_host_owner_and_name() { + let on_github = repository_from_slug("evanwhittaker/luxe").unwrap(); + assert_eq!( + (on_github.host.as_str(), on_github.slug().as_str()), + ("github.com", "evanwhittaker/luxe") + ); + let elsewhere = repository_from_slug("GHE.example.com/team/app.rs").unwrap(); + assert_eq!( + (elsewhere.host.as_str(), elsewhere.slug().as_str()), + ("ghe.example.com", "team/app.rs") + ); + + for slug in ["luxe", "a/b/c/d", "owner/", "/name", "my owner/app", "owner/app?x=1", ""] { + assert!(repository_from_slug(slug).is_err(), "`{slug}` names no repository"); + } +} + /// With nothing named, the branch's own pull request is the one read. #[tokio::test] async fn the_branchs_pull_request_is_the_default() { diff --git a/crates/luxe-tui/src/app/tests/modes.rs b/crates/luxe-tui/src/app/tests/modes.rs index c7eca5c..331be47 100644 --- a/crates/luxe-tui/src/app/tests/modes.rs +++ b/crates/luxe-tui/src/app/tests/modes.rs @@ -137,6 +137,54 @@ fn the_activity_row_keeps_the_mode_button_at_its_left() { assert!(line[..hint].chars().count() > usize::from(column), "{line}"); } +/// The colors the activity row is drawn in to the right of the mode button, at a frame with the +/// comet's head mid-bar. +fn activity_colors(app: &mut App) -> Vec { + app.status.spinner_frame = 24; + let mode = app.status.mode.clone(); + let (text, buffer) = screen(app, 80, 20); + let (column, row) = mode_badge_at(&text, &mode).expect("the mode button during a turn"); + let bar = column + mode.chars().count() as u16 + 1; + (bar..80).map(|x| buffer[(x, row)].fg).collect() +} + +/// The engine moving to `mode` while a turn runs, which reports the turn as still streaming. +fn switched_mid_turn(app: &mut App, mode: &str) { + app.update(Msg::Engine(Event::StateChanged(luxe_core::event::EngineState { + model: luxe_core::event::ModelRef::new("openai", "test-model"), + streaming: true, + status: format!("mode: {mode}"), + mode: mode.into(), + thinking: luxe_core::provider::ThinkingLevel::Off, + }))); +} + +/// The activity bar's comet wears the mode the engine reports, switched mid-turn too: that is the +/// mode each tool call is judged by as it starts, so it is what the turn can do from here on. +/// +/// The break this catches: a comet in the accent whatever the mode, or one that recolors on the +/// keypress before the engine has moved the mode the calls are judged by. +#[test] +fn the_activity_bar_wears_the_mode_the_engine_reports() { + let (mut app, _rx) = mode_app(); + in_mode(&mut app, "build"); + app.status.state = crate::app::AppState::Streaming; + app.status.on_turn_start(); + let build = app.theme_styles.activity_trail[0].fg.unwrap(); + let plan = app.theme_styles.activity_trail_plan[0].fg.unwrap(); + assert_ne!(build, plan, "the theme has to tell the two comets apart"); + let colors = activity_colors(&mut app); + assert!(colors.contains(&build) && !colors.contains(&plan), "build's comet: {colors:?}"); + + app.update(Msg::Key(KeyEvent::new(KeyCode::BackTab, KeyModifiers::SHIFT))); + let colors = activity_colors(&mut app); + assert!(colors.contains(&build) && !colors.contains(&plan), "asked, not applied: {colors:?}"); + + switched_mid_turn(&mut app, "plan"); + let colors = activity_colors(&mut app); + assert!(colors.contains(&plan) && !colors.contains(&build), "plan's comet: {colors:?}"); +} + /// Plan mode's color reaches the question the agent asks, and nothing further. #[test] fn plan_mode_tints_the_agent_s_question() { diff --git a/crates/luxe-tui/src/modes.rs b/crates/luxe-tui/src/modes.rs index 07de17a..c31f0e8 100644 --- a/crates/luxe-tui/src/modes.rs +++ b/crates/luxe-tui/src/modes.rs @@ -31,6 +31,20 @@ pub(crate) fn accent(mode: &str, styles: &ThemeStyles) -> Style { } } +/// The comet the activity bar sweeps while a turn runs in `mode`. +/// +/// It follows the mode the engine reports, never the key just pressed: each tool call is judged +/// against that mode as it starts, so the color says what the turn can do from here on. +pub(crate) fn activity_trail<'a>( + mode: &str, + styles: &'a ThemeStyles, +) -> &'a [Style; crate::theme::styles::ACTIVITY_TRAIL_LEN] { + match mode { + luxe_core::mode::PLAN => &styles.activity_trail_plan, + _ => &styles.activity_trail, + } +} + /// The theme, with the border accent swapped for the mode's color. /// /// Borrowed in every mode but plan, so the surfaces that take it cost nothing until somebody plans. @@ -71,6 +85,7 @@ mod tests { assert!(matches!(icon("review"), Icon::ModeBuild)); assert_eq!(accent("review", &theme), theme.border_accent); assert!(matches!(styles("review", &theme), Cow::Borrowed(_))); + assert_eq!(activity_trail("review", &theme), &theme.activity_trail); } #[test] diff --git a/crates/luxe-tui/src/theme/styles.rs b/crates/luxe-tui/src/theme/styles.rs index fc4b631..17501a0 100644 --- a/crates/luxe-tui/src/theme/styles.rs +++ b/crates/luxe-tui/src/theme/styles.rs @@ -11,8 +11,8 @@ use color::{blend_rgb, color_value_to_ratatui, plan_hue, rgb_color, rgb_token, t use luxe_core::theme::ColorValue; use ratatui::style::{Modifier, Style}; use shades::{ - shade_at, shade_ramp, Fade, COMET_FADE, CURSOR_LINE_WASH, GAUGE_FADE, PICK_WASH, RAIL_FADE, - STREAM_FADE, + derived_activity_shades, shade_at, shade_ramp, Fade, CURSOR_LINE_WASH, GAUGE_FADE, PICK_WASH, + RAIL_FADE, STREAM_FADE, }; pub use shades::{ Depth, GaugeShades, SlabShades, ACTIVITY_TRAIL_LEN, SLAB_DEPTHS, STREAM_TRAIL_LEN, @@ -42,6 +42,8 @@ pub struct ThemeStyles { pub text: Style, /// Shades the activity comet wears, its leading cell first, fading toward the rail behind it. pub activity_trail: [Style; ACTIVITY_TRAIL_LEN], + /// The comet plan mode wears: the same fade, from plan's hue rather than the accent. + pub activity_trail_plan: [Style; ACTIVITY_TRAIL_LEN], /// Shades a spent unit wears as the comet's glow falls off it, nearest the comet first. /// /// The last is the canvas itself but for a whisper, so the rail dissolves with distance instead @@ -134,8 +136,7 @@ impl ThemeStyles { diff_add_emphasis, diff_del_emphasis, } = derived_bands(&tokens, tint_base); - let (activity_trail, activity_rail) = - derived_activity_shades(&tokens, accent, tint_base, light); + let activity = derived_activity_shades(&tokens, accent, tint_base, light); ThemeStyles { accent, @@ -151,8 +152,9 @@ impl ThemeStyles { muted: fg("muted"), dim: fg("dim"), text: fg("text"), - activity_trail, - activity_rail, + activity_trail: activity.trail, + activity_trail_plan: activity.trail_plan, + activity_rail: activity.rail, paste_indicator, chip, thinking_text: fg("thinkingText"), @@ -427,27 +429,6 @@ fn derived_bands(tokens: &Tokens<'_>, tint_base: Option<(u8, u8, u8)>) -> Bands } } -/// The activity comet's trail and the rail it sweeps over. -/// -/// The comet fades from the accent into the rail, so its tail dissolves into the chrome instead of -/// stopping at an edge. -fn derived_activity_shades( - tokens: &Tokens<'_>, - accent: Style, - tint_base: Option<(u8, u8, u8)>, - light: bool, -) -> ([Style; ACTIVITY_TRAIL_LEN], [Style; ACTIVITY_TRAIL_LEN]) { - let resolved = tokens.0; - let rail = rgb_token(resolved, "borderMuted") - .or_else(|| rgb_token(resolved, "dim")) - .or(tint_base) - .unwrap_or(if light { (255, 255, 255) } else { (0, 0, 0) }); - let activity_trail = shade_ramp(accent, rail, light, COMET_FADE); - let canvas = tint_base.unwrap_or(if light { (255, 255, 255) } else { (0, 0, 0) }); - let activity_rail = shade_ramp(tokens.fg("borderMuted"), canvas, light, RAIL_FADE); - (activity_trail, activity_rail) -} - /// Fraction of the status hue mixed into the canvas for a tool-call band. Deliberately low so the /// tint reads as a wash, not a fill. const TOOL_STATUS_TINT: f32 = 0.16; diff --git a/crates/luxe-tui/src/theme/styles/shades.rs b/crates/luxe-tui/src/theme/styles/shades.rs index 0f1656f..de154db 100644 --- a/crates/luxe-tui/src/theme/styles/shades.rs +++ b/crates/luxe-tui/src/theme/styles/shades.rs @@ -1,6 +1,6 @@ //! Shades — fades, the slab and gauge ramps, depths and washes, derived from a theme's tokens. -use super::color::{blend_rgb, rgb_color}; +use super::color::{blend_rgb, plan_hue, rgb_color, rgb_token}; use ratatui::style::{Color as RatatuiColor, Modifier, Style}; /// Shades in the activity comet's ramp, its leading cell first. @@ -15,6 +15,39 @@ pub const ACTIVITY_TRAIL_LEN: usize = 10; /// the text you are actually reading is at full contrast. pub const STREAM_TRAIL_LEN: usize = 16; +/// The activity comet's trails and the rail they sweep over. +pub(super) struct ActivityShades { + /// Build's comet, and every mode's but plan's: from the accent + pub(super) trail: [Style; ACTIVITY_TRAIL_LEN], + /// Plan's comet: from plan's hue + pub(super) trail_plan: [Style; ACTIVITY_TRAIL_LEN], + pub(super) rail: [Style; ACTIVITY_TRAIL_LEN], +} + +/// The comets for build and plan, and the rail under them. +/// +/// Each comet fades from its hue into the rail, so its tail dissolves into the chrome instead of +/// stopping at an edge. Both land on the one rail, so switching mode recolors the comet alone. +pub(super) fn derived_activity_shades( + tokens: &super::Tokens<'_>, + accent: Style, + tint_base: Option<(u8, u8, u8)>, + light: bool, +) -> ActivityShades { + let resolved = tokens.0; + let rail = rgb_token(resolved, "borderMuted") + .or_else(|| rgb_token(resolved, "dim")) + .or(tint_base) + .unwrap_or(if light { (255, 255, 255) } else { (0, 0, 0) }); + let canvas = tint_base.unwrap_or(if light { (255, 255, 255) } else { (0, 0, 0) }); + let comet = |hue| shade_ramp(hue, rail, light, COMET_FADE); + ActivityShades { + trail: comet(accent), + trail_plan: comet(plan_hue(resolved)), + rail: shade_ramp(tokens.fg("borderMuted"), canvas, light, RAIL_FADE), + } +} + /// How a ramp fades: its curve, what it keeps at the far end, and the lift on its near end. #[derive(Debug, Clone, Copy)] pub(super) struct Fade { diff --git a/crates/luxe-tui/src/view/activity.rs b/crates/luxe-tui/src/view/activity.rs index 90bfaca..e20b118 100644 --- a/crates/luxe-tui/src/view/activity.rs +++ b/crates/luxe-tui/src/view/activity.rs @@ -177,9 +177,9 @@ fn first_steps(app: &App, width: usize) -> Option> { /// One row of the sweeping activity bar, as spans that can share a line with text. /// -/// The comet sweeps in shades of the theme accent, and the rail it travels is lit by the comet -/// rather than drawn at a fixed weight, so the indicator belongs to the chrome and the motion is the -/// only thing that draws the eye. +/// The comet sweeps in shades of the theme accent, or of plan's hue while the session plans, and the +/// rail it travels is lit by the comet rather than drawn at a fixed weight, so the indicator belongs +/// to the chrome and the motion is the only thing that draws the eye. fn activity_bar_spans(app: &App, width: usize) -> Vec> { use crate::widgets::ActivityGlyphs; use luxe_core::config::ActivityBarStyle; @@ -197,7 +197,7 @@ fn activity_bar_spans(app: &App, width: usize) -> Vec> { app.status.spinner_frame as u64, width, glyphs, - &styles.activity_trail, + crate::modes::activity_trail(&app.status.mode, styles), &styles.activity_rail, ) } diff --git a/scripts/site-cross.mjs b/scripts/site-cross.mjs index f993122..73a1932 100644 --- a/scripts/site-cross.mjs +++ b/scripts/site-cross.mjs @@ -100,6 +100,13 @@ const MIME = { ".wasm": "application/wasm", }; +/** + * Where both servers listen and every browser and probe connects: an address, not `localhost`. + * In a container `localhost` can name `::1` to the server binding it and `127.0.0.1` to the + * client dialing it, and in Playwright's image the dev server came up and refused every request. + */ +const LOOPBACK = "127.0.0.1"; + /** Serves `web/dist` the way a static host would, including the `.wasm` type the player needs. */ function serveBuilt(root) { return new Promise((resolve) => { @@ -123,7 +130,7 @@ function serveBuilt(root) { } response.writeHead(404).end("not found"); }); - server.listen(0, () => resolve({ server, port: server.address().port })); + server.listen(0, LOOPBACK, () => resolve({ server, port: server.address().port })); }); } @@ -144,10 +151,35 @@ async function serveDev(port) { // shell that launched this with it. Spawned directly, `child.kill()` is the server. const child = spawn( process.execPath, - [join(web, "node_modules/astro/bin/astro.mjs"), "dev", "--port", String(port)], - { cwd: web, stdio: "ignore" }, + [join(web, "node_modules/astro/bin/astro.mjs"), "dev", "--host", LOOPBACK, "--port", String(port)], + { cwd: web, stdio: ["ignore", "pipe", "pipe"] }, ); - return { child, port }; + return watchServer({ child, port, output: [], exit: null }); +} + +/** + * Keeps the last of what `target`'s server prints, and how it ended, so a server that never + * answers can say why. Read either way: a pipe nobody drains fills up and stalls its server. + */ +function watchServer(target) { + const keep = (chunk) => { + target.output.push(...String(chunk).split("\n").filter((line) => line.trim())); + target.output.splice(0, Math.max(0, target.output.length - 30)); + }; + target.child.stdout.on("data", keep); + target.child.stderr.on("data", keep); + target.child.on("exit", (code, signal) => { + target.exit = signal ?? `exit code ${code}`; + }); + return target; +} + +/** Why `target`'s server never answered, with the last of what it printed. */ +function reportSilentServer(name, target) { + const why = target.exit ? `it ended (${target.exit})` : "it was still running"; + console.log(`✗ ${name.padEnd(9)} the dev server never answered; ${why}`); + console.log(` the last ask got: ${target.lastAnswer ?? "nothing yet"}`); + for (const line of target.output) console.log(` ${line}`); } function shutdown(target) { @@ -157,13 +189,15 @@ function shutdown(target) { } } -async function waitForServer(port, seconds = 90) { - for (let attempt = 0; attempt < seconds * 2; attempt += 1) { +async function waitForServer(target, seconds = 90) { + for (let attempt = 0; attempt < seconds * 2 && !target.exit; attempt += 1) { try { - const response = await fetch(`http://localhost:${port}/`); + const response = await fetch(`http://${LOOPBACK}:${target.port}/`); if (response.ok) return true; - } catch { - /* not up yet */ + target.lastAnswer = `HTTP ${response.status}: ${(await response.text()).slice(0, 300)}`; + } catch (error) { + // Not up yet, usually; the cause is what tells a refused port from a wrong address + target.lastAnswer = `${error.message}${error.cause ? ` (${error.cause.code ?? error.cause.message})` : ""}`; } await new Promise((done) => setTimeout(done, 500)); } @@ -210,7 +244,7 @@ async function demosFit(browser, port, path) { const tab = await context.newPage(); const problems = []; try { - await tab.goto(`http://localhost:${port}${path}`, { waitUntil: "networkidle" }); + await tab.goto(`http://${LOOPBACK}:${port}${path}`, { waitUntil: "networkidle" }); await settleHero(tab); const demos = tab.locator(".demo"); const count = await demos.count(); @@ -279,7 +313,7 @@ async function checkEngine(engine, name, port) { noise.push(`request failed: ${request.url()} (${request.failure()?.errorText})`); }); - await tab.goto(`http://localhost:${port}${page.path}`, { waitUntil: "networkidle" }); + await tab.goto(`http://${LOOPBACK}:${port}${page.path}`, { waitUntil: "networkidle" }); await settleHero(tab); if (page.demos) { @@ -366,8 +400,8 @@ for (const [name, engine] of [ if (!built) { shutdown(current); current = await serveDev((port += 1)); - if (!(await waitForServer(current.port))) { - console.log(`✗ ${name.padEnd(9)} the dev server never answered`); + if (!(await waitForServer(current))) { + reportSilentServer(name, current); failed = true; continue; } diff --git a/web/package-lock.json b/web/package-lock.json index 7d4dd38..6f330f4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -12,7 +12,7 @@ "@astrojs/sitemap": "^3.7.4", "@astrojs/svelte": "^9.0.1", "asciinema-player": "^3.17.0", - "astro": "^7.3.2", + "astro": "^7.3.3", "svelte": "^5.57.0" }, "devDependencies": { @@ -711,9 +711,9 @@ } }, "node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20261012.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261012.1.tgz", - "integrity": "sha512-dkTL9aY3V4D40b+jBpGPCistWUPFQ/M61wlWi6i1o8MvHFFgEw7EQkcaYEv6Yd3bkPDD/3TFT4hRsMb2xVZSwQ==", + "version": "1.20261019.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261019.1.tgz", + "integrity": "sha512-5ZILbAta/fBQvhmAYeCE7dKMMYIr7N9wJEX50fEGLKSIwGtvT0HzSfHNIK/O7cBQ4gHQ2WfIiPClvwcye6E0fA==", "cpu": [ "x64" ], @@ -728,9 +728,9 @@ } }, "node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20261012.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261012.1.tgz", - "integrity": "sha512-2/nVGcKXjNNI+DhxKSepTKvFng9H7aN2WXv6Zu67iqgI6JrxypNt5kTPv4ZHosxrcfyKMci/2RfN7GIrN0BitQ==", + "version": "1.20261019.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261019.1.tgz", + "integrity": "sha512-cww2Ab6lVMxpTiEEjKmPI58p5EMo0vYTZSH+3WkqXJdQgc3ES66GuL247+U2B2YWajhhu2tqj7jySrXneU749g==", "cpu": [ "arm64" ], @@ -745,9 +745,9 @@ } }, "node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20261012.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261012.1.tgz", - "integrity": "sha512-uMe7ONHnLxStD1Ye0YFHBO36uj4cStv5P53rW+5GVWXFT8BRjqVixlH0IqCAHe1Pmcwyd1+7fVoGde89MZSCJg==", + "version": "1.20261019.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261019.1.tgz", + "integrity": "sha512-4++VRi9vkQROYqrpZYOixIJuVDmujkwrT4kszsxNFlvcmsX6Mr2GumvxIN3gIixS3vJUh3Umdtkthqj5X0S3Xw==", "cpu": [ "x64" ], @@ -762,9 +762,9 @@ } }, "node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20261012.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261012.1.tgz", - "integrity": "sha512-I0VMdcXk7ygG5vYDce0ePTBFdnBXC0i9WiBY5mWiv0iTinbfea6/rHqSQ7B1UMpjgrYVs9E0m4bZ9ufsk5GCFA==", + "version": "1.20261019.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261019.1.tgz", + "integrity": "sha512-75PVtJOwfjScQ53sbLtQXI7D8yP1c21t+WEUPaYbqkzaz4ZqfR5wAd+zuWs8G5Q7kOj2SQIvEfY5Sn8Y+UVrnA==", "cpu": [ "arm64" ], @@ -779,9 +779,9 @@ } }, "node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20261012.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261012.1.tgz", - "integrity": "sha512-c5hQvNx574UEoknaCFvMa/NdLrrYiALNbe6sx1okW8uOiRYWxrFuA8WpXFnBJ5XJypm0TEAHYaUTGv3rRLpY7Q==", + "version": "1.20261019.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261019.1.tgz", + "integrity": "sha512-z49fvKTETMCnG6wnMcQwxx9CpryFceiKz04FRjq26EkhCyzRNJ6c3UXhyZz3r5f1CXnnBZc5DcU8ZouPkUJCqw==", "cpu": [ "x64" ], @@ -2954,9 +2954,9 @@ } }, "node_modules/astro": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/astro/-/astro-7.3.2.tgz", - "integrity": "sha512-ysTcdpGP61XZpHoMRYC/CK19DQ94qkBvzXMtXEo0gEqPNkmOU/Tv++CtWmzaI4nF2Ck8RXFdiWvdlTWa2oOr9w==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/astro/-/astro-7.3.3.tgz", + "integrity": "sha512-NF08hk3edFkVmr9avf9HW/rQyf6NrpbVDyYj2cVN3JfijDhfJYh1ivWVTY5PUd5+rRZn/Vtu4iaeyNlP0Iv6mg==", "license": "MIT", "dependencies": { "@astrojs/compiler-rs": "^0.4.0", @@ -2978,7 +2978,7 @@ "dset": "^3.1.4", "es-module-lexer": "^2.0.0", "esbuild": "^0.28.0", - "find-proc": "0.1.0", + "find-proc": "0.2.0", "flattie": "^1.1.1", "fontace": "~0.4.1", "get-tsconfig": "5.0.0-beta.4", @@ -2997,16 +2997,16 @@ "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.4", - "semver": "^7.7.4", "shiki": "^4.0.2", "smol-toml": "^1.6.0", - "svgo": "^4.0.1", + "svgo": "^4.0.2", "tinyclip": "^0.1.12", "tinyexec": "^1.0.4", "tinyglobby": "^0.2.15", "ultrahtml": "^1.6.0", "unifont": "~0.7.5", "unstorage": "^1.17.5", + "verkit": "^0.4.0", "vite": "^8.0.13", "vitefu": "^1.1.2", "xxhash-wasm": "^1.1.0", @@ -3812,9 +3812,9 @@ } }, "node_modules/fast-uri": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", - "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", "dev": true, "funding": [ { @@ -3855,9 +3855,9 @@ } }, "node_modules/find-proc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/find-proc/-/find-proc-0.1.0.tgz", - "integrity": "sha512-OaOpEYv2PiQ7SQ5LIrl+deA1XaWcxEjnpM6VuWXTUvn+teIXxeFTLDmu18/zDQpFmHN4o3oDBX+BT0AGwEhemg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/find-proc/-/find-proc-0.2.0.tgz", + "integrity": "sha512-a6h2nTrgB3g5Wrn4au9Ux4kMk7IJtyF6oA8uGn+mk3weLZssUtc1cp6meHIzzuW2o1srrBAxzkmXLbqjRkgB6w==", "license": "MIT", "engines": { "node": "^20.19.0 || >=22.12.0" @@ -5740,16 +5740,16 @@ "license": "MIT" }, "node_modules/miniflare": { - "version": "5.20261012.0-beta", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261012.0-beta.tgz", - "integrity": "sha512-Cjrs+vHHQ7krLO4HYELYpYBJBuMhcnNZD/Z5z/UcQSnFqWSQY3DhtTCFalXgI1/yO1iK+YrRKK8EYkumrEopxg==", + "version": "5.20261019.2-beta", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261019.2-beta.tgz", + "integrity": "sha512-QNgCA/axizZ7kv7RV3nwbRoz+w4watBlwIsyXjwgYHw4eSw5BrR1F2152s3Kz+Bzy/YxjKFHrZl3LzBRbPgYoQ==", "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.5", "undici": "7.29.1", - "workerd": "1.20261012.1", + "workerd": "1.20261019.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" }, @@ -6603,6 +6603,7 @@ "version": "7.8.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "devOptional": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -7063,9 +7064,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz", - "integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==", + "version": "8.12.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz", + "integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==", "license": "MIT", "engines": { "node": ">=22.19.0" @@ -7377,6 +7378,18 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/verkit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.4.1.tgz", + "integrity": "sha512-mMVzj0TXExtVdlDEq+Mzp0eyOuyznNpFobNM3uAqe3HVm/Ps2c+u17BligMkZjZCA6EiXpoon8iRTer3iu40SQ==", + "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", @@ -7816,9 +7829,9 @@ } }, "node_modules/workerd": { - "version": "1.20261012.1", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261012.1.tgz", - "integrity": "sha512-tEHoMPsMga0seVjxfsR8Pd3f8IRqYwkq++dTUKI5Gdgj6zuSDluYwisydq+dn90SsIACwBquJUQ1nBpcOqaWTA==", + "version": "1.20261019.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261019.1.tgz", + "integrity": "sha512-UUYRUq/7DmeCl11YriNbcVbjUZVLtt8uuCXFu+nz77hGFf8d4DEVXoCYtnA+MlBatE4+wxoj47DVqzK3xGBAiw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -7829,17 +7842,17 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20261012.1", - "@cloudflare/workerd-darwin-arm64": "1.20261012.1", - "@cloudflare/workerd-linux-64": "1.20261012.1", - "@cloudflare/workerd-linux-arm64": "1.20261012.1", - "@cloudflare/workerd-windows-64": "1.20261012.1" + "@cloudflare/workerd-darwin-64": "1.20261019.1", + "@cloudflare/workerd-darwin-arm64": "1.20261019.1", + "@cloudflare/workerd-linux-64": "1.20261019.1", + "@cloudflare/workerd-linux-arm64": "1.20261019.1", + "@cloudflare/workerd-windows-64": "1.20261019.1" } }, "node_modules/wrangler": { - "version": "4.151.0", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.151.0.tgz", - "integrity": "sha512-ra8MpzSR+ClkbGofu9S+AmAKjytS60MqSuayXKpa1CAYIzP+NIc8q6EiF55Gz5PS3lxT4qcvMuPHihCNhTPpDg==", + "version": "4.152.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.152.0.tgz", + "integrity": "sha512-lmXTF1sCDEqBaEMpreGczvg/x3AIh1d/qxc4BN7utQ4jEDwdA4YG0L6kr3ev0TtVLHRb6QLySNAOAunwn+dHeA==", "dev": true, "license": "MIT OR Apache-2.0", "dependencies": { @@ -7847,10 +7860,10 @@ "@cloudflare/unenv-preset": "2.16.2", "blake3-wasm": "2.1.5", "esbuild": "0.28.2", - "miniflare": "5.20261012.0-beta", + "miniflare": "5.20261019.2-beta", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.24", - "workerd": "1.20261012.1" + "workerd": "1.20261019.1" }, "bin": { "cf-wrangler": "bin/cf-wrangler.js", @@ -7864,7 +7877,7 @@ "fsevents": "2.3.3" }, "peerDependencies": { - "@cloudflare/workers-types": "^5.20261006.1" + "@cloudflare/workers-types": "^5.20261019.1" }, "peerDependenciesMeta": { "@cloudflare/workers-types": { @@ -8079,9 +8092,9 @@ "license": "MIT" }, "node_modules/zod": { - "version": "4.6.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", - "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", + "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" diff --git a/web/package.json b/web/package.json index 75dda14..ca04c88 100644 --- a/web/package.json +++ b/web/package.json @@ -23,7 +23,7 @@ "@astrojs/sitemap": "^3.7.4", "@astrojs/svelte": "^9.0.1", "asciinema-player": "^3.17.0", - "astro": "^7.3.2", + "astro": "^7.3.3", "svelte": "^5.57.0" }, "devDependencies": {