Skip to content

Add support for Memos v0.25.1 and v0.26.1#56

Open
ccinoo wants to merge 1 commit intoRyoJerryYu:masterfrom
ccinoo:feat/support-v0.26.1
Open

Add support for Memos v0.25.1 and v0.26.1#56
ccinoo wants to merge 1 commit intoRyoJerryYu:masterfrom
ccinoo:feat/support-v0.26.1

Conversation

@ccinoo
Copy link
Copy Markdown

@ccinoo ccinoo commented Feb 10, 2026

This PR adds support for Memos API versions v0.25.1 and v0.26.1, addressing breaking changes in Memos v0.26.0 that migrated from gRPC-Web to Connect protocol.

Changes

v0.25.1 Support

  • Added memos-v0.25.1.ts API client using gRPC-Web with AttachmentService
  • Added MemosFactory0251 and MemosResourceFetcher0251 classes
  • Generated proto definitions from Memos v0.25.1 using buf

v0.26.1 Support

  • Added MemosPaginator0261 class using Obsidian's requestUrl (bypasses CORS)
  • Added MemosResourceFetcher0261 using HTTP /file/ endpoint
  • Added MemosFactory0261 - no gRPC clients needed, uses REST/Connect JSON

Key v0.26.0 Breaking Changes Handled

  1. AuthService: GetCurrentSession -> GetCurrentUser (skipped, not needed)
  2. AttachmentService: GetAttachmentBinary removed (use HTTP /file/ endpoint)
  3. Protocol: Server migrated to connect-rpc (CORS blocks gRPC-Web from Electron)

Settings

  • Updated version dropdown: "v0.25.1": "v0.25.x", "v0.26.1": "v0.26.x and later"
  • Updated PluginSettings type to include v0.25.1 and v0.26.1

Adapter Updates

  • Added attachments property to Memo type (v0.25.1+ uses "attachments" instead of "resources")
  • Added AttachmentCli interface with listAttachments and getAttachmentBinary methods
  • Updated AuthCli to support both getAuthStatus (v0.22.0/v0.24.0) and getCurrentSession (v0.25.1)

This PR adds support for Memos API versions v0.25.1 and v0.26.1, addressing breaking changes in Memos v0.26.0 that migrated from gRPC-Web to Connect protocol.

## Changes

### v0.25.1 Support
- Added `memos-v0.25.1.ts` API client using gRPC-Web with AttachmentService
- Added `MemosFactory0251` and `MemosResourceFetcher0251` classes
- Generated proto definitions from Memos v0.25.1 using buf

### v0.26.1 Support
- Added `MemosPaginator0261` class using Obsidian's requestUrl (bypasses CORS)
- Added `MemosResourceFetcher0261` using HTTP /file/ endpoint
- Added `MemosFactory0261` - no gRPC clients needed, uses REST/Connect JSON

### Key v0.26.0 Breaking Changes Handled
1. **AuthService**: `GetCurrentSession` -> `GetCurrentUser` (skipped, not needed)
2. **AttachmentService**: `GetAttachmentBinary` removed (use HTTP /file/ endpoint)
3. **Protocol**: Server migrated to connect-rpc (CORS blocks gRPC-Web from Electron)

### Settings
- Updated version dropdown: "v0.25.1": "v0.25.x", "v0.26.1": "v0.26.x and later"
- Updated PluginSettings type to include v0.25.1 and v0.26.1

### Adapter Updates
- Added `attachments` property to Memo type (v0.25.1+ uses "attachments" instead of "resources")
- Added `AttachmentCli` interface with `listAttachments` and `getAttachmentBinary` methods
- Updated `AuthCli` to support both `getAuthStatus` (v0.22.0/v0.24.0) and `getCurrentSession` (v0.25.1)
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.

1 participant