Commit Graph

3783 Commits

Author SHA1 Message Date
Innei
0bae393f08 chore(deps): update dependencies across multiple packages
- Upgraded various dependencies in package.json files, including @babel/core to 7.27.4, @nestjs/common and @nestjs/core to 11.1.3, and mongoose to 8.15.1 for improved stability and compatibility.
- Updated devDependencies such as form-data to 4.0.3 and zod to 3.25.56.
- Adjusted types for @types/node and @types/lodash to their latest versions for better type safety.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-07 23:02:27 +08:00
Innei
74b58f0b07 release: v8.3.2 v8.3.2 2025-05-27 00:47:58 +08:00
Innei
bf6021a0b4 fix(auth): enhance CORS support in CreateAuth handler
- Added comprehensive CORS headers to the CreateAuth function to improve cross-origin request handling.
- Configured headers for allowed origins, methods, and credentials, along with a max age for preflight requests.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-27 00:47:16 +08:00
Innei
bf49873701 release: v8.3.1 v8.3.1 2025-05-20 19:39:52 +08:00
Innei
40deef5204 refactor(vitest): remove unused module resolutions
- Eliminated the module resolutions for '@mx-space/compiled/auth' and '@mx-space/compiled' from vitest.config.mts to clean up the configuration.
- This change helps streamline the configuration and improve maintainability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-19 22:09:13 +08:00
Innei
75e153c355 fix(tinyexec): replace require statements to support cjs
- Updated the patch hash for tinyexec@1.0.1 in pnpm-lock.yaml to reflect the latest changes.
- Refactored require statements in the tinyexec patch to use standard require syntax for better compatibility and clarity.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-18 23:57:32 +08:00
Innei
89013ed348 fix(deps): complie @antfu/install-pkg
- Added a patch for tinyexec@1.0.1 in pnpm-lock.yaml and pnpm-workspace.yaml to address specific issues.
- Updated the import of installPackage from @antfu/install-pkg to @mx-space/compiled/install-pkg in tool.util.ts for better module management.
- Removed @antfu/install-pkg from core package.json to streamline dependencies.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-18 23:42:15 +08:00
Innei
c52759181b feat(s3): implement S3Uploader for file uploads
- Introduced S3Uploader class to handle file uploads to S3 with support for custom domains and automatic endpoint generation.
- Refactored BackupService to utilize S3Uploader for uploading backup files, enhancing code clarity and maintainability.
- Added unit tests for S3Uploader to ensure functionality and reliability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-18 23:31:51 +08:00
Innei
4336e0fb97 chore(deps): update dependencies for improved compatibility
- Upgraded TypeScript from 5.7.3 to 5.8.3 in package.json and pnpm-lock.yaml.
- Updated various dependencies including mongoose to 8.15.0, @antfu/install-pkg to 1.1.0, and @innei/pretty-logger-nestjs to 0.3.4 for better stability.
- Adjusted related dependencies to ensure compatibility with the new versions.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-18 23:04:41 +08:00
Innei
7e616eeb88 fix: bundle
Signed-off-by: Innei <tukon479@gmail.com>
2025-05-18 22:54:31 +08:00
Innei
441bc8ae3b chore(deps): update dependencies and ESLint configuration
- Changed pnpm setting in eslint.config.mjs from true to false.
- Updated various dependencies in package.json to specific versions for better stability and compatibility.
- Removed optionalDependencies from package.json to streamline the dependency management.
- Refactored ai-agent.service.ts to replace ToolInterface with DynamicStructuredTool for improved type safety.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-14 23:23:10 +08:00
Innei
7047b76f58 refactor(image): optimize image processing with AsyncQueue
- Replaced the promise-based image processing with an AsyncQueue to manage concurrent tasks more efficiently.
- Improved error handling and logging during image size and metadata retrieval.
- Updated the addMultiple method in AsyncQueue to return a wait function for better task management.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-11 21:40:27 +08:00
Innei
7229ccfb86 refactor: ai agent to langgraph
- Added @langchain/langgraph version 0.2.68 to package.json and pnpm-lock.yaml.
- Updated ai-deep-reading.service.ts to utilize createReactAgent from @langchain/langgraph for improved agent functionality.
- Enhanced error handling for GraphRecursionError in AiDeepReadingService.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-08 01:05:20 +08:00
Innei
e64acfa14b chore(deps): update @sxzz/eslint-config and related dependencies
- Upgraded @sxzz/eslint-config from version 6.1.1 to 7.0.0 in both pnpm-lock.yaml and pnpm-workspace.yaml.
- Updated various dependencies in pnpm-lock.yaml to ensure compatibility with the new eslint configuration.
- Added RedisMemoryServer to the test setup for improved testing capabilities alongside MongoDB.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-08 00:41:42 +08:00
Innei
3a8d1ede77 Revert "chore(deps): update TypeScript and related dependencies"
This reverts commit 4c9b9206c0.
2025-05-08 00:31:29 +08:00
Innei
f2873a5c9d chore(release): bump @mx-space/api-client to v1.17.0 2025-05-07 22:56:23 +08:00
Innei
4c9b9206c0 chore(deps): update TypeScript and related dependencies
- Upgraded TypeScript from version 5.7.3 to 5.8.3 in both package.json and pnpm-lock.yaml.
- Updated related dependencies to ensure compatibility with the new TypeScript version, including adjustments in various packages that depend on TypeScript.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-07 22:55:46 +08:00
Innei
f054fe5c4c refactor(markdown): optimize article extraction with Promise.all
- Refactored the extractAllArticle method to utilize Promise.all for concurrent fetching of posts, notes, and pages, improving performance and code readability.
- Simplified the return structure by directly assigning the results of the Promise.all call.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-07 22:51:41 +08:00
Innei
e80b77662b fix(markdown): refine tokenizer and code handling in markdown utility
- Updated the tokenizer regex to simplify the matching of GitHub, Twitter, and Telegram mentions.
- Refactored the code handling to correctly extract language and text for mermaid and other code blocks, improving output consistency.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-07 22:46:10 +08:00
Innei
9b46a60750 feat(ai): enhance OpenAI configuration with additional headers
- Added 'X-Title' and 'HTTP-Referer' headers to the OpenAI client configuration for improved request context.
- Included web URL in the configuration to support better tracking and analytics.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-07 00:41:01 +08:00
Innei
f7cd8c7035 fix(ai): ensure proper task cleanup in AiDeepReadingService
- Moved the deletion of the Redis task ID to the finally block to guarantee it is always executed, preventing potential memory leaks.
- Removed redundant Redis client initialization to streamline the code.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-07 00:27:47 +08:00
Innei
991cb0aeca release: v8.3.0 v8.3.0 2025-05-06 13:09:06 +08:00
Innei
574f02b2f1 refactor(tests): remove zx globals import from global.d.ts and lifecycle.ts
- Eliminated unnecessary import of 'zx/globals' from both global.d.ts and lifecycle.ts files to streamline test setup.
- Ensured that the test lifecycle remains intact while improving code clarity.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:55:51 +08:00
Innei
d75dcd72c8 chore(deps): add mongodb-memory-server and redis-memory-server to pnpm-lock.yaml
- Updated pnpm-lock.yaml to include `mongodb-memory-server` version 10.1.4 and `redis-memory-server` version 0.12.1 as dependencies.
- Removed optional flags from several dependencies for consistency.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:53:48 +08:00
Innei
c657e9a80a feat(ci): add custom action for MongoDB and Redis setup
- Introduced a new GitHub Action to streamline the setup of MongoDB and Redis for testing environments.
- Updated CI workflows to utilize the new action, replacing direct MongoDB and Redis setup steps for improved maintainability.
- Added `mongodb-memory-server` and `redis-memory-server` as dependencies in the project.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:52:50 +08:00
Innei
5077535eda feat(ci): add custom Node.js and pnpm setup action
- Introduced a new GitHub Action for setting up Node.js and pnpm with caching capabilities.
- Updated workflows to utilize the new action, changing the Node.js version to 22.x across CI, API client, and release workflows.
- Streamlined dependency installation and caching processes for improved build performance.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:41:49 +08:00
Innei
423cc7de14 chore(deps): update package dependencies to use catalog references
- Updated `package.json` and `pnpm-lock.yaml` to replace specific version references with catalog entries for various dependencies, including `@types/cors`, `@types/express`, `abort-controller`, `axios`, `camelcase-keys`, `cors`, `express`, `form-data`, `lodash`, `tsup`, `umi-request`, and `vite`.
- Removed obsolete conflict catalog for `@types/node`.
- Adjusted `pnpm-workspace.yaml` to reflect the new catalog structure for dependencies.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:36:30 +08:00
Innei
8a5048f067 feat(ai): add deep reading model and controller method
- Introduced `AIDeepReadingModel` to define the structure for deep reading responses.
- Added `getDeepReading` method in `AIController` to fetch deep reading data for a given article ID.
- Updated imports in `ai.ts` to include the new deep reading model.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:27:18 +08:00
Innei
c385c58943 feat(ai): introduce deep reading functionality and refactor AI module
- Added `AiDeepReadingController`, `AiDeepReadingService`, and related DTOs and models to support deep reading capabilities using AI.
- Integrated new methods for generating and managing deep readings, including error handling and caching mechanisms.
- Updated `AiModule` to include dependencies for deep reading services and controllers.
- Removed the obsolete `AiAgentModule` and its associated test controller.
- Enhanced configuration options to enable or disable deep reading features.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-06 00:16:46 +08:00
Innei
17f3febb5c release: v8.2.0 v8.2.0 2025-05-05 21:19:00 +08:00
Innei
f8555216b6 fix(comment): refine AI evaluation method and update comment options
- Updated `evaluateCommentWithAI` to enforce stricter type checks for `aiReviewType`, now only allowing 'binary' or 'score'.
- Added test calls in the constructor of `CommentService` to evaluate comments using AI.
- Enhanced the response handling in `evaluateCommentWithAI` to improve error management and ensure proper parsing of AI responses.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-05 21:09:41 +08:00
Innei
86fdb9e1f6 refactor(core): 再次延长获取配置等待时间以避免极端情况发生
Signed-off-by: Innei <tukon479@gmail.com>
2025-05-05 21:04:54 +08:00
Innei
d2956f3398 feat: implement AI-based comment evaluation in CommentService
- Added a new private method `evaluateCommentWithAI` to assess comment content using AI, supporting both scoring and spam detection modes.
- Integrated the `JsonOutputToolsParser` for handling AI responses.
- Updated the `checkSpam` method to utilize the new AI evaluation method, improving comment moderation capabilities.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-05 21:02:30 +08:00
Innei
46704d2498 feat: update ai integration (#2422)
* init

Signed-off-by: Innei <tukon479@gmail.com>

* update

Signed-off-by: Innei <tukon479@gmail.com>

* chore: update package dependencies and remove unused code

- Updated package manager version in package.json to pnpm@10.10.0.
- Removed references to `@modelcontextprotocol/sdk` from core application files.
- Deleted unused `mcp.controller.ts` and cleaned up related imports in `mcp.module.ts`.
- Adjusted optional dependencies in pnpm-lock.yaml.

Signed-off-by: Innei <tukon479@gmail.com>

* refactor: update AI summary and writer services to use new tools parser

- Replaced `JsonOutputFunctionsParser` with `JsonOutputToolsParser` in both `ai-summary.service.ts` and `ai-writer.service.ts`.
- Updated function definitions to align with the new tools structure, including changes to how functions are defined and invoked.
- Enhanced error handling to return empty objects when no results are found.

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-05 20:50:52 +08:00
renovate[bot]
bb7e9a38b1 chore(deps): update robinraju/release-downloader action to v1.12 (#2417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 20:49:45 +08:00
Innei
9214609eb4 release: v8.1.2 v8.1.2 2025-05-05 16:18:51 +08:00
Innei
af67ca184f chore: enhance CORS configuration in bootstrap and auth implementation
- Added comprehensive CORS methods support in `bootstrap.ts` to allow various HTTP methods.
- Removed redundant CORS headers from the `CreateAuth` function in `auth.implement.ts` to streamline the response handling.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-05 16:18:23 +08:00
Innei
d2e945fbe4 chore: update ESLint configuration
- Modified ESLint configuration to disable markdown support and sortKeys, while ensuring prettier and pnpm support are enabled.
- Removed redundant configuration options for prettier and markdown.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-04 15:10:27 +08:00
Innei
e055f5cd27 chore: update dependencies and improve health controller
- Updated various dependencies in package.json and pnpm-lock.yaml, including:
  - `@aws-sdk/client-s3` from 3.782.0 to 3.802.0
  - `@babel/core` from 7.26.10 to 7.27.1
  - `@nestjs/common` and `@nestjs/core` from 11.0.13 to 11.1.0
  - `axios` from 1.8.3 to 1.9.0
  - `mongoose` from 8.13.2 to 8.14.1
  - Other minor updates across various packages.

- Refactored `getAllCron` method in `cron.controller.ts` to use `job?.isActive` instead of `job?.running` for better clarity on job status.

Signed-off-by: Innei <tukon479@gmail.com>
2025-05-04 15:05:24 +08:00
Innei
7a4ee66011 release: v8.1.1 v8.1.1 2025-04-06 23:07:41 +08:00
Innei
c26e9ef0a6 chore: remove unused imports and update TypeScript version
- Removed unused imports `getSessionCookie` and `getSessionFromCtx` from `auth.implement.ts`.
- Updated TypeScript version from 5.8.3 to 5.7.3 in `package.json` and `pnpm-lock.yaml`.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-06 23:02:57 +08:00
Innei
5bf93975f3 chore: update dependencies and improve auth implementation
- Updated various dependencies in package.json and pnpm-lock.yaml, including:
  - `redis-memory-server` from 0.11.0 to 0.12.1
  - `@sxzz/eslint-config` from 4.6.0 to 6.1.1
  - `@types/node` from 22.13.10 to 22.14.0
  - `eslint` from ^9.17.0 to ^9.24.0
  - `lint-staged` from 15.3.0 to 15.5.0
  - `typescript` from 5.7.3 to 5.8.3
  - Other minor updates across various packages.

- Refactored `CreateAuth` function in `auth.implement.ts` to utilize `createAuthMiddleware` for better session handling.
- Enhanced exports in `auth.ts` to include new utility functions from `better-auth`.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-06 23:00:39 +08:00
nyaruta
577d5c5401 fix: deploy script (#2409) 2025-04-06 22:21:18 +08:00
indoordiary
e0f511668a fix: mask custom connection string passwords (CLI & env) (#2410) 2025-04-06 22:20:46 +08:00
Innei
96263782d0 fix: lint and fix cache service
Signed-off-by: Innei <tukon479@gmail.com>
2025-04-06 22:18:48 +08:00
nyaruta
128b92cbee fix(gateway/auth): broadcast failure (#2413) 2025-04-06 22:12:10 +08:00
Innei
f70faa2aa4 release: v8.1.0 v8.1.0 2025-03-25 15:39:59 +08:00
Innei
ef2fa7b294 chore: update script 2025-03-25 15:39:35 +08:00
nyaruta
a0ad1a2337 chore(ci): remove useless input (#2404) 2025-03-25 13:38:32 +08:00
nyaruta
539601408f Init (#2405) 2025-03-25 13:38:05 +08:00