@dalmasonto/taskflow-mcp 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -258,6 +258,16 @@ export async function updateTaskStatus(params) {
258
258
  return errorResponse(`Cannot transition from "${currentStatus}" to "${params.status}"`, 'INVALID_TRANSITION');
259
259
  }
260
260
  const ts = now();
261
+ // Auto-start a timer session when entering in_progress
262
+ if (params.status === 'in_progress') {
263
+ const existingOpen = db.prepare('SELECT id FROM sessions WHERE task_id = ? AND end IS NULL').get(params.id);
264
+ if (!existingOpen) {
265
+ const result = db.prepare('INSERT INTO sessions (task_id, start, end) VALUES (?, ?, ?)').run(params.id, ts, null);
266
+ const session = db.prepare('SELECT * FROM sessions WHERE id = ?').get(result.lastInsertRowid);
267
+ logActivity('timer_started', row.title, { entityType: 'task', entityId: params.id });
268
+ broadcastChange('timer', 'timer_started', { task_id: params.id, session, task_status: 'in_progress' });
269
+ }
270
+ }
261
271
  // Auto-close any active timer session when leaving an active state
262
272
  const terminalStatuses = ['done', 'partial_done', 'blocked', 'paused'];
263
273
  if (terminalStatuses.includes(params.status)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalmasonto/taskflow-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for TaskFlow — manage projects, tasks, timers, analytics via AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",