Skip to content

spectrum-ts v3.0.0

Choose a tag to compare

@photon-action-bot photon-action-bot released this 11 Jun 08:56
· 8 commits to main since this release

Breaking Changes

  • platform.space(...) is now platform.space.create(...) for creating a space, and platform.space.get(id) for looking up an existing one.
  • streamText() was removed from the public API. Pass streams directly to text(source, options) or markdown(source, options) instead; StreamTextOptions is now TextStreamOptions.
  • resumableOrderedStream replaced isRetryableError with isCursorRejectedError. Other stream errors now retry automatically.

New Features

  • Added markdown() for outbound styled text using CommonMark/GFM. Telegram and remote iMessage render it natively, while unsupported platforms fall back to readable plain text.
  • Streaming text now works through text() and markdown(), including native Telegram private-chat drafts and existing iMessage streaming behavior. Platforms without streaming support wait for the stream to finish and send the full text.
  • Added unsend() plus message.unsend() and space.unsend(), with iMessage support for retracting outbound messages.
  • Reactions now return a Message handle instead of undefined, so you can keep that handle and unsend the reaction later. ✨

Bug Fixes

  • effect() now accepts markdown content correctly, so markdown can be wrapped in supported iMessage effects.

Improvement

  • Resumable streams are more resilient: reconnects keep retrying, backoff has a safer jitter floor, persistent failures get louder logs, and cursor rejection is handled separately from normal stream errors.

Version: 3.0.0