forge-openclaw-plugin 0.2.15 → 0.2.19

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 (67) hide show
  1. package/README.md +39 -4
  2. package/dist/assets/{board-C_m78kvK.js → board-8L3uX7_O.js} +2 -2
  3. package/dist/assets/{board-C_m78kvK.js.map → board-8L3uX7_O.js.map} +1 -1
  4. package/dist/assets/index-Cj1IBH_w.js +36 -0
  5. package/dist/assets/index-Cj1IBH_w.js.map +1 -0
  6. package/dist/assets/index-DQT6EbuS.css +1 -0
  7. package/dist/assets/{motion-CpZvZumD.js → motion-1GAqqi8M.js} +2 -2
  8. package/dist/assets/{motion-CpZvZumD.js.map → motion-1GAqqi8M.js.map} +1 -1
  9. package/dist/assets/{table-DtyXTw03.js → table-DBGlgRjk.js} +2 -2
  10. package/dist/assets/{table-DtyXTw03.js.map → table-DBGlgRjk.js.map} +1 -1
  11. package/dist/assets/{ui-BXbpiKyS.js → ui-iTluWjC4.js} +2 -2
  12. package/dist/assets/{ui-BXbpiKyS.js.map → ui-iTluWjC4.js.map} +1 -1
  13. package/dist/assets/{vendor-QBH6qVEe.js → vendor-BvM2F9Dp.js} +151 -81
  14. package/dist/assets/vendor-BvM2F9Dp.js.map +1 -0
  15. package/dist/assets/{viz-w-IMeueL.js → viz-CNeunkfu.js} +2 -2
  16. package/dist/assets/{viz-w-IMeueL.js.map → viz-CNeunkfu.js.map} +1 -1
  17. package/dist/index.html +8 -8
  18. package/dist/openclaw/local-runtime.js +142 -9
  19. package/dist/openclaw/parity.js +1 -0
  20. package/dist/openclaw/plugin-entry-shared.js +7 -1
  21. package/dist/openclaw/routes.js +7 -0
  22. package/dist/openclaw/tools.js +198 -16
  23. package/dist/server/app.js +2615 -251
  24. package/dist/server/managers/platform/secrets-manager.js +44 -1
  25. package/dist/server/managers/runtime.js +3 -1
  26. package/dist/server/openapi.js +2212 -170
  27. package/dist/server/repositories/calendar.js +1101 -0
  28. package/dist/server/repositories/deleted-entities.js +10 -2
  29. package/dist/server/repositories/habits.js +358 -0
  30. package/dist/server/repositories/notes.js +161 -28
  31. package/dist/server/repositories/projects.js +45 -13
  32. package/dist/server/repositories/rewards.js +176 -6
  33. package/dist/server/repositories/settings.js +47 -5
  34. package/dist/server/repositories/task-runs.js +46 -10
  35. package/dist/server/repositories/tasks.js +25 -9
  36. package/dist/server/repositories/weekly-reviews.js +109 -0
  37. package/dist/server/repositories/work-adjustments.js +105 -0
  38. package/dist/server/services/calendar-runtime.js +1301 -0
  39. package/dist/server/services/context.js +16 -6
  40. package/dist/server/services/dashboard.js +6 -3
  41. package/dist/server/services/entity-crud.js +116 -3
  42. package/dist/server/services/gamification.js +66 -18
  43. package/dist/server/services/insights.js +2 -1
  44. package/dist/server/services/projects.js +32 -8
  45. package/dist/server/services/reviews.js +17 -2
  46. package/dist/server/services/work-time.js +27 -0
  47. package/dist/server/types.js +1069 -45
  48. package/openclaw.plugin.json +1 -1
  49. package/package.json +1 -1
  50. package/server/migrations/003_habits.sql +30 -0
  51. package/server/migrations/004_habit_links.sql +8 -0
  52. package/server/migrations/005_habit_psyche_links.sql +24 -0
  53. package/server/migrations/006_work_adjustments.sql +14 -0
  54. package/server/migrations/007_weekly_review_closures.sql +17 -0
  55. package/server/migrations/008_calendar_execution.sql +147 -0
  56. package/server/migrations/009_true_calendar_events.sql +195 -0
  57. package/server/migrations/010_calendar_selection_state.sql +6 -0
  58. package/server/migrations/011_calendar_timezone_backfill.sql +11 -0
  59. package/server/migrations/012_work_block_ranges.sql +7 -0
  60. package/server/migrations/013_microsoft_local_auth_settings.sql +8 -0
  61. package/server/migrations/014_note_tags_and_ephemeral.sql +8 -0
  62. package/skills/forge-openclaw/SKILL.md +130 -10
  63. package/skills/forge-openclaw/cron_jobs.md +395 -0
  64. package/dist/assets/index-BWtLtXwb.js +0 -36
  65. package/dist/assets/index-BWtLtXwb.js.map +0 -1
  66. package/dist/assets/index-Dp5GXY_z.css +0 -1
  67. package/dist/assets/vendor-QBH6qVEe.js.map +0 -1
@@ -1,14 +1,18 @@
1
1
  ---
2
2
  name: forge-openclaw
3
- description: use when the user wants to save, search, update, review, start, stop, or explain work or psyche records inside forge, or when the conversation is clearly about a forge entity such as a goal, project, task, task_run, insight, psyche_value, behavior_pattern, behavior, belief_entry, mode_profile, mode_guide_session, trigger_report, event_type, or emotion_definition. identify the exact forge entity, keep the main conversation natural, offer saving once when helpful, ask only for missing fields, and use the correct forge tool and payload shape.
3
+ description: use when the user wants to save, search, update, review, start, stop, reward, or explain work or psyche records inside forge, or when the conversation is clearly about a forge entity such as a goal, project, task, habit, note, calendar_event, work_block_template, task_timebox, task_run, insight, psyche_value, behavior_pattern, behavior, belief_entry, mode_profile, mode_guide_session, trigger_report, event_type, or emotion_definition. identify the exact forge entity, keep the main conversation natural, offer saving once when helpful, ask only for missing fields, and use the correct forge tool and payload shape.
4
4
  ---
5
5
 
6
6
  Forge is the user's structured system for planning work, doing work, reflecting on patterns, and keeping a truthful record of what is happening. Use it when the user is clearly working inside that system, or when they are describing something that naturally belongs there and would benefit from being stored, updated, reviewed, or acted on in Forge. Keep the conversation natural first. Do not turn every message into intake. When a real Forge entity is clearly present, name the exact entity type plainly, help with the substance of the conversation, and then offer Forge once, lightly, if storing it would genuinely help.
7
7
 
8
- Forge has two major domains. The planning side covers goals, projects, tasks, notes, live work sessions, and agent-authored insights. The Psyche side covers values, patterns, behaviors, beliefs, modes, guided mode sessions, trigger reports, event types, and reusable emotion definitions. The model should use the real entity names, not vague substitutes. Say `project`, not “initiative”. Say `behavior_pattern`, not “theme”. Say `trigger_report`, not “incident note”.
8
+ Forge has two major domains. The planning side covers goals, projects, tasks, habits, notes, calendar events, recurring work blocks, task timeboxes, live work sessions, and agent-authored insights. The Psyche side covers values, patterns, behaviors, beliefs, modes, guided mode sessions, trigger reports, event types, and reusable emotion definitions. The model should use the real entity names, not vague substitutes. Say `project`, not “initiative”. Say `behavior_pattern`, not “theme”. Say `trigger_report`, not “incident note”.
9
+ Habits are a first-class recurring entity in the planning side. They can link directly to goals, projects, tasks, values, patterns, behaviors, beliefs, modes, and trigger reports, and they participate in the same searchable noteable graph as the rest of Forge.
10
+ NEGATIVE HABIT CHECK-IN RULE: for a `negative` habit, the correct aligned/resisted outcome is `missed`. `missed` means the bad habit was resisted, the user stayed aligned, and the habit should award its XP bonus.
9
11
 
10
12
  Write to Forge only with clear user consent. If the user is just thinking aloud, helping first is usually better than writing immediately. After helping, you may offer one short Forge prompt if the match is strong. If the user agrees, ask only for the missing fields and only one to three focused questions at a time. Do not offer Forge again after a decline unless the user reopens it.
11
13
 
14
+ Optional recurring automation templates live in `cron_jobs.md` next to this skill. Use that file only when the user explicitly asks for recurring Forge automations, cron jobs, scheduled check-ins, or a recurring synthesis workflow. Those entries are rich examples, not defaults: adapt personal details such as names, recipients, phone numbers, or project titles to the current user, but preserve the intended tone, operational logic, and any example naming conventions when the user chooses to adopt that pattern.
15
+
12
16
  Forge data location rule:
13
17
 
14
18
  - by default, Forge stores data under the active runtime root at `data/forge.sqlite`
@@ -23,16 +27,22 @@ Use these exact entity meanings when deciding what the user is describing.
23
27
 
24
28
  `goal` is a meaningful long-horizon direction or outcome. Use it for “be a great father”, “create meaningfully”, or “build a beautiful family”, not for one-off action items.
25
29
 
26
- `project` is a bounded workstream under a goal. Use it for “launch Forge plugin”, “plan summer move”, or “repair relationship with X”.
30
+ `project` is a bounded workstream under a goal. Use it for “launch Forge plugin”, “plan summer move”, or “repair relationship with X”. Project lifecycle is status-driven: `active` means in play, `paused` means suspended, and `completed` means finished. Setting a project to `completed` auto-completes linked unfinished tasks through Forge's normal task-completion path.
27
31
 
28
32
  `task` is a concrete action item or deliverable. Use it for “draft the plugin README”, “call the landlord”, or “book therapy session”.
29
33
 
30
34
  `task_run` is one truthful live work session on a task. It is not the same thing as task status.
31
35
 
32
- `note` is a Markdown evidence record that can link to one or many entities. Use it for work summaries, context, progress logs, handoff explanations, or reflective detail that should stay searchable and attached to the right records.
36
+ `note` is a first-class Markdown entity that can link to one or many other entities. Use it for work summaries, context, progress logs, handoff explanations, wiki-style reference pages, or reflective detail that should stay searchable and attached to the right records. Notes also support note-owned `tags` for memory-system labels such as `Working memory`, `Short-term memory`, `Episodic memory`, `Semantic memory`, and `Procedural memory`, plus custom tags. Notes may be durable or ephemeral: if `destroyAt` is set, Forge will delete the note automatically after that time.
33
37
 
34
38
  `insight` is an agent-authored observation, recommendation, or warning grounded in Forge data. It does not replace a requested goal, project, task, pattern, belief, or trigger report.
35
39
 
40
+ `calendar_event` is a canonical Forge event record. It lives in Forge first and can later project to a writable provider calendar.
41
+
42
+ `work_block_template` is a recurring work-availability template such as Main Activity, Secondary Activity, Third Activity, Rest, Holiday, or Custom.
43
+
44
+ `task_timebox` is a planned or live calendar slot attached to a task. It is scheduling structure, not proof that work actually started.
45
+
36
46
  `psyche_value` is a direction the user wants to live toward, such as honesty, courage, steadiness, compassion, or creativity.
37
47
 
38
48
  `behavior_pattern` is a recurring loop across situations. Think in terms of cue, emotion, thought, action, short-term payoff, long-term cost, and preferred replacement response.
@@ -58,6 +68,7 @@ Use for a meaningful direction over time.
58
68
  Minimum field: `title`
59
69
  Usually useful: `description`, `horizon`, `status`
60
70
  Ask:
71
+
61
72
  1. What should this goal be called?
62
73
  2. Why does it matter to you?
63
74
  3. Is this a quarter, year, or lifetime horizon?
@@ -67,6 +78,7 @@ Use for a bounded workstream under a goal.
67
78
  Minimum field: `title`
68
79
  Usually useful: `goalId`, `description`, `status`
69
80
  Ask:
81
+
70
82
  1. What should this project be called?
71
83
  2. Which goal does it support?
72
84
  3. What outcome should it produce?
@@ -76,10 +88,26 @@ Use for one concrete action or deliverable.
76
88
  Minimum field: `title`
77
89
  Usually useful: `projectId`, `goalId`, `priority`, `dueDate`, `status`, `owner`
78
90
  Ask:
91
+
79
92
  1. What is the task in one concrete sentence?
80
93
  2. Should it live under an existing goal or project?
81
94
  3. Does it need a due date, priority, or owner?
82
95
 
96
+ `habit`
97
+ Use for a recurring commitment or recurring slip with explicit cadence and XP consequences.
98
+ Minimum field: `title`
99
+ Usually useful: `polarity`, `frequency`, `linkedGoalIds`, `linkedProjectIds`, `linkedTaskIds`, `linkedValueIds`, `linkedPatternIds`, `linkedBehaviorIds`, `linkedBeliefIds`, `linkedModeIds`, `linkedReportIds`
100
+ CRITICAL NEGATIVE-HABIT CHECK-IN RULE:
101
+
102
+ - For a `negative` habit, the correct check-in outcome is `missed`.
103
+ - On a `negative` habit, `missed` means the habit was resisted, the user stayed aligned, and the habit earns its XP bonus.
104
+ - Do not treat `missed` on a `negative` habit as failure. In this case, `missed` is the successful outcome.
105
+ Ask:
106
+
107
+ 1. What is the recurring behavior in one concrete sentence?
108
+ 2. Is doing it good (`positive`) or a slip (`negative`)?
109
+ 3. What should it link back to in Forge or Psyche?
110
+
83
111
  `task_run`
84
112
  Use for live work happening now.
85
113
  Required fields to start: `taskId`, `actor`
@@ -90,6 +118,7 @@ Use for a value or committed direction.
90
118
  Minimum field: `title`
91
119
  Usually useful: `description`, `valuedDirection`, `whyItMatters`, links to goals, projects, or tasks
92
120
  Ask:
121
+
93
122
  1. What value or direction is this?
94
123
  2. How would you describe it in your own words?
95
124
  3. Why does it matter now?
@@ -99,6 +128,7 @@ Use for a recurring loop across situations.
99
128
  Minimum field: `title`
100
129
  Usually useful: `description`, `targetBehavior`, `cueContexts`, `shortTermPayoff`, `longTermCost`, `preferredResponse`
101
130
  Ask:
131
+
102
132
  1. What would you call this pattern?
103
133
  2. What usually sets it off, and what tends to happen next?
104
134
  3. What does it give you in the short term, what does it cost later, and what response would you rather make?
@@ -108,6 +138,7 @@ Use for one recurring move or action tendency.
108
138
  Minimum fields: `kind`, `title`
109
139
  Usually useful: `commonCues`, `urgeStory`, `shortTermPayoff`, `longTermCost`, `replacementMove`, `repairPlan`
110
140
  Ask:
141
+
111
142
  1. What happened, in plain language?
112
143
  2. Is it an `away`, `committed`, or `recovery` behavior?
113
144
  3. What cues show up, and what move would you want available instead?
@@ -117,6 +148,7 @@ Use for one explicit belief sentence.
117
148
  Minimum fields: `statement`, `beliefType`
118
149
  Usually useful: `confidence`, `evidenceFor`, `evidenceAgainst`, `flexibleAlternative`, `originNote`
119
150
  Ask:
151
+
120
152
  1. What is the belief in one sentence?
121
153
  2. Is it `absolute` or `conditional`, and how true does it feel from 0 to 100?
122
154
  3. What supports it, what weakens it, and what would be a more flexible alternative?
@@ -126,6 +158,7 @@ Use for a recurring part-state or inner role.
126
158
  Minimum fields: `family`, `title`
127
159
  Usually useful: `fear`, `burden`, `protectiveJob`, `originContext`, links to patterns, behaviors, and values
128
160
  Ask:
161
+
129
162
  1. What kind of mode is this: `coping`, `child`, `critic_parent`, `healthy_adult`, or `happy_child`?
130
163
  2. What should this mode be called?
131
164
  3. What does it fear, carry, or try to protect?
@@ -140,6 +173,7 @@ Use for one specific emotionally important episode.
140
173
  Minimum field: `title`
141
174
  Usually useful: `eventSituation`, `occurredAt`, `emotions`, `thoughts`, `behaviors`, `consequences`, `nextMoves`, links to values, beliefs, patterns, modes, goals, projects, or tasks
142
175
  Ask:
176
+
143
177
  1. What happened?
144
178
  2. What emotions were present, and how intense were they?
145
179
  3. What thoughts showed up, what did you do next, and what would be the useful next move now?
@@ -149,6 +183,7 @@ Use for a reusable trigger category.
149
183
  Minimum field: `label`
150
184
  Usually useful: `description`
151
185
  Ask:
186
+
152
187
  1. What should this event type be called?
153
188
  2. What kind of incident does it represent?
154
189
 
@@ -157,6 +192,7 @@ Use for a reusable emotion vocabulary entry.
157
192
  Minimum field: `label`
158
193
  Usually useful: `description`, `category`
159
194
  Ask:
195
+
160
196
  1. What emotion label do you want to reuse?
161
197
  2. How would you describe it?
162
198
  3. Does it belong to a broader category?
@@ -171,12 +207,15 @@ Use the batch entity tools for stored records:
171
207
  `forge_search_entities`, `forge_create_entities`, `forge_update_entities`, `forge_delete_entities`, `forge_restore_entities`
172
208
 
173
209
  These tools operate on:
174
- `goal`, `project`, `task`, `note`, `psyche_value`, `behavior_pattern`, `behavior`, `belief_entry`, `mode_profile`, `mode_guide_session`, `trigger_report`, `event_type`, `emotion_definition`
210
+ `goal`, `project`, `task`, `habit`, `note`, `calendar_event`, `work_block_template`, `task_timebox`, `psyche_value`, `behavior_pattern`, `behavior`, `belief_entry`, `mode_profile`, `mode_guide_session`, `trigger_report`, `event_type`, `emotion_definition`
175
211
 
176
212
  Use live work tools for `task_run`:
177
- `forge_log_work`, `forge_start_task_run`, `forge_heartbeat_task_run`, `forge_focus_task_run`, `forge_complete_task_run`, `forge_release_task_run`
213
+ `forge_adjust_work_minutes`, `forge_log_work`, `forge_start_task_run`, `forge_heartbeat_task_run`, `forge_focus_task_run`, `forge_complete_task_run`, `forge_release_task_run`
178
214
 
179
215
  Use `forge_post_insight` for `insight`.
216
+ Use `forge_grant_reward_bonus` only for explicit manual XP bonuses or penalties that should be auditable and cannot be expressed through the normal task-run or habit check-in routes.
217
+ Use the calendar tools for provider sync and planning:
218
+ `forge_get_calendar_overview`, `forge_connect_calendar_provider`, `forge_sync_calendar_connection`, `forge_create_work_block_template`, `forge_recommend_task_timeboxes`, `forge_create_task_timebox`
180
219
 
181
220
  Do not say you lack a creation path when these tools cover the request. Do not open the Forge UI or a browser for normal creation or updates that the tools already support. Use `forge_get_ui_entrypoint` only when visual review, Kanban movement, graph exploration, or complex multi-record editing would genuinely be easier there.
182
221
 
@@ -188,12 +227,40 @@ Use these exact payload expectations.
188
227
 
189
228
  For create operations, each item must include `entityType` and `data`.
190
229
 
191
- When creating `goal`, `project`, or `task`, the create payload may also include `notes: [{ contentMarkdown, author?, links? }]`. Forge will create real linked `note` entities automatically and attach them to the new parent record.
230
+ Calendar entity CRUD uses these same batch tools:
231
+
232
+ - create a native event with `forge_create_entities` and `entityType: "calendar_event"`
233
+ - update or move an event with `forge_update_entities` and `entityType: "calendar_event"`
234
+ - delete an event with `forge_delete_entities` and `entityType: "calendar_event"`
235
+ - create, update, or delete recurring work blocks with `entityType: "work_block_template"`
236
+ - create or update planned task slots with `entityType: "task_timebox"`
237
+
238
+ Forge still runs the downstream calendar behavior after these generic mutations. For `calendar_event`, that includes provider projection sync on create or update and remote projection deletion on delete.
239
+ Calendar date/time rule: when the user gives a local time such as “1pm”, interpret it in the user's timezone, not UTC. Set the payload `timezone` to the user's real timezone and serialize `startAt`, `endAt`, `startsAt`, and `endsAt` so they represent that local wall-clock time correctly. Do not silently treat unspecified local times as `UTC+0`.
240
+ Calendar sync default: unless the user explicitly asks for Forge-only storage, do not set `preferredCalendarId` to `null`. Omit `preferredCalendarId` on event creation so Forge can use the default writable connected calendar automatically. Use `preferredCalendarId: null` only when the user clearly wants the event to stay Forge-only.
241
+
242
+ When creating `goal`, `project`, or `task`, the create payload may also include `notes: [{ contentMarkdown, author?, tags?, destroyAt?, links? }]`. Forge will create real linked `note` entities automatically and attach them to the new parent record.
243
+
244
+ To create a standalone note directly, use `forge_create_entities` with `entityType: "note"` and `data: { contentMarkdown, author?, tags?, destroyAt?, links }`. `links` should point at one or more real Forge entities so the note remains connected and searchable across the graph. Use `tags` for built-in memory-system labels or custom note labels. Use `destroyAt` only when the note should be ephemeral scratch memory that self-destructs later.
192
245
 
193
246
  For update operations, each item must include `entityType`, `id`, and `patch`.
194
247
 
248
+ For project lifecycle changes, prefer generic updates:
249
+
250
+ - suspend a project with `forge_update_entities` and `patch: { status: "paused" }`
251
+ - finish a project with `forge_update_entities` and `patch: { status: "completed" }`
252
+ - restart a project with `forge_update_entities` and `patch: { status: "active" }`
253
+ - set project calendar defaults with `forge_update_entities` and `patch: { schedulingRules: ... }`
254
+ - set task-specific scheduling with `forge_update_entities` and `patch: { schedulingRules: ..., plannedDurationSeconds: ... }`
255
+
195
256
  For delete operations, each item must include `entityType` and `id`. Delete is soft by default unless the user explicitly wants hard delete.
196
257
 
258
+ For project deletion and recovery, prefer the generic delete and restore tools:
259
+
260
+ - soft delete with `forge_delete_entities`
261
+ - hard delete only when the user is explicitly asking for permanent removal, using `mode: "hard"`
262
+ - restore with `forge_restore_entities`
263
+
197
264
  For restore operations, each item must include `entityType` and `id`.
198
265
 
199
266
  Batch tools do not create or control `task_run` or `insight`.
@@ -204,18 +271,63 @@ Use these live work rules.
204
271
 
205
272
  A `task_run` is the truthful way to represent live work. Do not pretend that changing task status is the same as starting or stopping a work session.
206
273
 
207
- Use `forge_start_task_run` to begin live work. Required fields: `taskId`, `actor`. If `timerMode` is `planned`, include `plannedDurationSeconds`. If `timerMode` is `unlimited`, omit `plannedDurationSeconds` or set it to null.
274
+ Use `forge_start_task_run` to begin live work. Required fields: `taskId`, `actor`. If `timerMode` is `planned`, include `plannedDurationSeconds`. If `timerMode` is `unlimited`, omit `plannedDurationSeconds` or set it to null. If calendar rules currently block the task and the user still wants to proceed, include `overrideReason`.
208
275
 
209
276
  Use `forge_heartbeat_task_run` to keep an active run alive.
210
277
 
211
278
  Use `forge_focus_task_run` when one active run should become the current visible run.
212
279
 
213
- Use `forge_complete_task_run` to finish live work. When the user or agent wants to preserve what was done, include `closeoutNote` so Forge creates a real linked `note` instead of losing that explanation inside ephemeral run metadata.
280
+ Use `forge_complete_task_run` to finish live work. When the user or agent wants to preserve what was done, include `closeoutNote` so Forge creates a real linked `note` instead of losing that explanation inside ephemeral run metadata. `closeoutNote` supports the same note fields as normal note creation, including `tags` and `destroyAt`.
214
281
 
215
- Use `forge_release_task_run` to stop live work without completing the task. `closeoutNote` is also available there for handoff or pause context.
282
+ Use `forge_release_task_run` to stop live work without completing the task. `closeoutNote` is also available there for handoff or pause context, including note tags or an ephemeral destroy time when that handoff note should self-delete later.
216
283
 
217
284
  Use `forge_log_work` only for retroactive work that already happened. If the user explains the work in a way that should be preserved, include `closeoutNote`.
218
285
 
286
+ Use `forge_adjust_work_minutes` when the task or project already exists and the user only needs tracked minutes corrected up or down. This is the truthful path for signed retrospective minute adjustments and it automatically applies symmetric XP changes when reward buckets are crossed.
287
+
288
+ Use the calendar tools when the request is about planning or availability rather than entity storage:
289
+
290
+ - `forge_get_calendar_overview` to inspect mirrored events, work blocks, provider connections, and existing timeboxes
291
+ - `forge_connect_calendar_provider` only when the operator explicitly wants a new Google, Apple, Exchange Online, or custom CalDAV connection and the discovery choices are already known
292
+ - `forge_sync_calendar_connection` after a provider connection is created or when the calendar needs a fresh pull/push cycle
293
+ - `forge_create_work_block_template` as a convenience helper for Main Activity, Secondary Activity, Third Activity, Rest, Holiday, or Custom recurring blocks
294
+ - `forge_recommend_task_timeboxes` to find future slots that satisfy current rules
295
+ - `forge_create_task_timebox` as a convenience helper to confirm a selected slot into a real planned timebox
296
+
297
+ Work-block payload guidance:
298
+
299
+ - `kind` must be one of `main_activity`, `secondary_activity`, `third_activity`, `rest`, `holiday`, or `custom`
300
+ - `weekDays` uses Sunday=`0` through Saturday=`6`
301
+ - `startMinute` and `endMinute` are minutes from midnight in the selected `timezone`
302
+ - `startsOn` and `endsOn` are optional `YYYY-MM-DD` bounds on the recurring template
303
+ - if `endsOn` is omitted or null, the block repeats indefinitely
304
+ - holidays should usually use `kind: "holiday"`, `weekDays: [0,1,2,3,4,5,6]`, `startMinute: 0`, and `endMinute: 1440`
305
+ - work blocks are compact recurring templates inside Forge, not repeated stored events for every day
306
+
307
+ Provider-specific expectations:
308
+
309
+ - Google and Apple plus writable custom CalDAV connections can mirror selected calendars and publish Forge-owned work blocks or timeboxes into a dedicated `Forge` calendar.
310
+ - Exchange Online uses Microsoft Graph and is read-only in the current Forge implementation. It mirrors the selected calendars into Forge but does not publish work blocks, timeboxes, or native events back to Microsoft.
311
+ - Exchange Online connection setup is guided and interactive. In normal self-hosted local use, the operator must first save the Microsoft client ID, tenant, and redirect URI in `Settings -> Calendar`, then continue through the popup sign-in flow backed by a local MSAL public-client configuration.
312
+ - If an interactive Microsoft auth session has already been completed and the backend gave you an `authSessionId`, then `forge_connect_calendar_provider` accepts `provider: "microsoft"` with `label`, `authSessionId`, and `selectedCalendarUrls`.
313
+
314
+ Use these exact calendar batch payload shapes when working generically:
315
+
316
+ - create a native event:
317
+ `{"operations":[{"entityType":"calendar_event","data":{"title":"Weekly research supervision","startAt":"2026-04-06T06:00:00.000Z","endAt":"2026-04-06T07:00:00.000Z","timezone":"Europe/Zurich","links":[{"entityType":"project","entityId":"project_123","relationshipType":"meeting_for"}]}}]}`
318
+ - update or move an event:
319
+ `{"operations":[{"entityType":"calendar_event","id":"calevent_123","patch":{"startAt":"2026-04-06T06:30:00.000Z","endAt":"2026-04-06T07:30:00.000Z","timezone":"Europe/Zurich","preferredCalendarId":"calendar_123"}}]}`
320
+ - delete an event:
321
+ `{"operations":[{"entityType":"calendar_event","id":"calevent_123"}]}`
322
+ - create a recurring work block:
323
+ `{"operations":[{"entityType":"work_block_template","data":{"title":"Main Activity","kind":"main_activity","color":"#f97316","timezone":"Europe/Zurich","weekDays":[1,2,3,4,5],"startMinute":480,"endMinute":720,"startsOn":"2026-04-06","endsOn":null,"blockingState":"blocked"}}]}`
324
+ - create a holiday block:
325
+ `{"operations":[{"entityType":"work_block_template","data":{"title":"Summer holiday","kind":"holiday","color":"#14b8a6","timezone":"Europe/Zurich","weekDays":[0,1,2,3,4,5,6],"startMinute":0,"endMinute":1440,"startsOn":"2026-08-01","endsOn":"2026-08-16","blockingState":"blocked"}}]}`
326
+ - create a planned task slot:
327
+ `{"operations":[{"entityType":"task_timebox","data":{"taskId":"task_123","projectId":"project_456","title":"Draft the methods section","startsAt":"2026-04-03T06:00:00.000Z","endsAt":"2026-04-03T07:30:00.000Z","source":"suggested"}}]}`
328
+
329
+ Do not use `forge_adjust_work_minutes` to simulate a live session. Live work still belongs in `forge_start_task_run` and the rest of the task-run workflow.
330
+
219
331
  Use these interaction rules.
220
332
 
221
333
  Keep the main discussion natural. Do not turn every conversation into a form. Do not offer Forge for every passing mention. Offer it once, near the end, only when the signal is strong and storing would help.
@@ -247,6 +359,8 @@ When the user asks which Forge tools are available, list exactly these tools:
247
359
  `forge_update_entities`
248
360
  `forge_delete_entities`
249
361
  `forge_restore_entities`
362
+ `forge_grant_reward_bonus`
363
+ `forge_adjust_work_minutes`
250
364
  `forge_log_work`
251
365
  `forge_start_task_run`
252
366
  `forge_heartbeat_task_run`
@@ -254,3 +368,9 @@ When the user asks which Forge tools are available, list exactly these tools:
254
368
  `forge_complete_task_run`
255
369
  `forge_release_task_run`
256
370
  `forge_post_insight`
371
+ `forge_get_calendar_overview`
372
+ `forge_connect_calendar_provider`
373
+ `forge_sync_calendar_connection`
374
+ `forge_create_work_block_template`
375
+ `forge_recommend_task_timeboxes`
376
+ `forge_create_task_timebox`