Skip to content
Sign in

telegram-bot

v0.4.6

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

license: Apache-2.0botchatmessagingtelegramwebhook

Install

bash
iii call compose::add worker=telegram-bot@0.4.6

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Functions11

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

Function

Internal: track approval-gate worker connect/disconnect.

Request
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • eventstring
    • worker_idstring
    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
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
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • entry_idstringrequired
    • messageany of
      Show 2 nested
      any of (2)
      Variant 1
      • contentone of[]
        Show 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.

    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
Response
  • okbooleanrequired

telegram-bot::on-message-updated

Function

Stream assistant edits into Telegram, throttled by revision.

Request
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • entry_idstringrequired
    • messageobjectrequired
      Show 2 nested
      • contentone of[]
        Show 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
    • revisioninteger· uint64requiredmin 0
    • session_idstringrequired
    • timestampinteger· int64

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

    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
Response
  • okbooleanrequired

telegram-bot::on-pending-created

Function

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

Request
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • arguments_excerptunknown
    • function_call_idstringrequired
    • function_idstringrequired
    • session_idstringrequired
    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
Response
  • okbooleanrequired

telegram-bot::on-pending-resolved

Function

Clear the approval prompt when a held call is resolved.

Request
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • function_call_idstringrequired
    • outcomestringrequired
    • session_idstringrequired
    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
Response
  • okbooleanrequired

telegram-bot::on-status-changed

Function

Observe session status changes.

Request
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • session_idstringrequired
    • statusstringrequired
    • status_reasonstring
    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
Response
  • okbooleanrequired

telegram-bot::on-turn-completed

Function

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

Request
  • activation_idstringrequired
  • callerany of
    any of (2)
    Variant 1
    • function_idstring

      The handler the call was made from; absent for a top-level call.

    • invocation_idstring
    • parentany of

      The caller of that handler, one level only.

      Show 2 nested
      any of (2)
      Variant 1
      • function_idstring
      • invocation_idstring
      • worker_idstring
      • worker_namestring
      Variant 2
      valuenull
    • worker_idstring
    • worker_namestring
    Variant 2
    valuenull
  • duration_msnumber· doublerequired
  • errorany of
    any of (2)
    Variant 1
    • codestringrequired
    • messagestringrequired
    Variant 2
    valuenull
  • function_idstringrequired
  • inputunknown
  • invocation_idstringrequired
  • metadataunknown
  • namespacestring
  • observer_idstringrequired
  • outputany of
    any of (2)
    Variant 1
    • reasonstring
    • result_errorstring
    • session_idstringrequired
    • statusstringrequired
    • terminalboolean

      `false` while the session still owns an armed wake: the run continues and a later turn carries the real outcome. Missing (legacy harness) → terminal.

    • turn_idstringrequired
    Variant 2
    valuenull
  • started_at_msinteger· uint64requiredmin 0
  • statusstringrequiredenum success, error
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

Search the registry

Find workers, kits and executables, or jump to a page.