This update introduces SessionManager.run_once/4, a convenience function that
collapses the full session lifecycle (creation, activation, run start,
execution, and completion or failure) into a single call. This is designed
for simplified request-response workflows.
The execute_run/4 function now accepts an optional :event_callback key. This
allows consumers to stream events in real-time for logging or UI updates
while the manager continues to handle internal event persistence.
In CodexAdapter, validation was added to ensure working_directory is present
and non-empty during initialization, providing clearer error reporting for
misconfiguration.
Key changes:
- Implemented SessionManager.run_once/4 convenience wrapper.
- Added :event_callback support to execute_run/4 for real-time streaming.
- Added working_directory validation to CodexAdapter.
- Added examples/oneshot.exs to demonstrate the simplified API.
- Updated documentation and test suites to reflect the new functionality.