Files
openhuman/src
Steven EnamakelandClaude Opus 4.5 5bd41b2859 Refactor Telegram MCP into separate API and Tools layers
Split monolithic tool handlers into a clean two-layer architecture:
- `api/` layer: ~80 files with raw Telegram API calls returning typed `ApiResult<T>` with `fromCache` boolean
- `tools/` layer: thinned to validation + formatting wrappers delegating to api/

Key changes:
- Add `ApiResult<T>` type and `fromCache` field to `MCPToolResult`
- Extract shared helpers (getChatById, formatMessage, etc.) into `api/helpers.ts`
- Move `apiResultTypes.ts` and `apiCastHelpers.ts` into `api/`
- Delete `telegramApi.ts` (all logic migrated to individual api/ files)
- Add `validatePositiveInt` to validation utilities
- Auto-infer `fromCache` in server.ts via `isStateOnlyTool()` safety net
- Update `bulk.ts` skill to import from new api layer

Net reduction of ~2,475 lines across 86 files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:10:27 +05:30
..
2026-01-29 07:38:34 +05:30
2026-01-29 07:38:34 +05:30
2026-01-29 07:38:34 +05:30
2026-01-29 18:12:00 +05:30
2026-01-29 07:38:34 +05:30
2026-01-29 07:38:34 +05:30
2026-01-29 18:12:00 +05:30
2026-01-29 07:38:34 +05:30