Skip to content

Conversation

RolandM99
Copy link
Contributor

@RolandM99 RolandM99 commented Jul 28, 2025

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


Copy link
Contributor

coderabbitai bot commented Jul 28, 2025

Summary by CodeRabbit

  • New Features

    • Added support for new environment variables and configuration options for the server MCP app.
    • Integrated local workspace packages as dependencies in the server MCP app.
  • Bug Fixes

    • Updated error messages and build instructions to use the correct build commands.
  • Chores

    • Simplified and updated build scripts and project configuration for the server MCP app.
    • Improved spell checker dictionary to recognize project-specific terms.
    • Added documentation to clarify environment setup and build instructions.
    • Enhanced TypeScript configuration for better type recognition and global variable support.

Walkthrough

This update introduces a new ServerMcpPackager class for packaging logic, expands environment variable support, and refactors build scripts and project configuration for the server-mcp Electron app. It consolidates build commands, updates project dependencies to reference local workspace packages, and improves TypeScript and documentation files for consistency.

Changes

Cohort / File(s) Change Summary
Packager Implementation
.scripts/electron-package-utils/concrete-packager/server-mcp-packager.ts
Adds ServerMcpPackager class implementing IPackager with a prepare method that updates package fields using environment variables.
Packager Factory Extension
.scripts/electron-package-utils/packager-factory.ts
Adds support for the new server-mcp packager type in the factory method.
Environment Variables
.scripts/env.ts
Adds seven new environment variables for MCP server app config; updates type and initialization.
Electron Start Script
apps/server-mcp/electron-start.js
Updates error message to use the new build command (yarn nx build server-mcp).
Global Type Declarations
apps/server-mcp/global.d.ts
Declares a new global variable variableGlobal in the NodeJS global namespace.
Electron Build Scripts
apps/server-mcp/package.json, package.json
Refactors build scripts to use standard Nx build commands, removes electron-specific scripts, and updates related commands.
Project Build Config
apps/server-mcp/project.json
Removes the "build" target, updates "build-electron" to include src/package.json as an asset.
Electron TSConfig
apps/server-mcp/tsconfig.electron.json
Adds global.d.ts to files, reduces included and excluded files for Electron build.
Server MCP Package
apps/server-mcp/src/package.json
Simplifies description, adds local workspace dependencies and workspaces field.
Environments Documentation
apps/server-mcp/src/environments/README.md
Adds a README describing auto-generated environment files.
Spell Checker Config
.cspell.json
Adds "gauzymcpserver" to the spell checker dictionary.
MCP Server README
packages/mcp-server/README.md
Simplifies run instructions to a single build command.

Sequence Diagram(s)

sequenceDiagram
    participant Env as Environment
    participant PackagerFactory
    participant ServerMcpPackager
    participant IPackage

    Env->>ServerMcpPackager: Provides environment variables
    PackagerFactory->>ServerMcpPackager: Instantiates for 'server-mcp'
    ServerMcpPackager->>IPackage: prepare(pkg)
    ServerMcpPackager->>Env: Reads env vars (name, desc, etc.)
    ServerMcpPackager->>IPackage: Updates fields with env values
    ServerMcpPackager-->>PackagerFactory: Returns updated package
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Suggested reviewers

  • evereq
  • rahul-rocket

Poem

A bunny hops through fields of code,
With scripts and configs all bestowed.
The MCP server’s built anew,
With local deps and docs in view.
Environment vars now multiply,
As build commands are simplified.
🐇 Cheers to progress—let’s multiply!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 537a071 and 226041a.

📒 Files selected for processing (3)
  • .cspell.json (1 hunks)
  • apps/server-mcp/global.d.ts (1 hunks)
  • apps/server-mcp/src/environments/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.
apps/server-mcp/src/environments/README.md (7)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/main.ts : Bootstrap your application in a file named 'main.ts' directly inside 'src'

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,html,css,scss,sass,less,styl} : Use the same file name for a component's TypeScript, template, and styles (e.g., 'user-profile.ts', 'user-profile.html', 'user-profile.css')

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Match file names to the TypeScript identifier within; avoid generic names like 'helpers.ts', 'utils.ts', or 'common.ts'

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.spec.ts : Use the same name for a file's tests with '.spec' at the end (e.g., 'user-profile.spec.ts' for the 'UserProfile' component)

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Separate words in file names with hyphens (e.g., 'user-profile.ts' for a component named 'UserProfile')

apps/server-mcp/global.d.ts (17)

Learnt from: syns2191
PR: #8909
File: packages/desktop-activity/src/lib/kb-mouse.ts:1-2
Timestamp: 2025-04-20T09:30:18.913Z
Learning: When importing Node.js built-in modules in TypeScript/JavaScript files, use the node: protocol prefix (e.g., import { EventEmitter } from 'node:events'; instead of import { EventEmitter } from 'events';) as it's more explicit and signals that the imported module belongs to Node.js.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: syns2191
PR: #8936
File: packages/desktop-lib/src/lib/offline/dto/kb-mouse-activity.dto.ts:20-20
Timestamp: 2025-05-11T19:08:56.740Z
Learning: In the Ever Gauzy project, 'any' type is sometimes used intentionally in DTOs for fields that need to be stringified when storing in SQLite and parsed when retrieving (like arrays and complex objects).

Learnt from: RolandM99
PR: #8901
File: packages/plugins/integration-zapier/zapier/src/triggers/timerStatus.ts:40-67
Timestamp: 2025-04-11T07:51:25.679Z
Learning: Zapier integration code often requires flexible typing with any for response data handling since Zapier's platform expects this flexibility to accommodate various response structures.

Learnt from: RolandM99
PR: #9000
File: packages/plugins/integration-zapier/src/lib/zapier.controller.ts:63-65
Timestamp: 2025-06-18T14:38:29.691Z
Learning: In the ever-gauzy codebase, particularly in packages/plugins/integration-zapier/src/lib/zapier.controller.ts, prefer explicit Buffer.from() wrapping even when the source already returns a Buffer, for defensive programming and type safety clarity.

Learnt from: RolandM99
PR: #9063
File: .scripts/env.ts:354-356
Timestamp: 2025-07-29T08:07:12.397Z
Learning: In .scripts/env.ts, APP_ID environment variable defaults use lowercase format (e.g., 'com.ever.gauzydesktoptimer', 'com.ever.gauzydesktop', 'com.ever.gauzyserver') rather than camelCase. New APP_ID values should maintain this lowercase consistency.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Use lifecycle hook interfaces (e.g., implement OnInit when using ngOnInit)

Learnt from: RolandM99
PR: #8901
File: packages/plugins/integration-zapier/zapier/src/triggers/projectList.ts:35-35
Timestamp: 2025-04-11T13:51:07.359Z
Learning: In the Zapier integration code, using any for error types in catch clauses is the preferred approach for simple error handling, especially when interfacing with external APIs.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Use 'readonly' on properties that are initialized by Angular (e.g., input, model, output, queries)

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Keep lifecycle methods (e.g., ngOnInit) simple; delegate logic to well-named methods

Learnt from: RolandM99
PR: #8901
File: packages/plugins/integration-zapier/zapier/src/triggers/taskList.ts:36-39
Timestamp: 2025-04-11T14:02:57.938Z
Learning: In Zapier integration files for Ever Gauzy, using any type for error handling is acceptable according to the project's practices and developers' preferences.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Directives should use the same application-specific prefix as your components; attribute selectors for directives should use camelCase (e.g., '[mrTooltip]')

Learnt from: rahul-rocket
PR: #8922
File: packages/plugins/integration-upwork/package.json:57-57
Timestamp: 2025-04-28T14:17:18.486Z
Learning: UUID version 11+ includes its own TypeScript definitions, making the separate @types/uuid package unnecessary. When using UUID v11 or newer, remove the @types/uuid dependency to avoid potential type conflicts.

Learnt from: rahul-rocket
PR: #8922
File: packages/plugins/integration-upwork/package.json:57-57
Timestamp: 2025-04-28T14:17:18.486Z
Learning: UUID version 11+ includes its own TypeScript definitions, making the separate @types/uuid package unnecessary. When using UUID v11 or newer, remove the @types/uuid dependency to avoid potential type conflicts.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

.cspell.json (2)

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

🪛 LanguageTool
apps/server-mcp/src/environments/README.md

[grammar] ~1-~1: Use correct spacing
Context: # Env files Directory for auto-generated environment...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: test
  • GitHub Check: build
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
apps/server-mcp/src/environments/README.md (1)

1-3: README formatting looks good now

Blank line after the heading is present and the description is concise; previous markdown-lint complaints are resolved.

apps/server-mcp/global.d.ts (1)

1-5: Switch from module to namespace successfully removes the deprecation warning
The previous review’s lint finding is fully addressed—using declare namespace NodeJS is the right form for ambient global augmentation.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mcp-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR establishes the build infrastructure for a new MCP (Model Context Protocol) Electron desktop application within the Ever Gauzy ecosystem. The changes introduce a complete packaging and build system for the server-mcp app, following established patterns from other desktop applications in the codebase.

Key changes include:

  • Build System Setup: Created a new ServerMcpPackager class and integrated it into the PackagerFactory to handle Electron packaging configuration with environment-driven customization
  • Environment Configuration: Added environment variable definitions in .scripts/env.ts for app metadata (name, description, ID, repository info) following the same pattern as other desktop apps
  • Project Configuration: Simplified and consolidated build targets in project.json, removing duplicate build-electron target and ensuring proper asset inclusion (package.json for Electron metadata)
  • Package Management: Updated package.json files to use local workspace dependencies (@gauzy/config and @gauzy/mcp-server) via file references and workspace configuration
  • TypeScript Configuration: Streamlined tsconfig.electron.json to focus only on essential Electron files (main process and preload scripts) and added global type definitions
  • Documentation Updates: Fixed build command references throughout documentation and scripts, changing from non-existent build-electron to the correct build target
  • Application Assets: Added standard Electron app infrastructure including icons, asset directories, and environment files

The implementation integrates seamlessly with the existing monorepo structure, using nx build system and following established patterns for environment handling, packaging, and TypeScript configuration used by other desktop applications like agent, desktop-timer, and desktop.

PR Description Notes:

  • The PR template checkboxes are not completed
  • No explanation is provided for what the changes do or why they add value

Confidence score: 0/5

  • This PR contains critical syntax errors that will prevent the application from building or running
  • Multiple environment files have invalid JavaScript/TypeScript syntax with undefined properties
  • Files apps/server-mcp/src/environments/environment.ts and apps/server-mcp/src/environments/environment.prod.ts need immediate fixes before merge

16 files reviewed, 3 comments

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a167c41 and 537a071.

⛔ Files ignored due to path filters (11)
  • apps/server-mcp/src/assets/icons/desktop_logo_512x512.png is excluded by !**/*.png
  • apps/server-mcp/src/assets/icons/logo_Gauzy.svg is excluded by !**/*.svg
  • apps/server-mcp/src/assets/icons/logo_Gauzy_white.svg is excluded by !**/*.svg
  • apps/server-mcp/src/icons/icon.ico is excluded by !**/*.ico
  • apps/server-mcp/src/icons/icon.png is excluded by !**/*.png
  • apps/server-mcp/src/icons/linux/128x128.png is excluded by !**/*.png
  • apps/server-mcp/src/icons/linux/16x16.png is excluded by !**/*.png
  • apps/server-mcp/src/icons/linux/256x256.png is excluded by !**/*.png
  • apps/server-mcp/src/icons/linux/32x32.png is excluded by !**/*.png
  • apps/server-mcp/src/icons/linux/512x512.png is excluded by !**/*.png
  • apps/server-mcp/src/icons/linux/64x64.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • .scripts/electron-package-utils/concrete-packager/server-mcp-packager.ts (1 hunks)
  • .scripts/electron-package-utils/packager-factory.ts (2 hunks)
  • .scripts/env.ts (2 hunks)
  • apps/server-mcp/electron-start.js (1 hunks)
  • apps/server-mcp/global.d.ts (1 hunks)
  • apps/server-mcp/package.json (1 hunks)
  • apps/server-mcp/project.json (1 hunks)
  • apps/server-mcp/src/environments/README.md (1 hunks)
  • apps/server-mcp/src/environments/environment.prod.ts (1 hunks)
  • apps/server-mcp/src/environments/environment.ts (1 hunks)
  • apps/server-mcp/src/package.json (1 hunks)
  • apps/server-mcp/tsconfig.electron.json (1 hunks)
  • package.json (2 hunks)
  • packages/mcp-server/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.
apps/server-mcp/src/environments/README.md (6)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/main.ts : Bootstrap your application in a file named 'main.ts' directly inside 'src'

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,html,css,scss,sass,less,styl} : Use the same file name for a component's TypeScript, template, and styles (e.g., 'user-profile.ts', 'user-profile.html', 'user-profile.css')

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Match file names to the TypeScript identifier within; avoid generic names like 'helpers.ts', 'utils.ts', or 'common.ts'

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.spec.ts : Use the same name for a file's tests with '.spec' at the end (e.g., 'user-profile.spec.ts' for the 'UserProfile' component)

packages/mcp-server/README.md (3)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

apps/server-mcp/src/environments/environment.ts (4)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #8863
File: packages/plugins/integration-zapier/zapier/src/authentication.ts:29-29
Timestamp: 2025-04-02T09:39:39.648Z
Learning: When developing Zapier integrations that will be deployed to the Zapier platform, use process.env directly to access environment variables instead of importing from @gauzy/config, as Zapier's platform cannot recognize or import this package.

apps/server-mcp/electron-start.js (6)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: syns2191
PR: #8909
File: packages/desktop-activity/src/lib/kb-mouse.ts:1-2
Timestamp: 2025-04-20T09:30:18.913Z
Learning: When importing Node.js built-in modules in TypeScript/JavaScript files, use the node: protocol prefix (e.g., import { EventEmitter } from 'node:events'; instead of import { EventEmitter } from 'events';) as it's more explicit and signals that the imported module belongs to Node.js.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/main.ts : Bootstrap your application in a file named 'main.ts' directly inside 'src'

Learnt from: syns2191
PR: #8848
File: packages/desktop-window/src/lib/utils/desktop-window-utils.ts:61-64
Timestamp: 2025-03-14T16:30:39.694Z
Learning: In development mode for Electron applications, the URL passed to window loading functions should be a complete HTTP URL (e.g., http://localhost:port) and should be passed directly to window.loadURL() without additional formatting or path manipulation.

.scripts/electron-package-utils/packager-factory.ts (3)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

apps/server-mcp/src/environments/environment.prod.ts (3)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #8863
File: packages/plugins/integration-zapier/zapier/src/authentication.ts:29-29
Timestamp: 2025-04-02T09:39:39.648Z
Learning: When developing Zapier integrations that will be deployed to the Zapier platform, use process.env directly to access environment variables instead of importing from @gauzy/config, as Zapier's platform cannot recognize or import this package.

apps/server-mcp/tsconfig.electron.json (14)

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Match file names to the TypeScript identifier within; avoid generic names like 'helpers.ts', 'utils.ts', or 'common.ts'

Learnt from: syns2191
PR: #8909
File: packages/desktop-activity/src/lib/kb-mouse.ts:1-2
Timestamp: 2025-04-20T09:30:18.913Z
Learning: When importing Node.js built-in modules in TypeScript/JavaScript files, use the node: protocol prefix (e.g., import { EventEmitter } from 'node:events'; instead of import { EventEmitter } from 'events';) as it's more explicit and signals that the imported module belongs to Node.js.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: rahul-rocket
PR: #8922
File: packages/plugins/integration-upwork/package.json:57-57
Timestamp: 2025-04-28T14:17:18.486Z
Learning: UUID version 11+ includes its own TypeScript definitions, making the separate @types/uuid package unnecessary. When using UUID v11 or newer, remove the @types/uuid dependency to avoid potential type conflicts.

Learnt from: rahul-rocket
PR: #8922
File: packages/plugins/integration-upwork/package.json:57-57
Timestamp: 2025-04-28T14:17:18.486Z
Learning: UUID version 11+ includes its own TypeScript definitions, making the separate @types/uuid package unnecessary. When using UUID v11 or newer, remove the @types/uuid dependency to avoid potential type conflicts.

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,html,css,scss,sass,less,styl} : Use the same file name for a component's TypeScript, template, and styles (e.g., 'user-profile.ts', 'user-profile.html', 'user-profile.css')

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Group Angular-specific properties (injected dependencies, inputs, outputs, queries) before methods in components and directives

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Separate words in file names with hyphens (e.g., 'user-profile.ts' for a component named 'UserProfile')

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.spec.ts : Use the same name for a file's tests with '.spec' at the end (e.g., 'user-profile.spec.ts' for the 'UserProfile' component)

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/main.ts : Bootstrap your application in a file named 'main.ts' directly inside 'src'

Learnt from: CR
PR: ever-co/ever-gauzy#0
File: .cursor/rules/angular.mdc:0-0
Timestamp: 2025-07-21T15:50:57.938Z
Learning: Applies to src/**/*.{ts,tsx} : Directives should use the same application-specific prefix as your components; attribute selectors for directives should use camelCase (e.g., '[mrTooltip]')

apps/server-mcp/package.json (7)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: rahul-rocket
PR: #8922
File: packages/plugins/integration-upwork/package.json:57-57
Timestamp: 2025-04-28T14:17:18.486Z
Learning: UUID version 11+ includes its own TypeScript definitions, making the separate @types/uuid package unnecessary. When using UUID v11 or newer, remove the @types/uuid dependency to avoid potential type conflicts.

Learnt from: rahul-rocket
PR: #8922
File: packages/plugins/integration-upwork/package.json:57-57
Timestamp: 2025-04-28T14:17:18.486Z
Learning: UUID version 11+ includes its own TypeScript definitions, making the separate @types/uuid package unnecessary. When using UUID v11 or newer, remove the @types/uuid dependency to avoid potential type conflicts.

Learnt from: syns2191
PR: #9033
File: packages/desktop-activity/src/lib/activity-window.ts:113-120
Timestamp: 2025-07-11T01:30:50.701Z
Learning: In the ever-gauzy codebase, the build system compiles all static import statements to require statements. When working with ESM-only modules like 'get-windows', the Function constructor approach with dynamic import is used to bypass build-time transformations, as seen in packages/desktop-activity/src/lib/activity-window.ts.

apps/server-mcp/project.json (4)

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

apps/server-mcp/global.d.ts (3)

Learnt from: syns2191
PR: #8909
File: packages/desktop-activity/src/lib/kb-mouse.ts:1-2
Timestamp: 2025-04-20T09:30:18.913Z
Learning: When importing Node.js built-in modules in TypeScript/JavaScript files, use the node: protocol prefix (e.g., import { EventEmitter } from 'node:events'; instead of import { EventEmitter } from 'events';) as it's more explicit and signals that the imported module belongs to Node.js.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

.scripts/electron-package-utils/concrete-packager/server-mcp-packager.ts (3)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

.scripts/env.ts (1)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

package.json (4)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

apps/server-mcp/src/package.json (6)

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.

Learnt from: RolandM99
PR: #9029
File: apps/mcp/tsconfig.json:13-14
Timestamp: 2025-07-23T16:00:29.020Z
Learning: In the ever-co/ever-gauzy project, empty "files" and "include" arrays in TypeScript configuration files (like apps/mcp/tsconfig.json) are written deliberately and should not be flagged as issues. The project intentionally uses this pattern where configurations rely solely on referenced configs via the "references" array.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is used consistently across most tool files for logging, but some files (employees.ts, tasks.ts, daily-plan.ts) still use console.error creating an inconsistency. The electron-log library works in both Electron and Node.js contexts, so it's safe to use throughout the shared package for consistent logging behavior.

Learnt from: RolandM99
PR: #9029
File: packages/mcp-server/src/lib/tools/employees.ts:78-600
Timestamp: 2025-07-25T05:08:34.515Z
Learning: In the ever-co/ever-gauzy packages/mcp-server shared package, electron-log is successfully used across multiple core files (api-client.ts, auth-manager.ts, mcp-server.ts, etc.) without any conditional logic or fallbacks. This proves electron-log works reliably in both Electron and standalone Node.js contexts within this codebase. The files using console.error (employees.ts, tasks.ts, daily-plan.ts) are inconsistent outliers that should use log.error for consistency.

Learnt from: rahul-rocket
PR: #8470
File: package.json:342-342
Timestamp: 2024-10-21T13:58:20.055Z
Learning: When verifying package versions, check both the npm registry and GitHub repositories, as versions may be published to npm even if not present in the GitHub repository.

Learnt from: syns2191
PR: #9033
File: packages/desktop-activity/src/lib/activity-window.ts:113-120
Timestamp: 2025-07-11T01:30:50.701Z
Learning: In the ever-gauzy codebase, the build system compiles all static import statements to require statements. When working with ESM-only modules like 'get-windows', the Function constructor approach with dynamic import is used to bypass build-time transformations, as seen in packages/desktop-activity/src/lib/activity-window.ts.

🧬 Code Graph Analysis (4)
apps/server-mcp/src/environments/environment.ts (1)
apps/server-mcp/src/environments/environment.prod.ts (1)
  • environment (1-4)
.scripts/electron-package-utils/packager-factory.ts (1)
.scripts/electron-package-utils/concrete-packager/server-mcp-packager.ts (1)
  • ServerMcpPackager (5-18)
apps/server-mcp/src/environments/environment.prod.ts (1)
apps/server-mcp/src/environments/environment.ts (1)
  • environment (1-4)
.scripts/electron-package-utils/concrete-packager/server-mcp-packager.ts (1)
.scripts/env.ts (1)
  • env (154-392)
🪛 LanguageTool
apps/server-mcp/src/environments/README.md

[grammar] ~1-~1: Use correct spacing
Context: # Env files Directory for auto-generated environment...

(QB_NEW_EN_OTHER_ERROR_IDS_5)

🪛 markdownlint-cli2 (0.17.2)
apps/server-mcp/src/environments/README.md

3-3: Files should end with a single newline character

(MD047, single-trailing-newline)

🪛 Biome (2.1.2)
apps/server-mcp/global.d.ts

[error] 1-1: Use the namespace keyword instead of the outdated module keyword.

The module keyword is deprecated to avoid any confusion with the ECMAScript modules which are often called modules.
Safe fix: Use namespace instead.

(lint/suspicious/useNamespaceKeyword)

🪛 GitHub Check: Cspell
.scripts/env.ts

[warning] 355-355:
Unknown word (gauzymcpserver)

🪛 GitHub Actions: Check Spelling and Typos with cspell
.scripts/env.ts

[warning] 355-355: cspell: Unknown word (gauzymcpserver)

package.json

[warning] 35-35: cspell: Unknown word (gauzymcpserver)

apps/server-mcp/src/package.json

[warning] 35-35: cspell: Unknown word (gauzymcpserver)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: build
  • GitHub Check: test
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (13)
apps/server-mcp/electron-start.js (1)

15-15: LGTM!

The error message correctly reflects the updated build command for the server-mcp app.

packages/mcp-server/README.md (1)

83-83: Documentation update aligns with build process standardization.

The removal of the electron-specific build command and simplification to use only yarn nx build server-mcp is consistent with the broader changes in this PR to standardize the build process across the codebase.

.scripts/electron-package-utils/packager-factory.ts (2)

6-6: LGTM! Proper import of the new packager.

The import follows the established pattern and correctly brings in the ServerMcpPackager class.


20-21: LGTM! Factory pattern implementation is correct.

The new case for 'server-mcp' follows the established pattern and correctly returns an instance of ServerMcpPackager, maintaining consistency with other packager types.

apps/server-mcp/tsconfig.electron.json (2)

18-20: LGTM! Global declaration file properly included.

Adding global.d.ts to the files array ensures the global type declarations are recognized during the Electron build process, supporting the new NodeJS global interface augmentation.


21-24: LGTM! Streamlined include configuration.

The simplified include array focusing only on Electron-specific files (electron-main.ts and preload scripts) aligns with the build process restructuring and creates a more focused Electron build configuration.

apps/server-mcp/package.json (1)

21-24: LGTM! Build script standardization is well-executed.

The replacement of electron-specific build commands with the standard yarn nx build server-mcp command across all build variants (dev, prod) aligns perfectly with the PR's objective to standardize the build process and fix build errors. The removal of the start:electron script also helps streamline the available scripts.

apps/server-mcp/project.json (1)

20-21: LGTM! Package.json correctly added to assets for packaging.

The addition of "apps/server-mcp/src/package.json" to the assets array is appropriate and aligns with the new ServerMcpPackager class that customizes package metadata during the build process.

Note: The AI summary mentions the "build" target was removed, but the provided code still shows the complete build target configuration. The actual change is adding the package.json file to the assets array.

Likely an incorrect or invalid review comment.

.scripts/electron-package-utils/concrete-packager/server-mcp-packager.ts (1)

5-18: Well-implemented packager following established patterns.

The ServerMcpPackager class correctly implements the IPackager interface and follows the same pattern as other packagers in the codebase. The use of environment variables with fallback to original package properties ensures robust behavior across different deployment scenarios.

All referenced environment variables (DESKTOP_MCP_SERVER_APP_NAME, DESKTOP_MCP_SERVER_APP_DESCRIPTION, etc.) are properly defined in .scripts/env.ts with appropriate defaults.

apps/server-mcp/src/package.json (3)

25-30: LGTM! Workspaces configuration correctly set up for local packages.

The workspaces configuration properly references the local dist packages that will be used by the MCP server application.


125-126: LGTM! Local dependencies correctly configured.

The local dependencies for @gauzy/config and @gauzy/mcp-server are properly set up to reference the built packages, which aligns with the workspaces configuration and supports the new packaging workflow.


35-35: Consider consistent naming for appId.

The appId "com.ever.gauzymcpserver" uses a concatenated format that differs from the kebab-case naming used elsewhere (e.g., "gauzy-mcp-server"). Consider using a more consistent format like "com.ever.gauzy-mcp-server" or "com.ever.gauzy.mcp.server".

[pipeline_failures]
This also addresses the cspell warning about "gauzymcpserver" being an unknown word.

⛔ Skipped due to learnings
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/tools/organization-contact.ts:12-25
Timestamp: 2025-07-23T10:56:18.549Z
Learning: In the ever-co/ever-gauzy codebase, the backend API uses camelCase naming conventions for field names (e.g., organizationId, tenantId, employeeId, primaryEmail). When implementing MCP tools and schema validation, field names should use camelCase to match the backend entity structure, not snake_case.
Learnt from: RolandM99
PR: ever-co/ever-gauzy#9029
File: packages/mcp-server/src/lib/config/server-info.ts:2-2
Timestamp: 2025-07-25T04:53:31.370Z
Learning: In packages/mcp-server/src/lib/config/server-info.ts, the user RolandM99 confirmed that the server name "Gauzy MCP Server" should remain hardcoded because it will stay the same across all environments (development, staging, production). The user prefers this approach over using environment variables for the server name.
package.json (1)

385-386: LGTM! Build scripts correctly updated to use standard Nx commands.

The replacement of nx build-electron server-mcp with nx build server-mcp aligns with the broader refactoring to standardize build commands across the project. This simplification makes the build process more consistent and maintainable.

Also applies to: 395-395

@RolandM99 RolandM99 requested a review from evereq July 29, 2025 10:41
@evereq evereq merged commit c7cc62e into develop Jul 29, 2025
16 of 17 checks passed
@evereq evereq deleted the fix/mcp-build branch July 29, 2025 15:47
evereq added a commit that referenced this pull request Jul 29, 2025
…i18n) (#9063) (#9065)

* feat: add i18n for translation and config well environment

* fix: fix build error related to packager for the electron desktop app

* fix: add suggestions from AI bots

* fix: add suggestions from AI bots

Co-authored-by: Roland MN <[email protected]>
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.

2 participants