feat: dashboard Second Brain, essai 7 jours et vérification e-mail
Rendre le dashboard actionnable (inbox, peek, carte mentale), aligner la facturation sur l’essai 7 jours, et bloquer le login e-mail tant que l’adresse n’est pas confirmée. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -394,7 +394,7 @@ app.get('/', (req, res) => {
|
||||
sessions: '/sessions',
|
||||
},
|
||||
auth: { enabled: config.requireAuth },
|
||||
tools: 22,
|
||||
tools: 29,
|
||||
uptime: process.uptime(),
|
||||
});
|
||||
});
|
||||
@@ -445,25 +445,23 @@ app.all(
|
||||
}
|
||||
|
||||
// Validate tool input if present
|
||||
if (req.body?.method) {
|
||||
const toolName = req.body.method;
|
||||
if (req.body?.params) {
|
||||
const validation = validateAndSanitize(toolName, req.body.params);
|
||||
if (!validation.success) {
|
||||
log('warn', `Validation failed for ${toolName}:`, validation.errors);
|
||||
return res
|
||||
.status(400)
|
||||
.json(
|
||||
mcpError(McpErrors.INVALID_PARAMS.code, {
|
||||
detail: 'Input validation failed',
|
||||
field: validation.errors[0]?.field,
|
||||
context: { toolName, errors: validation.errors },
|
||||
})
|
||||
);
|
||||
}
|
||||
// Update request with sanitized data
|
||||
req.body.params = validation.data;
|
||||
if (req.body?.method === 'tools/call' && req.body?.params?.name && req.body?.params?.arguments) {
|
||||
const toolName = req.body.params.name;
|
||||
const validation = validateAndSanitize(toolName, req.body.params.arguments);
|
||||
if (!validation.success) {
|
||||
log('warn', `Validation failed for ${toolName}:`, validation.errors);
|
||||
return res
|
||||
.status(400)
|
||||
.json(
|
||||
mcpError(McpErrors.INVALID_PARAMS.code, {
|
||||
detail: 'Input validation failed',
|
||||
field: validation.errors[0]?.field,
|
||||
context: { toolName, errors: validation.errors },
|
||||
})
|
||||
);
|
||||
}
|
||||
// Update request with sanitized data
|
||||
req.body.params.arguments = validation.data;
|
||||
}
|
||||
|
||||
const ctx = { userId: req.userSession?.userId || null };
|
||||
@@ -539,7 +537,7 @@ async function main() {
|
||||
Auth: ${config.requireAuth ? 'ENABLED' : 'DISABLED (dev)'}
|
||||
Timeout: ${config.requestTimeout}ms
|
||||
Database: ${isPostgres ? 'PostgreSQL' : 'SQLite'}
|
||||
Tools: 22
|
||||
Tools: 29
|
||||
Features: ${config.enableMetrics ? 'Metrics' : ''}${config.enableAuditLog ? ', Audit Log' : ''}
|
||||
`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user