Skip to main content

nexus-telegram

The Telegram gateway exposes portfolio status, goal controls and the shared exception inbox. It uses reqwest for Telegram's HTTP API, Tokio for polling, NATS for notifications and authenticated Core routes for mutations. It does not run a separate treasury approval executor or require Mongo credentials.

This describes the 2026-10-03 implementation checkpoints; verify deployed image versions before relying on a newly added command.

Commands and security​

The command reference lists the current commands. /pending includes typed treasury requests and goal challenges. Treasury cards provide versioned inline Approve/Reject buttons; /approve <id> and /reject <id> remain available with an unambiguous prefix of at least eight characters.

Every command and callback requires a positive sender ID in TELEGRAM_ALLOWED_USERS. An empty allowlist denies access. Core writes carry both the service credential and X-Nexus-Operator-Sub: telegram:<user id>; Core must allow that operator identity. There is no switch that silently records a human goal mutation as service.

Shared execution​

Core's /v1/desk/approvals routes own the accum_approvals records and the nexus-approval executor. Website and Telegram resolve the same record. Claims use compare-and-swap, current version and decision checks, fenced execution intents, and durable per-action progress. The first failed or unconfirmed action stops later actions. A retry preserves completed work; an uncertain signature remains unfinished until its outcome is known.

executing means the plan is in progress. Terminal approved means the plan completed; an order being placed does not mean it filled. Pending requests expire actively. Failed or executing records may contain submitted work and are retained for reconciliation.

Core stores the authenticated actor and action audit. Generic /v1/approvals software tasks are a separate surface and do not execute treasury plans. A dedicated durable audit collection for every inbound Telegram command is not implemented.

Controls and notifications​

/pause [reason] and /resume [reason] call the same Core portfolio controls as the website inbox. Core verifies and audits the actual Solana signer state. Pause blocks new signatures; existing orders and submitted transactions can still settle. Resume lifts only the operator pause, preserving independent safety controls. Uncertain responses do not trigger automatic mutation retries.

Delivery checks both HTTP status and Telegram's ok response. An explicit Markdown parse failure may receive one plain-text fallback. Paper/live futures notifications render their human message while structured event data remains in storage. Routine hygiene notices are throttled, ladder panels are deduplicated by their meaningful content, and contract rejects do not also appear as normal decision digests.

Notifications remain best-effort: durable delivery replay across restarts is still open. Use the website inbox or /pending to inspect persisted requests.