Skip to content

Update trendmoon tool implementation#183

Open
guibvieira wants to merge 69 commits intoEmberAGI:mainfrom
Trend-Spotter:main
Open

Update trendmoon tool implementation#183
guibvieira wants to merge 69 commits intoEmberAGI:mainfrom
Trend-Spotter:main

Conversation

@guibvieira
Copy link
Contributor

No description provided.

greg92 and others added 30 commits June 13, 2025 17:37
- Introduced project structure and dependencies.
- Configured TypeScript, ESLint, and Prettier.
- Added Docker support with `Dockerfile` and `docker-compose.yml`.
- Designed `index.ts` for server initialization in HTTP and stdio modes.
- Included `.env.example` for environment configuration samples.
- Configured `.dockerignore` and `.gitignore` files.

need to refactor trendmoonAgent.
- Documented setup instructions and prerequisites.
- Explained server operation modes (Stdio and HTTP).
- Added deployment details using Docker and Docker Compose.
- Listed available scripts and environment variables.
Added tags and example queries for better skill metadata and UX. Cleaned up and modernized integration tests, simplifying setup and removing redundant test cases to improve maintainability.
…h tool parameters

- Added alias generation for better entity resolution in `EntityResolver`.
- Improved platform and category caching logic with alias support in `initialize`.
- Updated integration test suite to ensure better test coverage for new query patterns (e.g., platform, category, and timeframe).
- Enhanced schema definitions in `SocialAndMarketInsights` tool with additional parameters (`timeframe`, `start_date`, `end_date`) for more precise filtering.
- Revised hooks to align with updated schema and entity resolution processes.
- Refined system prompts for better handling of user queries.
- Simplified test cases by reorganizing redundant structures.
… added `ENTITY_CACHE_DURATION_MINUTES` configuration, and updated category/platform data management.
… caching, fallback to static files, alias generation, and improved initialization logic. Updated `.gitignore` to include `/cache`.
…ndCoinsByMindshare`, `findFastestGrowingNarrativeTool`, `findGrowingCoinsByCategoryAndChainTool`, `getFundamentalCatalystsTool`, `getTopCoinsInCategoryTool`, `echoSkill`, and `greetSkill`. Refactored `EntityResolver` by cleaning up comments and unused imports. Updated initialization logic for clarity.
…d comprehensive MCP integration

- Simplify input schema to single 'query' parameter from complex routing system
- Integrate with trendmoon-mcp-server using moduleName workspace dependency
- Remove all individual tool implementations in favor of MCP server orchestration
- Maintain entity resolution hooks for categories, platforms, and timeframes
- Add comprehensive test suite with 45 passing tests (100% success rate)
- Configure timeouts for long-running getSocialAndMarketInsights operations (120s)
- Update package.json dependencies and README with complete usage documentation
- Preserve cache system with fallback to local JSON data files
- Implement dummy tool to satisfy framework requirements while using MCP tools
- Add support for crypto-specific queries: meme tokens, BTC analysis, DeFi projects

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add new getTopCategoryCoins tool that calls MCP server for category-based ranking
- Update agent index.ts to include new tool in configuration
- Enhanced system prompt to describe category ranking capabilities
- Support for all metrics: mindshare, sentiment, interactions, scores
- Fix TypeScript issues in socialAndMarketInsights.ts (remove Task import)
…d CLI parsing

- Add Map-based O(1) lookup for categories and platforms
- Implement intelligent alias generation with common crypto terms (defi→DeFi, arbitrum→arbitrum-one)
- Handle ambiguous token/platform resolution (sol→solana platform, not token)
- Add persistent cache system with timestamp-based file naming
- Fix MCP response parsing for different platform data structures
- Improve CLI message extraction for parts[0].text format
- Add language-aware system prompt (match user's language)
- Optimize performance from O(n×m) to O(1) for exact matches

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…gent\n\nResolve conflict in socialAndMarketInsights.ts and incorporate new tool.
…trendmoon-agent

# Conflicts:
#	typescript/examples/trendmoon-agent/src/index.ts
#	typescript/examples/trendmoon-agent/src/tools/getTopNarratives.ts
#	typescript/lib/mcp-tools/trendmoon-mcp-server/package.json
greg92 and others added 28 commits July 22, 2025 19:03
… added `ENTITY_CACHE_DURATION_MINUTES` configuration, and updated category/platform data management.
… caching, fallback to static files, alias generation, and improved initialization logic. Updated `.gitignore` to include `/cache`.
…ndCoinsByMindshare`, `findFastestGrowingNarrativeTool`, `findGrowingCoinsByCategoryAndChainTool`, `getFundamentalCatalystsTool`, `getTopCoinsInCategoryTool`, `echoSkill`, and `greetSkill`. Refactored `EntityResolver` by cleaning up comments and unused imports. Updated initialization logic for clarity.
…d comprehensive MCP integration

- Simplify input schema to single 'query' parameter from complex routing system
- Integrate with trendmoon-mcp-server using moduleName workspace dependency
- Remove all individual tool implementations in favor of MCP server orchestration
- Maintain entity resolution hooks for categories, platforms, and timeframes
- Add comprehensive test suite with 45 passing tests (100% success rate)
- Configure timeouts for long-running getSocialAndMarketInsights operations (120s)
- Update package.json dependencies and README with complete usage documentation
- Preserve cache system with fallback to local JSON data files
- Implement dummy tool to satisfy framework requirements while using MCP tools
- Add support for crypto-specific queries: meme tokens, BTC analysis, DeFi projects

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…d CLI parsing

- Add Map-based O(1) lookup for categories and platforms
- Implement intelligent alias generation with common crypto terms (defi→DeFi, arbitrum→arbitrum-one)
- Handle ambiguous token/platform resolution (sol→solana platform, not token)
- Add persistent cache system with timestamp-based file naming
- Fix MCP response parsing for different platform data structures
- Improve CLI message extraction for parts[0].text format
- Add language-aware system prompt (match user's language)
- Optimize performance from O(n×m) to O(1) for exact matches

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add new getTopCategoryCoins tool that calls MCP server for category-based ranking
- Update agent index.ts to include new tool in configuration
- Enhanced system prompt to describe category ranking capabilities
- Support for all metrics: mindshare, sentiment, interactions, scores
- Fix TypeScript issues in socialAndMarketInsights.ts (remove Task import)
This commit resolves a series of cascading build and runtime errors that prevented the `trendmoon-agent` from deploying and running successfully in a production environment like DigitalOcean.

The core issue stemmed from the complex interaction between `pnpm` workspaces, TypeScript compilation, and Node.js module resolution in a strict, isolated environment. This led to failures at multiple stages of the process.

The following essential fixes have been implemented:

- **build(deps):** Updated `arbitrum-vibekit-core` to use HTTPS for the `@google-a2a/types` dependency. This resolves `pnpm install` failures in environments without configured GitHub SSH keys.

- **fix(mcp-server):** Added an `exports` field to the `package.json` for `trendmoon-mcp-server`. This makes the package's entry point unambiguous, adhering to modern standards and improving resolution reliability.

- **fix(agent):** Manually construct the absolute path to the MCP server's entrypoint in the agent's `index.ts`. This bypasses Node's fragile module resolution algorithm, providing a robust and reliable link to the dependency that works consistently across all environments.

- **chore(tsconfig):** Updated the agent's `tsconfig.json` to target `ES2022` and use `module: "NodeNext"`. This enables modern Node.js features like `import.meta.url` and ensures correct type support for built-in modules.
Copy link
Contributor

@0xTomDaniel 0xTomDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address ci.yml and merge the latest main branch into this one to ensure there aren't any conflicts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert these changes before we merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants