codex-agent-framework 0.1.82__tar.gz → 0.1.83__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/CHANGELOG.md +13 -0
  2. {codex_agent_framework-0.1.82/codex_agent_framework.egg-info → codex_agent_framework-0.1.83}/PKG-INFO +1 -1
  3. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/agent.py +87 -0
  4. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/agent_runtime.py +226 -170
  5. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/memory/__init__.py +16 -0
  6. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/planner/__init__.py +8 -5
  7. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/cli/main.py +25 -1
  8. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/client.py +12 -0
  9. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/command.py +28 -0
  10. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/context.py +42 -16
  11. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/event.py +21 -3
  12. codex_agent_framework-0.1.83/codex_agent/interactions.py +207 -0
  13. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/mainloop.py +2 -0
  14. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/prompts/system_prompt.txt +25 -0
  15. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/server/app.py +143 -0
  16. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/server/core.py +120 -18
  17. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/sessions.py +13 -0
  18. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/status.py +4 -22
  19. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tray.py +114 -8
  20. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/app.py +2 -2
  21. codex_agent_framework-0.1.83/codex_agent/version.py +1 -0
  22. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83/codex_agent_framework.egg-info}/PKG-INFO +1 -1
  23. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent_framework.egg-info/SOURCES.txt +1 -0
  24. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/pyproject.toml +1 -1
  25. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_context.py +83 -0
  26. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_plugins.py +17 -0
  27. codex_agent_framework-0.1.83/tests/test_agent_runtime.py +324 -0
  28. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_cli.py +5 -1
  29. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_events.py +5 -5
  30. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_memory.py +1 -1
  31. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_planner.py +7 -3
  32. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_server.py +183 -76
  33. codex_agent_framework-0.1.82/codex_agent/version.py +0 -1
  34. codex_agent_framework-0.1.82/tests/test_agent_runtime.py +0 -159
  35. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/LICENSE +0 -0
  36. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/MANIFEST.in +0 -0
  37. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/README.md +0 -0
  38. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/__init__.py +0 -0
  39. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/__main__.py +0 -0
  40. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/ai.py +0 -0
  41. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/browser.py +0 -0
  42. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_commands.py +0 -0
  43. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/__init__.py +0 -0
  44. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/bash/__init__.py +0 -0
  45. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/bash/requirements.txt +0 -0
  46. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/browser/__init__.py +0 -0
  47. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/browser/requirements.txt +0 -0
  48. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/content/__init__.py +0 -0
  49. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/content/requirements.txt +0 -0
  50. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/content/system.py +0 -0
  51. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/content/vision.py +0 -0
  52. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/context/__init__.py +0 -0
  53. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/desktop/__init__.py +0 -0
  54. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/desktop/requirements.txt +0 -0
  55. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/environment/__init__.py +0 -0
  56. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/environment/requirements.txt +0 -0
  57. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/files/__init__.py +0 -0
  58. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/files/requirements.txt +0 -0
  59. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/files/tools.py +0 -0
  60. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/image_generation/__init__.py +0 -0
  61. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/image_generation/image_generation_system_prompt.txt +0 -0
  62. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/image_generation/requirements.txt +0 -0
  63. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/interface/__init__.py +0 -0
  64. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/interface/requirements.txt +0 -0
  65. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/memory/requirements.txt +0 -0
  66. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/planner/requirements.txt +0 -0
  67. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/python/__init__.py +0 -0
  68. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/python/requirements.txt +0 -0
  69. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/realtime/__init__.py +0 -0
  70. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/realtime/audio.py +0 -0
  71. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/realtime/bridge.py +0 -0
  72. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/realtime/manager.py +0 -0
  73. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/realtime/requirements.txt +0 -0
  74. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/realtime/session.py +0 -0
  75. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/scheduler/__init__.py +0 -0
  76. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/scheduler/requirements.txt +0 -0
  77. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/subagents/__init__.py +0 -0
  78. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/subagents/profiles/explorer.json +0 -0
  79. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/subagents/requirements.txt +0 -0
  80. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/tts/__init__.py +0 -0
  81. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/tts/requirements.txt +0 -0
  82. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/builtin_plugins/web_search/__init__.py +0 -0
  83. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/cli/__init__.py +0 -0
  84. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/cli/headless.py +0 -0
  85. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/cli/output.py +0 -0
  86. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/cli/root.py +0 -0
  87. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/cli/runner.py +0 -0
  88. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/config.py +0 -0
  89. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/desktop.py +0 -0
  90. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/get_text/__init__.py +0 -0
  91. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/get_text/default_gitignore +0 -0
  92. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/get_text/get_text.py +0 -0
  93. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/get_text/simpler_get_text.py +0 -0
  94. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/hooks.py +0 -0
  95. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/image.py +0 -0
  96. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/latex.py +0 -0
  97. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/message.py +0 -0
  98. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/plugin.py +0 -0
  99. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/prompts/compaction_prompt.txt +0 -0
  100. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/provider.py +0 -0
  101. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/runtime.py +0 -0
  102. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/scheduler.py +0 -0
  103. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/scripts/install-system-dependencies.sh +0 -0
  104. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/server/__init__.py +0 -0
  105. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/service.py +0 -0
  106. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/stream.py +0 -0
  107. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/stream_utils.py +0 -0
  108. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/token_counter.py +0 -0
  109. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tool.py +0 -0
  110. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/__init__.py +0 -0
  111. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/chat.py +0 -0
  112. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/lifecycle.py +0 -0
  113. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/log.py +0 -0
  114. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/perf.py +0 -0
  115. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/state.py +0 -0
  116. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/status_bar.py +0 -0
  117. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/stream_debug.py +0 -0
  118. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/style.py +0 -0
  119. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/transcript.py +0 -0
  120. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/tui/widgets.py +0 -0
  121. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/utils.py +0 -0
  122. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent/worker.py +0 -0
  123. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent_framework.egg-info/dependency_links.txt +0 -0
  124. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent_framework.egg-info/entry_points.txt +0 -0
  125. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent_framework.egg-info/requires.txt +0 -0
  126. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/codex_agent_framework.egg-info/top_level.txt +0 -0
  127. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/dependencies.txt +0 -0
  128. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/setup.cfg +0 -0
  129. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent.py +0 -0
  130. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_audio_hooks.py +0 -0
  131. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_commands.py +0 -0
  132. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_desktop.py +0 -0
  133. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_environment.py +0 -0
  134. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_image_generation.py +0 -0
  135. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_observe.py +0 -0
  136. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_providers_config.py +0 -0
  137. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_realtime.py +0 -0
  138. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_response.py +0 -0
  139. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_sessions.py +0 -0
  140. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_subagents.py +0 -0
  141. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_tools.py +0 -0
  142. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_agent_turns.py +0 -0
  143. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_ai.py +0 -0
  144. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_browser.py +0 -0
  145. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_builtin_config.py +0 -0
  146. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_chat.py +0 -0
  147. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_cli_headless.py +0 -0
  148. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_cli_root.py +0 -0
  149. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_client.py +0 -0
  150. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_get_text_browser.py +0 -0
  151. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_hooks.py +0 -0
  152. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_image_message.py +0 -0
  153. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_local_desktop.py +0 -0
  154. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_messages.py +0 -0
  155. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_scheduler.py +0 -0
  156. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_service.py +0 -0
  157. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_token_counter.py +0 -0
  158. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_tui.py +0 -0
  159. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_utils.py +0 -0
  160. {codex_agent_framework-0.1.82 → codex_agent_framework-0.1.83}/tests/test_worker.py +0 -0
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project loosely follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and uses semantic versioning where practical.
6
6
 
7
+ ## [0.1.83] - 2026-07-03
8
+ ### Changed
9
+ - Finalize the first functional desktop dock integration against the current local server: native SSE events, interactions, sessions, plugins, scheduler, auth/status, and settings.
10
+ - Replace legacy dock browser/realtime/STT/editor surfaces with a smaller chat-focused dock, and let the existing Pandora tray control both TUI and dock.
11
+ - Add bootstrap support for building and installing the desktop dock `.deb` from repository checkouts that include `apps/desktop`.
12
+
13
+ ### Fixed
14
+ - Allow multiple SSE subscribers so the TUI and desktop dock can receive live events concurrently.
15
+ - Add local CORS support needed by the desktop development server.
16
+
17
+ ### Tests
18
+ - Validate the dock/server/tray integration with targeted Python tests, desktop tests, frontend build, and Tauri `.deb` build.
19
+
7
20
  ## [0.1.82] - 2026-05-18
8
21
  ### Changed
9
22
  - Document process-backed runtime serialization, event payload, worker command dispatch, and worker loop helper contracts with concise docstrings.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-agent-framework
3
- Version: 0.1.82
3
+ Version: 0.1.83
4
4
  Summary: A lightweight event-driven Codex agent runtime.
5
5
  Author: Baptiste
6
6
  License-Expression: MIT
@@ -19,6 +19,7 @@ from .command import CommandManager
19
19
  from .config import ConfigManager
20
20
  from .context import ContextManager
21
21
  from .hooks import HookManager
22
+ from .interactions import InteractionManager
22
23
  from .mainloop import MainLoopManager
23
24
  from .plugin import PluginsManager
24
25
  from .provider import ProvidersManager
@@ -63,6 +64,7 @@ class Agent:
63
64
  self.runtime = RuntimeManager(self)
64
65
  self.scheduler = AgentScheduler(self)
65
66
  self.hooks = HookManager(self)
67
+ self.interactions = InteractionManager(self)
66
68
  self.stream_manager = StreamManager(self)
67
69
  self.mainloop_manager = MainLoopManager(self)
68
70
  self._interrupt_requested = ThreadEvent()
@@ -194,6 +196,32 @@ class Agent:
194
196
  job_id=job_id,
195
197
  )
196
198
 
199
+ def enable_terminal_interactions(self, *, input_func=input, print_func=print):
200
+ """Resolve interaction requests through a simple terminal choice prompt."""
201
+ from .interactions import terminal_interaction_response
202
+
203
+ @self.on("interaction_requested_event")
204
+ def terminal_interaction_handler(event):
205
+ response = terminal_interaction_response(event.interaction, input_func=input_func, print_func=print_func)
206
+ self.respond_interaction(event.interaction.id, response)
207
+ return terminal_interaction_handler
208
+
209
+ def request_interaction(self, **kwargs):
210
+ """Emit an interaction request and block until an event handler resolves it."""
211
+ return self.interactions.request(**kwargs)
212
+
213
+ def interactions_list(self, include_resolved=False):
214
+ return self.interactions.list(include_resolved=include_resolved)
215
+
216
+ def current_interaction(self):
217
+ return self.interactions.current()
218
+
219
+ def respond_interaction(self, interaction_id, response=None):
220
+ return self.interactions.respond(interaction_id, response=response)
221
+
222
+ def cancel_interaction(self, interaction_id, reason="cancelled"):
223
+ return self.interactions.cancel(interaction_id, reason=reason)
224
+
197
225
  def interrupt(self, reason="user"):
198
226
  abort_error = None
199
227
  if not self._interrupt_requested.is_set():
@@ -215,6 +243,46 @@ class Agent:
215
243
  def clear_interrupt(self):
216
244
  self._interrupt_requested.clear()
217
245
 
246
+ def authenticate(self, *, interactive=True, request_api_key=False):
247
+ """Authenticate the Codex backend client through stored or interactive OAuth credentials."""
248
+ from codex_backend_sdk import CodexClient
249
+
250
+ client = CodexClient(model=self.config.get("model") or "gpt-5.4").authenticate(
251
+ interactive=interactive,
252
+ request_api_key=request_api_key,
253
+ )
254
+ self.ai._codex_client = client
255
+ return self.account_info(client=client)
256
+
257
+ def account_info(self, *, client=None, refresh=False):
258
+ """Return safe non-secret Codex account metadata for UI/status surfaces."""
259
+ from codex_backend_sdk import CodexClient
260
+ from codex_backend_sdk.storage import load_tokens
261
+
262
+ try:
263
+ if client is None:
264
+ client = getattr(self.ai, "_codex_client", None)
265
+ if client is not None and getattr(client, "authenticated", False):
266
+ return client.account_info()
267
+ if refresh:
268
+ return self.authenticate(interactive=False)
269
+ store = load_tokens()
270
+ return CodexClient(store=store).account_info() if store else {"authenticated": False}
271
+ except Exception as exc:
272
+ return {"authenticated": False, "error": str(exc)}
273
+
274
+ def logout(self):
275
+ """Clear local Codex OAuth credentials and reset the in-memory backend client."""
276
+ from contextlib import suppress
277
+ from codex_backend_sdk.storage import _auth_path
278
+
279
+ path = _auth_path()
280
+ cleared = path.exists()
281
+ with suppress(FileNotFoundError):
282
+ path.unlink()
283
+ self.ai._codex_client = None
284
+ return cleared
285
+
218
286
  def is_interrupted(self):
219
287
  return self._interrupt_requested.is_set()
220
288
 
@@ -295,6 +363,9 @@ class Agent:
295
363
  def get_sessions(self):
296
364
  return self.sessions_manager.list()
297
365
 
366
+ def current_session(self):
367
+ return self.sessions_manager.current()
368
+
298
369
  def latest_session_id(self):
299
370
  return self.sessions_manager.latest_id()
300
371
 
@@ -307,6 +378,9 @@ class Agent:
307
378
  def delete_session(self, session):
308
379
  return self.sessions_manager.delete(session)
309
380
 
381
+ def rename_session(self, session=None, title=""):
382
+ return self.sessions_manager.rename(session, title)
383
+
310
384
  def navigate_session(self, direction):
311
385
  return self.sessions_manager.navigate(direction)
312
386
 
@@ -386,9 +460,22 @@ class Agent:
386
460
  def add_command(self, func=None, name=None, owner=None):
387
461
  return self.command_manager.add(func, name=name, owner=owner)
388
462
 
463
+ def plugin_infos(self):
464
+ return self.plugins_manager.plugin_infos()
465
+
389
466
  def add_plugin(self, plugin):
390
467
  return self.plugins_manager.add_plugin(plugin)
391
468
 
469
+ def load_plugin(self, name, kind="auto"):
470
+ if kind == "builtin":
471
+ return self.load_builtin_plugin(name)
472
+ if kind == "runtime":
473
+ return self.load_runtime_plugin(name)
474
+ info = self.plugins_manager.plugin_info(name)
475
+ if info and info.kind == "builtin":
476
+ return self.load_builtin_plugin(name)
477
+ return self.load_runtime_plugin(name)
478
+
392
479
  def load_builtin_plugin(self, name):
393
480
  return self.plugins_manager.load_builtin_plugin(name)
394
481