Skip to content

feat: add call task pull, claim and attempt sync - #71

Draft
wavekat-eason wants to merge 1 commit into
mainfrom
feat/call-tasks
Draft

wavekat-eason wants to merge 1 commit into
mainfrom
feat/call-tasks

Conversation

@wavekat-eason

Copy link
Copy Markdown
Contributor

Summary

The desktop side of the wire for call tasks (wavekat-voice docs/71-call-tasks.md). Platform routes: wavekat/wavekat-platform#417 (migration), plus the API PR that follows it.

  • Client::active_task_batches: GET /api/voice/task-batches/active, cursor by id, the same shape as published flows. Each batch carries its outcome fields and all its tasks.
  • Client::claim_task / release_task: lease a task before dialing. A 409 is an answer rather than an error, so it comes back as TaskClaim::Taken or TaskClaim::NotOpen.
  • VoiceTaskAttempts: a SyncEndpoint for POST /api/voice/task-attempts/sync, with a VoiceTaskAttemptRecord that carries the usual envelope.

The types live in a new voice_tasks.rs module and are re-exported from the crate root. A doctest guards the re-exports.

Release order: merge after the platform API PR is deployed. Then release-plz cuts the release, and wavekat-voice and wk bump to it.

Test plan

  • make ci passes: fmt, clippy -D warnings, 130 unit tests and the doctests.
  • New tests:
    • the batch page decodes the platform's shape
    • a minimal task decodes with the optional fields missing
    • an attempt serializes in camelCase without empty fields
    • all three claim answers come back correctly against a local HTTP server, and a 404 passes through as an error
    • task ids are escaped in paths

🤖 Generated with Claude Code

https://claude.ai/code/session_01X42YmhgZ5dYJRZU9Bvmbjp

Desktop wire for call tasks (wavekat-voice docs/71): pull open batches
with their tasks, claim/release a task before dialing (a 409 comes back
as TaskClaim::Taken / NotOpen rather than an error), and push attempts
through the sync contract as VoiceTaskAttempts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X42YmhgZ5dYJRZU9Bvmbjp
@wavekat-eason wavekat-eason mentioned this pull request Oct 17, 2026
3 of 4 tasks
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