@mind-your-now/myn 0.8.1 → 0.8.3
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.
- package/README.md +105 -6
- package/dist/index.js +1 -1
- package/dist/src/tools/debrief.d.ts +1 -0
- package/dist/src/tools/debrief.d.ts.map +1 -1
- package/dist/src/tools/debrief.js +10 -1
- package/dist/src/tools/debrief.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/skills/myn/SKILL.md +12 -10
- package/skills/myn/references/briefing-api.md +11 -183
- package/skills/myn/references/calendar-api.md +177 -55
- package/skills/myn/references/debrief-api.md +182 -0
- package/skills/myn/references/habits-api.md +37 -55
- package/skills/myn/references/household-api.md +37 -14
- package/skills/myn/references/lists-api.md +80 -46
- package/skills/myn/references/memory-api.md +66 -34
- package/skills/myn/references/planning-api.md +58 -155
- package/skills/myn/references/profile-api.md +54 -61
- package/skills/myn/references/projects-api.md +13 -11
- package/skills/myn/references/search-api.md +20 -48
- package/skills/myn/references/tasks-api.md +47 -40
- package/skills/myn/references/timers-api.md +113 -52
- package/skills/myn/references/ynab-api.md +323 -0
|
@@ -11,23 +11,22 @@ Unified search across all MYN entity types with filtering, pagination, and relev
|
|
|
11
11
|
### Search
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
|
|
14
|
+
GET /api/v2/search
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Performs a full-text search across tasks, habits, chores, events, projects, notes, and memories.
|
|
17
|
+
Performs a full-text search across tasks, habits, chores, events, projects, notes, and memories using query parameters.
|
|
18
18
|
|
|
19
|
-
**
|
|
19
|
+
**Query Parameters:**
|
|
20
20
|
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
| `
|
|
24
|
-
| `types` | string
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `filters.dateTo` | date | Results up to this date (YYYY-MM-DD) |
|
|
21
|
+
| Parameter | Type | Description |
|
|
22
|
+
|-----------|------|-------------|
|
|
23
|
+
| `q` | string | **Required.** Search query text |
|
|
24
|
+
| `types` | string | Entity types to search (repeatable). Options: `task`, `habit`, `chore`, `event`, `project`, `note`, `memory`. Omit to search all types. |
|
|
25
|
+
| `status` | string | Filter by status (e.g., `PENDING`, `IN_PROGRESS`, `COMPLETED`, `ARCHIVED`) |
|
|
26
|
+
| `priority` | string | Filter by priority (e.g., `CRITICAL`, `OPPORTUNITY_NOW`, `OVER_THE_HORIZON`, `PARKING_LOT`) |
|
|
27
|
+
| `projectId` | UUID | Filter by project |
|
|
28
|
+
| `dateFrom` | date | Results from this date onward (YYYY-MM-DD) |
|
|
29
|
+
| `dateTo` | date | Results up to this date (YYYY-MM-DD) |
|
|
31
30
|
| `limit` | number | Max results (default: 20, max: 100) |
|
|
32
31
|
| `offset` | number | Pagination offset (default: 0) |
|
|
33
32
|
|
|
@@ -53,45 +52,18 @@ Performs a full-text search across tasks, habits, chores, events, projects, note
|
|
|
53
52
|
|
|
54
53
|
```bash
|
|
55
54
|
# Basic search
|
|
56
|
-
curl -X
|
|
57
|
-
|
|
58
|
-
-H "Content-Type: application/json" \
|
|
59
|
-
-d '{"query": "quarterly report"}'
|
|
55
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
56
|
+
"$MYN_API_URL/api/v2/search?q=quarterly+report"
|
|
60
57
|
|
|
61
58
|
# Search only tasks and notes
|
|
62
|
-
curl -X
|
|
63
|
-
|
|
64
|
-
-H "Content-Type: application/json" \
|
|
65
|
-
-d '{
|
|
66
|
-
"query": "quarterly report",
|
|
67
|
-
"types": ["task", "note"],
|
|
68
|
-
"limit": 10
|
|
69
|
-
}'
|
|
59
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
60
|
+
"$MYN_API_URL/api/v2/search?q=quarterly+report&types=task&types=note&limit=10"
|
|
70
61
|
|
|
71
62
|
# Search with filters
|
|
72
|
-
curl -X
|
|
73
|
-
|
|
74
|
-
-H "Content-Type: application/json" \
|
|
75
|
-
-d '{
|
|
76
|
-
"query": "budget",
|
|
77
|
-
"types": ["task", "project"],
|
|
78
|
-
"filters": {
|
|
79
|
-
"status": "PENDING",
|
|
80
|
-
"priority": "CRITICAL",
|
|
81
|
-
"dateFrom": "2026-01-01",
|
|
82
|
-
"dateTo": "2026-03-31"
|
|
83
|
-
},
|
|
84
|
-
"limit": 50,
|
|
85
|
-
"offset": 0
|
|
86
|
-
}'
|
|
63
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
64
|
+
"$MYN_API_URL/api/v2/search?q=budget&types=task&types=project&status=PENDING&priority=CRITICAL&dateFrom=2026-01-01&dateTo=2026-03-31&limit=50"
|
|
87
65
|
|
|
88
66
|
# Paginated search
|
|
89
|
-
curl -X
|
|
90
|
-
|
|
91
|
-
-H "Content-Type: application/json" \
|
|
92
|
-
-d '{
|
|
93
|
-
"query": "meeting notes",
|
|
94
|
-
"limit": 20,
|
|
95
|
-
"offset": 20
|
|
96
|
-
}'
|
|
67
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
68
|
+
"$MYN_API_URL/api/v2/search?q=meeting+notes&limit=20&offset=20"
|
|
97
69
|
```
|
|
@@ -6,6 +6,10 @@ Unified task management covering Tasks, Habits, and Chores.
|
|
|
6
6
|
|
|
7
7
|
`/api/v2/unified-tasks`
|
|
8
8
|
|
|
9
|
+
## Actions
|
|
10
|
+
|
|
11
|
+
The `myn_tasks` tool supports these actions: `list`, `get`, `create`, `update`, `complete`, `archive`, `search`.
|
|
12
|
+
|
|
9
13
|
## Endpoints
|
|
10
14
|
|
|
11
15
|
### List Tasks
|
|
@@ -18,8 +22,8 @@ GET /api/v2/unified-tasks
|
|
|
18
22
|
|
|
19
23
|
| Parameter | Type | Description |
|
|
20
24
|
|-----------|------|-------------|
|
|
21
|
-
| `status` | string |
|
|
22
|
-
| `priority` | string |
|
|
25
|
+
| `status` | string | `PENDING`, `IN_PROGRESS`, `COMPLETED`, `ARCHIVED` |
|
|
26
|
+
| `priority` | string | `CRITICAL`, `OPPORTUNITY_NOW`, `OVER_THE_HORIZON`, `PARKING_LOT` |
|
|
23
27
|
| `projectId` | UUID | Filter by project |
|
|
24
28
|
| `startDate` | date | Filter by start date (YYYY-MM-DD) |
|
|
25
29
|
| `endDate` | date | Filter by end date (YYYY-MM-DD) |
|
|
@@ -27,13 +31,11 @@ GET /api/v2/unified-tasks
|
|
|
27
31
|
| `offset` | number | Pagination offset (default: 0) |
|
|
28
32
|
|
|
29
33
|
```bash
|
|
30
|
-
# List Critical Now tasks
|
|
31
34
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
32
|
-
"$MYN_API_URL/api/v2/unified-tasks
|
|
35
|
+
"$MYN_API_URL/api/v2/unified-tasks"
|
|
33
36
|
|
|
34
|
-
# List tasks for a date range
|
|
35
37
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
36
|
-
"$MYN_API_URL/api/v2/unified-tasks?
|
|
38
|
+
"$MYN_API_URL/api/v2/unified-tasks?priority=CRITICAL&status=PENDING"
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
### Get Task
|
|
@@ -42,9 +44,11 @@ curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
|
42
44
|
GET /api/v2/unified-tasks/{taskId}
|
|
43
45
|
```
|
|
44
46
|
|
|
47
|
+
The response includes a `stateHash` field for use in write operations (MIN-740 read-before-write guard).
|
|
48
|
+
|
|
45
49
|
```bash
|
|
46
50
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
47
|
-
"$MYN_API_URL/api/v2/unified-tasks/
|
|
51
|
+
"$MYN_API_URL/api/v2/unified-tasks/TASK_ID"
|
|
48
52
|
```
|
|
49
53
|
|
|
50
54
|
### Create Task
|
|
@@ -57,8 +61,7 @@ POST /api/v2/unified-tasks
|
|
|
57
61
|
|
|
58
62
|
| Field | Type | Description |
|
|
59
63
|
|-------|------|-------------|
|
|
60
|
-
| `
|
|
61
|
-
| `title` | string | Task title (1–200 chars) |
|
|
64
|
+
| `title` | string | Task title (1-200 chars) |
|
|
62
65
|
| `taskType` | string | `TASK`, `HABIT`, or `CHORE` |
|
|
63
66
|
| `priority` | string | `CRITICAL`, `OPPORTUNITY_NOW`, `OVER_THE_HORIZON`, `PARKING_LOT` |
|
|
64
67
|
| `startDate` | date | Start date (YYYY-MM-DD) |
|
|
@@ -67,10 +70,15 @@ POST /api/v2/unified-tasks
|
|
|
67
70
|
|
|
68
71
|
| Field | Type | Description |
|
|
69
72
|
|-------|------|-------------|
|
|
73
|
+
| `id` | UUID | Optional (auto-generated if omitted). Do NOT fabricate UUIDs. |
|
|
70
74
|
| `description` | string | Description (max 2000 chars) |
|
|
71
|
-
| `duration` | string | Duration: `"30m"`, `"1h"`, `"1h30m"`
|
|
75
|
+
| `duration` | string | Duration: `"30m"`, `"1h"`, `"1h30m"` |
|
|
72
76
|
| `projectId` | UUID | Assign to project |
|
|
73
77
|
| `recurrenceRule` | string | RRULE for HABIT/CHORE types (**required** for HABIT and CHORE) |
|
|
78
|
+
| `isAutoScheduled` | boolean | Enable auto-scheduling (default: true). Only set false if user explicitly opts out. |
|
|
79
|
+
| `calendarId` | string | Calendar ID to link task to (e.g. "primary") |
|
|
80
|
+
| `calendarName` | string | Calendar name to resolve (e.g. "Family", "Work"). Used instead of calendarId. |
|
|
81
|
+
| `scheduleNames` | string[] | Schedule names to assign (e.g. `["Morning"]`, `["Weekday Evening", "Weekend Morning"]`). Resolved to IDs automatically. |
|
|
74
82
|
|
|
75
83
|
**Type-Specific Rules:**
|
|
76
84
|
|
|
@@ -84,13 +92,14 @@ curl -X POST "$MYN_API_URL/api/v2/unified-tasks" \
|
|
|
84
92
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
85
93
|
-H "Content-Type: application/json" \
|
|
86
94
|
-d '{
|
|
87
|
-
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
88
95
|
"title": "Prepare quarterly report",
|
|
89
96
|
"taskType": "TASK",
|
|
90
97
|
"priority": "CRITICAL",
|
|
91
98
|
"startDate": "2026-03-01",
|
|
92
99
|
"duration": "2h",
|
|
93
|
-
"description": "Q1 financials and projections"
|
|
100
|
+
"description": "Q1 financials and projections",
|
|
101
|
+
"isAutoScheduled": true,
|
|
102
|
+
"scheduleNames": ["Morning"]
|
|
94
103
|
}'
|
|
95
104
|
|
|
96
105
|
# Create a habit
|
|
@@ -98,7 +107,6 @@ curl -X POST "$MYN_API_URL/api/v2/unified-tasks" \
|
|
|
98
107
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
99
108
|
-H "Content-Type: application/json" \
|
|
100
109
|
-d '{
|
|
101
|
-
"id": "660e8400-e29b-41d4-a716-446655440001",
|
|
102
110
|
"title": "Morning meditation",
|
|
103
111
|
"taskType": "HABIT",
|
|
104
112
|
"priority": "OPPORTUNITY_NOW",
|
|
@@ -114,11 +122,17 @@ curl -X POST "$MYN_API_URL/api/v2/unified-tasks" \
|
|
|
114
122
|
PATCH /api/v2/unified-tasks/{taskId}
|
|
115
123
|
```
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
**Uses read-before-write guard** (MIN-740). Reads task first to get `stateHash`, retries on 409.
|
|
126
|
+
|
|
127
|
+
Send only the fields to update via the `updates` object. Allowed fields: `title`, `description`, `priority`, `status`, `startDate`, `endDate`, `duration`, `projectId`, `recurrenceRule`, `isAutoScheduled`, `calendarId`, `location`, `notes`, `tags`, `estimatedMinutes`, `actualMinutes`, `completedAt`, `archivedAt`, `taskType`, `assignedTo`, `scheduledAt`, `dueDate`.
|
|
118
128
|
|
|
119
129
|
```bash
|
|
120
|
-
curl -
|
|
130
|
+
HASH=$(curl -s -H "X-API-KEY: $MYN_API_KEY" \
|
|
131
|
+
"$MYN_API_URL/api/v2/unified-tasks/TASK_ID" | jq -r .stateHash)
|
|
132
|
+
|
|
133
|
+
curl -X PATCH "$MYN_API_URL/api/v2/unified-tasks/TASK_ID" \
|
|
121
134
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
135
|
+
-H "X-MYN-State-Hash: $HASH" \
|
|
122
136
|
-H "Content-Type: application/json" \
|
|
123
137
|
-d '{"priority": "OPPORTUNITY_NOW", "startDate": "2026-03-05"}'
|
|
124
138
|
```
|
|
@@ -129,9 +143,15 @@ curl -X PATCH "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-4466554
|
|
|
129
143
|
POST /api/v2/unified-tasks/{taskId}/complete
|
|
130
144
|
```
|
|
131
145
|
|
|
146
|
+
**Uses read-before-write guard** (MIN-740).
|
|
147
|
+
|
|
132
148
|
```bash
|
|
133
|
-
curl -
|
|
149
|
+
HASH=$(curl -s -H "X-API-KEY: $MYN_API_KEY" \
|
|
150
|
+
"$MYN_API_URL/api/v2/unified-tasks/TASK_ID" | jq -r .stateHash)
|
|
151
|
+
|
|
152
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks/TASK_ID/complete" \
|
|
134
153
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
154
|
+
-H "X-MYN-State-Hash: $HASH" \
|
|
135
155
|
-H "Content-Type: application/json" \
|
|
136
156
|
-d '{}'
|
|
137
157
|
```
|
|
@@ -142,8 +162,10 @@ curl -X POST "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-44665544
|
|
|
142
162
|
POST /api/v2/unified-tasks/{taskId}/archive
|
|
143
163
|
```
|
|
144
164
|
|
|
165
|
+
**Uses read-before-write guard** (MIN-740).
|
|
166
|
+
|
|
145
167
|
```bash
|
|
146
|
-
curl -X POST "$MYN_API_URL/api/v2/unified-tasks/
|
|
168
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks/TASK_ID/archive" \
|
|
147
169
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
148
170
|
-H "Content-Type: application/json" \
|
|
149
171
|
-d '{}'
|
|
@@ -157,31 +179,16 @@ GET /api/v2/search
|
|
|
157
179
|
|
|
158
180
|
See [search-api.md](search-api.md) for full search documentation.
|
|
159
181
|
|
|
160
|
-
|
|
161
|
-
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
162
|
-
"$MYN_API_URL/api/v2/search?q=quarterly+report&limit=10"
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Get Habit Streak
|
|
182
|
+
**Query Parameters:**
|
|
166
183
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
184
|
+
| Parameter | Type | Description |
|
|
185
|
+
|-----------|------|-------------|
|
|
186
|
+
| `q` | string | Search query |
|
|
187
|
+
| `includeArchived` | boolean | Include archived results (default: false) |
|
|
188
|
+
| `limit` | number | Max results (default: 20) |
|
|
189
|
+
| `offset` | number | Pagination offset (default: 0) |
|
|
170
190
|
|
|
171
191
|
```bash
|
|
172
192
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
173
|
-
"$MYN_API_URL/api/v2/
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Move Task to Project
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
PUT /api/v2/unified-tasks/{taskId}/project
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
curl -X PUT "$MYN_API_URL/api/v2/unified-tasks/550e8400-e29b-41d4-a716-446655440000/project" \
|
|
184
|
-
-H "X-API-KEY: $MYN_API_KEY" \
|
|
185
|
-
-H "Content-Type: application/json" \
|
|
186
|
-
-d '{"projectId": "770e8400-e29b-41d4-a716-446655440002"}'
|
|
193
|
+
"$MYN_API_URL/api/v2/search?q=quarterly+report&limit=10"
|
|
187
194
|
```
|
|
@@ -6,6 +6,10 @@ Countdown timers, alarms, and Pomodoro sessions.
|
|
|
6
6
|
|
|
7
7
|
`/api/v2/timers`
|
|
8
8
|
|
|
9
|
+
## Actions
|
|
10
|
+
|
|
11
|
+
The `myn_timers` tool supports these actions: `create_countdown`, `create_alarm`, `list`, `cancel`, `snooze`, `pomodoro`.
|
|
12
|
+
|
|
9
13
|
## Endpoints
|
|
10
14
|
|
|
11
15
|
### List Active Timers
|
|
@@ -24,7 +28,7 @@ Returns all active timers for the current user.
|
|
|
24
28
|
| `timers[].timerId` | UUID | Timer identifier |
|
|
25
29
|
| `timers[].type` | string | `COUNTDOWN`, `ALARM`, or `POMODORO` |
|
|
26
30
|
| `timers[].label` | string | User-defined label (nullable) |
|
|
27
|
-
| `timers[].status` | string | Current status
|
|
31
|
+
| `timers[].status` | string | Current status |
|
|
28
32
|
| `timers[].duration` | number | Total duration in seconds (COUNTDOWN/POMODORO) |
|
|
29
33
|
| `timers[].remaining` | number | Seconds remaining (COUNTDOWN/POMODORO) |
|
|
30
34
|
| `timers[].endTime` | datetime | When the timer will fire (COUNTDOWN) |
|
|
@@ -40,15 +44,13 @@ curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
|
40
44
|
"$MYN_API_URL/api/v2/timers"
|
|
41
45
|
```
|
|
42
46
|
|
|
43
|
-
### Create Timer
|
|
47
|
+
### Create Countdown Timer
|
|
44
48
|
|
|
45
49
|
```
|
|
46
|
-
POST /api/v2/timers
|
|
50
|
+
POST /api/v2/timers/countdown
|
|
47
51
|
```
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
#### Countdown Timer
|
|
53
|
+
**Body Parameters:**
|
|
52
54
|
|
|
53
55
|
| Field | Type | Description |
|
|
54
56
|
|-------|------|-------------|
|
|
@@ -56,9 +58,30 @@ Creates a new timer. The request body varies by timer type.
|
|
|
56
58
|
| `duration` | number | **Required.** Duration in seconds |
|
|
57
59
|
| `label` | string | Optional label |
|
|
58
60
|
|
|
61
|
+
**Tool Parameters:**
|
|
62
|
+
|
|
63
|
+
| Parameter | Type | Description |
|
|
64
|
+
|-----------|------|-------------|
|
|
65
|
+
| `duration` | number | Duration in seconds |
|
|
66
|
+
| `durationMinutes` | number | Duration in minutes (converted to seconds automatically) |
|
|
67
|
+
| `label` | string | Timer label/description |
|
|
68
|
+
|
|
69
|
+
One of `duration` or `durationMinutes` is required.
|
|
70
|
+
|
|
71
|
+
**Response Fields:**
|
|
72
|
+
|
|
73
|
+
| Field | Type | Description |
|
|
74
|
+
|-------|------|-------------|
|
|
75
|
+
| `timerId` | UUID | Timer identifier |
|
|
76
|
+
| `type` | string | `"COUNTDOWN"` |
|
|
77
|
+
| `duration` | number | Duration in seconds |
|
|
78
|
+
| `endTime` | datetime | When the timer will fire |
|
|
79
|
+
| `label` | string | Timer label (nullable) |
|
|
80
|
+
| `status` | string | `ACTIVE`, `PAUSED`, or `COMPLETED` |
|
|
81
|
+
|
|
59
82
|
```bash
|
|
60
83
|
# 25-minute countdown
|
|
61
|
-
curl -X POST "$MYN_API_URL/api/v2/timers" \
|
|
84
|
+
curl -X POST "$MYN_API_URL/api/v2/timers/countdown" \
|
|
62
85
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
63
86
|
-H "Content-Type: application/json" \
|
|
64
87
|
-d '{
|
|
@@ -68,76 +91,67 @@ curl -X POST "$MYN_API_URL/api/v2/timers" \
|
|
|
68
91
|
}'
|
|
69
92
|
```
|
|
70
93
|
|
|
71
|
-
|
|
94
|
+
### Create Alarm
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
POST /api/v2/timers/alarm
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Body Parameters:**
|
|
72
101
|
|
|
73
102
|
| Field | Type | Description |
|
|
74
103
|
|-------|------|-------------|
|
|
75
|
-
| `
|
|
104
|
+
| `name` | string | Alarm name (defaults to "Alarm" from label) |
|
|
76
105
|
| `alarmTime` | datetime | **Required.** When the alarm should fire (ISO 8601) |
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
|
|
106
|
+
| `recurrence` | string | Optional recurrence pattern (e.g., "daily", "weekdays") |
|
|
107
|
+
| `completionSound` | string | Optional alarm sound name |
|
|
108
|
+
|
|
109
|
+
**Response Fields:**
|
|
110
|
+
|
|
111
|
+
| Field | Type | Description |
|
|
112
|
+
|-------|------|-------------|
|
|
113
|
+
| `timerId` | UUID | Timer identifier |
|
|
114
|
+
| `type` | string | `"ALARM"` |
|
|
115
|
+
| `alarmTime` | datetime | When the alarm will fire |
|
|
116
|
+
| `label` | string | Alarm label (nullable) |
|
|
117
|
+
| `recurrence` | string | Recurrence pattern (nullable) |
|
|
118
|
+
| `status` | string | `ACTIVE`, `TRIGGERED`, or `SNOOZED` |
|
|
80
119
|
|
|
81
120
|
```bash
|
|
82
121
|
# One-time alarm
|
|
83
|
-
curl -X POST "$MYN_API_URL/api/v2/timers" \
|
|
122
|
+
curl -X POST "$MYN_API_URL/api/v2/timers/alarm" \
|
|
84
123
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
85
124
|
-H "Content-Type: application/json" \
|
|
86
125
|
-d '{
|
|
87
|
-
"
|
|
88
|
-
"alarmTime": "2026-03-02T07:00:00Z"
|
|
89
|
-
"label": "Morning wake-up"
|
|
126
|
+
"name": "Morning wake-up",
|
|
127
|
+
"alarmTime": "2026-03-02T07:00:00Z"
|
|
90
128
|
}'
|
|
91
129
|
|
|
92
130
|
# Recurring weekday alarm
|
|
93
|
-
curl -X POST "$MYN_API_URL/api/v2/timers" \
|
|
131
|
+
curl -X POST "$MYN_API_URL/api/v2/timers/alarm" \
|
|
94
132
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
95
133
|
-H "Content-Type: application/json" \
|
|
96
134
|
-d '{
|
|
97
|
-
"
|
|
135
|
+
"name": "Standup reminder",
|
|
98
136
|
"alarmTime": "2026-03-02T08:30:00Z",
|
|
99
|
-
"label": "Standup reminder",
|
|
100
137
|
"recurrence": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
|
|
101
138
|
}'
|
|
102
139
|
```
|
|
103
140
|
|
|
104
|
-
#### Pomodoro Timer
|
|
105
|
-
|
|
106
|
-
| Field | Type | Description |
|
|
107
|
-
|-------|------|-------------|
|
|
108
|
-
| `type` | string | **Required.** `"POMODORO"` |
|
|
109
|
-
| `workDuration` | number | **Required.** Work phase duration in seconds |
|
|
110
|
-
| `breakDuration` | number | **Required.** Short break duration in seconds |
|
|
111
|
-
| `longBreakDuration` | number | **Required.** Long break duration in seconds (after all sessions) |
|
|
112
|
-
| `sessions` | number | Number of work sessions before long break (default: 4) |
|
|
113
|
-
| `autoStart` | boolean | Auto-start next phase (default: false) |
|
|
114
|
-
| `label` | string | Optional label |
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Standard Pomodoro: 25min work, 5min break, 15min long break, 4 sessions
|
|
118
|
-
curl -X POST "$MYN_API_URL/api/v2/timers" \
|
|
119
|
-
-H "X-API-KEY: $MYN_API_KEY" \
|
|
120
|
-
-H "Content-Type: application/json" \
|
|
121
|
-
-d '{
|
|
122
|
-
"type": "POMODORO",
|
|
123
|
-
"workDuration": 1500,
|
|
124
|
-
"breakDuration": 300,
|
|
125
|
-
"longBreakDuration": 900,
|
|
126
|
-
"sessions": 4,
|
|
127
|
-
"autoStart": true,
|
|
128
|
-
"label": "Deep work block"
|
|
129
|
-
}'
|
|
130
|
-
```
|
|
131
|
-
|
|
132
141
|
### Cancel Timer
|
|
133
142
|
|
|
134
143
|
```
|
|
135
|
-
|
|
144
|
+
POST /api/v2/timers/{timerId}/cancel
|
|
136
145
|
```
|
|
137
146
|
|
|
147
|
+
**Uses read-before-write guard** -- reads timer state hash before cancelling.
|
|
148
|
+
|
|
149
|
+
**Response:** `{ timerId, status }`
|
|
150
|
+
|
|
138
151
|
```bash
|
|
139
|
-
curl -X
|
|
140
|
-
-H "X-API-KEY: $MYN_API_KEY"
|
|
152
|
+
curl -X POST "$MYN_API_URL/api/v2/timers/TIMER_ID/cancel" \
|
|
153
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
154
|
+
-H "X-MYN-State-Hash: abc123"
|
|
141
155
|
```
|
|
142
156
|
|
|
143
157
|
### Snooze Timer
|
|
@@ -148,6 +162,8 @@ POST /api/v2/timers/{timerId}/snooze
|
|
|
148
162
|
|
|
149
163
|
Snoozes a ringing alarm or timer.
|
|
150
164
|
|
|
165
|
+
**Uses read-before-write guard** -- reads timer state hash before snoozing.
|
|
166
|
+
|
|
151
167
|
**Body Parameters:**
|
|
152
168
|
|
|
153
169
|
| Field | Type | Description |
|
|
@@ -163,9 +179,54 @@ Snoozes a ringing alarm or timer.
|
|
|
163
179
|
| `status` | string | `"SNOOZED"` |
|
|
164
180
|
|
|
165
181
|
```bash
|
|
166
|
-
|
|
167
|
-
curl -X POST "$MYN_API_URL/api/v2/timers/550e8400-e29b-41d4-a716-446655440000/snooze" \
|
|
182
|
+
curl -X POST "$MYN_API_URL/api/v2/timers/TIMER_ID/snooze" \
|
|
168
183
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
184
|
+
-H "X-MYN-State-Hash: abc123" \
|
|
169
185
|
-H "Content-Type: application/json" \
|
|
170
186
|
-d '{"snoozeMinutes": 10}'
|
|
171
187
|
```
|
|
188
|
+
|
|
189
|
+
### Create Pomodoro Timer
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
POST /api/v2/timers/countdown
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Creates a Pomodoro timer (uses the countdown endpoint with `type: "POMODORO"`).
|
|
196
|
+
|
|
197
|
+
**Body Parameters:**
|
|
198
|
+
|
|
199
|
+
| Field | Type | Description |
|
|
200
|
+
|-------|------|-------------|
|
|
201
|
+
| `type` | string | **Required.** `"POMODORO"` |
|
|
202
|
+
| `workDuration` | number | Work phase in seconds (tool accepts minutes, auto-converts) |
|
|
203
|
+
| `breakDuration` | number | Short break in seconds (tool accepts minutes, auto-converts) |
|
|
204
|
+
| `longBreakDuration` | number | Long break in seconds (tool accepts minutes, auto-converts) |
|
|
205
|
+
| `sessions` | number | Number of work sessions (default: 4) |
|
|
206
|
+
| `autoStart` | boolean | Auto-start next phase (default: false) |
|
|
207
|
+
| `label` | string | Optional label |
|
|
208
|
+
|
|
209
|
+
**Tool Parameters (in minutes):**
|
|
210
|
+
|
|
211
|
+
| Parameter | Type | Default | Description |
|
|
212
|
+
|-----------|------|---------|-------------|
|
|
213
|
+
| `workDuration` | number | 25 | Work duration in minutes |
|
|
214
|
+
| `breakDuration` | number | 5 | Break duration in minutes |
|
|
215
|
+
| `longBreakDuration` | number | 15 | Long break duration in minutes |
|
|
216
|
+
| `sessions` | number | 4 | Number of pomodoro sessions |
|
|
217
|
+
| `autoStart` | boolean | false | Auto-start next phase |
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
curl -X POST "$MYN_API_URL/api/v2/timers/countdown" \
|
|
221
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
222
|
+
-H "Content-Type: application/json" \
|
|
223
|
+
-d '{
|
|
224
|
+
"type": "POMODORO",
|
|
225
|
+
"workDuration": 1500,
|
|
226
|
+
"breakDuration": 300,
|
|
227
|
+
"longBreakDuration": 900,
|
|
228
|
+
"sessions": 4,
|
|
229
|
+
"autoStart": true,
|
|
230
|
+
"label": "Deep work block"
|
|
231
|
+
}'
|
|
232
|
+
```
|