skip to content
$worker

telegram-bot

v0.2.1

Telegram bridge to the harness stack — polling or webhook ingress, live message edits, approvals, and configurable verbosity.

iiiverified
6 installs0 in 7d0 today
install
$iii worker add telegram-bot@0.2.1
  • macOS: arm64 · x64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64 · x86

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

11

telegram-bot::__on-approval-gate-worker

function

Internal: track approval-gate worker add/remove.

request
  • operationstring
  • sourceunknown
  • stagestring
  • workerstring
response
  • okbooleanrequired

telegram-bot::notify

function

Send a message to the Telegram chat bound to a session. Use this to reach the user out-of-band (e.g. a scheduled reminder or when a long task finishes); the message is delivered only to that session's chat.

request
  • parse_modestring

    Optional Telegram `parse_mode` (`MarkdownV2` / `HTML`). When set, `text` is sent verbatim with that mode instead of being auto-formatted.

  • session_idstringrequired

    The session whose chat receives the message. Must be a session this bot created (e.g. the `session_id` from the channel-context prompt).

  • textstringrequired

    The message text. Markdown is auto-formatted for Telegram unless `parse_mode` is set explicitly. Long text is split across messages.

response
  • deliveredbooleanrequired
  • message_idsinteger[]· int64required

    Telegram message ids of the (possibly chunked) messages sent.

telegram-bot::on-config-change

function

Internal: reload telegram-bot configuration from the authoritative store on change.

request
empty object
response
  • okbooleanrequired

telegram-bot::on-message-added

function

Create a Telegram message for each new assistant or function_result entry.

request
  • entry_idstringrequired
  • messageany of
    any of (2)
    variant 1
    • contentone of[]
      … expand 4 nested
      one of (4)
      variant 1
      • textstringrequired
      • typestringrequiredenum: text
      variant 2
      • textstringrequired
      • typestringrequiredenum: thinking
      variant 3
      • argumentsunknownrequired
      • function_idstringrequired
      • idstringrequired
      • typestringrequiredenum: function_call
      variant 4
      • typestringrequiredenum: other
    • rolestringrequired
    variant 2
    valuenull
  • parent_idstring

    Parent entry in the session chain (authoritative append order).

  • session_idstringrequired
  • timestampinteger· int64

    Append time in ms; used as the per-entry ordering key.

response
  • okbooleanrequired

telegram-bot::on-message-updated

function

Stream assistant edits into Telegram, throttled by revision.

request
  • entry_idstringrequired
  • messageobjectrequired
    • contentone of[]
      one of (4)
      variant 1
      • textstringrequired
      • typestringrequiredenum: text
      variant 2
      • textstringrequired
      • typestringrequiredenum: thinking
      variant 3
      • argumentsunknownrequired
      • function_idstringrequired
      • idstringrequired
      • typestringrequiredenum: function_call
      variant 4
      • typestringrequiredenum: other
    • rolestringrequired
  • revisioninteger· uint64requiredmin 0
  • session_idstringrequired
  • timestampinteger· int64

    Mutation time in ms; refines the per-entry ordering key (min wins).

response
  • okbooleanrequired

telegram-bot::on-pending-created

function

Send an inline approval keyboard when a function call is held.

request
  • arguments_excerptunknown
  • function_call_idstringrequired
  • function_idstringrequired
  • session_idstringrequired
response
  • okbooleanrequired

telegram-bot::on-pending-resolved

function

Clear the approval prompt when a held call is resolved.

request
  • function_call_idstringrequired
  • outcomestringrequired
  • session_idstringrequired
response
  • okbooleanrequired

telegram-bot::on-status-changed

function

Observe session status changes.

request
  • session_idstringrequired
  • statusstringrequired
  • status_reasonstring
response
  • okbooleanrequired

telegram-bot::on-turn-completed

function

Finalize streaming, drain FIFO queue, and post turn outcome toasts.

request
  • reasonstring
  • result_errorstring
  • session_idstringrequired
  • statusstringrequired
  • turn_idstringrequired
response
  • okbooleanrequired

telegram-bot::set-webhook

function

Register the Telegram webhook URL from configuration.

request
empty object
response
  • okbooleanrequired
  • urlstringrequired

telegram-bot::webhook

function

Receive Telegram updates; route commands, messages, and callbacks.

request
  • bodyunknown
  • headersobject
response
  • okbooleanrequired

triggers

0
no triggers registered