Skip to content

v0.4.2

Choose a tag to compare

@jin-bo jin-bo released this 01 May 15:57
· 108 commits to main since this release

Agentao 0.4.2

Naming-cleanup release on top of 0.4.0. No runtime behavior change
and no wire-format change beyond identifier renaming. The host-facing
contract package agentao.harness is renamed to agentao.host
together with its public type names, schema-export functions, and
checked-in wire-schema filenames — so that imports read consistently:

from agentao.host import HostEvent, ToolLifecycleEvent, ActivePermissions

The old agentao.harness import path remains as a deprecated alias
through 0.5.0 (with one DeprecationWarning on first import), and
every old symbol name is bound to the new object via the shim.

Why this rename

The design framing in docs/design/embedded-host-contract.md uses
the word "harness" for Agentao itself running embedded in a host
application
. Calling the contract package agentao.harness made
hostside code read like from agentao.harness import HarnessEvent
the noun in the import path was the runtime (Agentao), not the
surface the host actually consumes. After the rename, the package
name names what the package is: the surface a host application talks
to. The conceptual word "harness" is unchanged in the design doc.

What got renamed

Old New
agentao.harness (module path) agentao.host
HarnessEvent HostEvent
HarnessReplaySink HostReplaySink
HarnessToolEmitter HostToolEmitter
HarnessPermissionEmitter HostPermissionEmitter
HarnessSubagentEmitter HostSubagentEmitter
export_harness_event_json_schema() export_host_event_json_schema()
export_harness_acp_json_schema() export_host_acp_json_schema()
harness_event_to_replay_kind() host_event_to_replay_kind()
harness_event_to_replay_payload() host_event_to_replay_payload()
replay_payload_to_harness_event() replay_payload_to_host_event()
docs/schema/harness.events.v1.json docs/schema/host.events.v1.json
docs/schema/harness.acp.v1.json docs/schema/host.acp.v1.json
scripts/write_harness_schema.py scripts/write_host_schema.py

In the wire schema JSON: top-level title changed to
AgentaoHostEvents / AgentaoHostACP; the v1 lineage is
preserved (adding optional fields stays in v1; removing or renaming
a field still requires a v2 bump).

Migration

- from agentao.harness import HarnessEvent, EventStream
+ from agentao.host    import HostEvent,    EventStream

- from agentao.harness.protocols import FileSystem, ShellExecutor
+ from agentao.host.protocols    import FileSystem, ShellExecutor

- export_harness_event_json_schema()
+ export_host_event_json_schema()

Pure find/replace. Code that still uses the old paths and names runs
unchanged — the alias module and type aliases stay live until 0.5.0.
First import of any agentao.harness.* path emits one
DeprecationWarning naming the new path; subsequent imports are
silent.

What did not change

  • No runtime behavior change. Event delivery semantics, ordering
    guarantees, backpressure, cancellation mechanics — all identical.
  • No Pydantic model field change. Wire bytes are byte-for-byte
    regenerated from the same models; only the top-level title and
    the discriminated-union name differ from the 0.4.0 snapshot.
  • No constructor signature change. Agentao(...) and the
    capability-protocol kwargs are unchanged.
  • The "harness" word in design docs stays — it still refers to
    Agentao itself running embedded inside a host, which is what the
    design doc has always meant.

Tests

2267 passed, 2 skipped, 9 deselected — same baseline as 0.4.0.
scripts/write_host_schema.py --check (CI gate) green; the
agentao.harness alias module is exercised by
tests/test_host_typing.py::test_harness_alias_emits_deprecation_warning_and_re_exports,
which asserts the old symbol names are identity-equal to the new
objects (HarnessEvent is HostEvent, etc.) and that exactly one
DeprecationWarning fires on first import.

The strict mypy gate (mypy --strict --package agentao.host) and
the schema drift gate now target the renamed package directly.

Upgrade (from 0.4.0)

0.4.2 is strictly backwards-compatible. The shim package
keeps existing code running. New code should use the canonical
agentao.host path.

pip install -U agentao

Hosts running with logging set to surface DeprecationWarning will
see one warning per process the first time agentao.harness is
imported. The warning names the replacement path. Plan to migrate
imports before 0.5.0 — the alias module ships its final release in
the 0.4.x series.

Out of scope (deferred)

  • Removal of the agentao.harness alias is scheduled for 0.5.0.
    No further deprecation cycle: the package and the type aliases die
    in a single release.
  • Doc-page filename history. docs/releases/v0.4.0.md and
    v0.4.1.md are still missing — pre-existing gap unrelated to this
    rename.