On this page

ADR-0300: Composable ActionMiddleware & Async ActionJob (app.actions/v1.2)

Context

app.actions/v1 and v1.1 (plugins/app_actions/, plugins/app_actions_mcp/, plugins/app_actions_trace/) established a pure (capabilities = []) control-plane contract for typed ActionApp sessions. Two recurring gaps remained for production agents and interactive apps:

  1. Hard-wired session cross-cutting concerns (Idea #30): Policy gating, secret redaction, bounded undo checkpoints, spin-loop/error circuit breaking (agent_obs), and in-memory structured trace recording (app_actions_trace) were either fixed inside ActionSession.execute or had to be wired manually by every host.
  2. Async long-running actions (Idea #24): Actions that trigger background work (builds, indexing, remote fetches) had no first-class job lifecycle, no bounded single-turn wait_quiescent_ms settlement, no notifications/progress streaming over MCP, and no cancellation path.

Decision

We extend app.actions to protocol version app.actions/v1.2 in pure Tenon (capabilities = [], zero Rust changes, 100% backward compatible with v1/v1.1 callers):

1. Composable ActionLayer & MiddlewareStack (app_actions.middleware)

2. Async ActionJob Lifecycle & Single-Turn Settlement (app_actions.jobs, app_actions.session, app_actions_mcp)

Consequences