|
| 1 | +# Active Context Update (2026-04-21 - inline hook tool hardening) |
| 2 | + |
| 3 | +- Rebuilt `src/mastra/tools/discord-webhook.tool.ts` so every hook is inline, the payload is built inline, and the file no longer relies on fake local hook helpers. |
| 4 | +- Reworked `src/mastra/tools/copywriter-agent-tool.ts` to use the repo's structured streaming pattern with `ChunkType`, inline hooks, and no message-count hook noise. |
| 5 | +- Replaced the Moltbook placeholder in `src/mastra/tools/moltbook-tools.ts` with a real axios-backed tool set that uses inline hooks and explicit output schemas. |
| 6 | +- Targeted `get_errors` on the edited tool files is clean. |
| 7 | + |
| 8 | +# Active Context Update (2026-04-21 - Moltbook filesystem hardening) |
| 9 | + |
| 10 | +- `src/mastra/tools/moltbook-tools.ts` now uses `mainFilesystem` from `src/mastra/workspaces.ts` for avatar uploads instead of `node:path` / `node:fs`. |
| 11 | +- The Moltbook avatar upload now validates the workspace file with `mainFilesystem.stat`, reads it with `mainFilesystem.readFile`, and converts the result into a `Blob` without Node filesystem imports. |
| 12 | +- `src/mastra/tools/AGENTS.md` now explicitly requires `mainFilesystem` for workspace file access and bans `node:path` / `node:fs` imports in tools. |
| 13 | +- Targeted `get_errors` on `src/mastra/tools/moltbook-tools.ts` is clean. |
| 14 | + |
| 15 | +# Active Context Update (2026-04-21 - Moltbook axios tools and URL-aware output hardening) |
| 16 | + |
| 17 | +- Added a full axios-backed Moltbook tool set in `src/mastra/tools/moltbook-tools.ts`, wired through the shared HTTP client, and exported it from `src/mastra/tools/index.ts`. |
| 18 | +- Added `MOLTBOOK_API_KEY` to `.env.example` so the authenticated Moltbook tools have a documented placeholder. |
| 19 | +- Added `src/mastra/tools/tool-output-formatters.ts` and hardened the remaining SERP, fetch, and arXiv tools with URL-aware `toModelOutput` mappings. |
| 20 | +- Confirmed targeted `get_errors` is clean on the edited tool files and the shared HTTP helper. |
| 21 | +- The earlier chat diagnostics, lint-task, typedRoutes, and Mastra hook hardening work remains in place. |
| 22 | + |
| 23 | +# Active Context Update (2026-04-20 - Mastra tool hook hardening sweep) |
| 24 | + |
| 25 | +- Continued the `src/mastra/tools` hardening pass to keep Mastra lifecycle hooks in the correct tool-object position and signature shape. |
| 26 | +- Confirmed the installed `@mastra/core/dist/tools/types.d.ts` exposes top-level `onInputStart`, `onInputDelta`, `onInputAvailable`, `toModelOutput`, and `onOutput` hooks directly on `createTool` objects, so the cleanup preserved top-level hooks instead of moving to a nested `hooks` object. |
| 27 | +- Fixed `confirmation.tool.ts`, `random-generator.tool.ts`, and `text-analysis.tool.ts` so their input hooks are ordered before `execute` and their output hooks remain after `execute`. |
| 28 | +- Repaired `image-tool.ts` hook signatures/formatting and restored `financial-chart-tools.ts` / `polygon-tools.ts` through large-batch structural cleanup. |
| 29 | +- The chart file repair was verified by direct file reads; the remaining analyzer warnings appear to be tooling noise rather than a different hook API shape. |
| 30 | + |
1 | 31 | # Active Context Update (2026-04-20 - calendar tool cross-platform refactor) |
2 | 32 |
|
3 | 33 | - Refactored `src/mastra/tools/calendar-tool.ts` from a macOS-only AppleScript reader into a platform-aware calendar source selector. |
|
994 | 1024 |
|
995 | 1025 | # Active Context |
996 | 1026 |
|
| 1027 | +## Active Context Update (2026-04-20 - chat adapter inventory research) |
| 1028 | +- Inspected the installed `@chat-adapter/*` packages under `node_modules` and confirmed the repo currently has platform adapters for `discord`, `github`, `gchat`, and `slack`. |
| 1029 | +- Confirmed the available state backends are `state-memory`, `state-redis`, and `state-ioredis`, plus shared chat utilities in `@chat-adapter/shared`. |
| 1030 | +- Key adapter capabilities discovered for future staging: |
| 1031 | + - Discord: HTTP interactions, optional gateway listener, DM/mention handling, reactions, slash commands, and card-to-embed rendering. |
| 1032 | + - Slack: single-workspace or OAuth multi-workspace installs, signing-secret webhook verification, interactive payloads, modals, scheduled messages, reactions, and encrypted installation storage. |
| 1033 | + - GitHub: PAT or GitHub App auth, single-tenant or multi-tenant modes, PR conversation comments, review comment threads, issue comments, and reactions. |
| 1034 | + - Google Chat: mention-based webhooks plus optional Workspace Events / PubSub subscriptions for full-space capture, card v2 conversion, and service-account/ADC auth. |
| 1035 | +- No code exports were changed; this is reference-only context for the next channel expansion pass. |
| 1036 | + |
| 1037 | +## Active Context Update (2026-04-20 - shared channel config extraction) |
| 1038 | +- Moved the research agent's channel adapters, handlers, inline media/links, and thread-context setup into `src/mastra/config/channels.ts`. |
| 1039 | +- `src/mastra/agents/researchAgent.ts` now imports `researchAgentChannels` from the shared config module instead of owning the channel block inline. |
| 1040 | +- Added a config barrel export in `src/mastra/config/index.ts` and documented `channels.ts` in `src/mastra/config/AGENTS.md` as the canonical channel location. |
| 1041 | +- Targeted ESLint on the edited Mastra TypeScript files was clean; the TypeScript compile check was skipped by the environment. |
| 1042 | + |
997 | 1043 | ## Active Context Update (2026-04-17 - weavingapi nil-safety and haste-aware prediction) |
998 | 1044 | - Reworked `src/mastra/public/workspace/weavingapi.md` so it now resolves the highest valid rank per spell family, avoiding nil `castTime` crashes when a WotLK-only rank is missing on a TBC/Classic client. |
999 | 1045 | - Added live cast prediction based on `GetSpellHaste()` / `UnitSpellHaste()` with `GetHaste()` fallback, plus latency-aware timing, while keeping `swingtimer.md` untouched. |
|
0 commit comments