@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
|
@@ -1,50 +1,128 @@
|
|
|
1
1
|
# Calendar API
|
|
2
2
|
|
|
3
|
-
Calendar events and meetings management including
|
|
3
|
+
Calendar events and meetings management including listing calendars, creating, updating, moving, and deleting events.
|
|
4
4
|
|
|
5
5
|
## Base Path
|
|
6
6
|
|
|
7
7
|
`/api/v2/calendar`
|
|
8
8
|
|
|
9
|
+
## Actions
|
|
10
|
+
|
|
11
|
+
The `myn_calendar` tool supports these actions: `list_calendars`, `list_events`, `get_event`, `create_event`, `update_event`, `delete_event`, `move_event`, `meetings`.
|
|
12
|
+
|
|
9
13
|
## Endpoints
|
|
10
14
|
|
|
15
|
+
### List Calendars
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
GET /api/v1/customers/calendars
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Returns all connected calendars with metadata.
|
|
22
|
+
|
|
23
|
+
**Response Fields:**
|
|
24
|
+
|
|
25
|
+
| Field | Type | Description |
|
|
26
|
+
|-------|------|-------------|
|
|
27
|
+
| `calendars` | object[] | Array of calendar objects |
|
|
28
|
+
| `calendars[].id` | string | Calendar identifier |
|
|
29
|
+
| `calendars[].name` | string | Calendar display name |
|
|
30
|
+
| `calendars[].using` | boolean | Whether the calendar is active/in use |
|
|
31
|
+
| `calendars[].timeZone` | string | Calendar timezone |
|
|
32
|
+
| `calendars[].accessRole` | string | User's access role |
|
|
33
|
+
| `calendars[].accountEmail` | string | Associated account email |
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
37
|
+
"$MYN_API_URL/api/v1/customers/calendars"
|
|
38
|
+
```
|
|
39
|
+
|
|
11
40
|
### List Events
|
|
12
41
|
|
|
13
42
|
```
|
|
14
43
|
GET /api/v2/calendar/events
|
|
15
44
|
```
|
|
16
45
|
|
|
46
|
+
Fetches events from all connected calendars within a date range. Descriptions are automatically truncated to 200 chars and attendee lists are stripped to reduce token bloat.
|
|
47
|
+
|
|
17
48
|
**Query Parameters:**
|
|
18
49
|
|
|
19
50
|
| Parameter | Type | Description |
|
|
20
51
|
|-----------|------|-------------|
|
|
21
|
-
| `start` | datetime |
|
|
22
|
-
| `end` | datetime |
|
|
23
|
-
| `calendarId` | string | Filter by specific calendar |
|
|
24
|
-
| `allDay` | boolean | Filter for all-day events only |
|
|
52
|
+
| `start` | datetime | Start of range (ISO 8601). Defaults to today |
|
|
53
|
+
| `end` | datetime | End of range (ISO 8601). Defaults to start + 7 days |
|
|
25
54
|
| `limit` | number | Max results (default: 50) |
|
|
26
55
|
|
|
27
|
-
|
|
28
|
-
# List events for this week
|
|
29
|
-
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
30
|
-
"$MYN_API_URL/api/v2/calendar/events?start=2026-03-01T00:00:00Z&end=2026-03-07T23:59:59Z"
|
|
56
|
+
**Tool Parameters:**
|
|
31
57
|
|
|
32
|
-
|
|
58
|
+
| Parameter | Type | Description |
|
|
59
|
+
|-----------|------|-------------|
|
|
60
|
+
| `startDate` | datetime | Maps to `start` query param |
|
|
61
|
+
| `endDate` | datetime | Maps to `end` query param |
|
|
62
|
+
| `daysAhead` | number | Alternative to `endDate` — computes end date N days from now |
|
|
63
|
+
| `limit` | number | Max results (default: 50) |
|
|
64
|
+
|
|
65
|
+
**Response:**
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"events": [
|
|
70
|
+
{
|
|
71
|
+
"id": "google-event-id-123",
|
|
72
|
+
"title": "Team Standup",
|
|
73
|
+
"startTime": "2026-03-09T09:00:00",
|
|
74
|
+
"endTime": "2026-03-09T09:30:00",
|
|
75
|
+
"location": "Conference Room B",
|
|
76
|
+
"calendarId": "primary",
|
|
77
|
+
"calendarName": "Edward Becker",
|
|
78
|
+
"provider": "google",
|
|
79
|
+
"allDay": false,
|
|
80
|
+
"taskId": "550e8400-e29b-41d4-a716-446655440000",
|
|
81
|
+
"status": "confirmed"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"total": 1,
|
|
85
|
+
"start": "2026-03-09T00:00:00",
|
|
86
|
+
"end": "2026-03-16T00:00:00"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Note:** When a calendar event is linked to a MYN task, the response includes a `taskId` field (UUID string) referencing the linked task.
|
|
91
|
+
|
|
92
|
+
### Get Event
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
GET /api/v2/calendar/events/{eventId}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Returns full details for a single event including description and attendees. Results are cached in-memory (10-minute TTL) with hash-based change detection.
|
|
99
|
+
|
|
100
|
+
**Required Parameters:**
|
|
101
|
+
|
|
102
|
+
| Parameter | Type | Description |
|
|
103
|
+
|-----------|------|-------------|
|
|
104
|
+
| `eventId` | string | Calendar event ID |
|
|
105
|
+
|
|
106
|
+
**Response:** Full event object plus `_cached` (boolean, whether unchanged since last fetch) and `_hash` (content hash).
|
|
107
|
+
|
|
108
|
+
```bash
|
|
33
109
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
34
|
-
"$MYN_API_URL/api/v2/calendar/events
|
|
110
|
+
"$MYN_API_URL/api/v2/calendar/events/EVENT_ID"
|
|
35
111
|
```
|
|
36
112
|
|
|
37
113
|
### Create Event
|
|
38
114
|
|
|
39
115
|
```
|
|
40
|
-
POST /api/v2/calendar/events
|
|
116
|
+
POST /api/v2/calendar/standalone-events
|
|
41
117
|
```
|
|
42
118
|
|
|
119
|
+
Creates a new calendar event (not linked to a MYN task).
|
|
120
|
+
|
|
43
121
|
**Required Fields:**
|
|
44
122
|
|
|
45
123
|
| Field | Type | Description |
|
|
46
124
|
|-------|------|-------------|
|
|
47
|
-
| `title` | string | Event title |
|
|
125
|
+
| `title` | string | Event title (1-200 chars) |
|
|
48
126
|
| `startTime` | datetime | Start time (ISO 8601) |
|
|
49
127
|
| `endTime` | datetime | End time (ISO 8601, required for non-all-day events) |
|
|
50
128
|
|
|
@@ -52,17 +130,24 @@ POST /api/v2/calendar/events
|
|
|
52
130
|
|
|
53
131
|
| Field | Type | Description |
|
|
54
132
|
|-------|------|-------------|
|
|
55
|
-
| `isAllDay` | boolean |
|
|
56
|
-
| `description` | string | Event description |
|
|
133
|
+
| `isAllDay` | boolean | All-day event (default: false) |
|
|
134
|
+
| `description` | string | Event description (max 2000 chars) |
|
|
57
135
|
| `location` | string | Event location |
|
|
58
136
|
| `calendarId` | string | Target calendar ID |
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
137
|
+
| `calendarName` | string | Calendar name to resolve to ID (e.g. "Family", "Work") |
|
|
138
|
+
| `attendees` | string[] | Email addresses, household member first names, or "family"/"everyone" to invite all household members |
|
|
139
|
+
| `timezone` | string | Timezone (e.g., "America/New_York") |
|
|
140
|
+
| `recurrence` | string | RRULE format (e.g., `FREQ=WEEKLY;BYDAY=MO,WE,FR`) |
|
|
141
|
+
| `reminders` | object[] | Each with `minutes` (number) and `method` (`popup` or `email`) |
|
|
142
|
+
|
|
143
|
+
**Calendar Selection Logic:**
|
|
144
|
+
1. Explicit `calendarId` takes precedence
|
|
145
|
+
2. `calendarName` is resolved by fuzzy match against available calendars
|
|
146
|
+
3. If attendees include household members, auto-detects family/shared calendar
|
|
147
|
+
4. Falls back to "primary"
|
|
62
148
|
|
|
63
149
|
```bash
|
|
64
|
-
|
|
65
|
-
curl -X POST "$MYN_API_URL/api/v2/calendar/events" \
|
|
150
|
+
curl -X POST "$MYN_API_URL/api/v2/calendar/standalone-events" \
|
|
66
151
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
67
152
|
-H "Content-Type: application/json" \
|
|
68
153
|
-d '{
|
|
@@ -73,18 +158,42 @@ curl -X POST "$MYN_API_URL/api/v2/calendar/events" \
|
|
|
73
158
|
"attendees": ["alice@example.com", "bob@example.com"],
|
|
74
159
|
"reminders": [{"minutes": 10, "method": "popup"}]
|
|
75
160
|
}'
|
|
161
|
+
```
|
|
76
162
|
|
|
77
|
-
|
|
78
|
-
|
|
163
|
+
### Update Event
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
PATCH /api/v2/calendar/standalone-events/{eventId}?calendarId={calendarId}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Updates an existing calendar event. Only provided fields are changed.
|
|
170
|
+
|
|
171
|
+
**Required Parameters:**
|
|
172
|
+
|
|
173
|
+
| Parameter | Type | Description |
|
|
174
|
+
|-----------|------|-------------|
|
|
175
|
+
| `eventId` | string | Calendar event ID |
|
|
176
|
+
|
|
177
|
+
**Update Fields (all optional, at least one required):**
|
|
178
|
+
|
|
179
|
+
| Field | Type | Description |
|
|
180
|
+
|-------|------|-------------|
|
|
181
|
+
| `newTitle` | string | New title |
|
|
182
|
+
| `newDescription` | string | New description |
|
|
183
|
+
| `newLocation` | string | New location |
|
|
184
|
+
| `newStartTime` | datetime | New start time (ISO 8601) |
|
|
185
|
+
| `newEndTime` | datetime | New end time (ISO 8601) |
|
|
186
|
+
| `newAttendees` | string[] | Replace attendee list (email addresses or household member names) |
|
|
187
|
+
| `addAttendees` | string[] | Add to existing attendee list |
|
|
188
|
+
| `calendarId` | string | Calendar ID (defaults to "primary") |
|
|
189
|
+
| `calendarName` | string | Calendar name to resolve |
|
|
190
|
+
| `timezone` | string | Timezone for start/end times |
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
curl -X PATCH "$MYN_API_URL/api/v2/calendar/standalone-events/EVENT_ID?calendarId=primary" \
|
|
79
194
|
-H "X-API-KEY: $MYN_API_KEY" \
|
|
80
195
|
-H "Content-Type: application/json" \
|
|
81
|
-
-d '{
|
|
82
|
-
"title": "Sprint review",
|
|
83
|
-
"startTime": "2026-03-06T00:00:00Z",
|
|
84
|
-
"isAllDay": true,
|
|
85
|
-
"recurrence": "FREQ=WEEKLY;INTERVAL=2;BYDAY=FR",
|
|
86
|
-
"description": "Bi-weekly sprint review"
|
|
87
|
-
}'
|
|
196
|
+
-d '{"title": "Updated meeting title", "location": "Room C"}'
|
|
88
197
|
```
|
|
89
198
|
|
|
90
199
|
### Delete Event
|
|
@@ -93,47 +202,60 @@ curl -X POST "$MYN_API_URL/api/v2/calendar/events" \
|
|
|
93
202
|
DELETE /api/v2/calendar/events/{eventId}
|
|
94
203
|
```
|
|
95
204
|
|
|
205
|
+
**Uses read-before-write guard** (agent reads event state hash before deleting).
|
|
206
|
+
|
|
96
207
|
```bash
|
|
97
|
-
curl -X DELETE "$MYN_API_URL/api/v2/calendar/events/
|
|
98
|
-
-H "X-API-KEY: $MYN_API_KEY"
|
|
208
|
+
curl -X DELETE "$MYN_API_URL/api/v2/calendar/events/EVENT_ID" \
|
|
209
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
210
|
+
-H "X-MYN-State-Hash: abc123"
|
|
99
211
|
```
|
|
100
212
|
|
|
101
|
-
###
|
|
213
|
+
### Move Event
|
|
102
214
|
|
|
103
215
|
```
|
|
104
|
-
|
|
216
|
+
POST /api/v2/calendar/standalone-events/{eventId}/move?sourceCalendarId={source}&destinationCalendarId={destination}
|
|
105
217
|
```
|
|
106
218
|
|
|
107
|
-
|
|
219
|
+
Moves an event from one calendar to another.
|
|
108
220
|
|
|
109
|
-
**
|
|
221
|
+
**Required Parameters:**
|
|
110
222
|
|
|
111
223
|
| Parameter | Type | Description |
|
|
112
224
|
|-----------|------|-------------|
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `limit` | number | Max results |
|
|
225
|
+
| `eventId` | string | Calendar event ID |
|
|
226
|
+
| `destinationCalendarId` | string | Target calendar ID (or use `destinationCalendarName`) |
|
|
116
227
|
|
|
117
|
-
**
|
|
228
|
+
**Optional Parameters:**
|
|
118
229
|
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `meetings[].title` | string | Meeting title |
|
|
124
|
-
| `meetings[].startTime` | datetime | Start time |
|
|
125
|
-
| `meetings[].endTime` | datetime | End time |
|
|
126
|
-
| `meetings[].attendees` | string[] | List of attendee emails |
|
|
127
|
-
| `meetings[].location` | string | Meeting location (nullable) |
|
|
128
|
-
| `meetings[].isRecurring` | boolean | Whether the meeting recurs |
|
|
129
|
-
| `total` | number | Total matching meetings |
|
|
230
|
+
| Parameter | Type | Description |
|
|
231
|
+
|-----------|------|-------------|
|
|
232
|
+
| `destinationCalendarName` | string | Target calendar name (resolved by fuzzy match) |
|
|
233
|
+
| `sourceCalendarId` | string | Source calendar ID (defaults to "primary") |
|
|
130
234
|
|
|
131
235
|
```bash
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
236
|
+
curl -X POST "$MYN_API_URL/api/v2/calendar/standalone-events/EVENT_ID/move?sourceCalendarId=primary&destinationCalendarId=DEST_ID" \
|
|
237
|
+
-H "X-API-KEY: $MYN_API_KEY" \
|
|
238
|
+
-H "Content-Type: application/json" \
|
|
239
|
+
-d '{}'
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Meetings
|
|
135
243
|
|
|
136
|
-
|
|
244
|
+
```
|
|
245
|
+
GET /api/v2/calendar/events (filtered to events with attendees)
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Returns upcoming meetings (events that have attendees). This action uses the standard events endpoint with date range filtering, then filters to only events with attendees.
|
|
249
|
+
|
|
250
|
+
**Tool Parameters:**
|
|
251
|
+
|
|
252
|
+
| Parameter | Type | Description |
|
|
253
|
+
|-----------|------|-------------|
|
|
254
|
+
| `includePast` | boolean | Include today's past meetings (default: false) |
|
|
255
|
+
| `daysAhead` | number | Days to look ahead (default: 7) |
|
|
256
|
+
| `limit` | number | Max results |
|
|
257
|
+
|
|
258
|
+
```bash
|
|
137
259
|
curl -H "X-API-KEY: $MYN_API_KEY" \
|
|
138
|
-
"$MYN_API_URL/api/v2/calendar/
|
|
260
|
+
"$MYN_API_URL/api/v2/calendar/events?start=2026-03-09T00:00:00&end=2026-03-16T00:00:00"
|
|
139
261
|
```
|
|
@@ -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
|
+
```
|