Commit graph

180 commits

Author SHA1 Message Date
amblued
76a7629243
feat(instance): persist access mode independently of URL (#6225) 2026-08-22 14:15:31 +08:00
amblued
57a4b7aee6
chore(go): upgrade to Go 1.27 (#6217) 2026-08-20 23:37:02 +08:00
amblued
38412eb75a
fix(storage): proxy S3 attachments through authenticated routes (#6210) 2026-08-18 23:38:35 +08:00
boojack
777d227eb9
feat: add OpenAPI-driven MCP support (#6026) 2026-06-09 09:16:50 +08:00
boojack
2a4638b332 chore: remove MCP server 2026-06-05 08:38:57 +08:00
boojack
bb76949fc0 chore(server): centralize CORS policy 2026-06-04 22:37:41 +08:00
boojack
583c3d24f4
feat(mcp): harden tool exposure and side effects (#5850) 2026-04-18 22:28:35 +08:00
wndnjs0
0fc1dab28b
fix: add unix socket file permission setting (755 -> 660) (#5849) 2026-04-18 13:21:03 +08:00
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.
2026-04-16 22:49:10 +08:00
memoclaw
b8e9ee2b26
feat(mcp): enhance MCP server with full capabilities and new tools (#5720)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:15:52 +08:00
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>
2026-03-03 22:56:12 +08:00
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
2026-02-24 23:08:16 +08:00
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.
2026-02-24 22:54:51 +08:00
Steven
71e8a06463 chore: upgrade Echo v4 to v5.0.3 2026-02-10 09:15:27 +08:00
Johnny
47ebb04dc3 refactor: remove mode flag and introduce explicit demo flag 2026-01-20 22:58:33 +08:00
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.
2025-12-15 10:04:11 +08:00
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>
2025-12-09 08:53:52 +08:00
Johnny
9a100d55be
chore(server): remove profiler code and endpoints (#5244)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 20:17:21 +08:00
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>
2025-11-05 23:35:35 +08:00
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`.
2025-10-26 11:28:40 +08:00
Brandon Sprague
931ddb7c1c
chore: add a new LOG_STACKTRACES option (#4973) 2025-08-07 23:56:21 +08:00
Maximilian Krauß
e724a7ef72
fix: disable profiler in production mode (#4925) 2025-07-29 19:22:41 +08:00
Steven
bb5809cae4 refactor: attachment service 2025-06-17 22:15:19 +08:00
Johnny
f467264e7d chore: remove memopayload runonce 2025-06-16 20:24:57 +08:00
Steven
f1b365f928 refactor: clean packages 2025-05-29 21:44:43 +08:00
Steven
ef6f80d925 chore: fix linter 2025-05-27 23:22:32 +08:00
Steven
ad2c5f0d05 refactor: store cache 2025-05-27 22:06:41 +08:00
Sergey Gorbunov
e23ade1f8b
feat: support listening on a UNIX socket (#4654) 2025-05-07 22:12:05 +08:00
RichardYe
ebccef6033
fix: shutdown gRPC server gracefully (#4626)
fix: add graceful shutdown for gRPC server
2025-04-15 22:58:25 +00:00
Johnny
0a429a899f chore: remove version update activity 2025-02-09 11:48:53 +08:00
johnnyjoy
3b0be442de chore: update memo payload runner schedule 2024-12-26 20:01:15 +08:00
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>
2024-12-24 15:23:15 +00:00
Steven
2b86069f3b chore: update MaxRecvMsgSize 2024-09-29 21:58:06 +08:00
Steven
88db037204 chore: fix linter warnings 2024-09-04 23:31:28 +08:00
Steven
4209575244 chore: tweak folder naming style 2024-09-04 23:29:18 +08:00
Steven
d11bd30ec6 chore: tweak logger 2024-08-28 22:53:57 +08:00
Steven
b376a20fb4 chore: tweak linter warnings 2024-08-20 08:25:34 +08:00
Steven
d1280bc04f chore: implement memo property runner 2024-08-20 08:07:48 +08:00
Steven
8bf7cdfd31 feat: add password auth flag 2024-07-27 19:24:37 +08:00
steven
33cd3ed8e3 chore: bump version 2024-06-21 18:16:35 +08:00
Steven
2b4c2b23b2 chore: tweak linter 2024-05-26 21:39:34 +08:00
Ryo
784fcbb698
feat: add panic recovery middleware for grpc and echo server (#3459) 2024-05-26 21:38:59 +08:00
Steven
b8763905ba chore: tweak naming 2024-05-13 20:03:04 +08:00
Lincoln Nogueira
f45f673aec
chore: respect supplied listening address (#3338) 2024-05-11 06:50:22 +08:00
Steven
4950ea1c74 fix: grpc max message size 2024-05-07 22:10:27 +08:00
Steven
10c57167cc chore: remove unused flags 2024-05-03 07:16:07 +08:00
Steven
74145157a0 chore: add presign background service 2024-05-02 22:08:45 +08:00
Steven
20dd3e17f7 chore: rename router package 2024-05-01 10:28:32 +08:00
Steven
ff175bbb7e refactor: update resource binary request handler 2024-05-01 10:23:56 +08:00
Steven
6295979592 chore: add user avatar route 2024-04-30 22:06:34 +08:00