# v0.11.0

## Highlights

The server can now run entirely from the stream. `--topic` loads the handler closure from an xs topic instead of a file, and with `-w` it hot-reloads whenever the topic is updated:

```bash
http-nu :3001 --store ./store --topic serve -w
```

If the topic doesn't exist yet, a placeholder page serves a 503 with instructions on how to get started. Append a closure and the server picks it up:

```nushell
'{|req| "hello, world"}' | .append serve
```

Topic-sourced handlers get access to VFS modules stored on the stream -- any `*.nu` topic appended to the store is available via standard `use` imports, same as with actors and services in xs.

Cookies have first-class support. `use http-nu/http` gives you `cookie parse`, `cookie set`, and `cookie delete` with secure defaults (HttpOnly, SameSite=Lax, Secure). Multiple cookies accumulate naturally through the pipeline:

```nushell
use http-nu/http *

{|req|
  let cookies = $req | cookie parse
  "logged in"
  | cookie set "session" "abc123" --max-age 86400
  | cookie set "theme" "dark"
}
```

The `--dev` flag tells the cookie module to omit the `Secure` attribute, so cookies work over plain HTTP during local development.

Datastar's JS bundle is now embedded in the binary. `--datastar` serves it at a versioned path with immutable cache headers -- no CDN dependency, zero runtime compression (brotli is pre-built at compile time):

```nushell
use http-nu/datastar *
SCRIPT {type: "module" src: $DATASTAR_JS_PATH}
```

`--expose` opens the xs API on an additional address, useful for separating the public-facing HTTP server from the stream management interface. Accepts TCP addresses or `iroh://` for peer-to-peer QUIC.

## Breaking changes

- feat!: update cross-stream to 0.10.0 -- aligns with the xs processor rename (handlers/generators/commands are now actors/services/actions) and the 2-parameter actor closure shape

## Changelog

- feat: add `--topic` flag to load handler from xs store
- feat: add cookie module (`cookie parse`, `cookie set`, `cookie delete`) with secure defaults
- feat: add `--dev` flag for development mode
- feat: embed Datastar JS bundle, serve via `--datastar`
- feat: add `--expose` flag to expose xs API on additional address
- feat: display startup options and dependency versions in preamble
- feat: VFS modules from the stream available to topic-sourced handlers
- feat: add cross.stream-powered branding
- refactor: bundle handler params into AppConfig struct
- refactor: align with xs processor rename (actor/service/action)
- fix: update actor closure signature to match xs 2-param requirement
- fix: add duration literal support to nushell syntax grammar
