@aitne-sh/aitne 0.1.5 → 0.1.7

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 (77) hide show
  1. package/README.md +295 -479
  2. package/agent-assets/agent-profiles/_safety.md +17 -2
  3. package/agent-assets/agent-profiles/routine-fetch-window.md +75 -40
  4. package/agent-assets/agent-profiles/wiki-agent.md +19 -0
  5. package/agent-assets/docs/features/messaging/bang-commands.md +161 -0
  6. package/agent-assets/docs/features/messaging/overview.md +3 -0
  7. package/agent-assets/docs/features/wiki/commands.md +222 -0
  8. package/agent-assets/docs/features/wiki/overview.md +145 -0
  9. package/agent-assets/docs/getting-started/03-what-can-this-do.md +18 -0
  10. package/agent-assets/docs/glossary.md +34 -0
  11. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +123 -0
  12. package/agent-assets/docs/guides/build-your-wiki.md +99 -0
  13. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +169 -0
  14. package/agent-assets/docs/guides/maintain-wiki-health.md +168 -0
  15. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +192 -0
  16. package/agent-assets/docs/guides/pause-the-agent.md +10 -3
  17. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +156 -0
  18. package/agent-assets/docs/reference/cli-commands.md +24 -1
  19. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +96 -0
  20. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +82 -0
  21. package/agent-assets/skills/context/SKILL.md +288 -17
  22. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +2 -2
  23. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +3 -3
  24. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +6 -6
  25. package/agent-assets/skills/external-services/SKILL.md +5 -3
  26. package/agent-assets/skills/external-services/SKILL.native.claude.md +49 -58
  27. package/agent-assets/skills/external-services/SKILL.native.codex.md +50 -58
  28. package/agent-assets/skills/external-services/SKILL.native.gemini.md +53 -56
  29. package/agent-assets/skills/mail/SKILL.md +5 -5
  30. package/agent-assets/skills/mail/SKILL.native.claude.md +57 -65
  31. package/agent-assets/skills/mail/SKILL.native.codex.md +73 -75
  32. package/agent-assets/skills/mail/SKILL.native.gemini.md +80 -75
  33. package/agent-assets/skills/management-task-register/SKILL.md +3 -3
  34. package/agent-assets/skills/notion/SKILL.native.claude.md +78 -82
  35. package/agent-assets/skills/notion/SKILL.native.codex.md +78 -80
  36. package/agent-assets/skills/notion/SKILL.native.gemini.md +91 -90
  37. package/agent-assets/skills/observations/SKILL.md +104 -14
  38. package/agent-assets/skills/roadmap/SKILL.md +19 -0
  39. package/agent-assets/skills/schedule/SKILL.md +44 -3
  40. package/agent-assets/skills/today/SKILL.md +25 -5
  41. package/agent-assets/skills/travel-time/SKILL.md +9 -0
  42. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +32 -0
  43. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +126 -0
  44. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +75 -0
  45. package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +45 -0
  46. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +182 -0
  47. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +90 -0
  48. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +72 -0
  49. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +145 -0
  50. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +28 -9
  51. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +26 -9
  52. package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +51 -24
  53. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +46 -16
  54. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +29 -9
  55. package/agent-assets/task-flows/message.received.dm.md +35 -2
  56. package/agent-assets/task-flows/message.received.dm.native.claude.md +25 -26
  57. package/agent-assets/task-flows/message.received.dm.native.codex.md +30 -24
  58. package/agent-assets/task-flows/message.received.dm.native.gemini.md +36 -36
  59. package/agent-assets/task-flows/message.received.dm_first.md +43 -4
  60. package/agent-assets/task-flows/message.received.dm_first.native.claude.md +20 -20
  61. package/agent-assets/task-flows/message.received.dm_first.native.codex.md +22 -19
  62. package/agent-assets/task-flows/message.received.dm_first.native.gemini.md +28 -24
  63. package/agent-assets/task-flows/routine.fetch_window.md +51 -36
  64. package/agent-assets/task-flows/routine.morning_routine.md +12 -3
  65. package/agent-assets/task-flows/routine.morning_routine_initial.md +22 -1
  66. package/agent-assets/task-flows/scheduled.dm.md +477 -0
  67. package/agent-assets/task-flows/wiki.ask.md +11 -0
  68. package/agent-assets/task-flows/wiki.compile.md +28 -0
  69. package/agent-assets/task-flows/wiki.connect.md +12 -0
  70. package/agent-assets/task-flows/wiki.ingest_url.md +35 -0
  71. package/agent-assets/task-flows/wiki.lint.md +13 -0
  72. package/agent-assets/task-flows/wiki.trace.md +13 -0
  73. package/agent-assets/wiki-seeds/schemas/output.md +12 -0
  74. package/agent-assets/wiki-seeds/schemas/raw.md +13 -0
  75. package/agent-assets/wiki-seeds/schemas/wiki.md +12 -0
  76. package/agent-assets/wiki-seeds/taxonomy.md +13 -0
  77. package/package.json +21 -41
@@ -20,9 +20,9 @@ Base URL: `http://localhost:8321`. All daemon calls via `curl -s` with
20
20
  > - `POST /api/integrations/google_calendar/reconcile` (410)
21
21
  > - `/api/calendar/*` (route-prefix 410 in native mode)
22
22
  >
23
- > Reach Google Calendar through the
24
- > `mcp__claude_ai_Google_Calendar__*` MCP tools this Claude session
25
- > already holds.
23
+ > Reach Google Calendar through the in-session Google Calendar
24
+ > connector your harness exposes. Your tool menu lists every available
25
+ > tool at session start — pick the Calendar one.
26
26
  >
27
27
  > Only **Google Calendar** is integration-gated here. Apple Calendar,
28
28
  > Outlook Calendar, Obsidian, GitHub, recurring-schedule CRUD,
@@ -65,71 +65,61 @@ The native gate covers Google Calendar only.
65
65
  ---
66
66
 
67
67
  <!-- service:calendar -->
68
- ## Google Calendar — Claude connector (native MCP)
68
+ ## Google Calendar — in-session connector
69
69
 
70
- Tool namespace: `mcp__claude_ai_Google_Calendar__`
70
+ The exact tool names depend on which Calendar connector your harness
71
+ has loaded. Inspect your tool menu at session start and pick the
72
+ matching capability.
71
73
 
72
- ### Read-class tools (`requiredCapabilities` floor + optional reads)
74
+ ### Read-class capabilities (`requiredCapabilities` floor + optional reads)
73
75
 
74
- | Capability | Tool | Use |
75
- |---|---|---|
76
- | `list_events` | `mcp__claude_ai_Google_Calendar__list_events` | Window-list events on a calendar. |
77
- | `get_event` | `mcp__claude_ai_Google_Calendar__get_event` | Fetch a single event by id. |
78
- | `list_calendars` | `mcp__claude_ai_Google_Calendar__list_calendars` | Enumerate the user's calendars (find `primary`). |
79
- | `suggest_time` | `mcp__claude_ai_Google_Calendar__suggest_time` | Free-slot proposal — pure compute, no calendar side effect. |
76
+ | Capability | What to do |
77
+ |---|---|
78
+ | `list_events` | Window-list events on a calendar (`calendarId`, `timeMin`, `timeMax`, `maxResults`). |
79
+ | `get_event` | Fetch a single event by id. |
80
+ | `list_calendars` | Enumerate the user's calendars (find `primary`). |
81
+ | `suggest_time` | Free-slot proposal — pure compute, no calendar side effect. |
80
82
 
81
- Canonical list call:
82
-
83
- ```
84
- mcp__claude_ai_Google_Calendar__list_events(
85
- calendarId="primary",
86
- timeMin="<ISO-8601 with offset>",
87
- timeMax="<ISO-8601 with offset>",
88
- maxResults=50
89
- )
90
- ```
83
+ Canonical list flow: invoke your connector's list-events function with
84
+ `calendarId="primary"`, `timeMin` / `timeMax` as ISO-8601 timestamps with
85
+ TZ offset, and a sensible `maxResults` (≈50).
91
86
 
92
87
  Canonical detail read (always GET-before-PATCH; see PATCH semantics
93
- below):
94
-
95
- ```
96
- mcp__claude_ai_Google_Calendar__get_event(
97
- calendarId="primary",
98
- eventId="<id>"
99
- )
100
- ```
88
+ below): invoke your connector's get-event function with `calendarId` and
89
+ the `eventId` returned by list.
101
90
 
102
- ### Destructive tools (require explicit user confirmation)
91
+ ### Destructive capabilities (require explicit user confirmation)
103
92
 
104
93
  Per the registry's
105
- `google_calendar.backendConnectors.claude.destructiveTools`:
94
+ `google_calendar.backendConnectors.claude.destructiveTools`, the
95
+ following capability classes are destructive in native:claude mode:
106
96
 
107
- - `create_event` — adds a new event.
108
- - `update_event` — mutates an existing event (attendees field is
97
+ - **Create event** — adds a new event.
98
+ - **Update event** — mutates an existing event (attendees field is
109
99
  whole-list replacement; see warning below).
110
- - `delete_event` — removes the event.
111
- - `respond_to_event` — dispatches an RSVP to the organizer.
100
+ - **Delete event** — removes the event.
101
+ - **Respond to event** — dispatches an RSVP to the organizer.
112
102
 
113
103
  Apply the destructive-confirm contract every time. Summarise the
114
104
  intended change ("create 30-min focus block at 14:00 JST tomorrow"),
115
105
  wait for explicit OK, then issue the call.
116
106
 
117
- **ATTENDEES WARNING.** `update_event` replaces the attendees array
118
- verbatim — it does not append. To add one attendee:
107
+ **ATTENDEES WARNING.** The update-event function replaces the attendees
108
+ array verbatim — it does not append. To add one attendee:
119
109
 
120
- 1. `get_event(...)` → copy `attendees: [...]`.
110
+ 1. Get the event → copy its `attendees: [...]`.
121
111
  2. Append the new attendee object.
122
- 3. `update_event(... attendees=[<full list>])`.
112
+ 3. Update the event with the full attendees list.
123
113
 
124
114
  Forgetting the GET drops every existing invitee.
125
115
 
126
116
  **Recurring events.** Single-instance edits require the instance id
127
- (usually returned alongside the master in `list_events`). PATCHing the
117
+ (usually returned alongside the master in list-events). PATCHing the
128
118
  master id shifts the whole series. Confirm with the user which scope
129
119
  they meant — "move this 9am to 10am" can mean the master or a single
130
120
  occurrence and the agent must not guess.
131
121
 
132
- `suggest_time` is read-only and exempt from the confirm dance.
122
+ The suggest-time capability is read-only and exempt from the confirm dance.
133
123
 
134
124
  ### Time discipline
135
125
 
@@ -148,10 +138,10 @@ fetch every hour and POSTs each materialised event to
148
138
  `/api/observations`. The hourly_check native variant's Step 0b spells
149
139
  out the exact shape; this skill describes the call surface.
150
140
 
151
- Free-busy queries are composed locally — `suggest_time` returns slot
152
- proposals against a primary calendar; for explicit free-busy across
153
- multiple calendars, list each calendar's events in the window and
154
- intersect.
141
+ Free-busy queries are composed locally — the suggest-time capability
142
+ returns slot proposals against a primary calendar; for explicit
143
+ free-busy across multiple calendars, list each calendar's events in
144
+ the window and intersect.
155
145
 
156
146
  <!-- /service:calendar -->
157
147
 
@@ -253,27 +243,28 @@ When the hourly_check native flow's Step 0b fetches imminent-window
253
243
  events, POST each materialised event to `/api/observations` so
254
244
  subsequent runs can dedup. The daemon computes `contentHash`
255
245
  server-side via `@personal-agent/shared/observations-hash.ts` — pass
256
- the raw `payload`:
246
+ the raw `payload`.
247
+
248
+ **Batch when you have more than one event.** Use
249
+ `POST /api/observations/batch` with up to 200 items in one
250
+ `observations[]` array (see the `observations` skill for the envelope).
251
+ The single-item form below is for the rare "one new event surfaced"
252
+ case.
257
253
 
258
254
  ```bash
259
255
  curl -s -X POST http://localhost:8321/api/observations \
260
256
  -H 'Content-Type: application/json' \
261
257
  -d '{
262
- "source": "google_calendar",
263
- "type": "calendar:lifecycle",
258
+ "source": "google_calendar:<calendarId>",
264
259
  "ref": "<eventId>",
265
- "actor": "user",
266
- "receivedAt": "<ISO-8601 UTC>",
267
- "summary_text": "<title start..end>",
268
- "refs": {
269
- "eventId": "<id>",
270
- "calendarId": "primary",
271
- "windowKey": "primary:imminent"
272
- },
273
- "payload": <verbatim MCP event object>
260
+ "changeType": "created",
261
+ "actor": "agent",
262
+ "payload": <verbatim connector event object>
274
263
  }'
275
264
  ```
276
265
 
266
+ `actor` MUST be `"agent"` or `"system"` — the server rejects `"user"`.
267
+
277
268
  `/api/observations` is never gated. HTTP 409 indicates a mode-flip race
278
269
  window (§11.3.1) — stop and re-read `<integration_modes>`.
279
270
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: external-services
3
- description: Load when an external-services surface is in scope (Google Calendar / Obsidian / GitHub / Skills CRUD / scheduling) and Google Calendar is in native mode bound to Codex (`nativeBackend === "codex"`). Calendar runs through Codex's hosted Calendar MCP directly; the daemon does not proxy Calendar. Other surfaces (Apple/Outlook Calendar, Obsidian, GitHub, scheduling, Skills CRUD) keep their direct routes.
3
+ description: Load when an external-services surface is in scope (Google Calendar / Obsidian / GitHub / Skills CRUD / scheduling) and Google Calendar is in native mode bound to Codex (`nativeBackend === "codex"`). Calendar runs through the in-session Calendar connector your Codex harness exposes directly; the daemon does not proxy Calendar. Other surfaces (Apple/Outlook Calendar, Obsidian, GitHub, scheduling, Skills CRUD) keep their direct routes.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
6
  - Bash(jq *)
7
7
  - Read
8
8
  ---
9
9
 
10
- # External Services — Native Mode (Codex Calendar MCP)
10
+ # External Services — Native Mode (in-session Calendar connector)
11
11
 
12
12
  Base URL: `http://localhost:8321`. All daemon calls via `curl -s`
13
13
  with `Content-Type: application/json` on POST/PATCH/PUT.
@@ -20,9 +20,9 @@ with `Content-Type: application/json` on POST/PATCH/PUT.
20
20
  > - `POST /api/integrations/google_calendar/reconcile` (410)
21
21
  > - `/api/calendar/*` (route-prefix 410)
22
22
  >
23
- > Reach Google Calendar through the
24
- > `mcp__codex_apps__google_calendar._*` MCP tools your Codex session
25
- > already holds.
23
+ > Reach Google Calendar through the in-session Google Calendar
24
+ > connector your harness exposes. Your tool menu lists every available
25
+ > tool at session start — pick the Calendar one.
26
26
  >
27
27
  > Only **Google Calendar** is integration-gated here. Apple Calendar,
28
28
  > Outlook Calendar, Obsidian, GitHub, recurring-schedule CRUD,
@@ -49,63 +49,55 @@ allowlist constraints.
49
49
  ---
50
50
 
51
51
  <!-- service:calendar -->
52
- ## Google Calendar — Codex hosted Calendar MCP (native)
52
+ ## Google Calendar — in-session connector
53
53
 
54
- Tool namespace: `mcp__codex_apps__google_calendar._`
54
+ The exact tool names depend on which Calendar connector your harness
55
+ has loaded. Inspect your tool menu at session start and pick the
56
+ matching capability. Codex-side hosted Calendar connectors typically
57
+ expose batch read and a free-busy primitive that Claude's hosted
58
+ connector approximates with `suggest_time`; rely on the capability
59
+ classes below rather than specific names.
55
60
 
56
- The Codex namespace terminates with `._`; the bare suffix below is what
57
- you write after the namespace (`_search` = `mcp__codex_apps__google_calendar._search`).
61
+ ### Read-class capabilities
58
62
 
59
- ### Read-class tools
63
+ | Capability | What to do |
64
+ |---|---|
65
+ | `search` | Free-text / filter search across events. Most connectors expose two variants — a general search and a window-list flavor scoped to a `calendarId` + `timeMin` / `timeMax`. |
66
+ | `read` | Single-event read by id; many connectors also expose a "fetch full payload incl. attendees" flavor. |
67
+ | `get_availability` | Free-busy across one or more calendars (pure compute, no side effect). |
68
+ | `batch_read` | Pull many events by id in one round-trip — use when the search returned a list and you need each event's full body. |
60
69
 
61
- | Capability | Tool(s) | Use |
62
- |---|---|---|
63
- | `search` | `_search`, `_search_events` | Free-text / filter search. |
64
- | `read` | `_read_event`, `_fetch` | Single-event read; `_fetch` returns the full payload incl. attendees. |
65
- | `get_availability` | `_get_availability` | Free-busy across one or more calendars (pure compute, no side effect). |
66
- | `batch_read` | `_batch_read_event` | Pull many events by id in one round-trip. |
70
+ Canonical window-list flow: invoke your connector's search-events /
71
+ list-events function with `calendar_id="primary"`, `time_min` /
72
+ `time_max` as ISO-8601 timestamps with TZ offset, and a sensible
73
+ `max_results` (≈50).
67
74
 
68
- Canonical search call (window-list):
75
+ Canonical detail read (always GET-before-PATCH; see PATCH semantics
76
+ below): invoke the read-event function with `calendar_id` and the
77
+ `event_id` returned by search.
69
78
 
70
- ```
71
- mcp__codex_apps__google_calendar._search_events(
72
- calendar_id="primary",
73
- time_min="<ISO-8601 with offset>",
74
- time_max="<ISO-8601 with offset>",
75
- max_results=50
76
- )
77
- ```
78
-
79
- Canonical detail read:
80
-
81
- ```
82
- mcp__codex_apps__google_calendar._read_event(
83
- calendar_id="primary",
84
- event_id="<id>"
85
- )
86
- ```
87
-
88
- ### Destructive tools (require explicit user confirmation)
79
+ ### Destructive capabilities (require explicit user confirmation)
89
80
 
90
81
  Per the registry's
91
- `google_calendar.backendConnectors.codex.destructiveTools`:
82
+ `google_calendar.backendConnectors.codex.destructiveTools`, the
83
+ following capability classes are destructive in native:codex mode:
92
84
 
93
- - `_create_event`
94
- - `_update_event` — attendees field is whole-list replacement; see
95
- warning below.
96
- - `_delete_event`
97
- - `_respond_event` — dispatches an RSVP to the organizer.
85
+ - **Create event** — adds a new event.
86
+ - **Update event** mutates an existing event (attendees field is
87
+ whole-list replacement; see warning below).
88
+ - **Delete event** — removes the event.
89
+ - **Respond to event** — dispatches an RSVP to the organizer.
98
90
 
99
91
  Apply the destructive-confirm contract: summarise the plan, wait for
100
92
  explicit OK, then issue. The starter `deniedTools` list is enforced
101
93
  before the call lands.
102
94
 
103
- **ATTENDEES WARNING.** `_update_event(attendees=[...])` replaces the
104
- list verbatim. To add one attendee:
95
+ **ATTENDEES WARNING.** The update-event capability replaces the
96
+ attendees array verbatim. To add one attendee:
105
97
 
106
- 1. `_read_event(...)` → copy `attendees`.
98
+ 1. Read the event → copy `attendees`.
107
99
  2. Append the new attendee.
108
- 3. `_update_event(..., attendees=[<full list>])`.
100
+ 3. Update with the full attendees list.
109
101
 
110
102
  **Recurring events.** Single-instance edits require the instance id;
111
103
  master-id PATCH shifts the whole series. Confirm scope before issuing.
@@ -200,27 +192,27 @@ from the session's integration state independently of Calendar.
200
192
 
201
193
  ## Persisting Calendar observations from native fetches
202
194
 
195
+ **Batch when you have more than one event.** Use
196
+ `POST /api/observations/batch` with up to 200 items in one
197
+ `observations[]` array (see the `observations` skill for the envelope).
198
+ The single-item form below is for the rare "one new event surfaced"
199
+ case.
200
+
203
201
  ```bash
204
202
  curl -s -X POST http://localhost:8321/api/observations \
205
203
  -H 'Content-Type: application/json' \
206
204
  -d '{
207
- "source": "google_calendar",
208
- "type": "calendar:lifecycle",
205
+ "source": "google_calendar:<calendarId>",
209
206
  "ref": "<eventId>",
210
- "actor": "user",
211
- "receivedAt": "<ISO-8601 UTC>",
212
- "summary_text": "<title start..end>",
213
- "refs": {
214
- "eventId": "<id>",
215
- "calendarId": "primary",
216
- "windowKey": "primary:imminent"
217
- },
218
- "payload": <verbatim MCP event object>
207
+ "changeType": "created",
208
+ "actor": "agent",
209
+ "payload": <verbatim connector event object>
219
210
  }'
220
211
  ```
221
212
 
222
213
  The daemon computes `contentHash` server-side — pass the raw `payload`
223
- verbatim. HTTP 409 indicates a mode-flip race window (§11.3.1); stop
214
+ verbatim. `actor` MUST be `"agent"` or `"system"` the server rejects
215
+ `"user"`. HTTP 409 indicates a mode-flip race window (§11.3.1); stop
224
216
  and re-read `<integration_modes>`.
225
217
 
226
218
  ---
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: external-services
3
- description: Load when an external-services surface is in scope (Google Calendar / Obsidian / GitHub / Skills CRUD / scheduling) and Google Calendar is in native mode bound to Gemini (`nativeBackend === "gemini"`). Calendar runs through the google-workspace extension directly; the daemon does not proxy Calendar. Other surfaces (Apple/Outlook Calendar, Obsidian, GitHub, scheduling, Skills CRUD) keep their direct routes.
3
+ description: Load when an external-services surface is in scope (Google Calendar / Obsidian / GitHub / Skills CRUD / scheduling) and Google Calendar is in native mode bound to Gemini (`nativeBackend === "gemini"`). Calendar runs through the in-session Calendar connector your Gemini harness exposes directly; the daemon does not proxy Calendar. Other surfaces (Apple/Outlook Calendar, Obsidian, GitHub, scheduling, Skills CRUD) keep their direct routes.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
6
  - Bash(jq *)
7
7
  - Read
8
8
  ---
9
9
 
10
- # External Services — Native Mode (Gemini google-workspace extension)
10
+ # External Services — Native Mode (in-session Calendar connector)
11
11
 
12
12
  Base URL: `http://localhost:8321`. All daemon calls via `curl -s` with
13
13
  `Content-Type: application/json` on POST/PATCH/PUT.
@@ -20,9 +20,10 @@ Base URL: `http://localhost:8321`. All daemon calls via `curl -s` with
20
20
  > - `POST /api/integrations/google_calendar/reconcile` (410)
21
21
  > - `/api/calendar/*` (route-prefix 410)
22
22
  >
23
- > Reach Google Calendar through the
24
- > `mcp_google-workspace_calendar.*` MCP tools your Gemini session
25
- > already holds via the `google-workspace` extension.
23
+ > Reach Google Calendar through the in-session Google Calendar
24
+ > connector your harness exposes (typically Gemini CLI's
25
+ > `google-workspace` extension). Your tool menu lists every available
26
+ > tool at session start — pick the Calendar one.
26
27
  >
27
28
  > Only **Google Calendar** is integration-gated here. Apple Calendar,
28
29
  > Outlook Calendar, Obsidian, GitHub, scheduling, and Skills CRUD
@@ -46,65 +47,61 @@ provider-specific direct route (`/api/apple-calendar/*` or
46
47
  ---
47
48
 
48
49
  <!-- service:calendar -->
49
- ## Google Calendar — google-workspace extension (native MCP)
50
+ ## Google Calendar — in-session connector
50
51
 
51
- Tool namespace: `mcp_google-workspace_calendar.`
52
+ The exact tool names depend on which Calendar connector your harness
53
+ has loaded. Inspect your tool menu at session start and pick the
54
+ matching capability. Gemini CLI's `google-workspace` extension is the
55
+ typical provider here; rely on the capability classes below rather
56
+ than specific tool names.
52
57
 
53
- ### Read-class tools
58
+ ### Read-class capabilities
54
59
 
55
- | Capability | Tool | Use |
56
- |---|---|---|
57
- | `list_events` | `listEvents` | Window-list events on a calendar. |
58
- | `get_event` | `getEvent` | Single-event read. |
59
- | `list_calendars` | `list` | Enumerate the user's calendars (the `primary: true` flag identifies the default). |
60
- | `find_free_time` | `findFreeTime` | Free-slot proposal — pure compute. |
61
-
62
- Canonical list call:
60
+ | Capability | What to do |
61
+ |---|---|
62
+ | `list_events` | Window-list events on a calendar (`calendarId` + `timeMin` / `timeMax`). |
63
+ | `get_event` | Single-event read by id. |
64
+ | `list_calendars` | Enumerate the user's calendars (the `primary: true` flag identifies the default). |
65
+ | `find_free_time` | Free-slot proposal — pure compute. |
63
66
 
64
- ```
65
- mcp_google-workspace_calendar.listEvents(
66
- calendarId="primary",
67
- timeMin="<ISO-8601 with offset>",
68
- timeMax="<ISO-8601 with offset>",
69
- maxResults=50
70
- )
71
- ```
67
+ Canonical list flow: invoke your connector's list-events function with
68
+ `calendarId="primary"`, `timeMin` / `timeMax` as ISO-8601 timestamps
69
+ with TZ offset, and (if supported) `maxResults=50`.
72
70
 
73
- **Gemini-specific Calendar quirk** (carries over from delegated mode):
71
+ **Gemini-specific Calendar quirks** (typical of the
72
+ `google-workspace` extension; verify against your connector's actual
73
+ behavior):
74
74
 
75
75
  | Quirk | Effect | Workaround |
76
76
  |---|---|---|
77
- | `maxResults` is silently ignored on `listEvents` | Result set bounded only by the time window + Google's default | Narrow the time window when the connector returns more than expected; do not assume the cap applies. |
77
+ | `maxResults` silently ignored on list-events | Result set bounded only by the time window + connector default | Narrow the time window when the connector returns more than expected; do not assume the cap applies. |
78
78
  | Default `attendeeResponseStatus = ["accepted","tentative","needsAction"]` drops declined events | Declined meetings invisible | Pass `attendeeResponseStatus=["declined"]` or the full set explicitly when needed. |
79
79
 
80
- Canonical detail read (always GET-before-PATCH):
80
+ Canonical detail read (always GET-before-PATCH): invoke the
81
+ get-event function with `calendarId` and the `eventId` returned by
82
+ list.
81
83
 
82
- ```
83
- mcp_google-workspace_calendar.getEvent(
84
- calendarId="primary",
85
- eventId="<id>"
86
- )
87
- ```
88
-
89
- ### Destructive tools (require explicit user confirmation)
84
+ ### Destructive capabilities (require explicit user confirmation)
90
85
 
91
86
  Per the registry's
92
- `google_calendar.backendConnectors.gemini.destructiveTools`:
87
+ `google_calendar.backendConnectors.gemini.destructiveTools`, the
88
+ following capability classes are destructive in native:gemini mode:
93
89
 
94
- - `createEvent`
95
- - `updateEvent` — attendees whole-list replacement; see warning below.
96
- - `deleteEvent`
97
- - `respondToEvent`dispatches RSVP.
90
+ - **Create event** — adds a new event.
91
+ - **Update event** mutates an existing event (attendees whole-list
92
+ replacement; see warning below).
93
+ - **Delete event** removes the event.
94
+ - **Respond to event** — dispatches an RSVP.
98
95
 
99
96
  Apply the destructive-confirm contract every time. The starter
100
97
  `deniedTools` list is enforced before the call lands.
101
98
 
102
- **ATTENDEES WARNING.** `updateEvent(attendees=[...])` replaces the
103
- list verbatim. To add one attendee:
99
+ **ATTENDEES WARNING.** The update-event capability replaces the
100
+ attendees array verbatim. To add one attendee:
104
101
 
105
- 1. `getEvent(...)` → copy `attendees`.
102
+ 1. Read the event → copy `attendees`.
106
103
  2. Append the new attendee.
107
- 3. `updateEvent(..., attendees=[<full list>])`.
104
+ 3. Update with the full attendees list.
108
105
 
109
106
  **Recurring events.** Single-instance edits require the instance id;
110
107
  master-id update shifts the whole series. Confirm scope.
@@ -112,7 +109,7 @@ master-id update shifts the whole series. Confirm scope.
112
109
  ### Time discipline
113
110
 
114
111
  ISO 8601 with TZ offset for timed events; `YYYY-MM-DD` for all-day.
115
- The extension rejects naked-ISO inputs.
112
+ Connectors typically reject naked-ISO inputs.
116
113
 
117
114
  ### Imminent-event reminders (hourly_check)
118
115
 
@@ -194,26 +191,26 @@ from the session's integration state independently of Calendar.
194
191
 
195
192
  ## Persisting Calendar observations from native fetches
196
193
 
194
+ **Batch when you have more than one event.** Use
195
+ `POST /api/observations/batch` with up to 200 items in one
196
+ `observations[]` array (see the `observations` skill for the envelope).
197
+ The single-item form below is for the rare "one new event surfaced"
198
+ case.
199
+
197
200
  ```bash
198
201
  curl -s -X POST http://localhost:8321/api/observations \
199
202
  -H 'Content-Type: application/json' \
200
203
  -d '{
201
- "source": "google_calendar",
202
- "type": "calendar:lifecycle",
204
+ "source": "google_calendar:<calendarId>",
203
205
  "ref": "<eventId>",
204
- "actor": "user",
205
- "receivedAt": "<ISO-8601 UTC>",
206
- "summary_text": "<title start..end>",
207
- "refs": {
208
- "eventId": "<id>",
209
- "calendarId": "primary",
210
- "windowKey": "primary:imminent"
211
- },
212
- "payload": <verbatim MCP event object>
206
+ "changeType": "created",
207
+ "actor": "agent",
208
+ "payload": <verbatim connector event object>
213
209
  }'
214
210
  ```
215
211
 
216
212
  The daemon computes `contentHash` server-side. Pass the raw `payload`.
213
+ `actor` MUST be `"agent"` or `"system"` — the server rejects `"user"`.
217
214
  HTTP 409 indicates a mode-flip race window (§11.3.1); stop and re-read
218
215
  `<integration_modes>`.
219
216
 
@@ -28,11 +28,11 @@ accordingly:
28
28
  <!-- mode:delegated-same:gmail -->
29
29
  - **Gmail when `gmail="delegated"` (same-backend):** the per-account
30
30
  gate returns `410 {"error": "integration_delegated"}`. Do NOT retry
31
- via `/api/mail/*`. Use the connector tools your session already
32
- holds natively `mcp__claude_ai_Gmail__*` (Claude session),
33
- `mcp__codex_apps__gmail._*` (Codex session), or
34
- `mcp_google-workspace_gmail.*` (Gemini session, via the
35
- `google-workspace` extension).
31
+ via `/api/mail/*`. Use the in-session Gmail connector your harness
32
+ exposesyour tool menu lists every available tool at session start.
33
+ The exact tool namespace depends on which Gmail connector your
34
+ harness has loaded (Claude / Codex / Gemini sessions each surface
35
+ Gmail under their own connector's namespace).
36
36
  <!-- /mode:delegated-same:gmail -->
37
37
 
38
38
  <!-- mode:delegated:outlook_mail -->