Skip to content

Submilli v0.4.1

Choose a tag to compare

@somdoron somdoron released this 14 Oct 07:22
· 97 commits to main since this release

Submilli 0.4.1

This release lets programs on the server call the application's own tools, keeps idempotent requests in the server database, fixes the string memory regression from 0.4.0, and publishes the policy and package-build crates beside the engine. Helm chart 0.4.2 deploys runtime 0.4.1.

Upgrade notes

  • Two schema migrations run on first startup: sessions gain their declared application tools, and Idempotency-Key reservations and recorded responses move into the server database. Back up the state directory or volume with the server stopped before upgrading. Rolling back to 0.4.0 requires restoring that backup. (#216, #185)
  • Idempotency ledger files from 0.4.0 are not imported. A request retried across the upgrade with the same Idempotency-Key runs again rather than replaying its recorded response. Let in-flight keyed retries finish before upgrading. (#185)
  • TimeoutError is a new built-in class, so a program that declares its own class TimeoutError no longer compiles. Rename it. (#216)
  • Typechecking matches tsc --strict in four more places: primitives are assignable to {}, narrowing a type parameter gives NonNullable<T>, and a field always overwritten by a later spread or a condition that is always truthy, always falsy or never nullish is now an error. Check your own Packages with submilli build check. (#214)
  • Embedded Rust callers: submilli_shared::PolicyCheck is now submilli_policy::PermissionCheck<Blueprint> with the same constructors, and blueprint package validation moved from submilli_build::blueprint_validation to submilli_shared::blueprint_validation. Server AppState construction is now async. (#217, #185)

New capabilities

  • Application tools over the HTTP API. A session can declare tools. A program imports @tools and calls them like a Package, gated by the new tools.call capability. Each call suspends the run, the execute answers suspended with the call, and the harness answers with POST /v1/runs/{id}/resume. GET /v1/runs/{id} reads the run's state. Waiting does not count against the execution time limit; the Blueprint's tool_call_timeout bounds it, and --max-suspended-runs limits how many runs may wait at once. (#216)
  • A policy denial names the request it refused, such as with customerId = "cus_globex" for a capability a Package declares, so a narrowed rule can be fixed from the message. (#213)
  • Run records show where inside a Package each call was made, next to the program line, so the playground can step into the Package's own code. (#211)
  • Playground chats continue. submilli playground chat --session ID carries a conversation on, with the programs it already ran and their results, refusals included. --model chooses the model for a new chat. (#205, #212)
  • submilli-policy and submilli-build on crates.io, published with submilli-engine at exactly the same version. An embedder without blueprints can decide capability calls with the same rules and check as the CLI and server (PermissionCheck, behind the engine feature), and read package artifacts. (#217)

Fixes

  • Building strings by concatenation, repeat, padding and case mapping no longer reaches the server memory cap well before the program's live data does: results are written directly in the GC heap and counted once. This was the known limitation of 0.4.0 (SUB-1668). (#206)
  • submilli-wasm 0.1.12 allocates every host array fallibly, so a failed allocation is an error rather than a process abort. (#207)
  • Embedding entry points state their native stack requirement, and code generation validates dependency types it borrows before using them. (#210)
  • The TypeScript conformance suite now runs multi-file cases and explains every divergence. (#209, #201, #208)

Known limitations

  • In a debug build on Apple Silicon, type inference for some programs overflows a 2 MiB worker stack. Release binaries, including the published ones, are not affected (SUB-1710).

Helm chart

After publication:

helm install submilli oci://ghcr.io/submilli/charts/submilli --version 0.4.2 --wait
helm test submilli

Chart 0.4.2 has no template changes from 0.4.1. Before upgrading a chart 0.4.1 deployment, stop the workload and snapshot its state, and keep the tokens and the submilli-secret-store Secret. Do not roll back the image without restoring the pre-upgrade state.

All changes since v0.4.0