Skip to content

feat(types): add agent_session_stopped and agent_session_title_changed events - #2707

Draft
zimeg wants to merge 2 commits into
mainfrom
clack/agent-session-events
Draft

feat(types): add agent_session_stopped and agent_session_title_changed events#2707
zimeg wants to merge 2 commits into
mainfrom
clack/agent-session-events

Conversation

@zimeg

@zimeg zimeg commented Aug 21, 2026

Copy link
Copy Markdown
Member

Types the two agent session events an agent app receives, so app.event(...) handlers for them are type-safe in bolt-js (they flow through the SlackEvent union). Mirrors the existing assistant events.

Events

  • agent_session_stopped — the user clicked the native stop button; the app should cease work and transition the session out of processing.
    • type, channel, user, thread_ts, streaming_message_ts (string array), event_ts
  • agent_session_title_changed — the user renamed the session.
    • type, channel, user, team_id, thread_ts, title, previous_title, event_ts

Notes

  • Field sets were confirmed against live events (via a Bolt socket-mode app), not just the docs.
  • The two events are intentionally not symmetric: agent_session_title_changed carries team_id on the inner event; agent_session_stopped does not (it carries streaming_message_ts, the timestamps of any in-flight streaming messages at stop time).
  • Envelope-level fields (enterprise_id, team_id on the wrapper, authorizations) are handled by the existing event-wrapper types and are not part of these inner-event interfaces.
  • Opening as a draft reference — companion to the agents.sessions.* methods work (node-slack-sdk#2703); a Java SDK equivalent will mirror these shapes.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cba0f8f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/types Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zimeg zimeg added enhancement M-T: A feature request for new functionality pkg:types applies to `@slack/types` labels Aug 21, 2026
@zimeg zimeg self-assigned this Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.15%. Comparing base (4322e14) to head (cba0f8f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2707   +/-   ##
=======================================
  Coverage   89.15%   89.15%           
=======================================
  Files          65       65           
  Lines       10383    10383           
  Branches      473      473           
=======================================
  Hits         9257     9257           
  Misses       1095     1095           
  Partials       31       31           
Flag Coverage Δ
cli-hooks 89.15% <ø> (ø)
cli-test 89.15% <ø> (ø)
logger 89.15% <ø> (ø)
oauth 89.15% <ø> (ø)
socket-mode 89.15% <ø> (ø)
web-api 89.15% <ø> (ø)
webhook 89.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

zimeg and others added 2 commits August 21, 2026 17:23
…d events

Type the two agent session events an agent app receives, mirroring the
existing assistant events. Adds them to the SlackEvent union so bolt-js
routes them type-safely.

- agent_session_stopped: type, channel, user, thread_ts,
  streaming_message_ts (array), event_ts
- agent_session_title_changed: type, channel, user, team_id, thread_ts,
  title, previous_title, event_ts

Field sets captured from live events.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg force-pushed the clack/agent-session-events branch from 9d521d2 to cba0f8f Compare August 22, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality pkg:types applies to `@slack/types`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant