A private-by-default Telegram client for a local Codex installation, plus a small personal-assistant layer. It runs on your Mac, communicates with codex app-server over stdio, and does not open an inbound network port.
This repository is an independent implementation with its own source structure, protocol transport, database schema, Telegram interface, tests, and deployment scripts.
- Codex from Telegram: create, resume, queue, interrupt, and hand off threads with separate contexts for chats and forum topics.
- Live agent interaction: stream answers and handle command, file, user-input, and permission approvals without returning to the Mac.
- Voice-first writing: transcribe locally with FluidAudio Parakeet v3 and an automatic MLX Whisper fallback, then optionally let Codex clean, structure, format, and proofread diary entries or story cycles.
- Video-link summaries: turn a standalone YouTube, RuTube, or VK Video link into a personal Russian-language summary with key ideas, useful takeaways, actions, and selected source timestamps.
- Style-aware drafts: turn a text or voice note beginning with
Блог,Пост,Анонс, orОтветinto a clean Telegram-ready text using a private, locally indexed corpus of the owner's accepted writing. - Evidence-aware article packages: keep the editorial brief, material-claim register, source visibility, and verification dates private while preventing unresolved evidence from being marked ready.
- Forwarded voice packages: collect rapidly forwarded voice messages from the same original sender, preserve their order, and use Codex to merge one topic or split genuine topic changes.
- Content-only accounts: grant selected Telegram users three isolated tools—clean direct-voice transcription, summarized forwarded-voice packages, and text proofreading—without exposing commands, memory, or assistant workflows.
- Apple Notes integration: append diary entries, and incrementally import private non-shared notes into local long-term memory.
- Spoken and text commands: route one-shot labels such as
Блог,Пост,Анонс,Ответ,Дневник,Рассказ,Календарь,Задача,Задачи, andНапоминаниеto the correct workflow. - Safe calendar automation: parse common dates locally, fall back to validated Codex extraction for ambiguous phrasing, and require confirmation before creating Apple Calendar events.
- Personal productivity: manage tasks, inbox captures, a FIFO Codex queue, reminders, scheduled runs, project aliases, and recently active threads.
- Long-term memory: store and recall project or global context with explicit pause, export, and deletion controls.
- Daily reporting and content radar: generate cross-project evening summaries, and prepare ten fact-checked morning blog ideas from explicitly allowed Telegram channels and international sources.
- Telegram-native formatting: safely render Codex Markdown as headings, emphasis, code, quotes, links, and lists with plain-text fallback.
- Mail integrations: read Gmail through the connected Codex app and use Apple Mail only for visible drafts.
- Always-on local runtime: run through a macOS LaunchAgent without exposing an inbound network port or depending on the Codex desktop app lifecycle.
- Durable Codex execution: persist Telegram requests before execution, keep intake responsive, retry transient stalls, recover interrupted jobs after restart, and deliver saved results without rerunning completed work.
- macOS
- Node.js 22+
- An installed and authenticated
codexCLI withcodex app-server - A Telegram bot token from BotFather
- MemSearch with local ONNX embeddings (
uv tool install "memsearch[onnx]") - Optional Hindsight knowledge layer: a Docker runtime, ChatGPT Plus/Pro, and a dedicated Codex login
- Optional local speech transcription: the pinned FluidAudio CLI plus Python with
mlx-whisperas a fallback - Optional video-link summaries:
yt-dlpandffmpeg(brew install yt-dlp ffmpeg)
npm install
cp .env.example .env
# Fill TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USER_IDS.
# Optionally fill TELEGRAM_TRANSCRIPTION_ONLY_USER_IDS for content-only accounts.
npm test
npm run build
npm startThe .env file, SQLite state, logs, model caches, and local paths are ignored by Git.
IDs in TELEGRAM_TRANSCRIPTION_ONLY_USER_IDS have three content-only modes:
- a directly recorded voice or audio file is proofread by a fast one-shot Codex editor and returns clean prose with corrected spelling, punctuation, capitalization, and paragraphs, without metadata, summaries, headings, or topic splitting;
- forwarded voice messages are collected for 45 seconds per Telegram chat and original sender, ordered by source time, and returned with a short summary, topic-aware sections, and a complete edited transcript;
- a text message is proofread for spelling, punctuation, capitalization, and natural paragraph breaks without changing its meaning.
These inputs never route to commands or the owner's assistant workflows. Audio is deleted after local transcription, and neither source text nor edited output is written to persistent Codex threads, the assistant database, long-term memory, diary, or story archives. Voice and text proofreading and forwarded-voice editing use a one-shot codex exec --ephemeral process in an empty temporary directory with a read-only sandbox; the directory is removed after every result. Short results include a native Copy button; longer results use Telegram's copyable text block.
/home— dashboard/taskand/tasks— capture and review work/chat— a new general conversation/new— a new project conversation/sessions— recent Codex threads, sorted by activity/abort— interrupt the current turn/remindand/schedule— notification or Codex run at a later time/digest on— в 06:00 прислать основную сводку с погодой, календарём, проектами, публичной доступностью сервисов и рекомендациями; затем отдельно тему дня и десять идей для блога; межпроектный итог работы — в 21:00/calendar,/event,/draft,/mac— local Mac integrations/recall,/forget,/about_me— recall, delete, and inspect personal memory/memory_status,/memory_pause,/memory_export— control and export long-term memory/voice— list spoken command labels;/storyselects the current story cycle/summary <url>— summarize a YouTube, RuTube, or VK Video link; a standalone supported URL starts the same flow automatically/article <мысль>— сохранить авторское ядро в банке статей и отдельно подготовить расширенные черновики статьи, Telegram и vc.ru
The persistent Telegram keyboard keeps common actions one tap away. Codex requests are stored in SQLite before execution and processed in order. A text sent while Codex is working becomes the next durable turn instead of blocking Telegram polling or being lost during a restart.
Set API_BALANCES_FILE to an absolute private JSON file to include Google Gemini
and OpenAI API credit balances in the main 06:00 digest. This section is only
delivered when exactly one full-access Telegram owner is configured. Subscription
quotas, monthly spending limits and billing-report costs are not credit balances.
A separate authorized collector reads the billing dashboards before the digest
(05:50 Moscow time) and atomically replaces the file with permissions 0600:
{"version":1,"providers":{"google":{"status":"ok","amount":350,"currency":"TRY","checkedAt":"2026-09-14T02:52:00Z"},"openai":{"status":"unavailable","reason":"login_required","checkedAt":"2026-09-14T02:53:00Z"}}}Use status: "unavailable" with reason: "login_required" or "unavailable"
when a dashboard cannot be checked. Do not copy cookies, credentials, payment
details, or browser session URLs into the snapshot. The collector does not send
a separate Telegram message or change billing settings. A browser-based Codex
collector needs the Mac, Codex and the authorized Chrome session to be available.
Only checks from the current Moscow date and at most two hours old are shown as current amounts. Missing, stale or invalid data produces an explicit unavailable line without delaying the digest. Balances at or below TRY 100 / USD 5 receive a top-up flag and an action in the daily recommendations. These are fixed warning thresholds, not predictions of remaining days. No database migration is needed.
An explicit request such as делаем в банк статей is routed to ARTICLE_BANK_DIR. It is considered successful only when a changed article package contains the main, Telegram, and vc.ru variants, metadata, 4:5 and 16:9 covers, and the bank validator exits successfully.
Обычный Bot API не видит подписки личного аккаунта. Для редакционного радара
и публикации используется отдельный локальный TDLib-клиент, авторизованный как
личный аккаунт. Список источников для чтения по-прежнему ограничивается локальным
списком разрешений. Публикация выполняется только в явно указанный канал и только
после проверки права владельца или администратора can_post_messages.
- Создай личное Telegram API-приложение в
https://my.telegram.org→API development tools. - Запусти
npm run telegram:connect-qrи отсканируй появившийся QR в Telegram:Настройки→Устройства→Подключить устройство. - Если включена 2FA, пароль запрашивается отдельным скрытым системным окном. Секретные значения сохраняются в Связке ключей macOS.
- Посмотри найденные каналы через
npm run telegram:channelsи разреши нужные командойnpm run telegram:allow -- "1, 4, 7". - Проверь подключение через
npm run telegram:status, затем сделай пробное чтение черезnpm run telegram:readи проверь право публикации черезnpm run telegram:access -- @channel_username.
Публичные каналы можно добавить по username и собрать выбранные номера в папку:
npm run telegram:join -- "channel_one, channel_two"
npm run telegram:folder -- "Контент" "1, 4, 7"
npm run telegram:folder-add -- 47 "8, 9"Штатный клиент умеет проверять публикацию без отправки, публиковать сразу, создавать отложенную запись и читать список отложенных сообщений:
npm run telegram:post -- --channel @channel_username --text-file writing/post.md --media cover.jpg --preview
npm run telegram:post -- --channel @channel_username --text-file writing/post.md --media video.mp4
npm run telegram:post -- --channel @channel_username --text-file writing/post.md --media video.mp4 --at 2026-08-11T21:39:00+03:00
npm run telegram:edit-post -- --channel @channel_username --message-id 123456 --text-file writing/post.md --preview
npm run telegram:edit-post -- --channel @channel_username --message-id 123456 --text-file writing/post.md
npm run telegram:scheduled -- @channel_usernameФлаг --preview запускает серверную проверку Telegram без публикации. Без него
команда создаёт настоящую публикацию. Markdown преобразуется в нативные сущности
Telegram, поэтому сохраняются жирное выделение и кликабельные ссылки. Для фото,
видео и документов тип вложения определяется автоматически; при необходимости
его можно задать через --media-kind photo|video|document.
Секретные чаты отключены, сообщения и медиа других диалогов не сохраняются,
медиа каналов автоматически не скачиваются. Зашифрованная служебная база TDLib
и локальный список источников находятся внутри ASSISTANT_DATA_DIR.
После основной утренней сводки отдельным сообщением приходит тема дня из PubMed
с кнопкой 👍 Готовь статью. Нажатие ставит в очередь полный публикационный
пакет Банка статей. Затем радар читает публикации за последние 48 часов,
отбрасывает рекламу и повторы и готовит десять коротких идей двумя сообщениями по пять.
Telegram-пост служит только сигналом: тезис для каждой карточки отдельно
проверяется по научной статье, систематическому обзору, клинической рекомендации
или официальному документу. Кнопка под идеей раскрывает подробную карточку с
ограничением, углом поста, заходом и ссылками; из подробной карточки статью можно
сразу отправить в подготовку той же кнопкой. Если свежих материалов радара мало,
список дополняется ещё не использованными исследованиями PubMed, поэтому тема дня
не подменяет и не отменяет отдельную десятку.
Международный слой читает официальные ленты и страницы девяти источников:
- Stronger by Science;
- Barbell Medicine;
- Peter Attia;
- Renaissance Periodization;
- Huberman Lab;
- Sigma Nutrition;
- MacroFactor;
- Behavioral Scientist;
- Menno Henselmans.
Сайт Menno Henselmans блокирует автоматическое чтение, поэтому радар использует официальную Atom-ленту его YouTube-канала, пропускает Shorts и сохраняет ссылки на исследования из описаний полноформатных выпусков.
Для сайтов используется окно в 21 день: медленнее обновляющиеся источники не исчезают из пула, а уже отправленные материалы не повторяются. Продажи, обновления приложений, рецепты и продуктовые кейсы отбрасываются до редакционного отбора. Популярные авторы остаются источниками сигналов, а не подтверждением тезиса.
The assistant stores sanitized user messages, the owner's voice transcripts, actions, and final Codex answers. SQLite tracks exact records, namespaces, pause state, and deletions; Markdown under the private data directory is the readable archive; MemSearch/Milvus provides hybrid semantic recall. Forwarded third-party voices are excluded. Global memory and the active project's memory are searched separately and then merged.
Passwords, API tokens, bearer credentials, JWTs, Telegram bot tokens, and OTP-like values are rejected or redacted before either SQLite or Markdown is written. MemSearch is a derived local index and can be rebuilt from the archive. If MemSearch is unavailable, /recall falls back to a scoped local text search.
Set APPLE_NOTES_IMPORT_ENABLED=true to read Apple Notes locally on the Mac at startup and every 24 hours. With one full-access Telegram owner, the owner ID is inferred; otherwise set APPLE_NOTES_IMPORT_OWNER_ID. Each note keeps a stable hashed source ID and its Notes modification time, so edits update one canonical memory event instead of creating duplicates. Shared notes, Recently Deleted, empty notes, and password-protected notes are excluded by default.
Protected notes require both manual unlocking in Notes and the explicit APPLE_NOTES_IMPORT_PROTECTED=true opt-in. Their plaintext is then copied into the assistant's local archive, so this option should only be used when that archive has the required physical privacy. Run npm run apple-notes:import for a one-shot import and summary. This importer only updates SQLite, Markdown, and local MemSearch; it does not start Hindsight or make an LLM request.
Official Telegram Desktop, Claude, and ChatGPT data exports plus standalone Markdown knowledge documents can be imported together without sending their contents to an LLM:
npm run memory:import -- \
--telegram /absolute/path/to/result.json \
--claude /absolute/path/to/claude-export.zip \
--chatgpt /absolute/path/to/chatgpt-export.zip \
--markdown /absolute/path/to/knowledge.mdTelegram import keeps only the owner's substantive messages, removes exact duplicate text, and groups them into stable chat/month batches. Claude import keeps visible human and assistant text with separate roles; hidden thinking, tool calls, tool results, attachments, and files are excluded. ChatGPT import follows only the selected branch of each conversation and keeps the owner's substantive messages; assistant answers, reasoning recaps, hidden thoughts, abandoned branches, and attachments are excluded because they are not facts about the owner. Markdown import stores the complete file as one global, user-confirmed source; its stable ID is derived from the absolute path, so running the same command after editing updates the existing memory instead of creating a duplicate. All importers redact credentials and rebuild the local index once after the complete batch.
The canonical profile is a small temporal fact graph stored directly in SQLite above the raw archive. Every fact has a stable ID, category, readable statement, subject → predicate → object triple, current/historical/uncertain/superseded status, confidence, validity date, source ID, and optional evidence memory ID. This keeps disputed or stale facts out of the current profile while preserving their history and provenance.
Import reviewed facts from a private JSON file:
npm run profile:import -- --file .private/profile-facts.jsonThe import updates ABOUT.md without rebuilding the large MemSearch index or calling an LLM. /about_me renders the categorized canonical profile together with facts explicitly saved through /remember; NOW.md remains the operational view of active tasks and reminders.
Hindsight is an optional derived layer above the exact SQLite/Markdown archive. It extracts facts, people, relationships, timelines, preferences, goals, and recurring patterns. Normal questions use Hindsight's local recall together with a compact confirmed ABOUT.md, operational NOW.md, and selected MemSearch source fragments; the current Codex produces the only final answer. LLM-backed reflect is reserved for explicit deep analysis. Assistant output remains in the canonical archive but is not ingested as personal fact.
The bundled Compose stack is pinned to Hindsight 0.8.5, persists both its embedded pg0 database and local model cache in Docker volumes, uses a stable worker ID so interrupted jobs can recover, and binds its API and UI only to localhost.
# Create and authenticate an isolated Codex home once. Do not copy the active
# ~/.codex/auth.json because refresh tokens rotate.
mkdir -p /absolute/path/to/hindsight-codex
CODEX_HOME=/absolute/path/to/hindsight-codex codex login --device-auth
# Put the same absolute path in HINDSIGHT_CODEX_HOME inside .env.
npm run hindsight:up
npm run hindsight:status
npm run hindsight:smoke
# Submit up to 500 existing active memory events for background extraction:
npm run hindsight:backfill -- 500The first hindsight:up downloads the local retrieval models. Once /health is ready, set HINDSIGHT_HF_OFFLINE=1 and run hindsight:up again for deterministic restarts without Hugging Face metadata requests.
Set HINDSIGHT_ENABLED=true to mirror eligible new events in small batches. The bundled stack uses openai-codex: Luna extracts facts, Terra consolidates observations and handles rare reflection, and the same ChatGPT/Codex subscription limits are consumed without an OpenAI Platform API key. BGE-M3 supplies high-recall multilingual embeddings, a compact MMARCO MiniLM model reranks Russian results, and PostgreSQL's Russian dictionary handles lexical recall. npm run hindsight:down stops the service without deleting its database or model volumes.
The generated views live under ASSISTANT_DATA_DIR/personal-context/<owner>/. ABOUT.md contains reviewed canonical facts and explicit memories; NOW.md is rebuilt from active tasks and reminders. See the unified Personal Memory v2 plan.
Install the pinned FluidAudio CLI with npm run fluid-audio:install. FluidAudio Parakeet v3 is the primary local engine for voice, audio, and video transcription. Install MLX Whisper in a dedicated Python environment and set WHISPER_PYTHON to its interpreter for automatic fallback; the default fallback model is mlx-community/whisper-large-v3-turbo.
Telegram OGG/Opus voice messages are passed directly to FluidAudio without an intermediate conversion. If FluidAudio is unavailable, rejects the file, or returns no text, the same temporary source is retried with MLX Whisper. An unlabelled voice message then goes through a bounded one-shot Codex correction pass using gpt-5.6-luna with no extended reasoning by default; it fixes spelling, punctuation, capitalization, obvious recognition errors, and paragraphing without invoking the author's style corpus or persistent assistant thread. If that editor fails or exceeds 20 seconds, deterministic local formatting is returned instead. A recognized label routes the remaining text to its dedicated command or AI writing workflow. Audio and FluidAudio's temporary JSON result are removed afterward. Each completed attempt writes a [voice-timing] log record with the engine, route, and download, transcription, post-processing, and total durations, but never the transcript text.
FluidAudio uses unrestricted multilingual decoding by default: its optional language argument filters the alphabet and must not be used to request a Russian translation. For media summaries, captions and ASR output are checked for readable speech before use; empty, numeric, or punctuation-dominated decoder garbage triggers the next transcription path. Invalid cached transcript parts are discarded. The summary stays in Russian regardless of the source language, and an explicit unusable-source result is treated as a failed job rather than delivered as a successful summary.
Media inspection uses the same audio format selector as downloading. RU/EN language hints come first from the selected audio track or the source audio-language metadata, then from consistent title/description text when explicit metadata is absent. These hints prefer matching captions and flag clear transcript-language conflicts; short or mixed-script text is not rejected on language alone. FluidAudio's first pass remains unrestricted. Only an audio-derived hint constrains the MLX fallback; a title-derived hint triggers independent automatic detection instead. Translated captions are checked against their own declared language. Hints survive retries in an additive nullable SQLite checkpoint column; older checkpoints remain compatible.
A standalone YouTube, RuTube, or VK Video URL starts the private media-summary flow. Install the pinned FluidAudio CLI once with npm run fluid-audio:install. The durable job first uses real author or automatic captions when the source provides them. Otherwise yt-dlp selects an audio-only stream (or the smallest low-resolution stream containing audio) and FluidAudio Parakeet v3 transcribes the original audio directly with timestamped words. It uses Apple Neural Engine acceleration and avoids an application-level split or audio conversion. If FluidAudio is unavailable or rejects a recording, ffmpeg splits the original codec into lossless 30-minute Matroska chunks and one resident MLX Whisper process handles all unfinished chunks. Completed transcript parts and fallback chunks are checkpointed, so a bot or Mac restart resumes without repeating finished work. Only the finished summary is added to assistant memory; temporary media and the raw transcript are removed after Telegram delivery, while a failed job retains its checkpoint for an explicit retry. Use /summary <url> when you want to make the intent explicit.
YouTube may require a browser check even for public videos. Authentication is opt-in: set either MEDIA_COOKIES_FROM_BROWSER=chrome (or another browser supported by yt-dlp) or MEDIA_COOKIES_FILE=/absolute/path/to/cookies.txt. The browser option allows yt-dlp to read that browser's cookies, so it is never enabled implicitly. A dedicated cookies file is preferable for an always-on background service.
Forwarded voice and audio messages use package processing. After each forwarded item, the bot waits 45 seconds for more messages from the same original sender. Original messages join the same package while consecutive source timestamps are no more than 10 minutes apart. Every file is transcribed separately and ordered by its Telegram source time; Codex then creates one coherent transcript or separates real topic changes with short headings. A different sender or a larger source-time gap starts a new package. Forwarded speech is always treated as content and can never trigger calendar, task, reminder, or other spoken commands.
Destinations are one-shot labels for both voice and text, not persistent modes. Start the message with помощник, блог, пост, анонс, ответ, дневник, рассказ, календарь, задача, напоминание, идея, or запомни, then continue normally. Помощник sends the remaining text to the currently selected Codex thread so a transcribed voice note can continue that conversation in context. Блог only cleans the remaining text, removes speech artifacts and semantic repetition, adds natural paragraphs, and returns Telegram Markdown with restrained bold emphasis; it does not save the source to assistant memory or another writing workflow. Пост, Анонс, and Ответ select relevant examples from the private writing corpus and ask a read-only Codex thread for a finished Telegram draft without inventing facts or copying source passages. If the local semantic index is unavailable, the assistant falls back to local lexical retrieval from the same private corpus.
дневник sends the remaining text through Codex and appends it to one Apple Notes note per month, grouped by date and time. Use /story <cycle name> once to select a cycle; subsequent messages beginning with рассказ use the same editorial flow and the end of the previous draft as continuity context. Calendar, task, reminder, inbox, and memory labels route the remaining content to the corresponding local workflow.
Start a voice message with «Задача», the project name, and the instructions. For example, «Задача, Тренер в кармане, проверь регистрацию». The bot confirms the project and queues a new Codex chat in its local folder. Find the chat through /sessions. PROJECT_ALIASES_JSON also accepts project display names keyed by absolute folder paths or folder names under ~/WORK.
| Say after «Задача» | Project folder |
|---|---|
| Тренер в кармане, Тренер, ТВК | ~/WORK/trenervkarmane |
| Где мои клиенты, Клиенты, ГМК | ~/WORK/gde-moi-klienty |
| Где мои деньги, Деньги, ГМД | ~/WORK/gde-moi-dengi |
| Помощник | ~/WORK/codex-telegram-assistant |
| Где мои ученики, Ученики | ~/WORK/gdeucheniki |
| Тело в порядке | ~/WORK/telovporiadke |
| Питание в кармане | ~/WORK/simplecal |
| Мой сайт, ValBarko.ru | ~/Documents/ChatGPT/ValBarko.ru |
| Банк статей | ~/WORK/valentin-writing |
| Вел Тревел, WellTravelClub | ~/Documents/WellTravelClub |
| Диалоги | ~/WORK/dialogs |
| ДДХ МореМолл | ~/WORK/ddxmoremall |
To include screenshots, send the photo or album first. Use Telegram’s reply action on any image in that message and record the voice task as the reply. The bot uses the referenced photo or all images in the referenced album. PNG, JPEG, and WebP files also work. The voice task and its screenshots go into the first Codex turn together.
задачи, /task, and text beginning with задача capture checklist items. The assistant recognizes ГМК / Где мои клиенты, ТВК / Тренер в кармане, and ГМД / Где мои деньги, extracts common deadlines and urgency phrases, adds the work to SQLite, appends a native checklist item to the Apple Notes note РАБОЧИЕ ЗАДАЧИ through the Codex Рабочая задача Shortcut, and keeps a readable Markdown copy at WRITING_ARCHIVE_DIR/Рабочие задачи/РАБОЧИЕ ЗАДАЧИ.md.
Send Дневник or Заметки without additional text to receive all entries for the current day. Add text after either label to create a new entry. Telegram renders the structured entry and also sends the same content as a downloadable Markdown file.
Calendar and reminder language uses a safe parsing cascade: deterministic local rules first, then a read-only Codex structured-extraction turn when the local parser cannot understand the date or time. Codex may only return validated JSON; the application still asks for confirmation before writing a calendar event. Ambiguous or invalid results produce a clarification request instead of an action.
Every edited entry is also stored as readable Markdown under WRITING_ARCHIVE_DIR (default: ~/Documents/Codex Writer). Untouched transcripts are kept separately under Исходные расшифровки. If Apple Notes automation fails, the Markdown copy still succeeds and Telegram reports the Notes error. The first Notes write may require permission in System Settings → Privacy & Security → Automation.
The authorial profile is versioned in writing/VALENTIN_STYLE.md. Raw Telegram exports, filtered posts, and search indexes live under ignored .private/; use npm run style:build and npm run style:index to refresh them. See writing/README.md for the private corpus workflow.
Natural requests such as поставь будильник на 14:00 create both a Clock alarm on the Mac and a fallback Telegram reminder. The Clock integration uses a local Shortcut so it does not need Accessibility or Computer Use permissions.
Create a shortcut named Codex Alarm once:
- Add the Clock action Add Alarm.
- In its Time field, choose Insert Variable → Shortcut Input.
- Keep the default alarm label or choose your own.
The bot runs it through /usr/bin/shortcuts and passes an explicit local date and time. Set ALARM_SHORTCUT_NAME if you use another shortcut name. If the shortcut fails, the Telegram reminder is still created and the response reports the two outcomes separately.
Deleting a reminder in Telegram does not delete the corresponding Clock alarm; manage system alarms in the Clock app.
After a successful foreground smoke test:
chmod +x scripts/*.sh
scripts/install-launch-agent.shThe installer creates two user LaunchAgents: the main bot starts at login and restarts after crashes, while a one-minute watchdog checks the atomic heartbeat file. A stale process or an active Codex job with no events beyond the configured timeout is restarted; the durable queue then resumes the job. Stop and remove both agents with scripts/uninstall-launch-agent.sh.
/health reports queue depth, the active attempt, time since the last Codex event, and a bounded app-server probe. The defaults are a 7-minute inactivity timeout, three attempts with backoff, a 15-second heartbeat, and a 2-minute process-heartbeat threshold. Override them with the ASSISTANT_* settings documented in .env.example.
Do not run two bots with the same Telegram token simultaneously. Stop the old service immediately before enabling this LaunchAgent.
The one-time migrator reads only runtime user data. It does not copy source files, tests, package metadata, Git history, or license text.
npm run migrate -- /path/to/old-data-directory /path/to/new/assistant.sqliteIt imports tasks, inbox records, explicit memories, enabled reminders, and saved conversation pointers into the new schema.
- Telegram access is restricted to configured numeric user IDs.
- Background jobs decline approval requests instead of auto-approving them.
- Email mutations require separate confirmation; Apple Mail integration creates drafts only.
- The default profile uses workspace writes with no interactive approvals. Use the included read-only or review profile when appropriate.
- Secrets are never printed by the application.
See docs/PRODUCT_SPEC.md for the behavioral contract.
MIT © 2026 Valentin Barko.