Skip to content

[codex] add task scheduling and management APIs#31

Merged
DorianZheng merged 1 commit intomainfrom
codex/capture-stdin-before-runner-compile
Apr 10, 2026
Merged

[codex] add task scheduling and management APIs#31
DorianZheng merged 1 commit intomainfrom
codex/capture-stdin-before-runner-compile

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • add public SDK task types plus scheduleTask, listTasks, getTask, updateTask, pauseTask, resumeTask, and cancelTask
  • wire the task APIs through AgentImpl, centralize next-run/task-id helpers, and expose task run history from the database
  • add task API, lifecycle, and SDK type coverage, plus an SDK E2E script and updated docs/README examples
  • clean up agent deletion so custom agent workdirs are removed without risking the shared registry DB

Why

The scheduler and MCP layer already supported task execution, but the public Node SDK did not expose a complete task management surface. That made it hard for SDK consumers to schedule tasks, inspect runs, or manage task lifecycle programmatically.

Impact

SDK consumers can now create and manage scheduled tasks directly through the public API, including reading task details and run history. The docs and README now show the task flow, and the added tests cover persistence and end-to-end lifecycle behavior.

Validation

  • npm run typecheck
  • npm test -- --run src/task-api.test.ts src/task-lifecycle.test.ts src/db.test.ts src/sdk-types.test.ts src/agentlite-impl.test.ts
  • npx eslint src/agent-impl.ts src/task-lifecycle.test.ts

Notes

  • npm run lint still reports existing unrelated repo-wide lint errors outside this change set, so validation here focused on the touched task-path files and tests.

@DorianZheng DorianZheng marked this pull request as ready for review April 10, 2026 08:13
@DorianZheng DorianZheng merged commit cf5a530 into main Apr 10, 2026
2 checks passed
@DorianZheng DorianZheng deleted the codex/capture-stdin-before-runner-compile branch April 10, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant