Skip to content

feat(ts): kernel events/commands, thread API, transports, handle/poll - #187

Draft
Rushant-123 wants to merge 2 commits into
feat/rewrite-tsfrom
cursor/ts-adapters-ed24
Draft

feat(ts): kernel events/commands, thread API, transports, handle/poll#187
Rushant-123 wants to merge 2 commits into
feat/rewrite-tsfrom
cursor/ts-adapters-ed24

Conversation

@Rushant-123

@Rushant-123 Rushant-123 commented Aug 17, 2026

Copy link
Copy Markdown
Member

What & why

Close the Python-parity gaps the TypeScript A-core had kept small. Python grew Events, Commands, AdapterPort methods, Thread verbs, and a single handle/poll composition root; TS now matches that kernel and B surface without putting I/O in core/.

Kernel

  • Events: Receipt, MemberJoin, MemberLeave, Edited, Deleted
  • Message fields: attachments, blocks, reply_to, topic_id, message_id (plus Action interaction_id / message_id)
  • Commands: Reply, SendBlocks, SendMedia, Delete, Pin, Unpin, Forward, MarkRead, Initiate, ScheduleSend, OpenModal, UpdateModal, ListHistory
  • AdapterPort: verify / acknowledge / capabilities / format, optional poll

Thread

  • reply, sendBlocks/send_blocks, sendMedia/send_media, delete, pin/unpin, forward, markRead, initiate, schedule, history, subscribe, thread.stream() (buffers to one Post when there is no live sink)

Composition root

  • cx.handle(channel, body, headers) — verify → parse → step → execute → transport
  • cx.poll(channel) — Telegram getUpdates long-poll into the same handleRaw pipeline
  • Facade still does not import adapters; lookup lives in interpreters/registry.ts

Transports

  • Shared HttpTransport + MultiplexTransport (http_json / http_form / http_multipart / noop)
  • SmtpTransport (injectable sender; no live SMTP by default)
  • VoiceResponder (lifts TwiML; no outbound HTTP)

Adapters

  • Telegram parse: edited, membership, attachments, reply_to, topic_id
  • Telegram execute: Reply/SendMedia/Delete/Pin/Forward/Initiate/MarkRead (noop); ScheduleSend/ListHistory are AdapterError
  • WhatsApp delivery receipts parse to Receipt

Checklist

  • TypeScript: cd packages/typescript && bun run ci (202 pass)
  • Facade does not import src/adapters (facade-no-adapters)
  • No real credentials — fake placeholders only
  • uv run pytest / ruff — Python not in this PR
Open in Web Open in Cursor 

Port the Python rewrite adapter set onto the TypeScript kernel without
growing Event/Command. Each pack parses inbound, plans Post/Edit/React/
Typing (or AdapterError), and owns thread ids and overlap keys.

Co-authored-by: Rushant Ashtputre <Rushant-123@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 60e692fa-5e99-4b19-afea-c936bf87cb29

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Close the Python-parity gaps the TS A-core kept small: Receipt/MemberJoin/
Edited/Deleted events, outbound Commands, AdapterPort verify/acknowledge/
capabilities/format, shared Http/Multiplex/SMTP/TwiML transports, and
cx.handle / cx.poll as one composition root.

Co-authored-by: Rushant Ashtputre <Rushant-123@users.noreply.github.com>
@cursor cursor Bot changed the title feat(ts): Discord, Slack, and remaining Python-parity adapters feat(ts): kernel events/commands, thread API, transports, handle/poll Aug 17, 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.

2 participants