|
| 1 | +## Active Context Update (2026-03-17 - codingAgents explicit tool-generic cleanup) |
| 2 | + |
| 3 | +- User flagged that `codingAgents.ts` still contained an explicit `new Agent<...>` constructor and that the per-agent tool objects had been disturbed. |
| 4 | +- Fixed `src/mastra/agents/codingAgents.ts` by: |
| 5 | + - removing the remaining explicit generic constructor from `codeReviewerAgent` |
| 6 | + - restoring the local per-agent tool objects (`codeArchitectTools`, `codeReviewerTools`, `testEngineerTools`, `refactoringTools`) with concrete tool names |
| 7 | + - normalizing `codeArchitectAgent` model selection back to shared request-context helper usage rather than raw string access |
| 8 | + - removing the stray unused `scrapingSchedulerTool` import |
| 9 | +- Validation: |
| 10 | + - targeted `get_errors` on `src/mastra/agents/codingAgents.ts` returned **No errors found** |
| 11 | + - folder-level `get_errors` on `src/mastra/agents` returned **No errors found** |
| 12 | + |
| 13 | +## Active Context Update (2026-03-17 - networks/a2a nested-agent cleanup completed without ToolsInput adaptering) |
| 14 | + |
| 15 | +- Completed the follow-up fix pass for the remaining `src/mastra/networks` and `src/mastra/a2a` nested child-agent assignment failures. |
| 16 | +- User direction was explicit: do **not** rely on any shared adapter or `as Record<string, Agent>` cast, and do **not** introduce gratuitous `ToolsInput` typing into agents. |
| 17 | +- Source-level fix applied across the remaining child agents by: |
| 18 | + - removing narrowed `RequestContext<SpecificContext>` instruction callback annotations from public agent surfaces |
| 19 | + - pinning affected child agents to public `new Agent<..., unknown>(...)` request-context generics |
| 20 | + - keeping specialized runtime-context parsing local inside instruction bodies via explicit narrowing/constants |
| 21 | + - removing the extra `ToolsInput` usage introduced in the touched agents; tool maps now use direct inferred object types (`typeof toolMap`) or `Record<string, never>` for tool-less agents |
| 22 | +- Additional cleanup included: |
| 23 | + - `codingAgents.ts` refactoring-tool typing cleanup |
| 24 | + - `codingA2ACoordinator.ts` / `a2aCoordinatorAgent.ts` unused-parameter cleanup |
| 25 | + - `codingTeamNetwork.ts` synchronous quality gate fix |
| 26 | +- Source agents updated in this pass: |
| 27 | + - `dataExportAgent.ts` |
| 28 | + - `dataIngestionAgent.ts` |
| 29 | + - `dataTransformationAgent.ts` |
| 30 | + - `reportAgent.ts` |
| 31 | + - `stockAnalysisAgent.ts` |
| 32 | + - `recharts.ts` |
| 33 | + - `researchPaperAgent.ts` |
| 34 | + - `documentProcessingAgent.ts` |
| 35 | + - `learningExtractionAgent.ts` |
| 36 | + - `scriptWriterAgent.ts` |
| 37 | + - `package-publisher.ts` |
| 38 | + - plus cleanup in previously touched `editorAgent.ts`, `copywriterAgent.ts`, `knowledgeIndexingAgent.ts`, `researchAgent.ts`, `contentStrategistAgent.ts`, `evaluationAgent.ts`, and `codingAgents.ts` |
| 39 | +- Validation result: |
| 40 | + - targeted `get_errors` returned clean for all edited agent files |
| 41 | + - targeted `get_errors` for `src/mastra/a2a` and `src/mastra/networks` no longer surfaced the earlier nested-agent assignment failures |
| 42 | + |
| 43 | +## Active Context Update (2026-03-17 - nested agent typing without adapter) |
| 44 | + |
| 45 | +- Resolved the `seoAgent.ts` nested child-agent type errors without using a shared adapter or local cast. |
| 46 | +- Root cause: Mastra inferred narrower child `Agent<..., TRequestContext>` generics from `researchAgent`, `contentStrategistAgent`, and `evaluationAgent`, which made them fail assignment to parent `agents: Record<string, Agent<..., unknown>>` slots. |
| 47 | +- Fix applied: |
| 48 | + - centralized shared request-context keys in `src/mastra/agents/request-context.ts` |
| 49 | + - replaced raw string usage in touched agents with declared constants/helpers |
| 50 | + - explicitly pinned the public child-agent generic to `unknown` via `new Agent<..., unknown>(...)` |
| 51 | + - kept runtime-safe parsing of specialized context values inside the agent instruction bodies |
| 52 | +- Files updated: |
| 53 | + - `src/mastra/agents/request-context.ts` |
| 54 | + - `src/mastra/agents/researchAgent.ts` |
| 55 | + - `src/mastra/agents/contentStrategistAgent.ts` |
| 56 | + - `src/mastra/agents/evaluationAgent.ts` |
| 57 | +- Validation: targeted `get_errors` is clean for all edited files and `src/mastra/agents/seoAgent.ts`. |
| 58 | + |
1 | 59 | ## Active Context Update (2026-03-16 - use-mastra-query full client-js surface expansion) |
2 | 60 |
|
3 | 61 | - Expanded `lib/hooks/use-mastra-query.ts` beyond dataset/eval coverage to expose the remaining installed `@mastra/client-js` surfaces needed by the frontend hook factory. |
|
0 commit comments