@mind-your-now/myn 0.4.0

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.
Files changed (86) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +318 -0
  3. package/dist/index.d.ts +77 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +147 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/src/client.d.ts +40 -0
  8. package/dist/src/client.d.ts.map +1 -0
  9. package/dist/src/client.js +95 -0
  10. package/dist/src/client.js.map +1 -0
  11. package/dist/src/tools/briefing.d.ts +44 -0
  12. package/dist/src/tools/briefing.d.ts.map +1 -0
  13. package/dist/src/tools/briefing.js +116 -0
  14. package/dist/src/tools/briefing.js.map +1 -0
  15. package/dist/src/tools/calendar.d.ts +56 -0
  16. package/dist/src/tools/calendar.d.ts.map +1 -0
  17. package/dist/src/tools/calendar.js +206 -0
  18. package/dist/src/tools/calendar.js.map +1 -0
  19. package/dist/src/tools/capabilityHash.d.ts +26 -0
  20. package/dist/src/tools/capabilityHash.d.ts.map +1 -0
  21. package/dist/src/tools/capabilityHash.js +48 -0
  22. package/dist/src/tools/capabilityHash.js.map +1 -0
  23. package/dist/src/tools/habits.d.ts +43 -0
  24. package/dist/src/tools/habits.d.ts.map +1 -0
  25. package/dist/src/tools/habits.js +123 -0
  26. package/dist/src/tools/habits.js.map +1 -0
  27. package/dist/src/tools/household.d.ts +44 -0
  28. package/dist/src/tools/household.d.ts.map +1 -0
  29. package/dist/src/tools/household.js +146 -0
  30. package/dist/src/tools/household.js.map +1 -0
  31. package/dist/src/tools/lists.d.ts +45 -0
  32. package/dist/src/tools/lists.d.ts.map +1 -0
  33. package/dist/src/tools/lists.js +167 -0
  34. package/dist/src/tools/lists.js.map +1 -0
  35. package/dist/src/tools/memory.d.ts +45 -0
  36. package/dist/src/tools/memory.d.ts.map +1 -0
  37. package/dist/src/tools/memory.js +131 -0
  38. package/dist/src/tools/memory.js.map +1 -0
  39. package/dist/src/tools/myn_a2a_pairing.d.ts +42 -0
  40. package/dist/src/tools/myn_a2a_pairing.d.ts.map +1 -0
  41. package/dist/src/tools/myn_a2a_pairing.js +166 -0
  42. package/dist/src/tools/myn_a2a_pairing.js.map +1 -0
  43. package/dist/src/tools/planning.d.ts +56 -0
  44. package/dist/src/tools/planning.d.ts.map +1 -0
  45. package/dist/src/tools/planning.js +94 -0
  46. package/dist/src/tools/planning.js.map +1 -0
  47. package/dist/src/tools/profile.d.ts +47 -0
  48. package/dist/src/tools/profile.d.ts.map +1 -0
  49. package/dist/src/tools/profile.js +125 -0
  50. package/dist/src/tools/profile.js.map +1 -0
  51. package/dist/src/tools/projects.d.ts +45 -0
  52. package/dist/src/tools/projects.d.ts.map +1 -0
  53. package/dist/src/tools/projects.js +106 -0
  54. package/dist/src/tools/projects.js.map +1 -0
  55. package/dist/src/tools/search.d.ts +46 -0
  56. package/dist/src/tools/search.d.ts.map +1 -0
  57. package/dist/src/tools/search.js +93 -0
  58. package/dist/src/tools/search.js.map +1 -0
  59. package/dist/src/tools/syncOnMismatch.d.ts +48 -0
  60. package/dist/src/tools/syncOnMismatch.d.ts.map +1 -0
  61. package/dist/src/tools/syncOnMismatch.js +94 -0
  62. package/dist/src/tools/syncOnMismatch.js.map +1 -0
  63. package/dist/src/tools/tasks.d.ts +52 -0
  64. package/dist/src/tools/tasks.d.ts.map +1 -0
  65. package/dist/src/tools/tasks.js +200 -0
  66. package/dist/src/tools/tasks.js.map +1 -0
  67. package/dist/src/tools/timers.d.ts +48 -0
  68. package/dist/src/tools/timers.d.ts.map +1 -0
  69. package/dist/src/tools/timers.js +138 -0
  70. package/dist/src/tools/timers.js.map +1 -0
  71. package/openclaw.plugin.json +30 -0
  72. package/package.json +74 -0
  73. package/skills/myn/SKILL.md +54 -0
  74. package/skills/myn/references/authentication.md +83 -0
  75. package/skills/myn/references/briefing-api.md +187 -0
  76. package/skills/myn/references/calendar-api.md +139 -0
  77. package/skills/myn/references/habits-api.md +257 -0
  78. package/skills/myn/references/household-api.md +175 -0
  79. package/skills/myn/references/lists-api.md +180 -0
  80. package/skills/myn/references/memory-api.md +95 -0
  81. package/skills/myn/references/planning-api.md +191 -0
  82. package/skills/myn/references/profile-api.md +148 -0
  83. package/skills/myn/references/projects-api.md +127 -0
  84. package/skills/myn/references/search-api.md +97 -0
  85. package/skills/myn/references/tasks-api.md +187 -0
  86. package/skills/myn/references/timers-api.md +171 -0
@@ -0,0 +1,175 @@
1
+ # Household API
2
+
3
+ Household members, invites, and chore management.
4
+
5
+ ## Base Path
6
+
7
+ `/api/v1/households` and `/api/v2/chores`
8
+
9
+ ## Getting the Household ID
10
+
11
+ Most endpoints require a `householdId`. Get it from the user profile:
12
+
13
+ ```bash
14
+ curl -H "X-API-KEY: $MYN_API_KEY" "$MYN_API_URL/api/v1/customers/me"
15
+ # → { "households": [{ "id": "uuid", "name": "Home" }] }
16
+ ```
17
+
18
+ ## Endpoints
19
+
20
+ ### List Members
21
+
22
+ ```
23
+ GET /api/v1/households/{householdId}/members
24
+ ```
25
+
26
+ **Response:**
27
+
28
+ ```json
29
+ {
30
+ "householdId": "uuid",
31
+ "members": [
32
+ {
33
+ "id": "uuid",
34
+ "name": "John Doe",
35
+ "email": "john@example.com",
36
+ "role": "owner",
37
+ "joinedAt": "2026-01-15T00:00:00Z",
38
+ "avatarUrl": "https://..."
39
+ }
40
+ ],
41
+ "pendingInvites": [
42
+ {
43
+ "inviteId": "uuid",
44
+ "email": "jane@example.com",
45
+ "role": "member",
46
+ "invitedAt": "2026-03-01T00:00:00Z",
47
+ "expiresAt": "2026-03-08T00:00:00Z"
48
+ }
49
+ ]
50
+ }
51
+ ```
52
+
53
+ ```bash
54
+ curl -H "X-API-KEY: $MYN_API_KEY" \
55
+ "$MYN_API_URL/api/v1/households/HOUSEHOLD_ID/members"
56
+ ```
57
+
58
+ ### Invite Member
59
+
60
+ ```
61
+ POST /api/v1/households/{householdId}/invites
62
+ ```
63
+
64
+ **Body:**
65
+
66
+ | Field | Type | Required | Description |
67
+ |-------|------|----------|-------------|
68
+ | `email` | email | Yes | Email to invite |
69
+ | `role` | string | No | `member` or `admin` (default: member) |
70
+ | `message` | string | No | Custom invite message |
71
+
72
+ **Response:** `{ inviteId, invited, expiresAt }`
73
+
74
+ ```bash
75
+ curl -X POST "$MYN_API_URL/api/v1/households/HOUSEHOLD_ID/invites" \
76
+ -H "X-API-KEY: $MYN_API_KEY" \
77
+ -H "Content-Type: application/json" \
78
+ -d '{"email": "jane@example.com", "role": "member"}'
79
+ ```
80
+
81
+ ### List Chores
82
+
83
+ ```
84
+ GET /api/v2/chores?householdId={householdId}
85
+ ```
86
+
87
+ **Response:**
88
+
89
+ ```json
90
+ {
91
+ "householdId": "uuid",
92
+ "chores": [
93
+ {
94
+ "id": "uuid",
95
+ "title": "Take out trash",
96
+ "description": "Both kitchen and recycling",
97
+ "recurrenceRule": "FREQ=WEEKLY;BYDAY=TU,FR",
98
+ "assignedTo": "member-uuid",
99
+ "estimatedMinutes": 10,
100
+ "difficulty": "easy",
101
+ "category": "household"
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ ```bash
108
+ curl -H "X-API-KEY: $MYN_API_KEY" \
109
+ "$MYN_API_URL/api/v2/chores?householdId=HOUSEHOLD_ID"
110
+ ```
111
+
112
+ ### Get Chore Schedule
113
+
114
+ ```
115
+ GET /api/v2/chores/schedule
116
+ ```
117
+
118
+ **Query Parameters:**
119
+
120
+ | Parameter | Type | Description |
121
+ |-----------|------|-------------|
122
+ | `householdId` | UUID | Required |
123
+ | `date` | date | Specific date (YYYY-MM-DD) |
124
+ | `weekStart` | date | Start of week to view |
125
+
126
+ **Response:**
127
+
128
+ ```json
129
+ {
130
+ "schedule": [
131
+ {
132
+ "date": "2026-03-01",
133
+ "dayOfWeek": 0,
134
+ "chores": [
135
+ {
136
+ "choreId": "uuid",
137
+ "title": "Take out trash",
138
+ "assignedTo": "member-uuid",
139
+ "estimatedMinutes": 10,
140
+ "completed": false
141
+ }
142
+ ]
143
+ }
144
+ ],
145
+ "totalChores": 5,
146
+ "completedChores": 2
147
+ }
148
+ ```
149
+
150
+ ```bash
151
+ curl -H "X-API-KEY: $MYN_API_KEY" \
152
+ "$MYN_API_URL/api/v2/chores/schedule?householdId=HOUSEHOLD_ID&date=2026-03-01"
153
+ ```
154
+
155
+ ### Complete Chore
156
+
157
+ ```
158
+ POST /api/v2/chores/{choreId}/complete
159
+ ```
160
+
161
+ **Body:**
162
+
163
+ | Field | Type | Required | Description |
164
+ |-------|------|----------|-------------|
165
+ | `completedBy` | UUID | No | Member who completed it |
166
+ | `note` | string | No | Completion note |
167
+
168
+ **Response:** `{ choreId, completed, completedAt, nextDueDate? }`
169
+
170
+ ```bash
171
+ curl -X POST "$MYN_API_URL/api/v2/chores/CHORE_ID/complete" \
172
+ -H "X-API-KEY: $MYN_API_KEY" \
173
+ -H "Content-Type: application/json" \
174
+ -d '{"note": "Both bins taken to curb"}'
175
+ ```
@@ -0,0 +1,180 @@
1
+ # Lists API
2
+
3
+ Grocery and shopping list management scoped to households.
4
+
5
+ ## Base Path
6
+
7
+ `/api/v1/households/{householdId}/grocery-list`
8
+
9
+ ## Prerequisites
10
+
11
+ All list endpoints require a `householdId`. Retrieve it from the current user profile:
12
+
13
+ ```bash
14
+ # Get your household ID
15
+ curl -H "X-API-KEY: $MYN_API_KEY" \
16
+ "$MYN_API_URL/api/v1/customers/me"
17
+ # Response includes: households[0].id
18
+ ```
19
+
20
+ ## Endpoints
21
+
22
+ ### Get Grocery List
23
+
24
+ ```
25
+ GET /api/v1/households/{householdId}/grocery-list
26
+ ```
27
+
28
+ Returns the full grocery list for the household.
29
+
30
+ **Response Fields:**
31
+
32
+ | Field | Type | Description |
33
+ |-------|------|-------------|
34
+ | `householdId` | UUID | Household identifier |
35
+ | `items` | object[] | Array of list items |
36
+ | `items[].id` | UUID | Item identifier |
37
+ | `items[].name` | string | Item name |
38
+ | `items[].category` | string | Item category (nullable, e.g., `Produce`, `Dairy`) |
39
+ | `items[].quantity` | string | Quantity description (nullable, e.g., `2 lbs`, `1 dozen`) |
40
+ | `items[].notes` | string | Additional notes (nullable) |
41
+ | `items[].checked` | boolean | Whether the item has been picked up |
42
+ | `items[].addedAt` | datetime | When the item was added |
43
+ | `items[].addedBy` | string | Name of the user who added the item |
44
+ | `categories` | string[] | All distinct categories in the list |
45
+ | `lastModified` | datetime | Last modification timestamp |
46
+
47
+ ```bash
48
+ curl -H "X-API-KEY: $MYN_API_KEY" \
49
+ "$MYN_API_URL/api/v1/households/880e8400-e29b-41d4-a716-446655440003/grocery-list"
50
+ ```
51
+
52
+ ### Add Item
53
+
54
+ ```
55
+ POST /api/v1/households/{householdId}/grocery-list/items
56
+ ```
57
+
58
+ **Body Parameters:**
59
+
60
+ | Field | Type | Description |
61
+ |-------|------|-------------|
62
+ | `name` | string | **Required.** Item name |
63
+ | `category` | string | Optional category (e.g., `Produce`, `Dairy`, `Frozen`) |
64
+ | `quantity` | string | Optional quantity (e.g., `2 lbs`, `1 gallon`) |
65
+ | `notes` | string | Optional notes |
66
+
67
+ **Response Fields:**
68
+
69
+ | Field | Type | Description |
70
+ |-------|------|-------------|
71
+ | `itemId` | UUID | New item identifier |
72
+ | `added` | boolean | Whether the item was successfully added |
73
+
74
+ ```bash
75
+ curl -X POST "$MYN_API_URL/api/v1/households/880e8400-e29b-41d4-a716-446655440003/grocery-list/items" \
76
+ -H "X-API-KEY: $MYN_API_KEY" \
77
+ -H "Content-Type: application/json" \
78
+ -d '{
79
+ "name": "Avocados",
80
+ "category": "Produce",
81
+ "quantity": "4",
82
+ "notes": "Ripe ones for guacamole"
83
+ }'
84
+ ```
85
+
86
+ ### Toggle Item Checked
87
+
88
+ ```
89
+ PATCH /api/v1/households/{householdId}/grocery-list/items/{itemId}
90
+ ```
91
+
92
+ **Body Parameters:**
93
+
94
+ | Field | Type | Description |
95
+ |-------|------|-------------|
96
+ | `checked` | boolean | Set checked state (toggles if omitted by some clients) |
97
+
98
+ **Response Fields:**
99
+
100
+ | Field | Type | Description |
101
+ |-------|------|-------------|
102
+ | `itemId` | UUID | Item identifier |
103
+ | `checked` | boolean | New checked state |
104
+
105
+ ```bash
106
+ # Mark an item as picked up
107
+ curl -X PATCH "$MYN_API_URL/api/v1/households/880e8400-e29b-41d4-a716-446655440003/grocery-list/items/990e8400-e29b-41d4-a716-446655440004" \
108
+ -H "X-API-KEY: $MYN_API_KEY" \
109
+ -H "Content-Type: application/json" \
110
+ -d '{"checked": true}'
111
+ ```
112
+
113
+ ### Bulk Add Items
114
+
115
+ ```
116
+ POST /api/v1/households/{householdId}/grocery-list/items/bulk
117
+ ```
118
+
119
+ **Body Parameters:**
120
+
121
+ | Field | Type | Description |
122
+ |-------|------|-------------|
123
+ | `items` | object[] | **Required.** Array of items to add |
124
+ | `items[].name` | string | **Required.** Item name |
125
+ | `items[].category` | string | Optional category |
126
+ | `items[].quantity` | string | Optional quantity |
127
+
128
+ **Response Fields:**
129
+
130
+ | Field | Type | Description |
131
+ |-------|------|-------------|
132
+ | `addedCount` | number | Number of items added |
133
+ | `itemIds` | UUID[] | IDs of the newly created items |
134
+
135
+ ```bash
136
+ curl -X POST "$MYN_API_URL/api/v1/households/880e8400-e29b-41d4-a716-446655440003/grocery-list/items/bulk" \
137
+ -H "X-API-KEY: $MYN_API_KEY" \
138
+ -H "Content-Type: application/json" \
139
+ -d '{
140
+ "items": [
141
+ {"name": "Milk", "category": "Dairy", "quantity": "1 gallon"},
142
+ {"name": "Eggs", "category": "Dairy", "quantity": "1 dozen"},
143
+ {"name": "Bread", "category": "Bakery"},
144
+ {"name": "Chicken breast", "category": "Meat", "quantity": "2 lbs"}
145
+ ]
146
+ }'
147
+ ```
148
+
149
+ ### Convert to Tasks
150
+
151
+ ```
152
+ POST /api/v1/households/{householdId}/grocery-list/convert-to-tasks
153
+ ```
154
+
155
+ Converts grocery list items into MYN tasks (e.g., for a shopping trip).
156
+
157
+ **Body Parameters:**
158
+
159
+ | Field | Type | Description |
160
+ |-------|------|-------------|
161
+ | `uncheckedOnly` | boolean | Only convert unchecked items (default: true) |
162
+ | `priority` | string | Priority for created tasks (e.g., `OPPORTUNITY_NOW`) |
163
+
164
+ **Response Fields:**
165
+
166
+ | Field | Type | Description |
167
+ |-------|------|-------------|
168
+ | `convertedCount` | number | Number of items converted to tasks |
169
+ | `taskIds` | UUID[] | IDs of the created tasks |
170
+
171
+ ```bash
172
+ # Convert unchecked items to Opportunity Now tasks
173
+ curl -X POST "$MYN_API_URL/api/v1/households/880e8400-e29b-41d4-a716-446655440003/grocery-list/convert-to-tasks" \
174
+ -H "X-API-KEY: $MYN_API_KEY" \
175
+ -H "Content-Type: application/json" \
176
+ -d '{
177
+ "uncheckedOnly": true,
178
+ "priority": "OPPORTUNITY_NOW"
179
+ }'
180
+ ```
@@ -0,0 +1,95 @@
1
+ # Memory API
2
+
3
+ Agent memory for storing and retrieving contextual information about users.
4
+
5
+ ## Base Path
6
+
7
+ `/api/v1/customers/memories`
8
+
9
+ ## Endpoints
10
+
11
+ ### Remember (Store Memory)
12
+
13
+ ```
14
+ POST /api/v1/customers/memories
15
+ ```
16
+
17
+ **Body:**
18
+
19
+ | Field | Type | Required | Description |
20
+ |-------|------|----------|-------------|
21
+ | `content` | string | Yes | Memory content to store |
22
+ | `category` | string | No | `user_preference`, `work_context`, `personal_info`, `decision`, `insight`, `routine` |
23
+ | `tags` | string[] | No | Tags for categorization |
24
+ | `importance` | string | No | `low`, `medium`, `high`, `critical` |
25
+ | `expiresAt` | datetime | No | Optional expiration date (ISO 8601) |
26
+
27
+ **Response:** `{ memoryId, stored, createdAt }`
28
+
29
+ ```bash
30
+ curl -X POST "$MYN_API_URL/api/v1/customers/memories" \
31
+ -H "X-API-KEY: $MYN_API_KEY" \
32
+ -H "Content-Type: application/json" \
33
+ -d '{
34
+ "content": "User prefers morning meetings before 10am",
35
+ "category": "user_preference",
36
+ "tags": ["meetings", "preferences"],
37
+ "importance": "medium"
38
+ }'
39
+ ```
40
+
41
+ ### Recall (Get Memories)
42
+
43
+ ```
44
+ GET /api/v1/customers/memories
45
+ GET /api/v1/customers/memories/{memoryId}
46
+ ```
47
+
48
+ Get recent memories (default limit 10) or a specific memory by ID.
49
+
50
+ **Response (specific):** `{ memoryId, content, category, tags[], importance, createdAt, accessedAt, accessCount, expiresAt? }`
51
+
52
+ **Response (list):** `{ memories[{ memoryId, content, category, tags[], importance, createdAt, accessedAt? }] }`
53
+
54
+ ```bash
55
+ # Get recent memories
56
+ curl -H "X-API-KEY: $MYN_API_KEY" \
57
+ "$MYN_API_URL/api/v1/customers/memories?limit=10"
58
+
59
+ # Get specific memory
60
+ curl -H "X-API-KEY: $MYN_API_KEY" \
61
+ "$MYN_API_URL/api/v1/customers/memories/aabb0000-0000-0000-0000-000000000001"
62
+ ```
63
+
64
+ ### Forget (Delete Memory)
65
+
66
+ ```
67
+ DELETE /api/v1/customers/memories/{memoryId}
68
+ ```
69
+
70
+ ```bash
71
+ curl -X DELETE "$MYN_API_URL/api/v1/customers/memories/aabb0000-0000-0000-0000-000000000001" \
72
+ -H "X-API-KEY: $MYN_API_KEY"
73
+ ```
74
+
75
+ ### Search Memories
76
+
77
+ ```
78
+ GET /api/v1/customers/memories/search
79
+ ```
80
+
81
+ **Query Parameters:**
82
+
83
+ | Parameter | Type | Description |
84
+ |-----------|------|-------------|
85
+ | `q` | string | Search query |
86
+ | `category` | string | Filter by category |
87
+ | `tag` | string | Filter by tag (repeatable for multiple tags) |
88
+ | `limit` | number | Max results (default: 10) |
89
+
90
+ **Response:** `{ results[{ memoryId, content, category, tags[], importance, relevance, createdAt }], total }`
91
+
92
+ ```bash
93
+ curl -H "X-API-KEY: $MYN_API_KEY" \
94
+ "$MYN_API_URL/api/v1/customers/memories/search?q=meeting+preference&category=user_preference&limit=5"
95
+ ```
@@ -0,0 +1,191 @@
1
+ # Planning API
2
+
3
+ AI-powered planning, auto-scheduling, and rescheduling.
4
+
5
+ ## Base Path
6
+
7
+ `/api/schedules`
8
+
9
+ ## Endpoints
10
+
11
+ ### Create Plan
12
+
13
+ ```
14
+ POST /api/schedules/plan
15
+ ```
16
+
17
+ Generate an AI plan for a goal or set of tasks.
18
+
19
+ **Body:**
20
+
21
+ | Field | Type | Required | Description |
22
+ |-------|------|----------|-------------|
23
+ | `goal` | string | Yes* | What you want to accomplish |
24
+ | `tasks` | array | Yes* | Tasks to plan (alternative to goal) |
25
+ | `tasks[].title` | string | Yes | Task title |
26
+ | `tasks[].estimatedDuration` | number | No | Duration in minutes |
27
+ | `tasks[].dependsOn` | string[] | No | Task titles this depends on |
28
+ | `tasks[].fixedTime` | datetime | No | Fixed time slot |
29
+ | `constraints` | object | No | Planning constraints |
30
+ | `constraints.availableHours` | number | No | Available hours |
31
+ | `constraints.preferredTimes` | string[] | No | Preferred time slots |
32
+ | `constraints.avoidTimes` | string[] | No | Times to avoid |
33
+ | `constraints.deadline` | datetime | No | Hard deadline |
34
+ | `constraints.priority` | string | No | `CRITICAL`, `OPPORTUNITY_NOW`, `OVER_THE_HORIZON` |
35
+
36
+ *At least one of `goal` or `tasks` is required.
37
+
38
+ **Response:**
39
+
40
+ ```json
41
+ {
42
+ "planId": "uuid",
43
+ "goal": "Complete Q1 planning",
44
+ "estimatedDuration": 240,
45
+ "schedule": [
46
+ {
47
+ "step": 1,
48
+ "title": "Review last quarter metrics",
49
+ "description": "Pull Q4 data and analyze trends",
50
+ "estimatedMinutes": 60,
51
+ "suggestedTimeSlot": {
52
+ "start": "2026-03-01T09:00:00Z",
53
+ "end": "2026-03-01T10:00:00Z"
54
+ },
55
+ "dependencies": []
56
+ }
57
+ ],
58
+ "conflicts": [
59
+ {
60
+ "taskTitle": "Team standup",
61
+ "reason": "Overlaps with suggested time slot",
62
+ "suggestion": "Move to 10:30 AM"
63
+ }
64
+ ],
65
+ "suggestions": ["Consider breaking the budget review into two sessions"],
66
+ "createdAt": "2026-03-01T08:00:00Z"
67
+ }
68
+ ```
69
+
70
+ ```bash
71
+ curl -X POST "$MYN_API_URL/api/schedules/plan" \
72
+ -H "X-API-KEY: $MYN_API_KEY" \
73
+ -H "Content-Type: application/json" \
74
+ -d '{
75
+ "goal": "Complete Q1 planning",
76
+ "constraints": {
77
+ "availableHours": 4,
78
+ "deadline": "2026-03-05T17:00:00Z",
79
+ "priority": "CRITICAL"
80
+ }
81
+ }'
82
+ ```
83
+
84
+ ### Auto-Schedule Day
85
+
86
+ ```
87
+ POST /api/schedules/auto
88
+ ```
89
+
90
+ Automatically schedule all unscheduled tasks for a day.
91
+
92
+ **Body:**
93
+
94
+ | Field | Type | Required | Description |
95
+ |-------|------|----------|-------------|
96
+ | `date` | date | No | Date to schedule (default: today) |
97
+ | `respectExisting` | boolean | No | Keep existing calendar items (default: true) |
98
+ | `bufferMinutes` | number | No | Buffer between tasks (default: 15) |
99
+
100
+ **Response:**
101
+
102
+ ```json
103
+ {
104
+ "date": "2026-03-01",
105
+ "scheduled": [
106
+ {
107
+ "taskId": "uuid",
108
+ "title": "Prepare report",
109
+ "scheduledStart": "2026-03-01T09:00:00Z",
110
+ "scheduledEnd": "2026-03-01T11:00:00Z",
111
+ "priority": "CRITICAL"
112
+ }
113
+ ],
114
+ "unscheduled": [
115
+ {
116
+ "taskId": "uuid",
117
+ "title": "Research competitors",
118
+ "reason": "Not enough available time"
119
+ }
120
+ ],
121
+ "conflicts": [
122
+ {
123
+ "type": "overlap",
124
+ "description": "Two critical tasks competing for morning slot",
125
+ "tasksInvolved": ["uuid1", "uuid2"]
126
+ }
127
+ ],
128
+ "stats": {
129
+ "totalScheduled": 5,
130
+ "totalMinutes": 300,
131
+ "byPriority": { "CRITICAL": 2, "OPPORTUNITY_NOW": 3 }
132
+ }
133
+ }
134
+ ```
135
+
136
+ ```bash
137
+ curl -X POST "$MYN_API_URL/api/schedules/auto" \
138
+ -H "X-API-KEY: $MYN_API_KEY" \
139
+ -H "Content-Type: application/json" \
140
+ -d '{"date": "2026-03-01", "bufferMinutes": 15}'
141
+ ```
142
+
143
+ ### Reschedule Tasks
144
+
145
+ ```
146
+ POST /api/schedules/reschedule
147
+ ```
148
+
149
+ Move tasks to a different date.
150
+
151
+ **Body:**
152
+
153
+ | Field | Type | Required | Description |
154
+ |-------|------|----------|-------------|
155
+ | `taskIds` | UUID[] | Yes | Tasks to reschedule |
156
+ | `reason` | string | No | Why rescheduling |
157
+ | `targetDate` | date | No | New target date |
158
+ | `spreadOverDays` | number | No | Spread across N days (default: 1) |
159
+
160
+ **Response:**
161
+
162
+ ```json
163
+ {
164
+ "rescheduled": [
165
+ {
166
+ "taskId": "uuid",
167
+ "title": "Budget review",
168
+ "oldDate": "2026-03-01",
169
+ "newDate": "2026-03-03"
170
+ }
171
+ ],
172
+ "failed": [
173
+ {
174
+ "taskId": "uuid",
175
+ "reason": "Task is already completed"
176
+ }
177
+ ],
178
+ "suggestions": ["Consider spreading over 2 days to avoid overload"]
179
+ }
180
+ ```
181
+
182
+ ```bash
183
+ curl -X POST "$MYN_API_URL/api/schedules/reschedule" \
184
+ -H "X-API-KEY: $MYN_API_KEY" \
185
+ -H "Content-Type: application/json" \
186
+ -d '{
187
+ "taskIds": ["uuid1", "uuid2"],
188
+ "targetDate": "2026-03-05",
189
+ "reason": "Meeting overran, no time today"
190
+ }'
191
+ ```