feat(photon): add native message effects - #43718
Conversation
|
Local verification from fork branch: |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for exposing the Spectrum effect capability without adding a new core tool.
Problems
PhotonAdapter.send_effect()is currently unreachable from Hermes's outbound interface.send_messageaccepts onlysend,list,react, andunreactintools/send_message_tool.py:210-250; its live route callsadapter.send()attools/send_message_tool.py:713-734, and the Photon standalone sender only posts to/sendatplugins/platforms/photon/adapter.py:1662-1739. The README/docs therefore overstate current user-visible support.- The added test stubs
_sidecar_call, so it cannot validate the new JavaScript handler or its spectrum-ts builder/import. Current main pins spectrum-ts8.0.0inplugins/platforms/photon/sidecar/package.json:15-17.
Suggested changes
- Wire effects through a deliberate supported invocation path, or scope this as internal and adjust the docs accordingly.
- Add sidecar-level coverage for a supported and unsupported effect against the pinned dependency.
This PR is substantially stale relative to the current Photon sidecar, so the implementation should be salvaged onto its current structure rather than applied verbatim. This is an automated hermes-sweeper review.
| chat_id, animation_url, caption, reply_to, metadata, | ||
| ) | ||
|
|
||
| async def send_effect( |
There was a problem hiding this comment.
send_effect() has no caller in the existing delivery surface: send_message dispatches only send/list/react/unreact and its send path invokes adapter.send(). Please wire this through a deliberate supported path (including standalone behavior), or keep it internal and avoid documenting Hermes-level effect support.
|
Merged via #73614 — cherry-picked with authorship preserved (trivially rebased over your poll PR; a follow-up hardened MESSAGE_EFFECTS against SDK builds lacking the effect surface). |
Summary
/send-effectendpoint backed byspectrum-ts/providers/imessage's nativeeffect(...)builderPhotonAdapter.send_effect(...)for text with native iMessage bubble/screen effectsWhy
spectrum-tsalready exposes iMessage effects such asslam,loud,gentle,invisible,confetti,fireworks,balloons,heart,lasers,celebration,sparkles,spotlight, andecho. This exposes the sidecar/adapter layer without adding a new model tool or changing the global tool schema.Verification
node --check plugins/platforms/photon/sidecar/index.mjsspectrum-ts/providers/imessage→effect builder ok: com.apple.messages.effect.CKConfettiEffectvenv/bin/python -m pytest tests/plugins/platforms/photon/test_outbound_media.py -q -o 'addopts='→ 10 passedvenv/bin/python -m pytest tests/plugins/platforms/photon -q -o 'addopts='→ 68 passed