# Changelog

All notable changes to termfleet are documented here. The format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project aims to
follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html) once it reaches
a stable release.

termfleet is pre-1.0 and under active development; the surface may change between
0.x releases. See `docs/ROADMAP.md` for what's planned. The standalone
`@termfleet/core` package versions independently of `termfleet`.

## [0.2.12] - 2026-09-06

### Fixed

- Share process snapshots across lifecycle identity and start-time observation,
  restrict listener discovery to relevant pane/background processes, and skip
  process discovery for empty providers. Polling cadence and external-session
  discovery remain unchanged.
- Require `@termfleet/core` 0.2.11 and `@termfleet/terminal` 0.1.11 or newer so
  nested dependency resolution cannot retain an older observer implementation.

This release is a minimal observer backport onto the previously published
termfleet 0.2.11, core 0.2.10, and terminal 0.1.10 artifacts. Unrelated
Hermes/Supercode features already present on main were not included in it.

## [0.2.11] - 2026-08-25

### Fixed
- Managed Grok sessions use the official Grok Build headless contract, allowing
  its external authentication provider to mint credentials automatically while
  preserving the engine-assigned session identity and approval posture.

## [0.2.10] - 2026-08-25

### Fixed
- Managed agent prompts are written beneath the provider-resolved workspace,
  so remote providers do not reject them when their server process starts
  outside the published filesystem boundary.
- Managed Grok Build sessions retain their creation-known identity while the
  external-login wrapper transitions into the agent process, preventing a live
  executor from disappearing from provider lifecycle snapshots.

## [0.2.9] - 2026-08-25

### Fixed
- Provider previews retain a declared loopback hostname for application
  virtual-host semantics while keeping the upstream socket structurally bound
  to loopback.
- Linux virtual-terminal lifecycle snapshots recover exact pane-descendant TCP
  listeners from `/proc` when `lsof` is unavailable or incomplete.

## [0.2.8] - 2026-08-24

### Added
- Native Terminal.app and iTerm agent sessions can be mirrored and relinquished
  by durable Claude Code or Codex session identity without exposing process,
  tty, or GUI handles. Fresh Codex sessions are joined through the rollout held
  open by their exact live process before any handoff is allowed.
- The `termfleet/native-terminal` host surface lets an embedding application
  perform an externally idle-proven native-to-tmux handoff without running the
  Termfleet console or provider servers.

## [0.2.7] - 2026-08-24

### Added
- Virtual-tmux providers can launch durable non-agent services from structured
  commands and report the exact pane-owned process and listener evidence. This
  gives work-platform consumers a managed service lifecycle without fabricating
  an AI-agent Session or injecting shell input.

## [0.2.6] - 2026-08-21

### Fixed
- Managed Grok Build sessions now invoke an external authentication provider
  inside the conversation's isolated `GROK_HOME` before the agent starts, then
  remove the short-lived token cache when the session exits.

## [0.2.5] - 2026-08-21

### Fixed
- Require `@termfleet/core` 0.2.5 or newer so every Grok Build CLI install has
  the matching session parser, launcher, and continuation support.

## [0.2.3] - 2026-08-21

### Added
- Provider lifecycle snapshots now report the TCP listeners owned by each
  background process, including the bound address and port. Runhuman uses this
  provider-observed fact to bind a governed Room application to its exact
  Assignment executor and reserved loopback listener.

## [0.2.2] - 2026-08-18

### Added
- SDK/provider: `prepareSessionContext` owns Claude, Codex, and Gemini context
  preparation and proves completion through normalized session state;
  `sendToSession(..., { ifIdleOnly: true })` atomically defers instead of writing
  while a session is active. Schedulers no longer need terminal-screen
  heuristics to wake an agent safely.

### Fixed
- Provider: fresh Codex launches answer the current numbered workspace-trust
  chooser, resolve the resulting Codex session UUID, and return an addressable
  `codex:<uuid>` session to callers such as Runhuman Room managers.
- iTerm provider: managed-window close paths (`closeManagedWindow`,
  `reopenManagedWindow`) resolve the window's CURRENT native id through its
  attached tmux client tty instead of trusting the id recorded at create time —
  iTerm restarts reassign every id, and a close against a stale id failed while
  the physical window lived on. A failed close no longer aborts the tmux
  process-tree kill or the fleet write.
- iTerm provider: a once-a-minute sweep (managed mode only) closes the visible
  zero-tab zombie window objects that scripted closes leave on screen ("born
  duds"). Two consecutive empty sightings required, fleet-tracked windows
  excluded, invisible inert objects left alone.

## [0.2.0] - 2026-06-24

First public release line. Supersedes the withdrawn 0.1.x pre-release versions,
which were unpublished before launch (they carried an internal tunnel-relay
hostname in `local-tunnel.js` — an infra address, not a credential; no secret or
key was ever published). This release ships the same code with that internal
reference removed, plus the launch-hardening pass below.

### Added
- CLI: `--help`/`-h` works for every command group; `use`/`attach`/`resolve`
  print help.
- Root package keywords for npm discoverability.

### Changed
- CLI: `attach <prefix>` reconnects to the most-recent matching session instead
  of an arbitrary one; live Gemini terminals are recognized via the shared
  agent-session-id grammar.
- Docs: tunnel setup is documented generically (ngrok/cloudflared or your own
  client via `TERMFLEET_LOCAL_TUNNEL_BIN`); no internal binary is referenced.
- `@termfleet/core` now declares `engines.node >= 20`, matching the root package.

### Fixed
- Registry: shared-provider registration is org-ownership set-once — a `baseUrl`
  already owned by another organization can no longer be re-registered and
  silently reassigned (POST is now symmetric with the already-org-scoped DELETE).
- Provider: Codex and Gemini transcript tailing memoizes the full parse by file
  stat, so an unchanged watch tick no longer re-reads and re-parses the whole
  transcript on the event loop; live Gemini sessions now surface their
  transcript in the watch path (previously routed to the Claude resolver and
  shown empty).
- MCP: `continue_session` rejects non-Claude agents instead of silently
  spawning a fresh unrelated chat; provider-resolution errors surface their
  actionable remedy.
- Server: shared-mode scoped-token verification fails closed when the token
  scope is absent; the `/healthz` identity probe caps its response body; the
  resilient session validator bounds its last-known-good cache; the auth-registry
  URL resolves through one named helper.
- Frontend: the collab fixture harness is DEV-gated; the agent-chat fixture no
  longer ships an internal repository string.

## [@termfleet/terminal 0.1.6] - 2026-08-24

### Added
- Embedders can persist namespaced, session-scoped tmux user options and read
  one option across the live session catalog in a single asynchronous call.
  This supports restart-safe opaque application associations without placing
  application identifiers in visible tmux session names.

## [0.1.5] - 2026-06-24

### Changed
- Build/publish: switched the package `prepare` step to `prepack` so a clean
  `dist/` is built when packing/publishing without running on plain installs.

### Fixed
- Docker image: the `@termfleet/core` `dist/` is now built and present in the
  image, fixing a missing-core failure at container startup.

## [0.1.4] - 2026-06-24

### Fixed
- SDK: `ProviderClient.readFile` returns a `Uint8Array` (browser-safe), not a
  Node `Buffer` — decode with `new TextDecoder().decode(bytes)` or
  `Buffer.from(bytes)`. Documented in `@termfleet/core`'s README.

## [0.1.3] - 2026-06-24

### Fixed
- Dependencies: pinned `@hocuspocus/server` and `engine.io` so the collab tier
  and the realtime transport resolve cleanly on a fresh install.

## [0.1.2] - 2026-06-24

### Added
- Free favicon for the console.

### Changed
- Removed the bundled wallpaper photos; the built-in wallpapers are now pure-CSS
  gradient/pattern/solid presets, so the package ships nothing whose
  redistribution license needs vetting.
- Docs: session-first framing carried further through the README and roadmap.

### Security
- Scrubbed a hardcoded tunnel secret / relay reference from the codebase; a
  self-hosted relay is now configured generically via `TERMFLEET_TUNNEL_SERVER_URL`
  and `TERMFLEET_LOCAL_TUNNEL_BIN`.
- CI: added a `gitleaks` secret-scan step using the free binary.

## [0.1.1] - 2026-06-24

### Added
- Top-level `--help` / `-h` and `--version` / `-v` on the CLI.

### Changed
- Docs: Quickstart now leads with `npm install -g termfleet`; the AI-agent
  workflow is documented session-first (`sessions` / `get` / `wait` /
  `send --agent-session-id`), with terminals/windows demoted to break-glass; the
  standalone library is documented as `@termfleet/core`.

### Security
- Removed a hardcoded default tunnel relay; `--tunnel` now requires an explicit
  `TERMFLEET_TUNNEL_SERVER_URL` (available in the current `@termfleet/core`,
  0.1.4). Documented `TERMFLEET_PROVIDER_PUBLIC_URL` as required for org-scoped
  shared providers.

## [0.1.0] - 2026-06-23

Initial public release.

### Added
- Session-first control center over terminal providers (virtual-tmux, iTerm2,
  WezTerm, docker-worker): a ReactFlow canvas of "machines", a durable chat list,
  and an attention/triage view (`sessions --sort attention`).
- CLI (`termfleet`) with auto-resolved provider targeting, and an MCP
  server (`termfleet-mcp`) exposing the session verbs (list/get/send/close/new/
  continue).
- Launch-outcome triage: a failed agent launch is kept open and surfaces as
  `errored` in the CLI list, the GUI chat list, and the board.
- Short-lived, signed console session tokens for tunneled remote access.
- Standalone `@termfleet/core` package: contracts, provider SDK, and the
  agent-transcript/session library.

### Security
- The tunneled console issues a short-lived, HMAC-signed session token on login
  instead of placing the raw `TERMFLEET_CONSOLE_TOKEN` in the browser cookie.
- SSRF + request-body-size hardening on the console proxy; non-loopback binds are
  treated as public and require a credential.
