UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

39 lines (38 loc) 1.63 kB
/** * Slack mrkdwn ↔ GitHub-flavored markdown converters and the bare * `@mention` rewriter used by the outbound post pipeline. These are * pure string utilities — no Slack API I/O, no I/O at all — so they * live separately from the binding constructor and request shape code * in {@link ./api.ts}. */ /** * Rewrites bare `@USER_ID` tokens (the form Slack apps and humans tend * to type) into the `<@USER_ID>` mention syntax Slack actually renders. * Anything already wrapped in `<...>` is left untouched. */ export declare function rewriteBareMentions(text: string): string; /** * Best-effort GFM → Slack mrkdwn converter used only in contexts that * do not support `markdown_text` (e.g. `files.completeUploadExternal`'s * `initial_comment` field). * * The main `{ markdown }` post path sends `markdown_text` directly * to `chat.postMessage` and does not go through this converter. */ export declare function gfmToSlackMrkdwn(input: string): string; /** * Best-effort Slack mrkdwn → GFM converter applied to the text of * every inbound Slack message before the harness sees it. * * - `<@U123>``@U123` * - `<#C123|name>``#name` (or `#C123` when no name) * - `<!channel>` etc. → `@channel` * - `<https://x|label>``[label](https://x)` * - `<https://x>``https://x` * - `*bold*` (paired) → `**bold**` * - `~strike~` (paired) → `~~strike~~` * * Inline `_italic_` and code spans pass through unchanged because both * formats render them identically. */ export declare function slackMrkdwnToGfm(input: string): string;