diff --git a/packages/hermes-tlon-adapter/adapter.py b/packages/hermes-tlon-adapter/adapter.py index 0f18b289de..21340a00e9 100644 --- a/packages/hermes-tlon-adapter/adapter.py +++ b/packages/hermes-tlon-adapter/adapter.py @@ -4993,7 +4993,10 @@ def register(ctx) -> None: "and /tlon (version, status storage, status telemetry, status " "binary — debug info). Point the owner at those commands when asked " "rather than changing configuration yourself. " - "Use concise plain text and basic markdown." + "Use concise plain text and basic markdown. Never use LaTeX math " + "delimiters ($...$, $$...$$, \\(...\\), \\[...\\]) in note bodies " + "or message text — Tlon renders no math; write math as plain " + "text/Unicode or in code blocks." + _reaction_platform_hint(TlonConfig.from_env().reaction_level) ), ) diff --git a/packages/hermes-tlon-adapter/test_tlon_tool.py b/packages/hermes-tlon-adapter/test_tlon_tool.py index e7c0235226..a73c789e77 100644 --- a/packages/hermes-tlon-adapter/test_tlon_tool.py +++ b/packages/hermes-tlon-adapter/test_tlon_tool.py @@ -345,6 +345,43 @@ def register_platform(self, **kwargs): self.assertIn("--parent ", platform_hint) self.assertIn("posts delete heap/~host/name ", platform_hint) + def test_tool_description_includes_latex_guidance(self): + description = tlon_tool.TLON_TOOL_DESCRIPTION + + self.assertIn("Never use LaTeX math delimiters", description) + self.assertIn("$$...$$", description) + self.assertIn("\\(...\\)", description) + self.assertIn("\\[...\\]", description) + self.assertIn("plain text/Unicode", description) + self.assertIn("code blocks", description) + + class RecordingContext: + def __init__(self): + self.platform = None + + def register_hook(self, *_args): + pass + + def register_tool(self, **_kwargs): + pass + + def register_skill(self, *_args, **_kwargs): + pass + + def register_platform(self, **kwargs): + self.platform = kwargs + + context = RecordingContext() + adapter_mod.register(context) + platform_hint = context.platform["platform_hint"] + + self.assertIn("Never use LaTeX math delimiters", platform_hint) + self.assertIn("$$...$$", platform_hint) + self.assertIn("\\(...\\)", platform_hint) + self.assertIn("\\[...\\]", platform_hint) + self.assertIn("plain text/Unicode", platform_hint) + self.assertIn("code blocks", platform_hint) + def test_blocks_notebook(self): args, error = tlon_tool.split_tlon_command('notebook diary/~zod/notes "Title"') self.assertIsNone(error) diff --git a/packages/hermes-tlon-adapter/tlon_tool.py b/packages/hermes-tlon-adapter/tlon_tool.py index d12bd2f5e1..0dfaae1fa8 100644 --- a/packages/hermes-tlon-adapter/tlon_tool.py +++ b/packages/hermes-tlon-adapter/tlon_tool.py @@ -92,6 +92,9 @@ class _DiaryMigrationNotificationRegistration: "notes/~host/name nests). For notes bodies, use --body " "(note-create also accepts --markdown ); --stdin is blocked because " "Hermes cannot pipe stdin into the CLI process. " + "Never use LaTeX math delimiters ($...$, $$...$$, \\(...\\), \\[...\\]) — " + "Tlon renders no math; write math as plain text/Unicode or in code " + "blocks. " "%diary channels are deprecated and unsupported by this tool. Ask the " "owner to type `/migrate ` to move one to %notes. Hermes " "delivery uses `tlon posts send`, which refuses diary/ targets. " diff --git a/packages/openclaw/index.ts b/packages/openclaw/index.ts index e995e55d1b..0ac4f3942a 100644 --- a/packages/openclaw/index.ts +++ b/packages/openclaw/index.ts @@ -972,6 +972,7 @@ export default defineBundledChannelEntry({ 'DO NOT use this tool to send messages — use the `message` tool instead. ' + '%diary channels are deprecated and unsupported by this CLI tool; ask the owner to type `/migrate ` to move one to %notes. ' + 'OpenClaw message delivery still accepts diary/ targets, including writable archives. ' + + 'Never use LaTeX math delimiters ($...$, $$...$$, \\(...\\), \\[...\\]) in note bodies or message text — Tlon renders no math; write math as plain text/Unicode or in code blocks. ' + "Examples: 'activity mentions --limit 10', 'channels groups', 'contacts self', 'groups list', 'notes list'", parameters: { type: 'object', diff --git a/packages/tlon-skill/SKILL.md b/packages/tlon-skill/SKILL.md index 52f41b10ff..007b9dfa4f 100644 --- a/packages/tlon-skill/SKILL.md +++ b/packages/tlon-skill/SKILL.md @@ -476,13 +476,21 @@ explanatory error). Deprecated diary channels are unmanaged by the CLI except through the owner-run `tlon notes migrate-plan ` and `tlon notes migrate-apply --yes` paths. -Message text supports Markdown lists, task lists, blockquotes, code, links, and ship mentions; raw HTML blocks and reference-style links are not supported. +Message text supports Markdown lists, task lists, blockquotes, code, links, and ship mentions; raw HTML blocks and reference-style links are not supported. Never use LaTeX math delimiters ($...$, $$...$$, \(...\), \[...\]) — Tlon renders no math; write math as plain text/Unicode or in code blocks. ### Notes Manage %notes notebooks (Markdown-first). Notebooks are nests of the form `notes/~host/name`; note bodies are plain Markdown (not Tlon Story). +Do not use LaTeX math delimiters (`$...$`, `$$...$$`, `\(...\)`, `\[...\]`) in +note bodies or message text. No Tlon surface renders math: the delimiters +display literally or get mangled (Markdown emphasis, mentions, and escaping can +corrupt the text inside and around them), and in a note body the backslashes in +`\(` and `\[` are silently eaten by Markdown escaping, so those delimiters +vanish. Write math as plain text/Unicode (`x²`, `E = mc²`, `θ ∈ [0, 2π)`) and +use code blocks or inline code for complex formulas. + ```bash tlon notes status # Check %notes reachability tlon notes request 0vabc # Check a pending write request diff --git a/packages/tlon-skill/scripts/commands/notes.ts b/packages/tlon-skill/scripts/commands/notes.ts index 78c9d04e79..b02b00dac8 100644 --- a/packages/tlon-skill/scripts/commands/notes.ts +++ b/packages/tlon-skill/scripts/commands/notes.ts @@ -69,6 +69,9 @@ Content sources (Markdown): --markdown Alias for --body --stdin Read the note body from stdin +Note bodies are plain Markdown. LaTeX math delimiters ($...$, $$...$$, +\\(...\\), \\[...\\]) do not render; use plain text/Unicode or code blocks. + Examples: tlon notes list tlon notes request 0vabc