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
In
deno.json, point@swamp/clientatjsr:@swamp-club/swamp-lib@^0.20261109.44.workflowRunnow returns aWorkflowRunResult. The run's fields stay at the top level, next to anoutcomeofcompleted,cancelled,suspendedorreplayed. Thereplayedvariant has onlyrunId, so TypeScript refusesrun.jobsandrun.statusuntil the code checksoutcome. Add a check after the call at both call sites:lib/app/apply-github-issue-event.ts(theci-ack-issuerun)scripts/trigger-debug-workflow.ts
Neither call passes an
idempotencyKey, and neither workflow has a gate, so onlycompletedorcancelledcan arrive. A guard such asif (run.outcome === "replayed" || run.outcome === "suspended") throw ...is enough, and the existingrun.jobsandrun.statuscode stays as it is.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).The
startedevent type now declaresjobsandparentRunId, so theas unknown as Record<string, unknown>casts used to readjobscan 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
workflowRunStreamormodelMethodRunStreamnow throws instead of ending silently (#4445). swamp-club only usesworkflowRun, which already rejected on errors. - A dropped socket rejects with
SwampClientErrorcodeconnection_closed; the message is still "WebSocket closed".
Related: #4438, #4445, #4459.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.