borja
422747c177
feat: add access control for task completion
...
Users can only complete tasks if they are:
- Assigned to the task, OR
- An active member of the task's group, OR
- An admin (ADMIN_USERS env var)
Changes:
- TaskService.completeTask() now checks assignment, group membership,
and admin status before allowing completion
- Returns 'forbidden' status when unauthorized
- completar command handler shows appropriate error message
- Web path (loadTaskAndGating) gets admin override for consistency
- AdminService.isAdmin() made public for reuse
- Updated tests to respect new access control + 12 new test cases
1 month ago
borja
1c7a7ffdbe
refactor: rename 't configurar' command to 't alarma' with 't recordatorio' as alias
...
- Rename configurar.ts -> alarma.ts, function handleConfigurar -> handleAlarma
- Add 'alarma' and 'recordatorio' aliases in shared.ts; keep 'configurar'/'config' for backward compat
- Update all help text, usage messages, onboarding, docs, and tests
- t alarma, t recordatorio, t configurar, t config all route to the same handler
1 month ago
borja
600bb46b09
resuelve un problema que hacía que no se pudiesen soltar tareas para algunos usuarios y crea tests que vigilan esa posible regresión
1 month ago
borja
fcaafc4600
fix: accept uppercase T/Tarea command prefixes from mobile keyboards
...
Make isTaskCommand in webhook-handler case-insensitive so that 'T ' and
'Tarea ' are recognized as task commands (mobile keyboards auto-capitalize
the first character). Add tests for both variants.
1 month ago
borja
5c1d2f2251
fix: prevent user DMs from being treated as groups in gating
...
handleGroupDiscovery and handleGroupEnforcement lacked isGroupId()
guards, causing user JIDs (e.g. 1234567890@s.whatsapp.net ) to be
incorrectly registered as 'pending' groups in discover mode, and
silently blocked in enforce mode.
Added isGroupId() bail-out at the top of both functions, matching the
existing pattern in ensureGroupActive(). Added 5 regression tests
covering both modes for DMs and preserving correct group behavior.
1 month ago
borja
b7ed1ad013
refactor: webhook handler, group sync, command handlers, tests
...
- Refactor webhook handler with improved error handling and auto-ensure
- Break group-sync into modular services (changes, deactivation, membership, scheduler)
- Add startup.ts bootstrap with health checks and metrics
- Refactor command handlers (nueva, completar, tomar, soltar, ver) for gating/resilience
- Remove unused Svelte UI components (Badge, Skeleton, GroupCard, etc.)
- Add ICS helpers, task helpers, preferences helpers to web lib
- Remove legacy help.ts message service
- Restructure tests: split monolithic server.test.ts into focused files
- Add server test harness and coverage/conformance tests
- Update docs (commands inventory, user guide, operational docs)
- Command trigger simplified to 't' and task name (no slash)
- Add .gitignore entries for fallow, sift, sq artifacts
1 month ago
brobert
82d633124a
Merge remote-tracking branch 'refs/remotes/origin/main'
...
ni idea
4 months ago
brobert
94d0378f40
cambia un test para ser en 2028 y que no falle según pasa el tiempo
4 months ago
borja
93db6a9adb
añade el script bun run test para ejecutar cada test por separado de forma que si alguno falla breakea pero sin que se solapen unos con otros
7 months ago
borja
2875c8eefb
docs: detallar fase D de documentación en el plan de refactor
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
5e504e4c67
fix: asegurar que Headers.entries siempre está disponible
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
95d0951270
fix: declarar entries en Headers en shim de tipos
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
b0397d24d0
fix: ajustar tipos Bun y Request para limpiar typecheck core
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
brobert
199863df00
bun upgrade
7 months ago
borja
8de013cc97
actualiza bun
7 months ago
borja
0816f8fa9e
feat: añade métricas de grupos/usuarios y paneles en Grafana
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
e890703035
docs: añade dashboard grafana de métricas taskbot tasks queue
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
bad86394ef
feat: añade métricas de tareas y cola en /metrics
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
fcf46cdd45
docs: documentar plan de métricas y conjunto core v1
...
Co-authored-by: aider (openrouter/openai/gpt-5.1) <aider@aider.chat>
7 months ago
borja
9883af5d02
feat: añade auto-ensure con reintentos y backoff en webhook
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
borja
ecff2a5643
feat: añadir reintentos en fondo para webhook y tests
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
15c7d638aa
actualiza un test
7 months ago
brobert
844204f60a
feat: usar arranque como último cambio e introducir métrica de edad
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
borja
de9bfba9aa
feat: añadir tests de health-check y documentar métricas/ENV
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
borja
a432ee5a4a
feat: reducir logs a cambios de estado y exponer métricas de Evolution
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
borja
5887072a1e
docs: agregar plan de documentación y internacionalización (Fase D/I)
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
e978d64a9a
cambia t ayuda por t info en un cta
7 months ago
brobert
144215a0b5
limpia 2 css con estilos sin usar
7 months ago
brobert
138eaa7238
test: configurar DB en pruebas y resetear al terminar
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
c241ffbc79
test: inicializar BD en memoria y configurar DB global en command.help
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
4b1374a4a4
docs: refleja finalización del PR 6.5 y lote 6 en plan técnico
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
ea0e492c70
otro bun update
7 months ago
borja
789654cadf
bun update
7 months ago
brobert
4c9f4d1439
refactor: quitar AsyncLocalStorage del locator y dejar currentDb simple
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
ac680ac467
refactor: mantener única DB por suite y limpiar tablas en beforeEach
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
84a5b80cae
fix: evitar contaminación entre pruebas quitando fallback a currentDb
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
fc6f6d8128
fix: permitir fallback a currentDb en tests cuando no hay scope
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
c1083b19d3
fix: evitar usar currentDb en tests al obtener DB
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
dce88e3874
fix: esperar a server.stop() y resetear DB en tests
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
b429053ee2
feat: aislar DB por contexto en tests con AsyncLocalStorage
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
a153163b5e
test: inicializar DB en memoria para pruebas de CommandService
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
5cd8f77b56
test: usa setDb(memdb) para configurar DB en gating
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
c7c960619f
test: configurar DB en tests con setDb y resetDb
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
500018c129
test: configurar BD de pruebas con setDb y resetDb
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
63f330a065
test: usar setDb y resetDb para configurar y limpiar BD en tests
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
39b6251b7b
test: usar setDb y resetDb para gestionar DB en tests
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
2ea389cf7d
fix: configurar DB global en pruebas para evitar DbNotConfiguredError
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
f743fd892b
test: usar setDb y resetDb para configurar DB global en pruebas
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
e8ceec1aff
fix: configurar DB global en tests con setDb y eliminar dbInstance
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago
brobert
e6c7e6e61e
fix: corregir import '../../../src/db' en el test
...
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
7 months ago