SIGN IN SIGN UP

feat: Refactor agent request context handling and improve agent definitions

- Introduced a new `request-context.ts` file to centralize request context management for agents.
- Created a `BaseAgentRequestContext` interface to standardize user tier and language handling across agents.
- Implemented utility functions `getUserTierFromContext` and `getLanguageFromContext` to simplify context retrieval.
- Updated all agents (reportAgent, researchAgent, researchPaperAgent, scriptWriterAgent, seoAgent, socialMediaAgent, stockAnalysisAgent, translationAgent, weatherAgent, webResearchAgent) to use the new context handling methods, removing redundant code.
- Replaced `asNestedAgents` usage in network definitions with direct agent assignments to improve type safety and clarity.
- Added a new `chat-request.ts` file defining a schema for chat transport requests using Zod for validation.
- Updated documentation in `AGENTS.md` to reflect changes in agent wiring and context handling.
- Enhanced type definitions for agent contexts to support additional properties and improve type safety.
S
ssdeanx committed
b862e2281904aee4d223baf3fee9ab52c06e262c
Parent: 7b3972e