@mind-your-now/myn 0.8.2 → 0.8.4
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.js +2 -2
- package/dist/src/tools/debrief.js.map +1 -1
- package/dist/src/tools/habits.js +2 -2
- package/dist/src/tools/habits.js.map +1 -1
- package/dist/src/tools/household.js +3 -3
- package/dist/src/tools/household.js.map +1 -1
- package/dist/src/tools/lists.js +2 -2
- package/dist/src/tools/lists.js.map +1 -1
- package/dist/src/tools/memory.js +1 -1
- package/dist/src/tools/memory.js.map +1 -1
- package/dist/src/tools/planning.js +1 -1
- package/dist/src/tools/planning.js.map +1 -1
- package/dist/src/tools/projects.js +4 -4
- package/dist/src/tools/projects.js.map +1 -1
- package/dist/src/tools/tasks.js +2 -2
- package/dist/src/tools/tasks.js.map +1 -1
- package/dist/src/tools/timers.js +1 -1
- package/dist/src/tools/timers.js.map +1 -1
- package/dist/src/validation.d.ts.map +1 -1
- package/dist/src/validation.js +3 -2
- package/dist/src/validation.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
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Daily Debrief API
|
|
2
|
+
|
|
3
|
+
Daily Debrief system for AI-generated daily planning sessions with corrections and completion tracking.
|
|
4
|
+
|
|
5
|
+
## Base Path
|
|
6
|
+
|
|
7
|
+
`/api/v2/debrief`
|
|
8
|
+
|
|
9
|
+
## Actions
|
|
10
|
+
|
|
11
|
+
The `myn_debrief` tool supports these actions: `status`, `generate`, `get`, `apply_correction`, `complete_session`.
|
|
12
|
+
|
|
13
|
+
## Endpoints
|
|
14
|
+
|
|
15
|
+
### Get Session Status
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
GET /api/v2/debrief/status
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Returns the current debrief session state.
|
|
22
|
+
|
|
23
|
+
**Response Fields:**
|
|
24
|
+
|
|
25
|
+
| Field | Type | Description |
|
|
26
|
+
|-------|------|-------------|
|
|
27
|
+
| `hasActiveSession` | boolean | Whether a debrief session is currently active |
|
|
28
|
+
| `sessionId` | UUID | Current session ID (nullable) |
|
|
29
|
+
| `lastDebriefId` | UUID | ID of the most recent debrief (nullable) |
|
|
30
|
+
| `lastDebriefTime` | datetime | Timestamp of the most recent debrief (nullable) |
|
|
31
|
+
| `pendingCorrections` | number | Count of unprocessed corrections |
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
35
|
+
"$MYN_API_URL/api/v2/debrief/status"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Generate Debrief
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
POST /api/v2/debrief/generate
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Generates a new Daily Debrief with prioritized task lists and suggestions.
|
|
45
|
+
|
|
46
|
+
**Body Parameters:**
|
|
47
|
+
|
|
48
|
+
| Field | Type | Description |
|
|
49
|
+
|-------|------|-------------|
|
|
50
|
+
| `type` | string | Debrief type: `DAILY`, `EVENING`, `WEEKLY`, `WEEKLY_AND_DAILY`, `ON_DEMAND` (default: `DAILY`) |
|
|
51
|
+
| `context` | string | Optional context to guide the debrief (e.g., "busy morning, meetings after 2pm") |
|
|
52
|
+
| `focusAreas` | string[] | Optional focus areas to emphasize (e.g., `["health", "work deadlines"]`) |
|
|
53
|
+
|
|
54
|
+
**Response Fields:**
|
|
55
|
+
|
|
56
|
+
| Field | Type | Description |
|
|
57
|
+
|-------|------|-------------|
|
|
58
|
+
| `debriefId` | UUID | Unique debrief identifier |
|
|
59
|
+
| `sessionId` | UUID | Session this debrief belongs to |
|
|
60
|
+
| `summary` | string | Natural language summary of the day |
|
|
61
|
+
| `criticalNow` | object[] | Tasks requiring immediate attention |
|
|
62
|
+
| `opportunityNow` | object[] | Tasks worth doing if time allows |
|
|
63
|
+
| `overTheHorizon` | object[] | Tasks to keep in mind for later |
|
|
64
|
+
| `upcomingMeetings` | object[] | Meetings and calendar events today |
|
|
65
|
+
| `habitsDue` | object[] | Habits scheduled for today |
|
|
66
|
+
| `suggestions` | string[] | AI-generated actionable suggestions |
|
|
67
|
+
| `createdAt` | datetime | Debrief generation timestamp |
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Generate a basic daily debrief
|
|
71
|
+
curl -X POST "$MYN_API_URL/api/v2/debrief/generate" \
|
|
72
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
73
|
+
-H "Content-Type: application/json" \
|
|
74
|
+
-d '{"type": "DAILY"}'
|
|
75
|
+
|
|
76
|
+
# Generate with context and focus areas
|
|
77
|
+
curl -X POST "$MYN_API_URL/api/v2/debrief/generate" \
|
|
78
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
79
|
+
-H "Content-Type: application/json" \
|
|
80
|
+
-d '{
|
|
81
|
+
"type": "DAILY",
|
|
82
|
+
"context": "Working from home today, low energy",
|
|
83
|
+
"focusAreas": ["health", "project deadlines"]
|
|
84
|
+
}'
|
|
85
|
+
|
|
86
|
+
# Evening debrief
|
|
87
|
+
curl -X POST "$MYN_API_URL/api/v2/debrief/generate" \
|
|
88
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
89
|
+
-H "Content-Type: application/json" \
|
|
90
|
+
-d '{"type": "EVENING"}'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Get Current Debrief
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
GET /api/v2/debrief/current
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Returns the most recent debrief without generating a new one. Used both for the `get` action (with or without `debriefId`).
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
103
|
+
"$MYN_API_URL/api/v2/debrief/current"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Submit Correction
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
POST /api/v2/debrief/corrections/apply
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Submits a correction to update the active debrief session when reality diverges from the plan.
|
|
113
|
+
|
|
114
|
+
**Uses read-before-write guard** -- reads current debrief state hash before applying.
|
|
115
|
+
|
|
116
|
+
**Body Parameters:**
|
|
117
|
+
|
|
118
|
+
| Field | Type | Description |
|
|
119
|
+
|-------|------|-------------|
|
|
120
|
+
| `type` | string | **Required.** One of: `TASK_COMPLETED`, `TASK_MISSED`, `TASK_RESCHEDULED`, `TASK_ADDED`, `PRIORITY_CHANGED`, `OTHER` |
|
|
121
|
+
| `data` | object | Optional data relevant to the correction type (e.g., `{"taskId": "..."}`) |
|
|
122
|
+
| `reason` | string | Optional human-readable reason for the correction |
|
|
123
|
+
|
|
124
|
+
**Response Fields:**
|
|
125
|
+
|
|
126
|
+
| Field | Type | Description |
|
|
127
|
+
|-------|------|-------------|
|
|
128
|
+
| `correctionId` | UUID | Unique correction identifier |
|
|
129
|
+
| `appliedAt` | datetime | When the correction was applied |
|
|
130
|
+
| `debriefUpdated` | boolean | Whether the active debrief was re-ranked |
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
curl -X POST "$MYN_API_URL/api/v2/debrief/corrections/apply" \
|
|
134
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
135
|
+
-H "X-MYN-State-Hash: abc123" \
|
|
136
|
+
-H "Content-Type: application/json" \
|
|
137
|
+
-d '{
|
|
138
|
+
"type": "TASK_COMPLETED",
|
|
139
|
+
"data": {"taskId": "550e8400-e29b-41d4-a716-446655440000"},
|
|
140
|
+
"reason": "Finished the report early"
|
|
141
|
+
}'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Complete Session
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
POST /api/v2/debrief/complete
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Ends the active debrief session with an optional summary and decisions record.
|
|
151
|
+
|
|
152
|
+
**Uses read-before-write guard** -- reads current debrief state hash before completing.
|
|
153
|
+
|
|
154
|
+
**Body Parameters:**
|
|
155
|
+
|
|
156
|
+
| Field | Type | Description |
|
|
157
|
+
|-------|------|-------------|
|
|
158
|
+
| `summary` | string | Optional end-of-session summary |
|
|
159
|
+
| `decisions` | string[] | Optional list of key decisions made during the session |
|
|
160
|
+
|
|
161
|
+
**Response Fields:**
|
|
162
|
+
|
|
163
|
+
| Field | Type | Description |
|
|
164
|
+
|-------|------|-------------|
|
|
165
|
+
| `sessionId` | UUID | The completed session ID |
|
|
166
|
+
| `completedAt` | datetime | Session completion timestamp |
|
|
167
|
+
| `nextSessionRecommended` | datetime | Suggested time for next debrief (nullable) |
|
|
168
|
+
| `followUps` | object[] | Auto-generated follow-up items |
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
curl -X POST "$MYN_API_URL/api/v2/debrief/complete" \
|
|
172
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
173
|
+
-H "X-MYN-State-Hash: abc123" \
|
|
174
|
+
-H "Content-Type: application/json" \
|
|
175
|
+
-d '{
|
|
176
|
+
"summary": "Productive morning, cleared all Critical Now items",
|
|
177
|
+
"decisions": [
|
|
178
|
+
"Postponed quarterly review to Friday",
|
|
179
|
+
"Delegated invoice follow-up to Sarah"
|
|
180
|
+
]
|
|
181
|
+
}'
|
|
182
|
+
```
|
|
@@ -2,49 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Habit streaks, habit chains, scheduling, and reminders.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Actions
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- Reminders: `/api/habits/reminders`
|
|
7
|
+
The `myn_habits` tool supports these actions: `streaks`, `skip`, `chains`, `schedule`, `reminders`.
|
|
9
8
|
|
|
10
9
|
## Endpoints
|
|
11
10
|
|
|
12
|
-
###
|
|
11
|
+
### Get Habit Streak
|
|
13
12
|
|
|
14
13
|
```
|
|
15
|
-
GET /api/
|
|
14
|
+
GET /api/v2/unified-tasks/{habitId}/streak
|
|
16
15
|
```
|
|
17
16
|
|
|
18
|
-
Returns streak data for
|
|
19
|
-
|
|
20
|
-
**Response Fields:**
|
|
21
|
-
|
|
22
|
-
| Field | Type | Description |
|
|
23
|
-
|-------|------|-------------|
|
|
24
|
-
| `habits` | object[] | Array of habit streak objects |
|
|
25
|
-
| `habits[].habitId` | UUID | Habit identifier |
|
|
26
|
-
| `habits[].title` | string | Habit title |
|
|
27
|
-
| `habits[].currentStreak` | number | Current consecutive completions |
|
|
28
|
-
| `habits[].longestStreak` | number | All-time longest streak |
|
|
29
|
-
| `habits[].totalCompletions` | number | Total times completed |
|
|
30
|
-
| `habits[].lastCompletedAt` | datetime | Last completion timestamp |
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
34
|
-
"$MYN_API_URL/api/v1/habit-chains/streaks"
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Get Specific Habit Streak
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
GET /api/v1/habit-chains/{habitId}/streaks
|
|
41
|
-
```
|
|
17
|
+
Returns streak data for a specific habit. Requires `habitId`.
|
|
42
18
|
|
|
43
19
|
**Query Parameters:**
|
|
44
20
|
|
|
45
21
|
| Parameter | Type | Description |
|
|
46
22
|
|-----------|------|-------------|
|
|
47
|
-
| `includeHistory` | boolean | Include day-by-day streak history |
|
|
23
|
+
| `includeHistory` | boolean | Include day-by-day streak history (default: false) |
|
|
48
24
|
|
|
49
25
|
**Response Fields:**
|
|
50
26
|
|
|
@@ -54,7 +30,7 @@ GET /api/v1/habit-chains/{habitId}/streaks
|
|
|
54
30
|
| `currentStreak` | number | Current consecutive completions |
|
|
55
31
|
| `longestStreak` | number | All-time longest streak |
|
|
56
32
|
| `totalCompletions` | number | Total times completed |
|
|
57
|
-
| `lastCompletedAt` | datetime | Last completion timestamp |
|
|
33
|
+
| `lastCompletedAt` | datetime | Last completion timestamp (nullable) |
|
|
58
34
|
| `streakHistory` | object[] | Day-by-day history (only if `includeHistory=true`) |
|
|
59
35
|
| `streakHistory[].date` | date | Calendar date |
|
|
60
36
|
| `streakHistory[].completed` | boolean | Whether the habit was completed that day |
|
|
@@ -62,26 +38,30 @@ GET /api/v1/habit-chains/{habitId}/streaks
|
|
|
62
38
|
```bash
|
|
63
39
|
# Basic streak info
|
|
64
40
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
65
|
-
"$MYN_API_URL/api/
|
|
41
|
+
"$MYN_API_URL/api/v2/unified-tasks/HABIT_ID/streak"
|
|
66
42
|
|
|
67
43
|
# With full history
|
|
68
44
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
69
|
-
"$MYN_API_URL/api/
|
|
45
|
+
"$MYN_API_URL/api/v2/unified-tasks/HABIT_ID/streak?includeHistory=true"
|
|
70
46
|
```
|
|
71
47
|
|
|
48
|
+
**Note:** There is no bulk streaks endpoint. Use the `schedule` action to see all habits.
|
|
49
|
+
|
|
72
50
|
### Skip Habit (Preserve Streak)
|
|
73
51
|
|
|
74
52
|
```
|
|
75
|
-
POST /api/
|
|
53
|
+
POST /api/v2/unified-tasks/{habitId}/skip
|
|
76
54
|
```
|
|
77
55
|
|
|
78
56
|
Marks a habit as skipped for a day without breaking the streak.
|
|
79
57
|
|
|
58
|
+
**Required:** `habitId`
|
|
59
|
+
|
|
80
60
|
**Body Parameters:**
|
|
81
61
|
|
|
82
62
|
| Field | Type | Description |
|
|
83
63
|
|-------|------|-------------|
|
|
84
|
-
| `skipDate` | date | Date to skip (
|
|
64
|
+
| `skipDate` | date | Date to skip (YYYY-MM-DD, default: today) |
|
|
85
65
|
| `reason` | string | Optional reason for skipping |
|
|
86
66
|
|
|
87
67
|
**Response Fields:**
|
|
@@ -94,7 +74,7 @@ Marks a habit as skipped for a day without breaking the streak.
|
|
|
94
74
|
| `newStreakCount` | number | Updated streak count |
|
|
95
75
|
|
|
96
76
|
```bash
|
|
97
|
-
curl -X POST "$MYN_API_URL/api/
|
|
77
|
+
curl -X POST "$MYN_API_URL/api/v2/unified-tasks/HABIT_ID/skip" \
|
|
98
78
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
99
79
|
-H "Content-Type: application/json" \
|
|
100
80
|
-d '{
|
|
@@ -106,7 +86,7 @@ curl -X POST "$MYN_API_URL/api/v1/habit-chains/660e8400-e29b-41d4-a716-446655440
|
|
|
106
86
|
### List All Chains
|
|
107
87
|
|
|
108
88
|
```
|
|
109
|
-
GET /api/
|
|
89
|
+
GET /api/habits/chains
|
|
110
90
|
```
|
|
111
91
|
|
|
112
92
|
Returns all habit chains (grouped sequences of habits).
|
|
@@ -120,17 +100,17 @@ Returns all habit chains (grouped sequences of habits).
|
|
|
120
100
|
| `chains[].name` | string | Chain name |
|
|
121
101
|
| `chains[].habitCount` | number | Number of habits in the chain |
|
|
122
102
|
| `chains[].totalCompletions` | number | Total completions across all habits |
|
|
123
|
-
| `chains[].lastCompletedAt` | datetime | Last completion in this chain |
|
|
103
|
+
| `chains[].lastCompletedAt` | datetime | Last completion in this chain (nullable) |
|
|
124
104
|
|
|
125
105
|
```bash
|
|
126
106
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
127
|
-
"$MYN_API_URL/api/
|
|
107
|
+
"$MYN_API_URL/api/habits/chains"
|
|
128
108
|
```
|
|
129
109
|
|
|
130
110
|
### Get Specific Chain
|
|
131
111
|
|
|
132
112
|
```
|
|
133
|
-
GET /api/
|
|
113
|
+
GET /api/habits/chains/{chainId}/status
|
|
134
114
|
```
|
|
135
115
|
|
|
136
116
|
**Response Fields:**
|
|
@@ -149,13 +129,13 @@ GET /api/v1/habit-chains/{chainId}
|
|
|
149
129
|
|
|
150
130
|
```bash
|
|
151
131
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
152
|
-
"$MYN_API_URL/api/
|
|
132
|
+
"$MYN_API_URL/api/habits/chains/CHAIN_ID/status"
|
|
153
133
|
```
|
|
154
134
|
|
|
155
135
|
### Get Habit Schedule
|
|
156
136
|
|
|
157
137
|
```
|
|
158
|
-
GET /api/
|
|
138
|
+
GET /api/v2/unified-tasks/schedule
|
|
159
139
|
```
|
|
160
140
|
|
|
161
141
|
Returns the habit schedule for the upcoming days.
|
|
@@ -172,7 +152,7 @@ Returns the habit schedule for the upcoming days.
|
|
|
172
152
|
|-------|------|-------------|
|
|
173
153
|
| `schedule` | object[] | Array of daily schedules |
|
|
174
154
|
| `schedule[].date` | date | Calendar date |
|
|
175
|
-
| `schedule[].dayOfWeek` |
|
|
155
|
+
| `schedule[].dayOfWeek` | number | Day of week number |
|
|
176
156
|
| `schedule[].habits` | object[] | Habits due on that day |
|
|
177
157
|
| `schedule[].habits[].habitId` | UUID | Habit identifier |
|
|
178
158
|
| `schedule[].habits[].title` | string | Habit title |
|
|
@@ -184,11 +164,11 @@ Returns the habit schedule for the upcoming days.
|
|
|
184
164
|
```bash
|
|
185
165
|
# Default 7-day schedule
|
|
186
166
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
187
|
-
"$MYN_API_URL/api/
|
|
167
|
+
"$MYN_API_URL/api/v2/unified-tasks/schedule"
|
|
188
168
|
|
|
189
169
|
# 14-day schedule
|
|
190
170
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
191
|
-
"$MYN_API_URL/api/
|
|
171
|
+
"$MYN_API_URL/api/v2/unified-tasks/schedule?days=14"
|
|
192
172
|
```
|
|
193
173
|
|
|
194
174
|
### List All Reminders
|
|
@@ -208,7 +188,7 @@ Returns reminder settings for all habits.
|
|
|
208
188
|
| `reminders[].title` | string | Habit title |
|
|
209
189
|
| `reminders[].enabled` | boolean | Whether the reminder is active |
|
|
210
190
|
| `reminders[].reminderTime` | time | Time of day for the reminder (nullable, HH:mm) |
|
|
211
|
-
| `reminders[].reminderDays` |
|
|
191
|
+
| `reminders[].reminderDays` | number[] | Days the reminder fires |
|
|
212
192
|
|
|
213
193
|
```bash
|
|
214
194
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
@@ -221,9 +201,18 @@ curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
|
221
201
|
GET /api/habits/reminders/{habitId}
|
|
222
202
|
```
|
|
223
203
|
|
|
204
|
+
**Response Fields:**
|
|
205
|
+
|
|
206
|
+
| Field | Type | Description |
|
|
207
|
+
|-------|------|-------------|
|
|
208
|
+
| `habitId` | UUID | Habit identifier |
|
|
209
|
+
| `remindersEnabled` | boolean | Whether reminders are active |
|
|
210
|
+
| `reminderTime` | time | Time of day (nullable, HH:mm) |
|
|
211
|
+
| `reminderDays` | number[] | Days the reminder fires |
|
|
212
|
+
|
|
224
213
|
```bash
|
|
225
214
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
226
|
-
"$MYN_API_URL/api/habits/reminders/
|
|
215
|
+
"$MYN_API_URL/api/habits/reminders/HABIT_ID"
|
|
227
216
|
```
|
|
228
217
|
|
|
229
218
|
### Update Reminder
|
|
@@ -240,18 +229,11 @@ PUT /api/habits/reminders/{habitId}
|
|
|
240
229
|
| `time` | time | Time of day for the reminder (HH:mm) |
|
|
241
230
|
|
|
242
231
|
```bash
|
|
243
|
-
|
|
244
|
-
curl -X PUT "$MYN_API_URL/api/habits/reminders/660e8400-e29b-41d4-a716-446655440001" \
|
|
232
|
+
curl -X PUT "$MYN_API_URL/api/habits/reminders/HABIT_ID" \
|
|
245
233
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
246
234
|
-H "Content-Type: application/json" \
|
|
247
235
|
-d '{
|
|
248
236
|
"enabled": true,
|
|
249
237
|
"time": "07:30"
|
|
250
238
|
}'
|
|
251
|
-
|
|
252
|
-
# Disable a reminder
|
|
253
|
-
curl -X PUT "$MYN_API_URL/api/habits/reminders/660e8400-e29b-41d4-a716-446655440001" \
|
|
254
|
-
-H "X-API-KEY: $MYN_API_KEY" \
|
|
255
|
-
-H "Content-Type: application/json" \
|
|
256
|
-
-d '{"enabled": false}'
|
|
257
239
|
```
|
|
@@ -8,13 +8,14 @@ Household members, invites, and chore management.
|
|
|
8
8
|
|
|
9
9
|
## Getting the Household ID
|
|
10
10
|
|
|
11
|
-
Most endpoints require a `householdId`.
|
|
11
|
+
Most endpoints require a `householdId`. The plugin auto-resolves it via:
|
|
12
12
|
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
# → { "households": [{ "id": "uuid", "name": "Home" }] }
|
|
13
|
+
```
|
|
14
|
+
GET /api/v1/households/current
|
|
16
15
|
```
|
|
17
16
|
|
|
17
|
+
Response: `{ "id": "uuid" }`
|
|
18
|
+
|
|
18
19
|
## Endpoints
|
|
19
20
|
|
|
20
21
|
### List Members
|
|
@@ -78,12 +79,20 @@ curl -X POST "$MYN_API_URL/api/v1/households/HOUSEHOLD_ID/invites" \
|
|
|
78
79
|
-d '{"email": "jane@example.com", "role": "member"}'
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
### List Chores
|
|
82
|
+
### List Chores (Today)
|
|
82
83
|
|
|
83
84
|
```
|
|
84
|
-
GET /api/v2/chores?householdId={householdId}
|
|
85
|
+
GET /api/v2/chores/today?householdId={householdId}
|
|
85
86
|
```
|
|
86
87
|
|
|
88
|
+
Returns today's chores for the household.
|
|
89
|
+
|
|
90
|
+
**Query Parameters:**
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Description |
|
|
93
|
+
|-----------|------|-------------|
|
|
94
|
+
| `householdId` | UUID | Required |
|
|
95
|
+
|
|
87
96
|
**Response:**
|
|
88
97
|
|
|
89
98
|
```json
|
|
@@ -106,22 +115,31 @@ GET /api/v2/chores?householdId={householdId}
|
|
|
106
115
|
|
|
107
116
|
```bash
|
|
108
117
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
109
|
-
"$MYN_API_URL/api/v2/chores?householdId=HOUSEHOLD_ID"
|
|
118
|
+
"$MYN_API_URL/api/v2/chores/today?householdId=HOUSEHOLD_ID"
|
|
110
119
|
```
|
|
111
120
|
|
|
112
121
|
### Get Chore Schedule
|
|
113
122
|
|
|
114
123
|
```
|
|
115
|
-
GET /api/v2/chores/schedule
|
|
124
|
+
GET /api/v2/chores/schedule/range
|
|
116
125
|
```
|
|
117
126
|
|
|
127
|
+
Returns chore schedule for a date range.
|
|
128
|
+
|
|
118
129
|
**Query Parameters:**
|
|
119
130
|
|
|
120
131
|
| Parameter | Type | Description |
|
|
121
132
|
|-----------|------|-------------|
|
|
122
133
|
| `householdId` | UUID | Required |
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
134
|
+
| `startDate` | date | Start date (YYYY-MM-DD, defaults to today) |
|
|
135
|
+
| `endDate` | date | End date (YYYY-MM-DD, defaults to startDate + 7 days) |
|
|
136
|
+
|
|
137
|
+
**Tool Parameters:**
|
|
138
|
+
|
|
139
|
+
| Parameter | Type | Description |
|
|
140
|
+
|-----------|------|-------------|
|
|
141
|
+
| `date` | date | Specific date (sets both startDate and endDate) |
|
|
142
|
+
| `weekStart` | date | Start of week (endDate computed as +7 days) |
|
|
125
143
|
|
|
126
144
|
**Response:**
|
|
127
145
|
|
|
@@ -137,7 +155,9 @@ GET /api/v2/chores/schedule
|
|
|
137
155
|
"title": "Take out trash",
|
|
138
156
|
"assignedTo": "member-uuid",
|
|
139
157
|
"estimatedMinutes": 10,
|
|
140
|
-
"completed": false
|
|
158
|
+
"completed": false,
|
|
159
|
+
"completedAt": null,
|
|
160
|
+
"completedBy": null
|
|
141
161
|
}
|
|
142
162
|
]
|
|
143
163
|
}
|
|
@@ -149,15 +169,17 @@ GET /api/v2/chores/schedule
|
|
|
149
169
|
|
|
150
170
|
```bash
|
|
151
171
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
152
|
-
"$MYN_API_URL/api/v2/chores/schedule?householdId=HOUSEHOLD_ID&
|
|
172
|
+
"$MYN_API_URL/api/v2/chores/schedule/range?householdId=HOUSEHOLD_ID&startDate=2026-03-01&endDate=2026-03-07"
|
|
153
173
|
```
|
|
154
174
|
|
|
155
175
|
### Complete Chore
|
|
156
176
|
|
|
157
177
|
```
|
|
158
|
-
POST /api/v2/chores/{choreId}/complete
|
|
178
|
+
POST /api/v2/chores/instances/{choreId}/complete
|
|
159
179
|
```
|
|
160
180
|
|
|
181
|
+
**Uses read-before-write guard** — reads chore instance state hash before completing.
|
|
182
|
+
|
|
161
183
|
**Body:**
|
|
162
184
|
|
|
163
185
|
| Field | Type | Required | Description |
|
|
@@ -168,8 +190,9 @@ POST /api/v2/chores/{choreId}/complete
|
|
|
168
190
|
**Response:** `{ choreId, completed, completedAt, nextDueDate? }`
|
|
169
191
|
|
|
170
192
|
```bash
|
|
171
|
-
curl -X POST "$MYN_API_URL/api/v2/chores/CHORE_ID/complete" \
|
|
193
|
+
curl -X POST "$MYN_API_URL/api/v2/chores/instances/CHORE_ID/complete" \
|
|
172
194
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
195
|
+
-H "X-MYN-State-Hash: abc123" \
|
|
173
196
|
-H "Content-Type: application/json" \
|
|
174
197
|
-d '{"note": "Both bins taken to curb"}'
|
|
175
198
|
```
|