Skip to content

v0.2.15

Choose a tag to compare

@jin-bo jin-bo released this 27 Apr 15:37
· 180 commits to main since this release

Agentao 0.2.15

Maintenance follow-up to 0.2.14. Headline: ACP control-plane
parity
— the missing session/set_model, session/set_mode, and
session/list_models handlers land so Zed and other ACP clients can
drive model switching, permission-mode toggles, and capability
discovery without falling back to environment-restart workarounds.
The same release also carries three correctness fixes around the ACP
stdio channel and an LLM streaming gap that affected thinking-model
backends.

No breaking changes. The full Added / Fixed / Packaging breakdown is
in the CHANGELOG.md [0.2.15] entry.

Highlights

  • Three new ACP session handlers (agentao/acp/session_set_model.py,
    session_set_mode.py, session_list_models.py):
    • session/set_model — apply model / contextLength / maxTokens
      independently on a running session via agent.set_model() and
      agent.context_manager.max_tokens / agent.llm.max_tokens.
      Each knob is optional; a request carrying only model does not
      reset the caller's existing context/cap. The handler holds the
      session's idle turn lock so an in-flight session/prompt cannot
      observe a model/window/cap change mid-stream. Conversation
      history and tool state are preserved.
    • session/set_mode — toggle PermissionEngine permission mode
      (default / acceptEdits / bypassPermissions / plan) per
      session, matching ACP's permission-mode contract.
    • session/list_models — call agent.list_available_models() and
      cache the result on AcpSessionState.last_known_models. On
      provider lookup failure, returns the cached list with a
      warning field instead of a JSON-RPC error so a transient
      outage doesn't blank the UI.
    • Shared session-validation helper in agentao/acp/_handler_utils.py
      (single point for "does this session_id exist, is it ours,
      did the client send a well-formed request").
  • Preserve outsider log handlers across LLMClient reconstruction
    (agentao/llm/client.py): the package-root logger eviction now only
    drops handlers tagged with _agentao_llm_file_handler=True. The ACP
    stderr-guard handler installed by AcpServer is no longer collateral
    damage when set_model or repeated test reconstructions trigger a
    new LLMClient.
  • Capture reasoning_content in streaming mode (agentao/llm/client.py):
    thinking-model output that arrives on the streaming delta was
    silently dropped while non-streaming message.reasoning_content
    worked. Streaming now mirrors the non-streaming path so reasoning
    text reaches the transport THINKING event without backend-shape
    drift.
  • Detach subprocess stdin in the shell tool (agentao/tools/shell.py):
    subprocess.Popen(..., stdin=subprocess.DEVNULL) so any child
    process that reads stdin (e.g. an interactive prompt slipped into a
    shell call) cannot consume — and corrupt — the ACP JSON-RPC stdin
    channel that the parent process owns.

Tests

  • tests/test_acp_session_set_model.py — 484 lines / 31 cases covering
    set_model, set_mode, list_models, including permission-engine
    interaction, session-id validation, and error paths.
  • tests/test_chat_stream_reasoning.py — verifies the streaming
    reasoning_content capture matches non-streaming behaviour.
  • tests/test_llm_handler_marker.py — asserts handler tagging and
    preservation across repeated LLMClient reconstruction (the
    scenario set_model triggers).
  • tests/test_shell_stdin_devnull.py — confirms subprocess stdin is
    detached from the parent's stdin in the shell tool.

Packaging / CI

  • .gitignore: ignore rotated *.log.* files (avoid tracking the
    bounded-rotation artifacts introduced in 0.2.14).
  • .github/workflows/ci.yml: actions/upload-artifact pinned at v7
    (v8 does not exist; resolved on-branch in commit e84fc0b).

Release Summary

  • Version: 0.2.15
  • Git tag: v0.2.15
  • GitHub release type: regular release, not pre-release
  • Publish workflow: .github/workflows/publish.yml

Install

pip install -U agentao

Maintainer Checklist

  1. Ensure agentao/__init__.py reports 0.2.15 (drop the .dev0
    suffix from 0.2.15.dev0).

  2. Run the smoke path:
    uv run python -m pytest tests/ && uv build && uv run twine check dist/*.

  3. Push the tag:

    git push origin v0.2.15
  4. Create the GitHub release for v0.2.15.

  5. Leave Set as a pre-release unchecked so
    .github/workflows/publish.yml publishes to PyPI (the workflow's
    tag-vs-package version consistency check will validate alignment
    before upload).

Full Changelog

See CHANGELOG.md for the 0.2.15 entry.