mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
docs: update architecture comparison — 5/10 roadmap items done
Update report to reflect all completed work:
- Matrix: streaming ✅, tool registration updated to 29 tools + MCP
- §5.2 Streaming: marked done
- §5.3 Tool System: marked done
- §6 Table: items 1-3 + 5 struck through with commit refs
- §8 Fazit: updated gaps and recommendations
5 of 10 roadmap items complete in one session:
1. SSE Streaming, 2. Dynamic Tool Registry, 3. Budget Enforcement,
5. MCP Server Export (27/29 tools with DB ops), plus Tool Drift Fix.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ce57e11950
commit
acd7e0d6b0
26 changed files with 2744 additions and 661 deletions
|
|
@ -106,6 +106,38 @@ routes.get('/files/:id/download', async (c) => {
|
|||
}
|
||||
});
|
||||
|
||||
// ─── Avatar Upload (profile) ───────────────────────────────
|
||||
|
||||
const ALLOWED_AVATAR_TYPES = new Set(['image/jpeg', 'image/png', 'image/gif', 'image/webp']);
|
||||
|
||||
routes.post('/avatar/upload', async (c) => {
|
||||
const userId = c.get('userId');
|
||||
const formData = await c.req.formData();
|
||||
const file = formData.get('file') as File | null;
|
||||
|
||||
if (!file) return c.json({ error: 'No file' }, 400);
|
||||
if (file.size > 5 * 1024 * 1024) return c.json({ error: 'Max 5MB' }, 400);
|
||||
if (!ALLOWED_AVATAR_TYPES.has(file.type)) {
|
||||
return c.json({ error: 'Invalid file type. Allowed: JPEG, PNG, GIF, WebP' }, 400);
|
||||
}
|
||||
|
||||
try {
|
||||
const buffer = await file.arrayBuffer();
|
||||
const { uploadImageToMedia } = await import('../../lib/media');
|
||||
const result = await uploadImageToMedia(
|
||||
buffer,
|
||||
`avatar-${userId}.${file.name.split('.').pop()}`,
|
||||
{
|
||||
app: 'profile',
|
||||
userId,
|
||||
}
|
||||
);
|
||||
return c.json({ url: result.urls.thumbnail || result.urls.original, mediaId: result.id }, 201);
|
||||
} catch (_err) {
|
||||
return c.json({ error: 'Avatar upload failed' }, 500);
|
||||
}
|
||||
});
|
||||
|
||||
// ─── Version Upload ─────────────────────────────────────────
|
||||
|
||||
routes.post('/files/:id/versions', async (c) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue