codexapi 0.10.1__tar.gz → 0.12.2__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 (31) hide show
  1. {codexapi-0.10.1/src/codexapi.egg-info → codexapi-0.12.2}/PKG-INFO +27 -1
  2. {codexapi-0.10.1 → codexapi-0.12.2}/README.md +26 -0
  3. {codexapi-0.10.1 → codexapi-0.12.2}/pyproject.toml +1 -1
  4. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/__init__.py +1 -1
  5. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/agents.py +648 -28
  6. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/cli.py +157 -11
  7. {codexapi-0.10.1 → codexapi-0.12.2/src/codexapi.egg-info}/PKG-INFO +27 -1
  8. {codexapi-0.10.1 → codexapi-0.12.2}/tests/test_agents.py +760 -5
  9. {codexapi-0.10.1 → codexapi-0.12.2}/LICENSE +0 -0
  10. {codexapi-0.10.1 → codexapi-0.12.2}/setup.cfg +0 -0
  11. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/__main__.py +0 -0
  12. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/agent.py +0 -0
  13. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/foreach.py +0 -0
  14. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/gh_integration.py +0 -0
  15. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/lead.py +0 -0
  16. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/pushover.py +0 -0
  17. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/ralph.py +0 -0
  18. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/rate_limits.py +0 -0
  19. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/science.py +0 -0
  20. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/task.py +0 -0
  21. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/taskfile.py +0 -0
  22. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi/welfare.py +0 -0
  23. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi.egg-info/SOURCES.txt +0 -0
  24. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi.egg-info/dependency_links.txt +0 -0
  25. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi.egg-info/entry_points.txt +0 -0
  26. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi.egg-info/requires.txt +0 -0
  27. {codexapi-0.10.1 → codexapi-0.12.2}/src/codexapi.egg-info/top_level.txt +0 -0
  28. {codexapi-0.10.1 → codexapi-0.12.2}/tests/test_agent_backend.py +0 -0
  29. {codexapi-0.10.1 → codexapi-0.12.2}/tests/test_rate_limits.py +0 -0
  30. {codexapi-0.10.1 → codexapi-0.12.2}/tests/test_science.py +0 -0
  31. {codexapi-0.10.1 → codexapi-0.12.2}/tests/test_task_progress.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codexapi
3
- Version: 0.10.1
3
+ Version: 0.12.2
4
4
  Summary: Minimal Python API for running the Codex CLI.
5
5
  License: MIT
6
6
  Keywords: codex,agent,cli,openai
@@ -173,6 +173,10 @@ codexapi agent whoami
173
173
  codexapi agent install-cron
174
174
  ```
175
175
 
176
+ `codexapi agent install-cron` installs one background scheduler hook for this
177
+ `CODEXAPI_HOME`. The wrapper runs `codexapi tick`, which drives the durable
178
+ agent wake scan.
179
+
176
180
  If you skip `install-cron`, `codexapi agent start` warns on stderr because
177
181
  background wakes will not run until the scheduler hook is installed.
178
182
  When `gh` is installed and authenticated, `agent start` also captures a
@@ -203,6 +207,8 @@ Inspect and talk to agents:
203
207
  ```bash
204
208
  codexapi agent list
205
209
  codexapi agent show ci-fixer
210
+ codexapi agent status ci-fixer
211
+ codexapi agent status --actions ci-fixer
206
212
  codexapi agent read ci-fixer
207
213
  codexapi agent book ci-fixer
208
214
  codexapi agent send ci-fixer "Prefer the smallest safe fix."
@@ -212,11 +218,27 @@ codexapi agent wake --wait ci-fixer
212
218
  codexapi agent pause ci-fixer
213
219
  codexapi agent resume ci-fixer
214
220
  codexapi agent resume --wait ci-fixer
221
+ codexapi agent recover ci-fixer
222
+ codexapi agent recover --wait ci-fixer
215
223
  codexapi agent set-heartbeat ci-fixer 30
216
224
  codexapi agent cancel ci-fixer
217
225
  codexapi agent delete ci-fixer
218
226
  ```
219
227
 
228
+ `codexapi agent resume` can reopen a `done` agent. Sending to a `done` or
229
+ `canceled` agent still triggers a one-off wake on the next tick so you can get
230
+ a reply without putting the agent back into continuous heartbeat mode.
231
+ For local-owned agents, `send`, `wake`, and `resume` now also nudge an
232
+ immediate non-blocking wake even without `--wait`; `--wait` only changes
233
+ whether the CLI blocks for completion.
234
+ `codexapi agent recover` is for a different failure mode: a local wake that is
235
+ still marked `running` but has stopped making rollout progress. `agent list`,
236
+ `agent show`, and `agent status` now surface stale running wakes, and `recover`
237
+ terminates the stuck local wake, marks it recoverable, and queues a fresh one.
238
+ `agent list` also surfaces queued operator intent for local commands, so a
239
+ paused agent with a queued `resume` shows as `resuming` with separate queued
240
+ message and queued command counts.
241
+
220
242
  Create a child agent explicitly:
221
243
 
222
244
  ```bash
@@ -237,6 +259,10 @@ wrappers report inconsistent hostnames for the same machine.
237
259
 
238
260
  `codexapi agent show` also prints the resolved `AGENTBOOK.md` path so you can
239
261
  jump directly to the durable working memory file.
262
+ `codexapi agent status` reads the latest turn from the agent's rollout log and
263
+ shows recent commentary plus the final visible output. Pass `--actions` to
264
+ include the tool-action summary. If a wake is still in progress, it shows the
265
+ active turn so far.
240
266
 
241
267
  See [docs/agent-v1.md](docs/agent-v1.md) for the filesystem model and scheduling
242
268
  details.
@@ -158,6 +158,10 @@ codexapi agent whoami
158
158
  codexapi agent install-cron
159
159
  ```
160
160
 
161
+ `codexapi agent install-cron` installs one background scheduler hook for this
162
+ `CODEXAPI_HOME`. The wrapper runs `codexapi tick`, which drives the durable
163
+ agent wake scan.
164
+
161
165
  If you skip `install-cron`, `codexapi agent start` warns on stderr because
162
166
  background wakes will not run until the scheduler hook is installed.
163
167
  When `gh` is installed and authenticated, `agent start` also captures a
@@ -188,6 +192,8 @@ Inspect and talk to agents:
188
192
  ```bash
189
193
  codexapi agent list
190
194
  codexapi agent show ci-fixer
195
+ codexapi agent status ci-fixer
196
+ codexapi agent status --actions ci-fixer
191
197
  codexapi agent read ci-fixer
192
198
  codexapi agent book ci-fixer
193
199
  codexapi agent send ci-fixer "Prefer the smallest safe fix."
@@ -197,11 +203,27 @@ codexapi agent wake --wait ci-fixer
197
203
  codexapi agent pause ci-fixer
198
204
  codexapi agent resume ci-fixer
199
205
  codexapi agent resume --wait ci-fixer
206
+ codexapi agent recover ci-fixer
207
+ codexapi agent recover --wait ci-fixer
200
208
  codexapi agent set-heartbeat ci-fixer 30
201
209
  codexapi agent cancel ci-fixer
202
210
  codexapi agent delete ci-fixer
203
211
  ```
204
212
 
213
+ `codexapi agent resume` can reopen a `done` agent. Sending to a `done` or
214
+ `canceled` agent still triggers a one-off wake on the next tick so you can get
215
+ a reply without putting the agent back into continuous heartbeat mode.
216
+ For local-owned agents, `send`, `wake`, and `resume` now also nudge an
217
+ immediate non-blocking wake even without `--wait`; `--wait` only changes
218
+ whether the CLI blocks for completion.
219
+ `codexapi agent recover` is for a different failure mode: a local wake that is
220
+ still marked `running` but has stopped making rollout progress. `agent list`,
221
+ `agent show`, and `agent status` now surface stale running wakes, and `recover`
222
+ terminates the stuck local wake, marks it recoverable, and queues a fresh one.
223
+ `agent list` also surfaces queued operator intent for local commands, so a
224
+ paused agent with a queued `resume` shows as `resuming` with separate queued
225
+ message and queued command counts.
226
+
205
227
  Create a child agent explicitly:
206
228
 
207
229
  ```bash
@@ -222,6 +244,10 @@ wrappers report inconsistent hostnames for the same machine.
222
244
 
223
245
  `codexapi agent show` also prints the resolved `AGENTBOOK.md` path so you can
224
246
  jump directly to the durable working memory file.
247
+ `codexapi agent status` reads the latest turn from the agent's rollout log and
248
+ shows recent commentary plus the final visible output. Pass `--actions` to
249
+ include the tool-action summary. If a wake is still in progress, it shows the
250
+ active turn so far.
225
251
 
226
252
  See [docs/agent-v1.md](docs/agent-v1.md) for the filesystem model and scheduling
227
253
  details.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codexapi"
7
- version = "0.10.1"
7
+ version = "0.12.2"
8
8
  description = "Minimal Python API for running the Codex CLI."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -27,4 +27,4 @@ __all__ = [
27
27
  "task_result",
28
28
  "lead",
29
29
  ]
30
- __version__ = "0.10.1"
30
+ __version__ = "0.12.2"