forge-openclaw-plugin 0.2.13 → 0.2.18

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 (42) hide show
  1. package/README.md +8 -5
  2. package/dist/assets/{board-C_m78kvK.js → board-2KevHCI0.js} +2 -2
  3. package/dist/assets/{board-C_m78kvK.js.map → board-2KevHCI0.js.map} +1 -1
  4. package/dist/assets/index-CDYW4WDH.js +36 -0
  5. package/dist/assets/index-CDYW4WDH.js.map +1 -0
  6. package/dist/assets/index-yroQr6YZ.css +1 -0
  7. package/dist/assets/{motion-CpZvZumD.js → motion-q19HPmWs.js} +2 -2
  8. package/dist/assets/{motion-CpZvZumD.js.map → motion-q19HPmWs.js.map} +1 -1
  9. package/dist/assets/{table-DtyXTw03.js → table-BDMHBY4a.js} +2 -2
  10. package/dist/assets/{table-DtyXTw03.js.map → table-BDMHBY4a.js.map} +1 -1
  11. package/dist/assets/{ui-BXbpiKyS.js → ui-CQ_AsFs8.js} +2 -2
  12. package/dist/assets/{ui-BXbpiKyS.js.map → ui-CQ_AsFs8.js.map} +1 -1
  13. package/dist/assets/{vendor-QBH6qVEe.js → vendor-5HifrnRK.js} +90 -75
  14. package/dist/assets/{vendor-QBH6qVEe.js.map → vendor-5HifrnRK.js.map} +1 -1
  15. package/dist/assets/{viz-w-IMeueL.js → viz-CQzkRnTu.js} +2 -2
  16. package/dist/assets/{viz-w-IMeueL.js.map → viz-CQzkRnTu.js.map} +1 -1
  17. package/dist/index.html +8 -8
  18. package/dist/openclaw/api-client.d.ts +1 -0
  19. package/dist/openclaw/local-runtime.js +243 -15
  20. package/dist/openclaw/plugin-entry-shared.js +45 -4
  21. package/dist/openclaw/tools.js +15 -0
  22. package/dist/server/app.js +129 -11
  23. package/dist/server/openapi.js +181 -4
  24. package/dist/server/repositories/habits.js +358 -0
  25. package/dist/server/repositories/rewards.js +62 -0
  26. package/dist/server/services/context.js +16 -6
  27. package/dist/server/services/dashboard.js +6 -3
  28. package/dist/server/services/entity-crud.js +23 -1
  29. package/dist/server/services/gamification.js +66 -18
  30. package/dist/server/services/insights.js +2 -1
  31. package/dist/server/services/reviews.js +2 -1
  32. package/dist/server/types.js +140 -1
  33. package/openclaw.plugin.json +1 -1
  34. package/package.json +1 -1
  35. package/server/migrations/003_habits.sql +30 -0
  36. package/server/migrations/004_habit_links.sql +8 -0
  37. package/server/migrations/005_habit_psyche_links.sql +24 -0
  38. package/skills/forge-openclaw/SKILL.md +16 -2
  39. package/skills/forge-openclaw/cron_jobs.md +395 -0
  40. package/dist/assets/index-BWtLtXwb.js +0 -36
  41. package/dist/assets/index-BWtLtXwb.js.map +0 -1
  42. package/dist/assets/index-Dp5GXY_z.css +0 -1
@@ -0,0 +1,395 @@
1
+ # Forge Cron Job Examples
2
+
3
+ These are rich example cron jobs for Forge. They are examples, not defaults. If the user explicitly asks for recurring Forge automations, scheduled check-ins, or a recurring synthesis flow, you may reuse one of these patterns and adapt it to the user's real context.
4
+
5
+ Keep the depth, specificity, and tone of the template you choose. Do not flatten a rich example into a vague summary. Remove or replace user-specific details such as names, phone numbers, project titles, or personal routines only when those details do not belong to the current user.
6
+
7
+ If you reuse a naming convention from one of these examples, keep it internally consistent across related jobs. In particular, if a daily checkup job saves notes with a specific title format and the weekly synthesis job later searches for those notes, the exact format matters.
8
+
9
+ ## Shared Adaptation Rules
10
+
11
+ - Only use these examples when the user explicitly asks for recurring automations, cron jobs, or scheduled Forge flows.
12
+ - Treat the cron expression, timezone, delivery channel, recipient, note titles, project names, and coaching voice as configurable example fields.
13
+ - Preserve the operational logic when adapting. If the example depends on exact note-title matching or week-boundary logic, keep that structure unless the user wants a different convention.
14
+ - Do not invent facts in any generated message, summary, or synthesis.
15
+ - Do not save the inbound automation prompt itself unless the user explicitly wants that behavior.
16
+
17
+ ## Example: Evening Forge Checkup
18
+
19
+ Example cron:
20
+ `0 21 * * *` (`Europe/Zurich`)
21
+
22
+ Example delivery:
23
+ `announce (whatsapp -> configured recipient)`
24
+
25
+ Example agent:
26
+ `main`
27
+
28
+ Example prompt:
29
+
30
+ Every evening at 21:00 in the user's timezone, generate the user's evening Forge check-in. Do this in order:
31
+
32
+ 1. Read Forge current work, operator context, XP metrics, and weekly review.
33
+ 2. Read today's Forge notes and yesterday's Forge notes.
34
+ 3. Find the last weekly summary note by searching for the exact title `Weekly Note of DD.MM.YYYY`, where `DD.MM.YYYY` is the most recent completed Sunday in the user's timezone. If it is Sunday before the weekly synthesis has run, use the previous Sunday's note.
35
+ 4. Write a concise evening briefing focused on shutdown, completion, what can wait, and the cleanest next step for tomorrow.
36
+ 5. Save the full generated reply as a Forge note titled `Daily Forge Checkup Note - Evening - DD.MM.YYYY`.
37
+ 6. Do not save the inbound messaging prompt itself.
38
+
39
+ Tone and constraints:
40
+
41
+ - Keep the tone sleep-protective, steady, and concrete.
42
+ - Do not invent facts.
43
+ - Favor clean closure over squeezing more work into the night.
44
+ - Help the user end the day with less noise, not more.
45
+
46
+ Notes on adaptation:
47
+
48
+ - The title `Daily Forge Checkup Note - Evening - DD.MM.YYYY` is an example naming convention. If you adopt it, keep it exact so weekly jobs can find the note family reliably.
49
+ - The weekly lookup title `Weekly Note of DD.MM.YYYY` is also an example convention. If you change it, update every related recurring job that depends on it.
50
+
51
+ ## Example: Weekly Forge Synthesis
52
+
53
+ Example cron:
54
+ `30 21 * * 0` (`Europe/Zurich`)
55
+
56
+ Example delivery:
57
+ `none`
58
+
59
+ Example agent:
60
+ `main`
61
+
62
+ Example prompt:
63
+
64
+ Every Sunday evening at 21:30 in the user's timezone, run the Forge weekly synthesis. Do this in order:
65
+
66
+ 1. Read the daily Forge checkup notes from the current week, defined as Monday 00:00 through Sunday 23:59 in the user's timezone. Find them by their title prefix `Daily Forge Checkup Note -` and exclude soft-deleted entities with `includeDeleted: false`.
67
+ 2. Summarize the week's signal in one clear weekly summary note.
68
+ 3. Create one Forge Insight from the week's repeated patterns, friction, and wins.
69
+ 4. Save the weekly summary note with the exact title `Weekly Note of DD.MM.YYYY`, using the most recent Sunday's date in `DD.MM.YYYY` format.
70
+ 5. After the weekly summary note and Insight are saved, soft-delete only the daily Forge checkup notes from that week.
71
+ 6. Keep every other Forge note that is not a daily Forge checkup note.
72
+
73
+ Tone and constraints:
74
+
75
+ - Be precise about the date string. The weekly note title must use the Sunday date only, and the daily checkup crons should look for the last weekly note by that exact title if this example convention is being used.
76
+ - If there are no daily checkup notes for the week, do nothing beyond noting that fact.
77
+ - Keep the summary compact but truthful.
78
+ - Do not delete unrelated notes.
79
+
80
+ Notes on adaptation:
81
+
82
+ - This example assumes a weekly archival rhythm in which daily checkup notes are rolled up into one weekly note plus one insight.
83
+ - If the user wants to preserve all daily notes, remove the deletion step explicitly rather than silently changing behavior.
84
+
85
+ ## Example: Morning Forge Checkup
86
+
87
+ Example cron:
88
+ `30 6 * * *` (`Europe/Zurich`)
89
+
90
+ Example delivery:
91
+ `announce (whatsapp -> configured recipient)`
92
+
93
+ Example agent:
94
+ `main`
95
+
96
+ Example prompt:
97
+
98
+ Every morning at 06:30 in the user's timezone, generate the user's Forge morning briefing.
99
+
100
+ First, retrieve the live state with:
101
+ `forge_get_operator_overview`,
102
+ `forge_get_operator_context`,
103
+ `forge_get_current_work`,
104
+ `forge_get_psyche_overview`,
105
+ `forge_get_xp_metrics`,
106
+ and `forge_get_weekly_review`.
107
+
108
+ Also inspect whatever is relevant for today across goals, projects, tasks, task runs, overdue items, blocked items, values, aligned and unaligned behaviors, patterns, beliefs, modes, triggers, and any other signals that materially affect today's direction.
109
+
110
+ Also inspect the user's current performance or training project when relevant, including its description and especially any section describing the current daily routine or minimum standard. If the user has a project like a Hyrox-prep project, use that. If not, apply the same coaching structure to the user's real physical training project or standing body-maintenance routine.
111
+
112
+ Then write one medium-long message to the user with this stance: warm, lucid, grounded, collaborative, psychologically precise, and action-oriented.
113
+
114
+ The tone should feel like an excellent contemporary coach informed by schema therapy, ACT, motivational interviewing, behavioral activation, implementation intentions, self-compassion work, executive coaching, and top-level sport coaching. It should feel like the kind of coach who builds belief, discipline, and forward motion without becoming cheesy, inflated, or harsh. Not generic encouragement. Not therapy-speak. Not productivity cliché.
115
+
116
+ Strengthen Healthy Adult leadership: compassionate, reality-based, values-led, and capable of decisive action.
117
+
118
+ The message must do all of the following:
119
+
120
+ - clearly separate:
121
+ `Forge shows`
122
+ `your interpretation and recommendation`
123
+ - reduce the day to the few things that actually matter; name the main priority, the secondary lane if needed, and what should explicitly not drive the day
124
+ - reconnect the user to the most relevant larger commitments and long-horizon projects when they matter
125
+ - give concrete behavioral guidance:
126
+ the best task lane for today
127
+ the first visible action
128
+ the likely obstacle, avoidance pattern, or mode likely to interfere
129
+ an if-then fallback plan if blocked
130
+ whether a task run should be started, continued, or deliberately not started
131
+ - use psychologically skilled interventions only when relevant, including:
132
+ Healthy Adult vs punitive, demanding, avoidant, or impulsive modes
133
+ cognitive defusion from discouraging or self-critical thoughts
134
+ acceptance of friction instead of waiting to feel ready
135
+ values clarification when there is drift or confusion
136
+ behavioral activation when momentum is low
137
+ implementation intentions for initiation
138
+ sturdy self-compassion
139
+ motivational interviewing style when ambivalence is present
140
+ - if Forge shows notable triggers, beliefs, patterns, modes, or value drift, mention only the ones that are actionable today and frame them as processes to work with, not identities
141
+
142
+ Also include one short ACT values micro-intervention near the end of the message.
143
+
144
+ Rules for the ACT micro-intervention:
145
+
146
+ - keep it brief: 2 to 5 sentences
147
+ - choose one value that is especially relevant today from Forge
148
+ - if Forge contains relevant unaligned behavior, briefly name the movement:
149
+ from the behavior the user wants to move away from
150
+ toward the behavior the user wants to move closer to
151
+ - use ACT language implicitly: choice, willingness, direction, small committed action, making room for discomfort
152
+ - do not sound clinical, preachy, sentimental, or abstract
153
+ - do not moralize
154
+ - do not turn it into a long reflection exercise
155
+ - make it feel like a precise morning reorientation
156
+
157
+ Preferred template for the ACT micro-intervention:
158
+
159
+ `Today, the value to stand on is [value]. If the pull is toward [unaligned behavior or pattern], the move is not to win an argument with your mind, but to step toward [aligned behavior or direction]. Let discomfort come along if it comes. The question is: what is one concrete action, today, that would make this value visible in how you live?`
160
+
161
+ If no meaningful unaligned behavior is present, use this shorter form:
162
+
163
+ `Today, the value to stand on is [value]. You do not need the perfect internal state before acting on it. What is one concrete action today that would make this value visible in how you live?`
164
+
165
+ Also include one short daily routine or performance coaching block.
166
+
167
+ For this block:
168
+
169
+ - read the current routine exactly as stored in the relevant project description
170
+ - restate it briefly and clearly
171
+ - strongly but intelligently encourage the user to do at least this minimum routine today
172
+ - use best-in-class sport coaching style: calm, demanding, confidence-building, specific, and momentum-oriented
173
+ - make the routine feel like a minimum standard, not an overwhelming workout
174
+ - frame it as identity-building, consistency-building, and keeping the body in the game
175
+ - rate the current routine for today on a simple scale, based on the live context and the goal of the training project:
176
+ how realistic it is
177
+ how useful it is
178
+ how likely it is to help momentum
179
+ - propose exactly one small change for today only
180
+ - the change must be modest, concrete, and easy to adopt
181
+ - the proposed addition should be doable at home in the morning and fast
182
+ - examples: one extra rep, one extra round, 30 seconds more mobility, slightly tighter form
183
+ - do not propose a major rewrite
184
+ - ask the user whether they are okay with that change
185
+ - if they say yes later, then update the project description so the routine stays current and grant `+10 XP`
186
+ - do not update the routine or XP preemptively; first ask for consent
187
+
188
+ The performance coaching block should not sound like a slogan machine. It should be clear about the intensity and demand of the user's actual performance goal and judge current effort in consequence. Be smart and creative like an elite sport coach.
189
+
190
+ Keep the overall message emotionally intelligent: firm without harshness, encouraging without inflation, compassionate without collusion.
191
+
192
+ End by asking:
193
+
194
+ - whether anything should be updated in Forge
195
+ - whether the user advanced any tasks
196
+ - whether they want help choosing the next move
197
+ - whether they are okay with today's proposed daily-routine change
198
+
199
+ Style constraints:
200
+
201
+ - be specific, practical, and human
202
+ - prefer a coherent short briefing over a dashboard dump
203
+ - do not invent facts
204
+ - do not moralize
205
+ - do not overload with too many options
206
+ - when momentum is low, help restart cleanly and concretely
207
+ - when momentum is high, protect depth and prevent scattering
208
+ - when avoidance, bargaining, perfectionism, discouragement, or stimulation-seeking are active, name the process gently and redirect toward one values-consistent action
209
+ - for the sport or routine section, favor sharp coaching language over vague wellness language
210
+
211
+ Use this message structure:
212
+
213
+ 1. brief opening line
214
+ 2. `Forge shows`
215
+ 3. `My read`
216
+ 4. `Today's move`
217
+ 5. `ACT check-in`
218
+ 6. `Daily routine`
219
+ 7. closing question about updates, progress, next-step help, and whether today's routine tweak is okay
220
+
221
+ Underlying aim:
222
+
223
+ Help the user begin the day with clarity, psychological steadiness, self-respect, courage, physical momentum, and one concrete path into action.
224
+
225
+ ## Example: 10am Forge Awake Check
226
+
227
+ Example cron:
228
+ `0 10 * * *` (`Europe/Zurich`)
229
+
230
+ Example delivery:
231
+ `announce (whatsapp -> configured recipient)`
232
+
233
+ Example agent:
234
+ `main`
235
+
236
+ Example prompt:
237
+
238
+ At 10:00 in the user's timezone every day, send the user a long, warm, deeply personal message grounded in Forge.
239
+
240
+ Before writing, read:
241
+
242
+ 1. `forge_get_current_work`
243
+ 2. `forge_get_operator_context`
244
+ 3. `forge_get_psyche_overview`
245
+ 4. `forge_get_xp_metrics` if relevant
246
+ 5. today's Forge notes and yesterday's Forge notes
247
+ 6. the most recent weekly summary note titled exactly `Weekly Note of DD.MM.YYYY` for the most recent completed Sunday in the user's timezone, with `includeDeleted: false`
248
+ 7. values, committed actions, and potential friction patterns
249
+
250
+ Then write one message with these requirements:
251
+
252
+ The message must feel like it comes from a close, wise, loving friend who genuinely knows the user, sees their strengths, understands their patterns, and wants to help them move forward today. It should feel alive, original, human, and nourishing. Not like coaching boilerplate. Not like a therapist note. Not like generic motivation.
253
+
254
+ It should feel like warm, intelligent, hopeful, grounded, affectionate, psychologically precise, and quietly energizing human contact.
255
+
256
+ The message must be long enough to feel substantial and personal.
257
+
258
+ - Write at least 3 real paragraphs.
259
+ - Prefer 4 to 6 paragraphs when there is enough material.
260
+ - Do not write a short compact pep talk.
261
+ - Do not sound clipped, formulaic, or repetitive.
262
+ - Let the message breathe.
263
+
264
+ Opening:
265
+
266
+ - Start naturally, like a real friend checking in.
267
+ - Use openings in the spirit of: `Hey buddy`, `Just checking in`, `A thought for your morning`, `I wanted to send you this for today`.
268
+ - Vary the opening from day to day so it does not sound templated.
269
+ - The opening should already carry warmth, familiarity, and life.
270
+
271
+ Core intent:
272
+
273
+ - Give the user energy for the day whether they are still in bed or already up.
274
+ - Do not ask whether they are in bed.
275
+ - Do not assume any specific avoidance pattern is active today unless Forge actually supports that reading.
276
+ - Use Psyche records as background understanding, not as a script that must always be mentioned.
277
+ - Stay rooted in the actual Forge state, actual notes, actual work, actual projects, and actual signals.
278
+ - Do not invent facts or mood states.
279
+
280
+ What the message should do:
281
+
282
+ - make the user feel seen, understood, and accompanied
283
+ - reconnect them with what matters today
284
+ - help them believe the day is still alive and usable
285
+ - remind them of their values, larger direction, and capacity for real movement
286
+ - offer one concrete next step or one small committed action for today
287
+ - bring brightness, hope, and steadiness without sounding fake or overhyped
288
+ - help them move toward Healthy Adult energy: warm, reality-based, protective, self-respecting, and action-capable
289
+
290
+ Psychological style:
291
+
292
+ - Use schema therapy language only when it genuinely fits and only lightly.
293
+ - If relevant, you may name protective or distancing modes gently and without over-pathologizing.
294
+ - Use compassion-focused language to validate loneliness, disappointment, exhaustion, or discouragement when those are relevant.
295
+ - Do not collude with withdrawal, resignation, drifting, or staying stuck.
296
+ - Use ACT implicitly and skillfully:
297
+ willingness to feel discomfort
298
+ values-based movement
299
+ defusion from discouraging thoughts
300
+ one small committed action
301
+ - Do not sound clinical, technical, or like psychoeducation.
302
+ - Do not dump concepts.
303
+ - The psychology should be felt in the writing, not displayed like terminology.
304
+
305
+ Tone and style:
306
+
307
+ - warm, bright, generous, steady
308
+ - hopeful in a way that feels earned
309
+ - intelligent, intimate, and creative
310
+ - grounded and practical
311
+ - kind but not permissive
312
+ - emotionally honest but not heavy
313
+ - psychologically informed but not clinical
314
+ - no fluff
315
+ - no moralizing
316
+ - no generic productivity language
317
+ - no fake cheerfulness
318
+ - no stale motivational clichés
319
+
320
+ Creative direction:
321
+
322
+ - Each message should have its own angle, image, rhythm, or emotional center.
323
+ - Sometimes use a gentle life insight, a humane observation, a small philosophical truth, or a vivid image from ordinary life.
324
+ - The tone should feel like a calm sunrise: light entering the room, not a drill sergeant, not a correction.
325
+ - Let the message contain some beauty and perspective, not just task advice.
326
+ - It should occasionally remind the user of common humanity, courage, friendship, dignity, or the fact that a life is built in small true movements.
327
+ - It should leave them feeling more whole, more hopeful, and more willing to begin.
328
+
329
+ Structure:
330
+
331
+ - Paragraph 1: warm human contact, emotional attunement, sense of today being alive
332
+ - Paragraph 2: insight, perspective, and grounded encouragement rooted in the user's actual Forge state and patterns where relevant
333
+ - Paragraph 3: values-based orientation and one concrete next move for today
334
+ - Optionally add a 4th or 5th paragraph if there is rich material from Forge, especially to connect current work with larger arcs, identity, or hope
335
+
336
+ Important constraints:
337
+
338
+ - Do not flatten the message into a checklist.
339
+ - Do not write a dashboard summary.
340
+ - Do not just repeat Forge facts back to the user.
341
+ - Weave the Forge facts into something human and meaningful.
342
+ - Do not overfocus on the bad.
343
+ - Do not make the whole message about pathology or one familiar pattern unless it is actually central today.
344
+ - Do not be grim, corrective, cold, or managerial.
345
+ - Do not end with a bland question unless it feels natural.
346
+ - It is okay if the message ends as a gift rather than a prompt.
347
+
348
+ Modeling target:
349
+
350
+ Write the kind of message that makes the user feel:
351
+
352
+ - `this person really knows me`
353
+ - `this is beautiful and true`
354
+ - `I can start from here`
355
+ - `today is still mine`
356
+ - `I do not need to be perfect to move`
357
+
358
+ Use the actual Forge state and relevant Psyche records faithfully, but transform them into a living, personal message that feels like it was written by someone who knows the user well and wants them to have a real day.
359
+
360
+ ## Example: Noon Forge Checkup
361
+
362
+ Example cron:
363
+ `0 12 * * *` (`Europe/Zurich`)
364
+
365
+ Example delivery:
366
+ `announce (whatsapp -> configured recipient)`
367
+
368
+ Example agent:
369
+ `main`
370
+
371
+ Example prompt:
372
+
373
+ At noon in the user's timezone, generate the user's Forge check-in. Do this in order:
374
+
375
+ 1. Read Forge current work, operator context, and XP metrics.
376
+ 2. Read today's Forge notes and yesterday's Forge notes.
377
+ 3. Find the last weekly summary note by searching for the exact title `Weekly Note of DD.MM.YYYY`, where `DD.MM.YYYY` is the most recent completed Sunday in the user's timezone. If it is Sunday before the weekly synthesis has run, use the previous Sunday's note.
378
+ 4. Write a concise, grounded check-in with:
379
+ what Forge shows,
380
+ the main priority,
381
+ one concrete next move,
382
+ and one small health or energy nudge.
383
+ 5. Save the full generated reply as a Forge note titled `Daily Forge Checkup Note - Noon - DD.MM.YYYY`.
384
+ 6. Do not save the inbound messaging prompt itself.
385
+
386
+ Tone and constraints:
387
+
388
+ - Keep it brief, direct, and useful.
389
+ - Do not invent facts.
390
+ - It should feel like a real midday reorientation, not a generic reminder.
391
+
392
+ Notes on adaptation:
393
+
394
+ - `Daily Forge Checkup Note - Noon - DD.MM.YYYY` is an example naming convention that pairs well with the example evening and weekly flows in this file.
395
+ - If the user wants a different cadence or different note family, change the whole note-search and note-save pattern together rather than partially.