# Agentica 0.40.0

Agentica 0.40.0 is out. It gathers the two betas of this line with a few last changes, and it has breaking changes in `std/http`, `std/utc` and file error kinds. The full list is in the [changelog](https://github.com/agentica-lang/agentica/blob/0.40.0/CHANGELOG.md).

## What is new

### Pipes over several lines

A line that starts with `|>` continues the line before it, so a pipe can span lines without parentheses. `agentica fmt` uses that form.

```agentica
def double(n: Int) -> Int = n * 2

def describe(n: Int) -> String = "total: #{n}"

def main() -> Void
  text = [1, 2, 3, 4].sum
    |> double()
    |> describe()

  puts(text)
end
```

```output
total: 20
```

### Package modules in a `src/` folder

A package may keep its modules in a `src/` folder: `pkg/NAME/x` is `src/x.agc` of the package when it has one. Imports do not change.

### A time limit for tests

`agentica test --test-timeout-ms N` sets the time of each test and each scenario. The default stays 30,000 ms.

### Files, enums and Float32 lists

From the betas: `File.copy`, `File.chmod`, `File.symlink`, `File.readlink`, temp files with `File.open(path, "temp")`, and `System.hostname()`. `Archive.Options(keep_mode: true)` keeps the permission bits of TAR entries. Enums without payloads get `values` and `parse`, and every enum value has `name`. A `List[Float32]` is stored packed, 4 bytes per item, and native modules can read it in place.

## Breaking changes

- The `std/http` connection pool is removed: `HTTP.client`, `HTTP.close_client`, `HTTP.get`, `HTTP.post`, `HTTP.request` and `HTTP.Client`. Use `HTTP.get_response` and `HTTP.post_response`, or the `http-client` package for a pool. `HTTP.download` takes `HTTP.ClientOptions` instead of a client.
- `std/utc` is removed; use the builtin `Time`.
- A 0.39 VM rejects a `.agcb` built by 0.40 that loads a `[native]` library.
- A file error with errno `ENOTSUP` or `EOPNOTSUPP` has kind `io.unsupported`, not `io.failed`.

## Also

- `agentica compile` warns `PKG-NATIVE-STORED` for each native library that must travel beside the `.agcb`, and `agentica run` looks for it there first.
- A cancelled `HTTP.download` no longer leaves its hidden part file behind.
- `type-at` and go to definition on a module alias answer the imported file.
