@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mind Your Now
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,318 @@
1
+ # @mind-your-now/openclaw-plugin
2
+
3
+ [![npm version](https://badge.fury.io/js/@mindyournow%2Fopenclaw-plugin.svg)](https://badge.fury.io/js/@mindyournow%2Fopenclaw-plugin)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ > OpenClaw plugin for Mind Your Now - AI-powered task and life management
7
+
8
+ ## Overview
9
+
10
+ This plugin integrates [Mind Your Now](https://mindyournow.com) (MYN) with [OpenClaw](https://openclaw.dev) agents, enabling AI assistants to manage tasks, calendar, habits, and more using the MYN productivity methodology.
11
+
12
+ ## Features
13
+
14
+ - **12 powerful tools** for complete MYN integration
15
+ - **Urgency-based prioritization** following the MYN methodology
16
+ - **Shared API client** with automatic authentication
17
+ - **Built-in skill companion** for workflow guidance
18
+ - **TypeScript-first** with full type safety
19
+ - **Comprehensive test coverage**
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ # Install via OpenClaw
25
+ openclaw plugins install @mind-your-now/openclaw-plugin
26
+
27
+ # Or via npm
28
+ npm install @mind-your-now/openclaw-plugin
29
+ ```
30
+
31
+ ## Configuration
32
+
33
+ Add to your OpenClaw configuration:
34
+
35
+ ```yaml
36
+ plugins:
37
+ entries:
38
+ myn:
39
+ enabled: true
40
+ config:
41
+ apiKey: "your-myn-api-key" # Required: API key with AGENT_FULL scope
42
+ baseUrl: "https://api.mindyournow.com" # Optional: defaults to production
43
+ ```
44
+
45
+ ### Getting an API Key
46
+
47
+ 1. Log into your Mind Your Now account
48
+ 2. Go to Settings → API Keys
49
+ 3. Generate a new key with `AGENT_FULL` scope
50
+
51
+ ## Tools Reference
52
+
53
+ ### myn_tasks
54
+ Manage tasks, habits, and chores.
55
+
56
+ ```yaml
57
+ action: list | get | create | update | complete | archive | search
58
+ ```
59
+
60
+ **Examples:**
61
+ ```yaml
62
+ # List critical tasks
63
+ action: list
64
+ priority: CRITICAL
65
+ status: PENDING
66
+
67
+ # Create a task
68
+ action: create
69
+ id: "550e8400-e29b-41d4-a716-446655440000" # Client-generated UUID
70
+ title: "Finish quarterly report"
71
+ taskType: TASK
72
+ priority: CRITICAL
73
+ startDate: "2026-03-01"
74
+ duration: "2h"
75
+ ```
76
+
77
+ ### myn_briefing
78
+ Generate and manage Compass briefings.
79
+
80
+ ```yaml
81
+ action: status | generate | get | apply_correction | complete_session
82
+ ```
83
+
84
+ **Examples:**
85
+ ```yaml
86
+ # Generate morning briefing
87
+ action: generate
88
+ context: "Morning planning session"
89
+ focusAreas:
90
+ - work
91
+ - health
92
+ ```
93
+
94
+ ### myn_calendar
95
+ Manage calendar events and meetings.
96
+
97
+ ```yaml
98
+ action: list_events | create_event | delete_event | meetings
99
+ ```
100
+
101
+ **Examples:**
102
+ ```yaml
103
+ # Create an event
104
+ action: create_event
105
+ title: "Team Standup"
106
+ startTime: "2026-03-01T09:00:00Z"
107
+ endTime: "2026-03-01T09:30:00Z"
108
+ ```
109
+
110
+ ### myn_habits
111
+ Track habits, streaks, and reminders.
112
+
113
+ ```yaml
114
+ action: streaks | skip | chains | schedule | reminders
115
+ ```
116
+
117
+ ### myn_lists
118
+ Manage grocery and shopping lists.
119
+
120
+ ```yaml
121
+ action: get | add | toggle | bulk_add | convert_to_tasks
122
+ ```
123
+
124
+ ### myn_search
125
+ Unified search across tasks, events, notes, and memories.
126
+
127
+ ```yaml
128
+ action: search
129
+ query: "quarterly report"
130
+ types:
131
+ - task
132
+ - event
133
+ ```
134
+
135
+ ### myn_timers
136
+ Manage countdowns, alarms, and pomodoro sessions.
137
+
138
+ ```yaml
139
+ action: create_countdown | create_alarm | list | cancel | snooze | pomodoro
140
+ ```
141
+
142
+ **Examples:**
143
+ ```yaml
144
+ # Create a pomodoro session
145
+ action: pomodoro
146
+ workDuration: 25
147
+ breakDuration: 5
148
+ sessions: 4
149
+
150
+ # Create a countdown
151
+ action: create_countdown
152
+ durationMinutes: 30
153
+ label: "Focus time"
154
+ ```
155
+
156
+ ### myn_memory
157
+ Store and retrieve agent memories.
158
+
159
+ ```yaml
160
+ action: remember | recall | forget | search
161
+ ```
162
+
163
+ **Examples:**
164
+ ```yaml
165
+ # Remember user preference
166
+ action: remember
167
+ content: "User prefers morning meetings before 10am"
168
+ category: user_preference
169
+ tags: ["meetings", "preferences"]
170
+ importance: medium
171
+ ```
172
+
173
+ ### myn_profile
174
+ Manage user profile, goals, and preferences.
175
+
176
+ ```yaml
177
+ action: get_info | get_goals | update_goals | preferences
178
+ ```
179
+
180
+ ### myn_household
181
+ Manage household members, invites, and chores.
182
+
183
+ ```yaml
184
+ action: members | invite | chores | chore_schedule | chore_complete
185
+ ```
186
+
187
+ ### myn_projects
188
+ Manage projects and categories.
189
+
190
+ ```yaml
191
+ action: list | get | create | move_task
192
+ ```
193
+
194
+ ### myn_planning
195
+ AI-powered planning and scheduling.
196
+
197
+ ```yaml
198
+ action: plan | schedule_all | reschedule
199
+ ```
200
+
201
+ ## The MYN Methodology
202
+
203
+ Mind Your Now uses **urgency-based prioritization** rather than traditional importance-based systems.
204
+
205
+ ### Critical Now (≤ 5 items)
206
+ The "Going Home Test": "Would you work until midnight to finish this?"
207
+ - If NO → It's not Critical Now
208
+ - If YES → It belongs here
209
+ - **Maximum 5 items** - More than 5 and things slip
210
+
211
+ ### Opportunity Now (≤ 20 items)
212
+ Tasks you'd like to do soon but aren't burning. The max you can scan in one glance.
213
+
214
+ ### Over-the-Horizon (10+ days out)
215
+ Items with start dates 10+ days in the future. This gets them OFF your mental radar so you can focus.
216
+
217
+ ### Parking Lot
218
+ Low urgency tasks that don't fit elsewhere.
219
+
220
+ ## Task Creation Rules
221
+
222
+ When creating tasks, you MUST provide:
223
+
224
+ | Field | Description |
225
+ |-------|-------------|
226
+ | `id` | Client-generated UUID (`crypto.randomUUID()`) |
227
+ | `taskType` | TASK, HABIT, or CHORE |
228
+ | `priority` | CRITICAL, OPPORTUNITY_NOW, OVER_THE_HORIZON, or PARKING_LOT |
229
+ | `startDate` | ISO 8601 date (YYYY-MM-DD) |
230
+
231
+ **Type-Specific Requirements:**
232
+ - **HABIT**: Must have `recurrenceRule`
233
+ - **CHORE**: Must have `recurrenceRule`, always household-scoped
234
+
235
+ **Duration Format**: Use simple format like "30m", "1h", "1h30m" (NOT ISO PT prefix)
236
+
237
+ ## Skill Companion
238
+
239
+ This plugin includes a companion skill at `skills/myn/SKILL.md` that teaches agents MYN workflow patterns including:
240
+
241
+ - The morning routine (Compass briefing)
242
+ - Task creation best practices
243
+ - Priority management
244
+ - Common workflows
245
+
246
+ ## Development
247
+
248
+ ```bash
249
+ # Clone the repository
250
+ git clone https://github.com/mindyournow/openclaw-plugin.git
251
+ cd openclaw-plugin
252
+
253
+ # Install dependencies
254
+ npm install
255
+
256
+ # Run tests
257
+ npm test
258
+
259
+ # Build
260
+ npm run build
261
+
262
+ # Type check
263
+ npm run typecheck
264
+ ```
265
+
266
+ ## API Reference
267
+
268
+ ### MynApiClient
269
+
270
+ The shared API client used by all tools:
271
+
272
+ ```typescript
273
+ import { MynApiClient } from '@mind-your-now/openclaw-plugin';
274
+
275
+ const client = new MynApiClient(
276
+ 'https://api.mindyournow.com',
277
+ 'your-api-key'
278
+ );
279
+
280
+ // Make authenticated requests
281
+ const tasks = await client.get('/api/v2/unified-tasks');
282
+ const newTask = await client.post('/api/v2/unified-tasks', { ... });
283
+ ```
284
+
285
+ ## Testing
286
+
287
+ The plugin includes comprehensive test coverage:
288
+
289
+ ```bash
290
+ # Run all tests
291
+ npm test
292
+
293
+ # Run with coverage
294
+ npm run test -- --coverage
295
+
296
+ # Watch mode
297
+ npm run test:watch
298
+ ```
299
+
300
+ ## Contributing
301
+
302
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.
303
+
304
+ ## License
305
+
306
+ MIT © Mind Your Now
307
+
308
+ ## Support
309
+
310
+ - Documentation: https://docs.mindyournow.com
311
+ - Issues: https://github.com/mindyournow/openclaw-plugin/issues
312
+ - Discord: https://discord.gg/mindyournow
313
+
314
+ ---
315
+
316
+ <p align="center">
317
+ <sub>Built with ❤️ by the Mind Your Now team</sub>
318
+ </p>
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Mind Your Now - OpenClaw Plugin
3
+ * @mind-your-now/myn
4
+ *
5
+ * Main entry point that registers all 13 MYN tools with the OpenClaw agent.
6
+ */
7
+ export interface ToolDefinition {
8
+ id: string;
9
+ name: string;
10
+ description: string;
11
+ inputSchema: unknown;
12
+ execute: (input: unknown) => Promise<unknown>;
13
+ }
14
+ export interface OpenClawPluginApi {
15
+ registerTool(tool: ToolDefinition): void;
16
+ logger: {
17
+ debug(message: string): void;
18
+ info(message: string): void;
19
+ warn(message: string): void;
20
+ error(message: string): void;
21
+ };
22
+ pluginConfig?: Record<string, unknown>;
23
+ }
24
+ export interface MynPluginConfig {
25
+ apiKey: string;
26
+ baseUrl?: string;
27
+ }
28
+ declare const _default: {
29
+ id: string;
30
+ name: string;
31
+ configSchema: {
32
+ type: string;
33
+ properties: {
34
+ apiKey: {
35
+ type: string;
36
+ description: string;
37
+ };
38
+ baseUrl: {
39
+ type: string;
40
+ description: string;
41
+ default: string;
42
+ };
43
+ };
44
+ required: string[];
45
+ };
46
+ register(api: OpenClawPluginApi): void;
47
+ };
48
+ export default _default;
49
+ export { MynApiClient, MynApiError, jsonResult, errorResult } from './src/client.js';
50
+ export type { MynApiClientOptions } from './src/client.js';
51
+ export { TasksInputSchema } from './src/tools/tasks.js';
52
+ export { BriefingInputSchema } from './src/tools/briefing.js';
53
+ export { CalendarInputSchema } from './src/tools/calendar.js';
54
+ export { HabitsInputSchema } from './src/tools/habits.js';
55
+ export { ListsInputSchema } from './src/tools/lists.js';
56
+ export { SearchInputSchema } from './src/tools/search.js';
57
+ export { TimersInputSchema } from './src/tools/timers.js';
58
+ export { MemoryInputSchema } from './src/tools/memory.js';
59
+ export { ProfileInputSchema } from './src/tools/profile.js';
60
+ export { HouseholdInputSchema } from './src/tools/household.js';
61
+ export { ProjectsInputSchema } from './src/tools/projects.js';
62
+ export { PlanningInputSchema } from './src/tools/planning.js';
63
+ export { MynA2APairingInputSchema } from './src/tools/myn_a2a_pairing.js';
64
+ export type { TasksInput } from './src/tools/tasks.js';
65
+ export type { BriefingInput } from './src/tools/briefing.js';
66
+ export type { CalendarInput } from './src/tools/calendar.js';
67
+ export type { HabitsInput } from './src/tools/habits.js';
68
+ export type { ListsInput } from './src/tools/lists.js';
69
+ export type { SearchInput } from './src/tools/search.js';
70
+ export type { TimersInput } from './src/tools/timers.js';
71
+ export type { MemoryInput } from './src/tools/memory.js';
72
+ export type { ProfileInput } from './src/tools/profile.js';
73
+ export type { HouseholdInput } from './src/tools/household.js';
74
+ export type { ProjectsInput } from './src/tools/projects.js';
75
+ export type { PlanningInput } from './src/tools/planning.js';
76
+ export type { MynA2APairingInput } from './src/tools/myn_a2a_pairing.js';
77
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACzC,MAAM,EAAE;QACN,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAiDD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;;;;;;;;;;;;;;;kBAuBe,iBAAiB,GAAG,IAA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AE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Mind Your Now - OpenClaw Plugin
3
+ * @mind-your-now/myn
4
+ *
5
+ * Main entry point that registers all 13 MYN tools with the OpenClaw agent.
6
+ */
7
+ import { MynApiClient } from './src/client.js';
8
+ import { registerTasksTool } from './src/tools/tasks.js';
9
+ import { registerBriefingTool } from './src/tools/briefing.js';
10
+ import { registerCalendarTool } from './src/tools/calendar.js';
11
+ import { registerHabitsTool } from './src/tools/habits.js';
12
+ import { registerListsTool } from './src/tools/lists.js';
13
+ import { registerSearchTool } from './src/tools/search.js';
14
+ import { registerTimersTool } from './src/tools/timers.js';
15
+ import { registerMemoryTool } from './src/tools/memory.js';
16
+ import { registerProfileTool } from './src/tools/profile.js';
17
+ import { registerHouseholdTool } from './src/tools/household.js';
18
+ import { registerProjectsTool } from './src/tools/projects.js';
19
+ import { registerPlanningTool } from './src/tools/planning.js';
20
+ import { registerA2APairingTool } from './src/tools/myn_a2a_pairing.js';
21
+ /**
22
+ * Normalize JSON Schema for cross-provider compatibility.
23
+ *
24
+ * 1. JSON round-trip to strip TypeBox Symbol keys (Symbol(TypeBox.Kind))
25
+ * 2. Convert anyOf/const unions → enum (Moonshot/Kimi, Google require this)
26
+ * 3. Strip non-standard fields (format, patternProperties, minLength, maxLength)
27
+ */
28
+ function normalizeSchema(schema) {
29
+ // JSON round-trip strips TypeBox Symbol keys and non-serializable metadata
30
+ const clean = JSON.parse(JSON.stringify(schema));
31
+ return deepNormalize(clean);
32
+ }
33
+ function deepNormalize(schema) {
34
+ if (schema === null || typeof schema !== 'object')
35
+ return schema;
36
+ const s = schema;
37
+ // Convert anyOf of const literals → enum
38
+ if (Array.isArray(s.anyOf)) {
39
+ const allConst = s.anyOf.every((item) => item !== null && typeof item === 'object' && 'const' in item);
40
+ if (allConst) {
41
+ const enumValues = s.anyOf.map((item) => item.const);
42
+ const { anyOf: _, ...rest } = s;
43
+ return deepNormalize({ ...rest, type: 'string', enum: enumValues });
44
+ }
45
+ }
46
+ // Keys that break cross-provider compatibility
47
+ const skipKeys = new Set(['$schema', 'format', 'patternProperties', 'minLength', 'maxLength']);
48
+ const result = {};
49
+ for (const [key, value] of Object.entries(s)) {
50
+ if (skipKeys.has(key))
51
+ continue;
52
+ if (Array.isArray(value)) {
53
+ result[key] = value.map((item) => deepNormalize(item));
54
+ }
55
+ else if (value !== null && typeof value === 'object') {
56
+ result[key] = deepNormalize(value);
57
+ }
58
+ else {
59
+ result[key] = value;
60
+ }
61
+ }
62
+ return result;
63
+ }
64
+ const DEFAULT_BASE_URL = 'https://api.mindyournow.com';
65
+ export default {
66
+ id: 'myn',
67
+ name: 'Mind Your Now',
68
+ configSchema: {
69
+ type: 'object',
70
+ properties: {
71
+ apiKey: {
72
+ type: 'string',
73
+ description: 'MYN API key with AGENT_FULL scope'
74
+ },
75
+ baseUrl: {
76
+ type: 'string',
77
+ description: 'MYN API base URL',
78
+ default: DEFAULT_BASE_URL
79
+ }
80
+ },
81
+ required: ['apiKey']
82
+ },
83
+ register(api) {
84
+ const apiKey = api.pluginConfig?.apiKey;
85
+ const baseUrl = api.pluginConfig?.baseUrl || DEFAULT_BASE_URL;
86
+ if (!apiKey) {
87
+ api.logger.warn('[myn] apiKey not configured; MYN tools will not be registered');
88
+ api.logger.warn('[myn] Set plugins.entries.myn.config.apiKey in your OpenClaw config');
89
+ return;
90
+ }
91
+ api.logger.info('[myn] Initializing Mind Your Now plugin...');
92
+ // Create shared API client
93
+ const client = new MynApiClient(baseUrl, apiKey);
94
+ // Wrap registerTool to adapt our internal tool format to OpenClaw's plugin SDK:
95
+ // - 'parameters' (not 'inputSchema') for the schema
96
+ // - execute(_id, params) signature (not execute(input))
97
+ // - Return { content: [{ type: "text", text }] } format
98
+ // - Normalize TypeBox schemas for cross-provider compatibility
99
+ const wrappedApi = {
100
+ ...api,
101
+ registerTool(tool) {
102
+ const origExecute = tool.execute;
103
+ api.registerTool({
104
+ name: tool.id,
105
+ description: tool.description,
106
+ parameters: normalizeSchema(tool.inputSchema),
107
+ async execute(_id, params) {
108
+ const result = await origExecute(params);
109
+ return { content: [{ type: 'text', text: JSON.stringify(result) }] };
110
+ },
111
+ });
112
+ },
113
+ };
114
+ // Register all 13 tools
115
+ registerTasksTool(wrappedApi, client);
116
+ registerBriefingTool(wrappedApi, client);
117
+ registerCalendarTool(wrappedApi, client);
118
+ registerHabitsTool(wrappedApi, client);
119
+ registerListsTool(wrappedApi, client);
120
+ registerSearchTool(wrappedApi, client);
121
+ registerTimersTool(wrappedApi, client);
122
+ registerMemoryTool(wrappedApi, client);
123
+ registerProfileTool(wrappedApi, client);
124
+ registerHouseholdTool(wrappedApi, client);
125
+ registerProjectsTool(wrappedApi, client);
126
+ registerPlanningTool(wrappedApi, client);
127
+ registerA2APairingTool(wrappedApi, baseUrl);
128
+ api.logger.info('[myn] Registered 13 tools: tasks, briefing, calendar, habits, lists, search, timers, memory, profile, household, projects, planning, a2a_pairing');
129
+ }
130
+ };
131
+ // Re-export types and utilities for advanced usage
132
+ export { MynApiClient, MynApiError, jsonResult, errorResult } from './src/client.js';
133
+ // Re-export tool schemas for programmatic use
134
+ export { TasksInputSchema } from './src/tools/tasks.js';
135
+ export { BriefingInputSchema } from './src/tools/briefing.js';
136
+ export { CalendarInputSchema } from './src/tools/calendar.js';
137
+ export { HabitsInputSchema } from './src/tools/habits.js';
138
+ export { ListsInputSchema } from './src/tools/lists.js';
139
+ export { SearchInputSchema } from './src/tools/search.js';
140
+ export { TimersInputSchema } from './src/tools/timers.js';
141
+ export { MemoryInputSchema } from './src/tools/memory.js';
142
+ export { ProfileInputSchema } from './src/tools/profile.js';
143
+ export { HouseholdInputSchema } from './src/tools/household.js';
144
+ export { ProjectsInputSchema } from './src/tools/projects.js';
145
+ export { PlanningInputSchema } from './src/tools/planning.js';
146
+ export { MynA2APairingInputSchema } from './src/tools/myn_a2a_pairing.js';
147
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAqBxE;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,MAAe;IACtC,2EAA2E;IAC3E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,S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baseUrl: string;
7
+ apiKey: string;
8
+ }
9
+ export declare class MynApiClient {
10
+ private readonly baseUrl;
11
+ private readonly apiKey;
12
+ constructor(baseUrl: string, apiKey: string);
13
+ private request;
14
+ get<T>(path: string): Promise<T>;
15
+ post<T>(path: string, body?: unknown): Promise<T>;
16
+ put<T>(path: string, body?: unknown): Promise<T>;
17
+ patch<T>(path: string, body?: unknown): Promise<T>;
18
+ delete<T>(path: string): Promise<T>;
19
+ }
20
+ export declare class MynApiError extends Error {
21
+ readonly statusCode: number;
22
+ readonly responseBody?: string | undefined;
23
+ constructor(message: string, statusCode: number, responseBody?: string | undefined);
24
+ }
25
+ /**
26
+ * Helper to create a standardized tool result
27
+ */
28
+ export declare function jsonResult<T>(data: T): {
29
+ success: true;
30
+ data: T;
31
+ };
32
+ /**
33
+ * Helper to create a standardized error result
34
+ */
35
+ export declare function errorResult(message: string, details?: unknown): {
36
+ success: false;
37
+ error: string;
38
+ details?: unknown;
39
+ };
40
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;YAK7B,OAAO;IA4Df,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAIjD,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE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