The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(imessage): platform hints steer replies to plain texting style
teknium16fa6df75f20e
diff --git a/agent/prompt_builder.py b/agent/prompt_builder.pyindex 5f330639129..982411f9d40 100644--- a/agent/prompt_builder.py+++ b/agent/prompt_builder.py@@ -723,10 +723,13 @@ PLATFORM_HINTS = {"formatting. SMS messages are limited to ~1600 characters, so be brief and direct."),"bluebubbles": (- "You are chatting via iMessage (BlueBubbles). iMessage does not render markdown formatting β use "- "plain text. Keep responses concise as they appear as text messages. You can send media files "- "natively: include MEDIA:/absolute/path/to/file in your response. Images (.jpg, .png, .heic) appear "- "as photos and other files arrive as attachments."+ # The adapter runs strip_markdown(): markers vanish but the layout stays, and [label](url) loses its URL.+ "You are texting via iMessage (BlueBubbles). Replies arrive as plain text bubbles, so write like a person "+ "texting: short and conversational, answer first, no preamble or recap. Markdown does not render and is "+ "stripped, so skip headers, tables, code fences and backticks; for a few items use short lines or a "+ "sentence rather than nested bullets. Put a command or code snippet on its own line as plain text so it "+ "can be copied. Write links as bare URLs (iMessage auto-links them); [text](url) links lose the URL. "+ f"{_MEDIA_NATIVE}Images (.jpg, .png, .heic) appear as photos and other files arrive as attachments."),"mattermost": ("You are in a Mattermost workspace communicating with your user. Mattermost renders standard "diff --git a/plugins/platforms/photon/adapter.py b/plugins/platforms/photon/adapter.pyindex 05733baeea7..1975db6ded3 100644--- a/plugins/platforms/photon/adapter.py+++ b/plugins/platforms/photon/adapter.py@@ -1559,13 +1559,20 @@ def register(ctx) -> None:allow_all_env="PHOTON_ALLOW_ALL_USERS", max_message_length=_MAX_MESSAGE_LENGTH, emoji="π±",pii_safe=True, # E.164 phone numbers: redact session descriptions before they reach the LLMallow_update_command=True,+ # Grounded in spectrum-ts markdownToIMessageText + sidecar send-format.mjs: headings -> bold, tables ->+ # "a | b" rows, code -> Unicode math-monospace; any message containing a URL is sent as raw text.platform_hint=(- "You are communicating via Photon Spectrum (iMessage). "- "Treat replies like regular text messages β short and friendly. "- "Markdown is rendered (bold, italics, lists, code), but keep "- "formatting light and conversational. Recipient identifiers are "- "E.164 phone numbers; never expose them in responses unless the "- "user asked. Attachments arrive as metadata only."))+ "You are texting via iMessage (Photon). Write like a person texting: short and conversational, "+ "answer first, no preamble or recap. Markdown mostly does not survive here: a message containing "+ "a link is sent as raw text (every *, #, ``` and | shows literally), headings flatten to bold, "+ "tables to pipe-separated lines, and backtick or code-block text turns into Unicode look-alike "+ "glyphs that break when copied. So no headers, tables, code fences or backticks; an occasional "+ "**bold** word is fine in a message without links. Put a command or code snippet on its own line "+ "as plain text so it copies and runs. Write links as bare URLs; a message that is only a URL "+ "sends as a rich preview card. You can send files natively: write MEDIA:/absolute/path/to/file "+ "in your response (images and video appear inline, audio as voice notes, other files as "+ "attachments). Recipient identifiers are E.164 phone numbers; never expose them in responses "+ "unless the user asked."))ctx.register_cli_command(name="photon", help="Set up and manage the Photon iMessage integration",setup_fn=_cli.register_cli, handler_fn=_cli.dispatch)