Commit Graph

174 Commits (f22c4bd5c2f5906a689041ecfba91852ec824263)

Author SHA1 Message Date
boojack 583c3d24f4
feat(mcp): harden tool exposure and side effects (#5850) 1 month ago
wndnjs0 0fc1dab28b
fix: add unix socket file permission setting (755 -> 660) (#5849) 1 month ago
boojack a5ddd5adaf fix(server): close SSE clients during shutdown
Close long-lived SSE streams before HTTP shutdown so graceful shutdown is not held until the deadline. Also wait for background runners before closing the store to make shutdown ordering explicit.
1 month ago
memoclaw b8e9ee2b26
feat(mcp): enhance MCP server with full capabilities and new tools (#5720)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
3 months ago
milvasic ea0892a8b2
feat: add live refresh via Server-Sent Events (SSE) with visual indicator (#5638)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: milvasic <milvasic@users.noreply.github.com>
3 months ago
Steven 26d10212c6 refactor: consolidate duplicated auth logic into auth package
Add ApplyToContext and AuthenticateToUser helpers to the auth package,
then remove the duplicated auth code spread across the MCP middleware,
file server, Connect interceptor, and gRPC-Gateway middleware.

- auth.ApplyToContext: single place to set claims/user into context after Authenticate()
- auth.AuthenticateToUser: resolves any credential (bearer token or refresh cookie) to a *store.User
- MCP middleware: replaced manual PAT DB lookup + expiry check with Authenticator.AuthenticateByPAT
- File server: replaced authenticateByBearerToken/authenticateByRefreshToken with AuthenticateToUser
- Connect interceptor + Gateway middleware: replaced duplicated context-setting block with ApplyToContext
- MCPService now accepts secret to construct its own Authenticator
3 months ago
Steven 47d9414702 feat: add MCP server with PAT authentication
Embeds a Model Context Protocol (MCP) server into the Memos HTTP
process, exposing memo operations as MCP tools at POST/GET /mcp using
Streamable HTTP transport.

Authentication is PAT-only — requests without a valid personal access
token receive HTTP 401. Six tools are exposed: list_memos, get_memo,
create_memo, update_memo, delete_memo, and search_memos, all scoped to the authenticated user.
3 months ago
Steven 71e8a06463 chore: upgrade Echo v4 to v5.0.3 4 months ago
Johnny 47ebb04dc3 refactor: remove mode flag and introduce explicit demo flag 4 months ago
Johnny 09afa579e4 chore: implement session sliding expiration and JWT authentication
- Added UpdateSessionLastAccessed method to update session access time.
- Enhanced Authenticate method to support both session cookie and JWT token authentication.
- Introduced AuthResult struct to encapsulate authentication results.
- Added SetUserInContext function to simplify context management for authenticated users.

refactor(auth): streamline gRPC and HTTP authentication

- Removed gRPC authentication interceptor and replaced it with a unified approach using GatewayAuthMiddleware for HTTP requests.
- Updated Connect interceptors to utilize the new authentication logic.
- Consolidated public and admin-only method checks into service layer for better maintainability.

chore(api): clean up unused code and improve documentation

- Removed deprecated logger interceptor and unused gRPC server code.
- Updated ACL configuration documentation for clarity on public and admin-only methods.
- Enhanced metadata handling in Connect RPC to ensure consistent header access.

fix(server): simplify server startup and shutdown process

- Eliminated cmux dependency for handling HTTP and gRPC traffic.
- Streamlined server initialization and shutdown logic for better performance and readability.
6 months ago
Steven 1cf047707b refactor: migrate binary file serving from gRPC to dedicated HTTP fileserver
Migrates attachment and avatar binary serving from gRPC endpoints to a new dedicated HTTP fileserver package, fixing Safari video playback issues and improving architectural separation.

Key changes:
- Created server/router/fileserver package for all binary file serving
- Removed GetAttachmentBinary and GetUserAvatar gRPC endpoints from proto
- Implemented native HTTP handlers with full range request support
- Added authentication support (session cookies + JWT) to fileserver
- New avatar endpoint supports lookup by user ID or username
- Eliminated duplicate auth constants (imports from api/v1)

HTTP endpoints:
- Attachments: /file/attachments/:uid/:filename (unchanged URL)
- Avatars: /file/users/:identifier/avatar (new URL format)

This fixes Safari video/audio playback by using http.ServeContent() which properly handles HTTP 206 Partial Content responses and range request headers.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
6 months ago
Johnny 9a100d55be
chore(server): remove profiler code and endpoints (#5244)
Co-authored-by: Claude <noreply@anthropic.com>
7 months ago
Steven 4c1d1c70d1 refactor: rename workspace to instance throughout codebase
Remove work-related terminology by renaming "workspace" to "instance"
across the entire application. This change better reflects that Memos
is a self-hosted tool suitable for personal and non-work use cases.

Breaking Changes:
- API endpoints: /api/v1/workspace/* → /api/v1/instance/*
- gRPC service: WorkspaceService → InstanceService
- Proto types: WorkspaceSetting → InstanceSetting
- Frontend translation keys: workspace-section → instance-section

Backend Changes:
- Renamed proto definitions and regenerated code
- Updated all store layer methods and database drivers
- Renamed service implementations and API handlers
- Updated cache from workspaceSettingCache to instanceSettingCache

Frontend Changes:
- Renamed service client: workspaceServiceClient → instanceServiceClient
- Updated all React components and state management
- Refactored stores: workspace.ts → instance.ts
- Updated all 32 locale translation files

All tests pass and both backend and frontend build successfully.

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

Co-Authored-By: Claude <noreply@anthropic.com>
7 months ago
Claude 739fd2cde6 refactor: update markdown parser
- Removed the `nodes` field from the `Memo` interface in `memo_service.ts`.
- Updated the `createBaseMemo` function and the `Memo` message functions to reflect the removal of `nodes`.
- Cleaned up the serialization and deserialization logic accordingly.

chore: remove code-inspector-plugin from Vite configuration

- Deleted the `codeInspectorPlugin` from the Vite configuration in `vite.config.mts`.
- Simplified the plugins array to include only `react` and `tailwindcss`.
7 months ago
Brandon Sprague 931ddb7c1c
chore: add a new LOG_STACKTRACES option (#4973) 10 months ago
Maximilian Krauß e724a7ef72
fix: disable profiler in production mode (#4925) 10 months ago
Steven bb5809cae4 refactor: attachment service 12 months ago
Johnny f467264e7d chore: remove memopayload runonce 12 months ago
Steven f1b365f928 refactor: clean packages 1 year ago
Steven ef6f80d925 chore: fix linter 1 year ago
Steven ad2c5f0d05 refactor: store cache 1 year ago
Sergey Gorbunov e23ade1f8b
feat: support listening on a UNIX socket (#4654) 1 year ago
RichardYe ebccef6033
fix: shutdown gRPC server gracefully (#4626)
fix: add graceful shutdown for gRPC server
1 year ago
Johnny 0a429a899f chore: remove version update activity 1 year ago
johnnyjoy 3b0be442de chore: update memo payload runner schedule 1 year ago
Johnny e913271f15
refactor: move tags from property to payload (#4229)
* refactor: move tags from property to payload

* chore: fix tests

* chore: drop memo tags

* chore: update

---------

Co-authored-by: Steven <stevenlgtm@gmail.com>
1 year ago
Steven 2b86069f3b chore: update `MaxRecvMsgSize` 2 years ago
Steven 88db037204 chore: fix linter warnings 2 years ago
Steven 4209575244 chore: tweak folder naming style 2 years ago
Steven d11bd30ec6 chore: tweak logger 2 years ago
Steven b376a20fb4 chore: tweak linter warnings 2 years ago
Steven d1280bc04f chore: implement memo property runner 2 years ago
Steven 8bf7cdfd31 feat: add password auth flag 2 years ago
steven 33cd3ed8e3 chore: bump version 2 years ago
Steven 2b4c2b23b2 chore: tweak linter 2 years ago
Ryo 784fcbb698
feat: add panic recovery middleware for grpc and echo server (#3459) 2 years ago
Steven b8763905ba chore: tweak naming 2 years ago
Lincoln Nogueira f45f673aec
chore: respect supplied listening address (#3338) 2 years ago
Steven 4950ea1c74 fix: grpc max message size 2 years ago
Steven 10c57167cc chore: remove unused flags 2 years ago
Steven 74145157a0 chore: add presign background service 2 years ago
Steven 20dd3e17f7 chore: rename router package 2 years ago
Steven ff175bbb7e refactor: update resource binary request handler 2 years ago
Steven 6295979592 chore: add user avatar route 2 years ago
Michael cac6f42770
fix: server matchs 2 years ago
Steven 155c5baf2c refactor: add markdown service 2 years ago
Steven 320963098f refactor: update storage setting 2 years ago
Steven 1b291422e7 refactor: api version 2 years ago
Steven e8dfd579c3 chore: update background services 2 years ago
Steven 2a93b8d720 chore: tweak linter 2 years ago