Skip to content

🦋 New version release - #467

Merged
brentrager merged 1 commit into
mainfrom
changeset-release/main
Aug 18, 2026
Merged

🦋 New version release#467
brentrager merged 1 commit into
mainfrom
changeset-release/main

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@smooai/smooth-operator@1.52.1

Patch Changes

  • 888cbef: feat(go): client-initiated turn cancellation — Client.Cancel() + MessageTurn.Cancel()

    The wire protocol and all five servers already honor the cancel frame / cancelled
    event, but the Go client had no way to send it. Add the missing client surface, mirroring
    the TypeScript reference (sdk: client-initiated turn cancellation — SmoothAgentClient.cancel() + MessageTurn.cancel() #459):

    • Client.Cancel(CancelParams{RequestID, SessionID?}) sends the cancel frame.
    • MessageTurn.Cancel() is the ergonomic "stop THIS turn" convenience — it cancels using
      the turn's own requestId + originating sessionId. Fire-and-forget, idempotent.
    • A terminal cancelled event settles the matching turn as a user-stop: the event is
      delivered on Events(), the channel closes cleanly, Wait resolves WITHOUT an error,
      and MessageTurn.Cancelled() reports true so a UI tells a user-stop apart from a
      failure. Errors still go the error path.
    • cancel is now first-class in the ActionType set and cancelled in the EventType
      set (with ServerEvent.AsCancelled()), not stringly-typed.
    • Idempotent: a cancel with no active turn, or a cancelled with no matching turn, is a
      harmless no-op.

@smooai/smooth-operator-web-chat-example@0.0.89

Patch Changes

  • Updated dependencies [888cbef]
    • @smooai/smooth-operator@1.52.1

@smooai/smooth-operator-server@1.12.1

Patch Changes

  • 89c5ca7: fix(ts): cancel discards a HITL-parked confirmation so the parked turn drops cleanly

    Cancelling a turn parked at a write-confirmation (HITL) freed the slot and emitted cancelled
    correctly, but the park in turnRunner.ts awaits a bare deferred from ConfirmationRegistry.register
    (const approved = await verdict) that the turn's cancelSignal abort does NOT itself complete. The
    cancel path already discarded it via a connection-wide confirmations.rejectAll(), but that is a
    broader sweep than the cancel needs.

    FrameDispatcher.cancelActiveTurn now discards precisely the cancelled turn's pending confirmation
    (confirmations.resolve(turn.sessionId, false)) after aborting the controller, so the parked await
    unblocks immediately (resolves denied; the result is dropped because the sink is gagged and the slot
    is already cleared). activeTurn now carries a sessionId, stamped where the turn is created in the
    send_message handler. The disconnect path still rejects every outstanding confirmation separately
    via rejectPendingConfirmations, so nothing dangles there. Mirrors the Rust reference dropping the
    confirmation future on abort and the .NET fix (dotnet: cancel discards a HITL-parked confirmation so the parked turn drops cleanly #460). No behavior change for a non-parked cancel or
    the no-active-turn no-op.

    Adds a parity test (mirroring the .NET CancelUnparkTests) that drives a turn to
    write_confirmation_required, cancels it, and asserts cancelled is emitted, a later
    confirm_tool_action returns NO_PENDING_CONFIRMATION, the slot is freed (a new send_message is
    accepted), and no stray events leak from the abandoned turn.

@brentrager
brentrager force-pushed the changeset-release/main branch from 480a0f5 to 294092b Compare August 18, 2026 19:40
@brentrager
brentrager merged commit ca5bab5 into main Aug 18, 2026
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