forge-openclaw-plugin 0.2.18 → 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 (56) hide show
  1. package/README.md +36 -4
  2. package/dist/assets/{board-2KevHCI0.js → board-8L3uX7_O.js} +2 -2
  3. package/dist/assets/{board-2KevHCI0.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-q19HPmWs.js → motion-1GAqqi8M.js} +2 -2
  8. package/dist/assets/{motion-q19HPmWs.js.map → motion-1GAqqi8M.js.map} +1 -1
  9. package/dist/assets/{table-BDMHBY4a.js → table-DBGlgRjk.js} +2 -2
  10. package/dist/assets/{table-BDMHBY4a.js.map → table-DBGlgRjk.js.map} +1 -1
  11. package/dist/assets/{ui-CQ_AsFs8.js → ui-iTluWjC4.js} +2 -2
  12. package/dist/assets/{ui-CQ_AsFs8.js.map → ui-iTluWjC4.js.map} +1 -1
  13. package/dist/assets/{vendor-5HifrnRK.js → vendor-BvM2F9Dp.js} +139 -84
  14. package/dist/assets/vendor-BvM2F9Dp.js.map +1 -0
  15. package/dist/assets/{viz-CQzkRnTu.js → viz-CNeunkfu.js} +2 -2
  16. package/dist/assets/{viz-CQzkRnTu.js.map → viz-CNeunkfu.js.map} +1 -1
  17. package/dist/index.html +8 -8
  18. package/dist/openclaw/parity.js +1 -0
  19. package/dist/openclaw/routes.js +7 -0
  20. package/dist/openclaw/tools.js +183 -16
  21. package/dist/server/app.js +2509 -263
  22. package/dist/server/managers/platform/secrets-manager.js +44 -1
  23. package/dist/server/managers/runtime.js +3 -1
  24. package/dist/server/openapi.js +2037 -172
  25. package/dist/server/repositories/calendar.js +1101 -0
  26. package/dist/server/repositories/deleted-entities.js +10 -2
  27. package/dist/server/repositories/notes.js +161 -28
  28. package/dist/server/repositories/projects.js +45 -13
  29. package/dist/server/repositories/rewards.js +114 -6
  30. package/dist/server/repositories/settings.js +47 -5
  31. package/dist/server/repositories/task-runs.js +46 -10
  32. package/dist/server/repositories/tasks.js +25 -9
  33. package/dist/server/repositories/weekly-reviews.js +109 -0
  34. package/dist/server/repositories/work-adjustments.js +105 -0
  35. package/dist/server/services/calendar-runtime.js +1301 -0
  36. package/dist/server/services/entity-crud.js +94 -3
  37. package/dist/server/services/projects.js +32 -8
  38. package/dist/server/services/reviews.js +15 -1
  39. package/dist/server/services/work-time.js +27 -0
  40. package/dist/server/types.js +934 -49
  41. package/openclaw.plugin.json +1 -1
  42. package/package.json +1 -1
  43. package/server/migrations/006_work_adjustments.sql +14 -0
  44. package/server/migrations/007_weekly_review_closures.sql +17 -0
  45. package/server/migrations/008_calendar_execution.sql +147 -0
  46. package/server/migrations/009_true_calendar_events.sql +195 -0
  47. package/server/migrations/010_calendar_selection_state.sql +6 -0
  48. package/server/migrations/011_calendar_timezone_backfill.sql +11 -0
  49. package/server/migrations/012_work_block_ranges.sql +7 -0
  50. package/server/migrations/013_microsoft_local_auth_settings.sql +8 -0
  51. package/server/migrations/014_note_tags_and_ephemeral.sql +8 -0
  52. package/skills/forge-openclaw/SKILL.md +117 -11
  53. package/dist/assets/index-CDYW4WDH.js +0 -36
  54. package/dist/assets/index-CDYW4WDH.js.map +0 -1
  55. package/dist/assets/index-yroQr6YZ.css +0 -1
  56. package/dist/assets/vendor-5HifrnRK.js.map +0 -1
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: forge-openclaw
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, 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
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.
10
11
 
11
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.
12
13
 
@@ -26,16 +27,22 @@ Use these exact entity meanings when deciding what the user is describing.
26
27
 
27
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.
28
29
 
29
- `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.
30
31
 
31
32
  `task` is a concrete action item or deliverable. Use it for “draft the plugin README”, “call the landlord”, or “book therapy session”.
32
33
 
33
34
  `task_run` is one truthful live work session on a task. It is not the same thing as task status.
34
35
 
35
- `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.
36
37
 
37
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.
38
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
+
39
46
  `psyche_value` is a direction the user wants to live toward, such as honesty, courage, steadiness, compassion, or creativity.
40
47
 
41
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.
@@ -61,6 +68,7 @@ Use for a meaningful direction over time.
61
68
  Minimum field: `title`
62
69
  Usually useful: `description`, `horizon`, `status`
63
70
  Ask:
71
+
64
72
  1. What should this goal be called?
65
73
  2. Why does it matter to you?
66
74
  3. Is this a quarter, year, or lifetime horizon?
@@ -70,6 +78,7 @@ Use for a bounded workstream under a goal.
70
78
  Minimum field: `title`
71
79
  Usually useful: `goalId`, `description`, `status`
72
80
  Ask:
81
+
73
82
  1. What should this project be called?
74
83
  2. Which goal does it support?
75
84
  3. What outcome should it produce?
@@ -79,6 +88,7 @@ Use for one concrete action or deliverable.
79
88
  Minimum field: `title`
80
89
  Usually useful: `projectId`, `goalId`, `priority`, `dueDate`, `status`, `owner`
81
90
  Ask:
91
+
82
92
  1. What is the task in one concrete sentence?
83
93
  2. Should it live under an existing goal or project?
84
94
  3. Does it need a due date, priority, or owner?
@@ -87,7 +97,13 @@ Ask:
87
97
  Use for a recurring commitment or recurring slip with explicit cadence and XP consequences.
88
98
  Minimum field: `title`
89
99
  Usually useful: `polarity`, `frequency`, `linkedGoalIds`, `linkedProjectIds`, `linkedTaskIds`, `linkedValueIds`, `linkedPatternIds`, `linkedBehaviorIds`, `linkedBeliefIds`, `linkedModeIds`, `linkedReportIds`
90
- Ask:
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
+
91
107
  1. What is the recurring behavior in one concrete sentence?
92
108
  2. Is doing it good (`positive`) or a slip (`negative`)?
93
109
  3. What should it link back to in Forge or Psyche?
@@ -102,6 +118,7 @@ Use for a value or committed direction.
102
118
  Minimum field: `title`
103
119
  Usually useful: `description`, `valuedDirection`, `whyItMatters`, links to goals, projects, or tasks
104
120
  Ask:
121
+
105
122
  1. What value or direction is this?
106
123
  2. How would you describe it in your own words?
107
124
  3. Why does it matter now?
@@ -111,6 +128,7 @@ Use for a recurring loop across situations.
111
128
  Minimum field: `title`
112
129
  Usually useful: `description`, `targetBehavior`, `cueContexts`, `shortTermPayoff`, `longTermCost`, `preferredResponse`
113
130
  Ask:
131
+
114
132
  1. What would you call this pattern?
115
133
  2. What usually sets it off, and what tends to happen next?
116
134
  3. What does it give you in the short term, what does it cost later, and what response would you rather make?
@@ -120,6 +138,7 @@ Use for one recurring move or action tendency.
120
138
  Minimum fields: `kind`, `title`
121
139
  Usually useful: `commonCues`, `urgeStory`, `shortTermPayoff`, `longTermCost`, `replacementMove`, `repairPlan`
122
140
  Ask:
141
+
123
142
  1. What happened, in plain language?
124
143
  2. Is it an `away`, `committed`, or `recovery` behavior?
125
144
  3. What cues show up, and what move would you want available instead?
@@ -129,6 +148,7 @@ Use for one explicit belief sentence.
129
148
  Minimum fields: `statement`, `beliefType`
130
149
  Usually useful: `confidence`, `evidenceFor`, `evidenceAgainst`, `flexibleAlternative`, `originNote`
131
150
  Ask:
151
+
132
152
  1. What is the belief in one sentence?
133
153
  2. Is it `absolute` or `conditional`, and how true does it feel from 0 to 100?
134
154
  3. What supports it, what weakens it, and what would be a more flexible alternative?
@@ -138,6 +158,7 @@ Use for a recurring part-state or inner role.
138
158
  Minimum fields: `family`, `title`
139
159
  Usually useful: `fear`, `burden`, `protectiveJob`, `originContext`, links to patterns, behaviors, and values
140
160
  Ask:
161
+
141
162
  1. What kind of mode is this: `coping`, `child`, `critic_parent`, `healthy_adult`, or `happy_child`?
142
163
  2. What should this mode be called?
143
164
  3. What does it fear, carry, or try to protect?
@@ -152,6 +173,7 @@ Use for one specific emotionally important episode.
152
173
  Minimum field: `title`
153
174
  Usually useful: `eventSituation`, `occurredAt`, `emotions`, `thoughts`, `behaviors`, `consequences`, `nextMoves`, links to values, beliefs, patterns, modes, goals, projects, or tasks
154
175
  Ask:
176
+
155
177
  1. What happened?
156
178
  2. What emotions were present, and how intense were they?
157
179
  3. What thoughts showed up, what did you do next, and what would be the useful next move now?
@@ -161,6 +183,7 @@ Use for a reusable trigger category.
161
183
  Minimum field: `label`
162
184
  Usually useful: `description`
163
185
  Ask:
186
+
164
187
  1. What should this event type be called?
165
188
  2. What kind of incident does it represent?
166
189
 
@@ -169,6 +192,7 @@ Use for a reusable emotion vocabulary entry.
169
192
  Minimum field: `label`
170
193
  Usually useful: `description`, `category`
171
194
  Ask:
195
+
172
196
  1. What emotion label do you want to reuse?
173
197
  2. How would you describe it?
174
198
  3. Does it belong to a broader category?
@@ -183,13 +207,15 @@ Use the batch entity tools for stored records:
183
207
  `forge_search_entities`, `forge_create_entities`, `forge_update_entities`, `forge_delete_entities`, `forge_restore_entities`
184
208
 
185
209
  These tools operate on:
186
- `goal`, `project`, `task`, `habit`, `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`
187
211
 
188
212
  Use live work tools for `task_run`:
189
- `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`
190
214
 
191
215
  Use `forge_post_insight` for `insight`.
192
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`
193
219
 
194
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.
195
221
 
@@ -201,12 +227,40 @@ Use these exact payload expectations.
201
227
 
202
228
  For create operations, each item must include `entityType` and `data`.
203
229
 
204
- 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.
205
245
 
206
246
  For update operations, each item must include `entityType`, `id`, and `patch`.
207
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
+
208
256
  For delete operations, each item must include `entityType` and `id`. Delete is soft by default unless the user explicitly wants hard delete.
209
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
+
210
264
  For restore operations, each item must include `entityType` and `id`.
211
265
 
212
266
  Batch tools do not create or control `task_run` or `insight`.
@@ -217,18 +271,63 @@ Use these live work rules.
217
271
 
218
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.
219
273
 
220
- 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`.
221
275
 
222
276
  Use `forge_heartbeat_task_run` to keep an active run alive.
223
277
 
224
278
  Use `forge_focus_task_run` when one active run should become the current visible run.
225
279
 
226
- 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`.
227
281
 
228
- 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.
229
283
 
230
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`.
231
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
+
232
331
  Use these interaction rules.
233
332
 
234
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.
@@ -261,6 +360,7 @@ When the user asks which Forge tools are available, list exactly these tools:
261
360
  `forge_delete_entities`
262
361
  `forge_restore_entities`
263
362
  `forge_grant_reward_bonus`
363
+ `forge_adjust_work_minutes`
264
364
  `forge_log_work`
265
365
  `forge_start_task_run`
266
366
  `forge_heartbeat_task_run`
@@ -268,3 +368,9 @@ When the user asks which Forge tools are available, list exactly these tools:
268
368
  `forge_complete_task_run`
269
369
  `forge_release_task_run`
270
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`