Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cueapi/cueapi-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bd9b21b
Choose a base ref
...
head repository: cueapi/cueapi-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: caf33a4
Choose a head ref
  • 1 commit
  • 8 files changed
  • 2 contributors

Commits on May 4, 2026

  1. feat: add fire + list_claimable + claim + claim_next

    Brings the Python SDK toward parity with the @cueapi/mcp 0.3.0 + 0.4.0
    surface. Adds four new methods covering the SEND side (fire) and the
    RECEIVE side (claimable list, claim, claim-next). Heartbeat signature
    fix is held for a follow-up commit pending technical review.
    
    CuesResource:
    - fire(cue_id, payload_override=None, merge_strategy=None)
      POST /v1/cues/{id}/fire. For ad-hoc one-shot triggers and for using
      cues as a messaging channel between agents (carry message, instruction,
      task, reply_cue_id in payload_override).
    
    ExecutionsResource:
    - list_claimable(task=None, agent=None)
      GET /v1/executions/claimable?task=&agent=
      Filters server-side via query params (NOT client-side). Required for
      single-purpose workers; client-side filter after fetch hits the LIMIT
      50 starvation bug fixed in the 2026-04-25 prod incident.
    
    - claim(execution_id, worker_id=...)
      POST /v1/executions/{id}/claim
      Atomic; returns 409 if already claimed.
    
    - claim_next(worker_id=..., task=None)
      POST /v1/executions/claim (no task) OR list+claim chain (with task).
      Server's claim endpoint does not accept a task filter today; with task
      the SDK fans out (list_claimable filtered, pick oldest, claim by ID).
      Tiny race window between list and claim is bounded by the atomic claim
      returning 409, in which case the caller retries.
    
    Version: 0.1.3 -> 0.2.0. Aligned cueapi/__init__.py (had drifted to
    0.1.2) with pyproject.toml at the same time.
    
    Tests: 42 unit tests pass (was 30; +12 net). Mirrors the existing
    MagicMock pattern in tests/test_executions_resource.py.
    
    Pending follow-up:
    - ExecutionsResource.heartbeat(execution_id) currently sends an empty
      body and does not include worker_id via the X-Worker-Id request
      header that the server reads from. Worker-id is what the server uses
      to enforce ownership on heartbeat (returns 403 on mismatch); without
      it the race-protection check is silently bypassed. A signature change
      to add worker_id is held pending technical review of the deprecation
      cadence (additive kwarg-only with default-warn-on-omit vs hard
      signature change in a major bump).
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    2 people authored and Gk committed May 4, 2026
    Configuration menu
    Copy the full SHA
    caf33a4 View commit details
    Browse the repository at this point in the history
Loading