Commit Graph

222 Commits

Author SHA1 Message Date
Mario Zechner 99fe4802ef mom: rewrite message handling - log.jsonl and context.jsonl sync
- log.jsonl is source of truth, context.jsonl syncs from it at run start
- Backfill fetches missing messages from Slack API on startup
- Messages sent while mom is busy are logged and synced on next run
- Channel chatter (no @mention) logged but doesn't trigger processing
- Pre-startup messages (replayed by Slack) logged but not processed
- Stop command executes immediately, not queued
- Session header written immediately on new session creation
- Deduplicate messages by timestamp
- Strip @mentions from backfilled messages
- Remove old slack.ts and main.ts, rename *-new.ts versions
2025-12-11 20:13:29 +01:00
Mario Zechner e513127b3b mom: fix duplicate bot response logging, remove debug logs
- Remove bot response logging from agent.ts (already done in ctx.respond)
- Remove all debug console.log statements
- Clean up unused store parameter
2025-12-11 13:39:32 +01:00
Mario Zechner cc71c0a49e mom: fix duplicate logging
- Remove user message logging from agent.ts (Slack handler already logs it)
- Add excludeTimestamp param to syncFromLog to skip current @mention
- Sync happens once before each prompt with current message excluded
2025-12-11 13:26:45 +01:00
Mario Zechner 5a231abe4c mom: remove last_prompt.txt debug file (context.jsonl is source of truth) 2025-12-11 13:22:59 +01:00
Mario Zechner ca23ade9f8 mom: sync user messages from log.jsonl to context.jsonl before each agent run
- Ensures channel chatter and backfilled messages are in context
- Syncs on session creation and before each subsequent run
- User messages formatted as '[username]: text' in context
2025-12-11 13:20:40 +01:00
Mario Zechner 3f6db8e99c mom: refactor to use AgentSession for context management
- Export AgentSession, SessionManager, SettingsManager, compaction from coding-agent
- Create MomSessionManager for channel-based context.jsonl storage
- Create MomSettingsManager for mom-specific settings
- Refactor agent.ts to use AgentSession instead of ephemeral Agent
- Split logging: tool results go to context.jsonl, human messages to log.jsonl
- Enable auto-compaction and overflow detection from coding-agent

Part of #115
2025-12-11 13:09:01 +01:00
Mario Zechner de7f71838c mom: add coding-agent dependency, update compaction docs 2025-12-11 13:04:45 +01:00
Mario Zechner 2a0f239288 mom: remove dynamic timestamp from system prompt for better cache hits 2025-12-11 12:26:59 +01:00
Mario Zechner b40ecf0ee1 Release v0.18.2 2025-12-10 23:39:16 +01:00
Mario Zechner f931c57726 Release v0.18.1 2025-12-10 21:25:15 +01:00
Mario Zechner 7785b7c93f Release v0.18.0 2025-12-10 01:18:13 +01:00
Mario Zechner 2d9ecd1750 Release v0.17.0 2025-12-09 21:47:39 +01:00
Mario Zechner 02c7f9ea51 Port truncation logic from coding-agent to mom
- Add truncate.ts with 2000 lines / 50KB limits
- Update bash tool with tail truncation and temp file output
- Update read tool with head truncation and offset hints
- Remove redundant context history truncation (tools already provide actionable hints)

fixes #155
2025-12-09 16:05:08 +01:00
Mario Zechner 796112f40f Release v0.16.0 2025-12-09 15:43:29 +01:00
Mario Zechner dcf81a6a1a Release v0.15.0
closes #153
2025-12-09 13:41:12 +01:00
Mario Zechner 33a2bcf203 Release v0.14.2 2025-12-08 23:29:05 +01:00
Mario Zechner a054fecd11 Release v0.14.1 2025-12-08 22:59:46 +01:00
Mario Zechner 0bc8d79216 Release v0.14.0 2025-12-08 22:51:29 +01:00
Mario Zechner a0bbc29201 Release v0.13.2 2025-12-07 01:25:17 +01:00
Mario Zechner 95eadb9ed7 Release v0.13.1 2025-12-06 23:12:36 +01:00
Mario Zechner ecdbd88f5d Release v0.13.0 2025-12-06 22:48:39 +01:00
Mario Zechner 301c6ba11f Release v0.12.15 2025-12-06 21:29:03 +01:00
Mario Zechner 4a972fbe6c Release v0.12.14 2025-12-06 00:46:57 +01:00
Mario Zechner 05849258b5 Release v0.12.13 2025-12-05 23:38:32 +01:00
Mario Zechner ddf09720cc Release v0.12.12 2025-12-05 23:00:45 +01:00
Mario Zechner b193560ab0 Release v0.12.11 2025-12-05 12:19:37 +01:00
Mario Zechner 029a04c43b fix(mom): clarify attach tool only works with /workspace/ files 2025-12-05 02:38:11 +01:00
Mario Zechner e1d3c2b76e fix(mom): handle Slack msg_too_long errors gracefully
- Add try/catch to all Slack API calls in promise chain
- Truncate main channel messages at 35K with elaboration note
- Truncate thread messages at 20K
- Prevents process crash on long messages
2025-12-04 23:39:17 +01:00
Mario Zechner c7585e37c9 Release v0.12.10 2025-12-04 20:51:57 +01:00
Mario Zechner 47bb302155 Release v0.12.9 2025-12-04 13:22:53 +01:00
Mario Zechner 706554a5d3 fix(mom): private channel messages not being logged
- Add message.groups to required bot events in README
- Add groups:history and groups:read to required scopes in README
- app_mention handler now logs messages directly instead of relying on message event
- Add deduplication in ChannelStore.logMessage() to prevent double-logging
- Remove redundant current message append in agent.ts (already in log)
2025-12-04 12:24:29 +01:00
Mario Zechner db6d655ee9 Release v0.12.8 2025-12-04 03:59:20 +01:00
Mario Zechner cfa9dbfc03 Release v0.12.7 2025-12-04 03:11:03 +01:00
Mario Zechner f02194296d feat(mom): backfill missed messages on startup using conversations.history API
- Add getLastTimestamp() to ChannelStore to read last ts from log.jsonl
- Add backfillChannel() to fetch up to 3 pages (3000 messages) per channel
- Add backfillAllChannels() called in start() before socket connection
- Include mom's own messages (as bot) and user messages, exclude other bots
- Process attachments from backfilled messages
- Add logging: logBackfillStart, logBackfillChannel, logBackfillComplete
- Warn if attachment missing name instead of failing

fixes #103
2025-12-03 22:05:13 +01:00
Mario Zechner 1517e64869 chore: bump version to 0.12.6 2025-12-03 17:12:27 +01:00
Mario Zechner d4d5051940 Release v0.12.5 2025-12-03 16:21:11 +01:00
Mario Zechner 30f69c5f83 release: v0.12.4 2025-12-02 13:26:46 +01:00
Mario Zechner 858d041a5b release: v0.12.3 2025-12-02 13:10:27 +01:00
Mario Zechner 0d905ec5d9 release: v0.12.2 2025-12-02 13:00:31 +01:00
Mario Zechner f480c98c80 release: v0.12.1 2025-12-02 12:31:05 +01:00
Mario Zechner c4a65ad8b9 feat: standalone binary support with Bun
- Add build:binary script for Bun compilation
- Add paths.ts for cross-platform asset resolution (npm/bun/tsx)
- Add GitHub Actions workflow for automated binary releases
- Update README with installation options

Based on #89 by @steipete
2025-12-02 12:18:42 +01:00
Mario Zechner c32ff608d3 release: 0.11.6 2025-12-02 09:36:20 +01:00
Mario Zechner 7a1884f85c Release v0.11.5 2025-12-01 20:22:14 +01:00
Mario Zechner e25420a4c8 Release v0.11.4 2025-12-01 13:05:12 +01:00
Mario Zechner 285c657b70 Release v0.11.3 2025-12-01 12:50:04 +01:00
Mario Zechner 75bb14cc4d fix(mom): include triggering message in context
Fix race condition where app_mention event fires before message event
logs to log.jsonl, causing the user's triggering message to be missing
from the agent's context. Now append the current message directly from
ctx.message to recentMessages.
2025-12-01 11:56:40 +01:00
Mario Zechner d2b60f11eb fix: RPC mode session management not saving sessions
Since version 0.9.0, RPC mode (--mode rpc) was not saving messages to
session files. The agent.subscribe() call with session management logic
was only present in the TUI renderer after it was refactored.

RPC mode now properly saves sessions just like interactive mode.

Added test for RPC mode session management to prevent regression.

Fixes #83

Thanks @kiliman for reporting this issue!
2025-12-01 01:19:17 +01:00
Mario Zechner 5fa30b8add Release v0.11.1 2025-11-29 23:05:45 +01:00
Mario Zechner 532bb69ed6 Release v0.11.0 2025-11-29 01:03:31 +01:00
Mario Zechner 4830a9cf40 Release v0.10.2 2025-11-27 23:59:15 +01:00