Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublic
AssigneesNone

Relationships

≡ duplicate of #4545

#4535 swamp-club: move swamp-lib from the archived @systeminit scope to @swamp-club/swamp-lib

Opened by skunk-ape · 11/9/2026· Shipped 11/9/2026

Summary

swamp-club imports swamp-lib as @swamp/client from jsr:@systeminit/swamp-lib@^0.20260327.1. That package is archived, and a caret range on a 0.x version pins the minor (here the date), so swamp-club only ever resolves 0.20260327.x. It gets no swamp-lib fixes, including #4445 (stream helpers drop refusals) and #4438 (workflowRun hangs at an approval gate).

Move it to jsr:@swamp-club/swamp-lib@^0.20261109.44, the first release with both fixes.

What changes

  1. In deno.json, point @swamp/client at jsr:@swamp-club/swamp-lib@^0.20261109.44.

  2. workflowRun now returns a WorkflowRunResult. The run's fields stay at the top level, next to an outcome of completed, cancelled, suspended or replayed. The replayed variant has only runId, so TypeScript refuses run.jobs and run.status until the code checks outcome. Add a check after the call at both call sites:

    • lib/app/apply-github-issue-event.ts (the ci-ack-issue run)
    • scripts/trigger-debug-workflow.ts

    Neither call passes an idempotencyKey, and neither workflow has a gate, so only completed or cancelled can arrive. A guard such as if (run.outcome === "replayed" || run.outcome === "suspended") throw ... is enough, and the existing run.jobs and run.status code stays as it is.

  3. Everything else swamp-club uses is unchanged: the constructor, connect, close, and the event handlers it registers (started, job_started, job_completed, step_started, step_completed, step_failed, method_output, report_completed).

  4. The started event type now declares jobs and parentRunId, so the as unknown as Record<string, unknown> casts used to read jobs can go, though that is optional.

Checked so far

A scratch file reproducing both call sites' use of the result type-checks against the old package. Against 0.20261109.44 it fails with Property 'jobs' does not exist on type 'WorkflowRunResult', and it passes once the one-line check is added. swamp-club's full deno check and tests were not run against the new version; do that as part of this change.

Behaviour changes to expect

  • A run refused or failed through workflowRunStream or modelMethodRunStream now throws instead of ending silently (#4445). swamp-club only uses workflowRun, which already rejected on errors.
  • A dropped socket rejects with SwampClientError code connection_closed; the message is still "WebSocket closed".

Related: #4438, #4445, #4459.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDLINKED+ 4 MOREPR_MERGED+ 1 MORESESSION_SUMMARIZED

Shipped

11/9/2026, 4:31:14 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
skunk-ape linked duplicate of #454511/9/2026, 3:36:57 PM

Sign in to post a ripple.