@mulmoclaude/google-plugin 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -2
- package/dist/args.d.ts +28 -0
- package/dist/definition.d.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +126 -15
- package/dist/index.js.map +1 -1
- package/package.json +25 -4
package/README.md
CHANGED
|
@@ -12,9 +12,17 @@ dispatch). Server-only — no Vue View.
|
|
|
12
12
|
OAuth client secret Google requires and stores nothing; tokens stay on the
|
|
13
13
|
user's machine. A `~/.secrets/client_secret_*.json` (advanced) keeps the
|
|
14
14
|
whole flow local instead.
|
|
15
|
-
- Kinds: `status`; Calendar (`
|
|
16
|
-
|
|
15
|
+
- Kinds: `status`; Calendar (`calendarListCalendars`, `calendarColors`,
|
|
16
|
+
`calendarListEvents`, `calendarSync`, `calendarCreateEvent`,
|
|
17
|
+
`calendarUpdateEvent`, `calendarDeleteEvent`); Tasks (`taskListsList`,
|
|
18
|
+
`tasksList`, `tasksCreate`, `tasksUpdate`, `tasksComplete`, `tasksDelete`);
|
|
17
19
|
Drive (`driveList`, `driveCreate`, `driveRead`).
|
|
20
|
+
- Editing is a **patch**: omitted fields keep their value, and `""` clears a
|
|
21
|
+
description / notes. Deletes are irreversible, so the tool tells the agent to
|
|
22
|
+
confirm with the user first.
|
|
23
|
+
- Date-times must carry a **timezone offset** (`2026-07-17T09:00:00+09:00`);
|
|
24
|
+
Calendar rejects date-only and offset-less values with an opaque 400, so the
|
|
25
|
+
schema rejects them first with an actionable message.
|
|
18
26
|
- **Drive is `drive.file`-scoped** — the app only ever sees files it created,
|
|
19
27
|
never the user's wider Drive. That's what keeps the scope non-sensitive.
|
|
20
28
|
- Not linked yet? The tool's errors tell the LLM to guide the user to this
|
|
@@ -22,9 +30,28 @@ dispatch). Server-only — no Vue View.
|
|
|
22
30
|
per host (MulmoClaude: Settings → Plugins → Google or `yarn google:auth`;
|
|
23
31
|
MulmoTerminal: Settings → Google account or `npx mulmoterminal google login`).
|
|
24
32
|
|
|
33
|
+
## About MulmoClaude and MulmoTerminal
|
|
34
|
+
|
|
35
|
+
- **[MulmoClaude](https://github.com/receptron/mulmoclaude)** — an AI-native
|
|
36
|
+
application platform built on Claude Code. Chat summons the right GUI for each
|
|
37
|
+
task (documents, charts, forms, wikis, spreadsheets, 3D scenes), and
|
|
38
|
+
everything your assistant accumulates stays as plain files in your own
|
|
39
|
+
workspace, on your own machine.
|
|
40
|
+
- **[MulmoTerminal](https://github.com/receptron/mulmoterminal)** — run a whole
|
|
41
|
+
team of coding agents from your browser. Many Claude Code / Codex sessions at
|
|
42
|
+
once in a grid, colour-coded so you see which are working, which need you and
|
|
43
|
+
which are done, plus git worktrees, one-click PRs and cost readouts. One `npx`
|
|
44
|
+
command, no Electron, no config.
|
|
45
|
+
|
|
46
|
+
📖 **User guide**: <https://receptron.github.io/mulmoterminal/> (日本語 / English)
|
|
47
|
+
|
|
25
48
|
## Dev loop
|
|
26
49
|
|
|
27
50
|
```bash
|
|
28
51
|
yarn workspace @mulmoclaude/google-plugin run build
|
|
29
52
|
yarn workspace @mulmoclaude/google-plugin run test
|
|
30
53
|
```
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
package/dist/args.d.ts
CHANGED
|
@@ -22,6 +22,19 @@ export declare const GoogleArgs: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
22
22
|
description: z.ZodOptional<z.ZodString>;
|
|
23
23
|
calendarId: z.ZodOptional<z.ZodString>;
|
|
24
24
|
colorId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"calendarUpdateEvent">;
|
|
27
|
+
eventId: z.ZodString;
|
|
28
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
29
|
+
start: z.ZodOptional<z.ZodString>;
|
|
30
|
+
end: z.ZodOptional<z.ZodString>;
|
|
31
|
+
description: z.ZodOptional<z.ZodString>;
|
|
32
|
+
calendarId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
colorId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"calendarDeleteEvent">;
|
|
36
|
+
eventId: z.ZodString;
|
|
37
|
+
calendarId: z.ZodOptional<z.ZodString>;
|
|
25
38
|
}, z.core.$strip>, z.ZodObject<{
|
|
26
39
|
kind: z.ZodLiteral<"taskListsList">;
|
|
27
40
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -35,10 +48,25 @@ export declare const GoogleArgs: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
35
48
|
notes: z.ZodOptional<z.ZodString>;
|
|
36
49
|
due: z.ZodOptional<z.ZodString>;
|
|
37
50
|
taskListId: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"tasksUpdate">;
|
|
53
|
+
taskId: z.ZodString;
|
|
54
|
+
title: z.ZodOptional<z.ZodString>;
|
|
55
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
56
|
+
due: z.ZodOptional<z.ZodString>;
|
|
57
|
+
taskListId: z.ZodOptional<z.ZodString>;
|
|
38
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
39
59
|
kind: z.ZodLiteral<"tasksComplete">;
|
|
40
60
|
taskId: z.ZodString;
|
|
41
61
|
taskListId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"tasksUncomplete">;
|
|
64
|
+
taskId: z.ZodString;
|
|
65
|
+
taskListId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"tasksDelete">;
|
|
68
|
+
taskId: z.ZodString;
|
|
69
|
+
taskListId: z.ZodOptional<z.ZodString>;
|
|
42
70
|
}, z.core.$strip>, z.ZodObject<{
|
|
43
71
|
kind: z.ZodLiteral<"driveList">;
|
|
44
72
|
maxResults: z.ZodOptional<z.ZodNumber>;
|
package/dist/definition.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_LIST_MAX_RESULTS, MAX_LIST_RESULTS, clearCalendarSyncToken, clientSecretPresence, completeTask, createCalendarEvent, createDriveFile, createTask, getCalendarColors, getGoogleAccessToken, isIsoDateTimeWithOffset, listCalendarEvents, listCalendars, listDriveFiles, listTaskLists, listTasks, loadCalendarSyncToken, loadGoogleTokens, readDriveFile, saveCalendarSyncToken, syncCalendarEvents } from "@mulmoclaude/core/google";
|
|
1
|
+
import { DEFAULT_LIST_MAX_RESULTS, MAX_LIST_RESULTS, clearCalendarSyncToken, clientSecretPresence, completeTask, createCalendarEvent, createDriveFile, createTask, deleteCalendarEvent, deleteTask, getCalendarColors, getGoogleAccessToken, isIsoDateTimeWithOffset, listCalendarEvents, listCalendars, listDriveFiles, listTaskLists, listTasks, loadCalendarSyncToken, loadGoogleTokens, readDriveFile, saveCalendarSyncToken, syncCalendarEvents, uncompleteTask, updateCalendarEvent, updateTask } from "@mulmoclaude/core/google";
|
|
2
2
|
//#region ../../../node_modules/gui-chat-protocol/dist/index.js
|
|
3
3
|
/**
|
|
4
4
|
* Identity function for type inference. Same philosophy as
|
|
@@ -4165,6 +4165,18 @@ var IsoDateTimeWithOffset = string().refine(isIsoDateTimeWithOffset, { error: "m
|
|
|
4165
4165
|
var MaxResults = number().int().min(1).max(MAX_LIST_RESULTS).optional();
|
|
4166
4166
|
var NonEmpty = string().min(1);
|
|
4167
4167
|
var OptionalNonEmpty = string().trim().min(1).optional();
|
|
4168
|
+
var EDITABLE_EVENT_FIELDS = [
|
|
4169
|
+
"summary",
|
|
4170
|
+
"start",
|
|
4171
|
+
"end",
|
|
4172
|
+
"description",
|
|
4173
|
+
"colorId"
|
|
4174
|
+
];
|
|
4175
|
+
var EDITABLE_TASK_FIELDS = [
|
|
4176
|
+
"title",
|
|
4177
|
+
"notes",
|
|
4178
|
+
"due"
|
|
4179
|
+
];
|
|
4168
4180
|
var GoogleArgs = discriminatedUnion("kind", [
|
|
4169
4181
|
object({ kind: literal("status") }),
|
|
4170
4182
|
object({ kind: literal("calendarListCalendars") }),
|
|
@@ -4189,10 +4201,25 @@ var GoogleArgs = discriminatedUnion("kind", [
|
|
|
4189
4201
|
calendarId: OptionalNonEmpty,
|
|
4190
4202
|
colorId: OptionalNonEmpty
|
|
4191
4203
|
}),
|
|
4204
|
+
object({
|
|
4205
|
+
kind: literal("calendarUpdateEvent"),
|
|
4206
|
+
eventId: NonEmpty,
|
|
4207
|
+
summary: NonEmpty.optional(),
|
|
4208
|
+
start: IsoDateTimeWithOffset.optional(),
|
|
4209
|
+
end: IsoDateTimeWithOffset.optional(),
|
|
4210
|
+
description: string().optional(),
|
|
4211
|
+
calendarId: OptionalNonEmpty,
|
|
4212
|
+
colorId: OptionalNonEmpty
|
|
4213
|
+
}).refine((args) => EDITABLE_EVENT_FIELDS.some((field) => args[field] !== void 0), { error: `pass at least one field to change (${EDITABLE_EVENT_FIELDS.join(", ")})` }),
|
|
4214
|
+
object({
|
|
4215
|
+
kind: literal("calendarDeleteEvent"),
|
|
4216
|
+
eventId: NonEmpty,
|
|
4217
|
+
calendarId: OptionalNonEmpty
|
|
4218
|
+
}),
|
|
4192
4219
|
object({ kind: literal("taskListsList") }),
|
|
4193
4220
|
object({
|
|
4194
4221
|
kind: literal("tasksList"),
|
|
4195
|
-
taskListId:
|
|
4222
|
+
taskListId: OptionalNonEmpty,
|
|
4196
4223
|
maxResults: MaxResults,
|
|
4197
4224
|
showCompleted: boolean().optional()
|
|
4198
4225
|
}),
|
|
@@ -4201,12 +4228,30 @@ var GoogleArgs = discriminatedUnion("kind", [
|
|
|
4201
4228
|
title: NonEmpty,
|
|
4202
4229
|
notes: string().optional(),
|
|
4203
4230
|
due: IsoDateTimeWithOffset.optional(),
|
|
4204
|
-
taskListId:
|
|
4231
|
+
taskListId: OptionalNonEmpty
|
|
4205
4232
|
}),
|
|
4233
|
+
object({
|
|
4234
|
+
kind: literal("tasksUpdate"),
|
|
4235
|
+
taskId: NonEmpty,
|
|
4236
|
+
title: NonEmpty.optional(),
|
|
4237
|
+
notes: string().optional(),
|
|
4238
|
+
due: IsoDateTimeWithOffset.optional(),
|
|
4239
|
+
taskListId: OptionalNonEmpty
|
|
4240
|
+
}).refine((args) => EDITABLE_TASK_FIELDS.some((field) => args[field] !== void 0), { error: `pass at least one field to change (${EDITABLE_TASK_FIELDS.join(", ")})` }),
|
|
4206
4241
|
object({
|
|
4207
4242
|
kind: literal("tasksComplete"),
|
|
4208
4243
|
taskId: NonEmpty,
|
|
4209
|
-
taskListId:
|
|
4244
|
+
taskListId: OptionalNonEmpty
|
|
4245
|
+
}),
|
|
4246
|
+
object({
|
|
4247
|
+
kind: literal("tasksUncomplete"),
|
|
4248
|
+
taskId: NonEmpty,
|
|
4249
|
+
taskListId: OptionalNonEmpty
|
|
4250
|
+
}),
|
|
4251
|
+
object({
|
|
4252
|
+
kind: literal("tasksDelete"),
|
|
4253
|
+
taskId: NonEmpty,
|
|
4254
|
+
taskListId: OptionalNonEmpty
|
|
4210
4255
|
}),
|
|
4211
4256
|
object({
|
|
4212
4257
|
kind: literal("driveList"),
|
|
@@ -4228,8 +4273,8 @@ var GoogleArgs = discriminatedUnion("kind", [
|
|
|
4228
4273
|
var TOOL_DEFINITION = {
|
|
4229
4274
|
type: "function",
|
|
4230
4275
|
name: "google",
|
|
4231
|
-
prompt: "The user's Google account is linked LOCALLY on this machine — the refresh token
|
|
4232
|
-
description: "Operate the user's Google services through the locally linked Google account: Calendar, Tasks, and Drive. Supported kinds:\n - `status`: report whether the Google account is linked on this machine — call this first when unsure.\n\nCalendar (events default to the primary calendar; pass `calendarId` — from `calendarListCalendars` — to target another):\n - `calendarListCalendars`: list the calendars the user has added/subscribed to (`id`, `summary`, `primary`, `backgroundColor`/`foregroundColor` hex, `colorId`, `accessRole`). Call this to work with a non-primary calendar.\n - `calendarColors`: palettes that map an event/calendar `colorId` to hex — `event` for per-event colours, `calendar` for calendar colours.\n - `calendarListEvents`: list upcoming events (each carries `colorId`, empty when it inherits the calendar colour). Optional `calendarId`, `timeMin` (ISO 8601 date-time with timezone offset; default now), `maxResults` (1-50, default 10).\n - `calendarSync`: fetch only what CHANGED since the last sync of this calendar, using a stored sync token. Use this for repeated/periodic syncing — it does not re-fetch the whole calendar, so it stays cheap. The FIRST call (or after `fullResync: true`) walks the entire calendar to establish the token. Returns counts (`changed`, `cancelled`) plus a capped `events` sample — never the full list, so it will not flood the conversation; `truncated: true` means more changed than are shown. Deletions are reported as the `cancelled` count. Optional `calendarId`, `fullResync` (discard the stored token and start over).\n - `calendarCreateEvent`: create an event. Requires `summary`, `start`, `end` — ISO 8601 date-times WITH a timezone offset (e.g. 2026-07-17T09:00:00+09:00); optional `description`, `calendarId`, `colorId` (event palette id \"1\"-\"11\").\n\nTasks:\n - `taskListsList`: list the user's task lists (`id`, `title`). Only needed when the user means a list other than their default one.\n - `tasksList`: list tasks. Optional `taskListId` (default: the user's default list), `maxResults` (1-50, default 10), `showCompleted` (default false).\n - `tasksCreate`: add a task. Requires `title`; optional `notes`, `due` (ISO 8601 with offset — Google keeps the DATE only, so do not promise a time of day), `taskListId`.\n - `tasksComplete`: mark a task done. Requires `taskId` (from `tasksList`); optional `taskListId`.\n\nDrive — IMPORTANT: this app can only see files IT created, never the user's wider Drive. Never claim you searched their whole Drive:\n - `driveList`: list files this app created. Optional `maxResults` (1-50, default 10).\n - `driveCreate`: create a text file. Requires `name` and `content`; optional `mimeType` (default text/plain).\n - `driveRead`: read one of this app's files. Requires `fileId` (from `driveList` or `driveCreate`). Text files only.",
|
|
4276
|
+
prompt: "The user's Google account is linked LOCALLY on this machine — the refresh token is stored in ~/.config/mulmo/ and goes only to Google to mint access tokens, never to claude.ai or any other service. This is independent of claude.ai Google connectors; the tool works without them. If a call fails with 'Google account not linked', ask the user to link their Google account in this app's settings, then retry the original call.",
|
|
4277
|
+
description: "Operate the user's Google services through the locally linked Google account: Calendar, Tasks, and Drive. Supported kinds:\n - `status`: report whether the Google account is linked on this machine — call this first when unsure.\n\nCalendar (events default to the primary calendar; pass `calendarId` — from `calendarListCalendars` — to target another):\n - `calendarListCalendars`: list the calendars the user has added/subscribed to (`id`, `summary`, `primary`, `backgroundColor`/`foregroundColor` hex, `colorId`, `accessRole`). Call this to work with a non-primary calendar.\n - `calendarColors`: palettes that map an event/calendar `colorId` to hex — `event` for per-event colours, `calendar` for calendar colours.\n - `calendarListEvents`: list upcoming events (each carries `colorId`, empty when it inherits the calendar colour). Optional `calendarId`, `timeMin` (ISO 8601 date-time with timezone offset; default now), `maxResults` (1-50, default 10).\n - `calendarSync`: fetch only what CHANGED since the last sync of this calendar, using a stored sync token. Use this for repeated/periodic syncing — it does not re-fetch the whole calendar, so it stays cheap. The FIRST call (or after `fullResync: true`) walks the entire calendar to establish the token. Returns counts (`changed`, `cancelled`) plus a capped `events` sample — never the full list, so it will not flood the conversation; `truncated: true` means more changed than are shown. Deletions are reported as the `cancelled` count. Optional `calendarId`, `fullResync` (discard the stored token and start over).\n - `calendarCreateEvent`: create an event. Requires `summary`, `start`, `end` — ISO 8601 date-times WITH a timezone offset (e.g. 2026-07-17T09:00:00+09:00); optional `description`, `calendarId`, `colorId` (event palette id \"1\"-\"11\").\n - `calendarUpdateEvent`: edit an existing event. Requires `eventId` (from `calendarListEvents` / `calendarSync`) plus AT LEAST ONE of `summary`, `start`, `end`, `description`, `colorId`; fields you omit keep their current value, and `description: \"\"` clears the body. Optional `calendarId`. Moving only one end of the event still has to leave start before end, or Calendar rejects it.\n - `calendarDeleteEvent`: delete an event. Requires `eventId`; optional `calendarId`. This removes it for every attendee and cannot be undone — confirm with the user before calling. For a recurring event, an instance id (as returned by the list kinds) deletes that single occurrence.\n\nTasks:\n - `taskListsList`: list the user's task lists (`id`, `title`). Only needed when the user means a list other than their default one.\n - `tasksList`: list tasks. Optional `taskListId` (default: the user's default list), `maxResults` (1-50, default 10), `showCompleted` (default false).\n - `tasksCreate`: add a task. Requires `title`; optional `notes`, `due` (ISO 8601 with offset — Google keeps the DATE only, so do not promise a time of day), `taskListId`.\n - `tasksUpdate`: edit a task. Requires `taskId` (from `tasksList`) plus AT LEAST ONE of `title`, `notes`, `due`; omitted fields keep their value and `notes: \"\"` clears them. Use `tasksComplete` / `tasksUncomplete` to change status — this kind does not. Optional `taskListId`.\n - `tasksComplete`: mark a task done. Requires `taskId` (from `tasksList`); optional `taskListId`.\n - `tasksUncomplete`: put a completed task back on the to-do list. Requires `taskId`; optional `taskListId`. Completed tasks are hidden from `tasksList` unless you pass `showCompleted: true`, so list with that first to find the id.\n - `tasksDelete`: delete a task. Requires `taskId`; optional `taskListId`. Cannot be undone — confirm with the user before calling.\n\nDrive — IMPORTANT: this app can only see files IT created, never the user's wider Drive. Never claim you searched their whole Drive:\n - `driveList`: list files this app created. Optional `maxResults` (1-50, default 10).\n - `driveCreate`: create a text file. Requires `name` and `content`; optional `mimeType` (default text/plain).\n - `driveRead`: read one of this app's files. Requires `fileId` (from `driveList` or `driveCreate`). Text files only.",
|
|
4233
4278
|
parameters: {
|
|
4234
4279
|
type: "object",
|
|
4235
4280
|
properties: {
|
|
@@ -4242,10 +4287,15 @@ var TOOL_DEFINITION = {
|
|
|
4242
4287
|
"calendarListEvents",
|
|
4243
4288
|
"calendarSync",
|
|
4244
4289
|
"calendarCreateEvent",
|
|
4290
|
+
"calendarUpdateEvent",
|
|
4291
|
+
"calendarDeleteEvent",
|
|
4245
4292
|
"taskListsList",
|
|
4246
4293
|
"tasksList",
|
|
4247
4294
|
"tasksCreate",
|
|
4295
|
+
"tasksUpdate",
|
|
4248
4296
|
"tasksComplete",
|
|
4297
|
+
"tasksUncomplete",
|
|
4298
|
+
"tasksDelete",
|
|
4249
4299
|
"driveList",
|
|
4250
4300
|
"driveCreate",
|
|
4251
4301
|
"driveRead"
|
|
@@ -4257,7 +4307,11 @@ var TOOL_DEFINITION = {
|
|
|
4257
4307
|
},
|
|
4258
4308
|
colorId: {
|
|
4259
4309
|
type: "string",
|
|
4260
|
-
description: "calendarCreateEvent: optional event palette colour id \"1\"-\"11\""
|
|
4310
|
+
description: "calendarCreateEvent / calendarUpdateEvent: optional event palette colour id \"1\"-\"11\""
|
|
4311
|
+
},
|
|
4312
|
+
eventId: {
|
|
4313
|
+
type: "string",
|
|
4314
|
+
description: "calendarUpdateEvent / calendarDeleteEvent: id of the event, from calendarListEvents or calendarSync"
|
|
4261
4315
|
},
|
|
4262
4316
|
timeMin: {
|
|
4263
4317
|
type: "string",
|
|
@@ -4273,19 +4327,19 @@ var TOOL_DEFINITION = {
|
|
|
4273
4327
|
},
|
|
4274
4328
|
summary: {
|
|
4275
4329
|
type: "string",
|
|
4276
|
-
description: "calendarCreateEvent: event title"
|
|
4330
|
+
description: "calendarCreateEvent / calendarUpdateEvent: event title"
|
|
4277
4331
|
},
|
|
4278
4332
|
start: {
|
|
4279
4333
|
type: "string",
|
|
4280
|
-
description: "calendarCreateEvent: start, ISO 8601 with timezone offset"
|
|
4334
|
+
description: "calendarCreateEvent / calendarUpdateEvent: start, ISO 8601 with timezone offset"
|
|
4281
4335
|
},
|
|
4282
4336
|
end: {
|
|
4283
4337
|
type: "string",
|
|
4284
|
-
description: "calendarCreateEvent: end, ISO 8601 with timezone offset"
|
|
4338
|
+
description: "calendarCreateEvent / calendarUpdateEvent: end, ISO 8601 with timezone offset"
|
|
4285
4339
|
},
|
|
4286
4340
|
description: {
|
|
4287
4341
|
type: "string",
|
|
4288
|
-
description: "calendarCreateEvent:
|
|
4342
|
+
description: "calendarCreateEvent / calendarUpdateEvent: event body (\"\" on update clears it)"
|
|
4289
4343
|
},
|
|
4290
4344
|
taskListId: {
|
|
4291
4345
|
type: "string",
|
|
@@ -4297,19 +4351,19 @@ var TOOL_DEFINITION = {
|
|
|
4297
4351
|
},
|
|
4298
4352
|
title: {
|
|
4299
4353
|
type: "string",
|
|
4300
|
-
description: "tasksCreate: task title"
|
|
4354
|
+
description: "tasksCreate / tasksUpdate: task title"
|
|
4301
4355
|
},
|
|
4302
4356
|
notes: {
|
|
4303
4357
|
type: "string",
|
|
4304
|
-
description: "tasksCreate:
|
|
4358
|
+
description: "tasksCreate / tasksUpdate: task notes (\"\" on update clears them)"
|
|
4305
4359
|
},
|
|
4306
4360
|
due: {
|
|
4307
4361
|
type: "string",
|
|
4308
|
-
description: "tasksCreate:
|
|
4362
|
+
description: "tasksCreate / tasksUpdate: due date, ISO 8601 with offset (Google keeps the date only)"
|
|
4309
4363
|
},
|
|
4310
4364
|
taskId: {
|
|
4311
4365
|
type: "string",
|
|
4312
|
-
description: "tasksComplete: id of the task
|
|
4366
|
+
description: "tasksUpdate / tasksComplete / tasksUncomplete / tasksDelete: id of the task, from tasksList"
|
|
4313
4367
|
},
|
|
4314
4368
|
name: {
|
|
4315
4369
|
type: "string",
|
|
@@ -4411,6 +4465,32 @@ var src_default = definePlugin(({ log }) => {
|
|
|
4411
4465
|
event
|
|
4412
4466
|
};
|
|
4413
4467
|
}
|
|
4468
|
+
case "calendarUpdateEvent": {
|
|
4469
|
+
const event = await updateCalendarEvent(await getGoogleAccessToken(), {
|
|
4470
|
+
eventId: args.eventId,
|
|
4471
|
+
summary: args.summary,
|
|
4472
|
+
startDateTime: args.start,
|
|
4473
|
+
endDateTime: args.end,
|
|
4474
|
+
description: args.description,
|
|
4475
|
+
calendarId: args.calendarId,
|
|
4476
|
+
colorId: args.colorId
|
|
4477
|
+
});
|
|
4478
|
+
log.info("calendar event updated", { id: event.id });
|
|
4479
|
+
return {
|
|
4480
|
+
ok: true,
|
|
4481
|
+
event
|
|
4482
|
+
};
|
|
4483
|
+
}
|
|
4484
|
+
case "calendarDeleteEvent":
|
|
4485
|
+
await deleteCalendarEvent(await getGoogleAccessToken(), {
|
|
4486
|
+
eventId: args.eventId,
|
|
4487
|
+
calendarId: args.calendarId
|
|
4488
|
+
});
|
|
4489
|
+
log.info("calendar event deleted", { id: args.eventId });
|
|
4490
|
+
return {
|
|
4491
|
+
ok: true,
|
|
4492
|
+
deleted: args.eventId
|
|
4493
|
+
};
|
|
4414
4494
|
case "taskListsList": return {
|
|
4415
4495
|
ok: true,
|
|
4416
4496
|
taskLists: await listTaskLists(await getGoogleAccessToken())
|
|
@@ -4436,6 +4516,20 @@ var src_default = definePlugin(({ log }) => {
|
|
|
4436
4516
|
task
|
|
4437
4517
|
};
|
|
4438
4518
|
}
|
|
4519
|
+
case "tasksUpdate": {
|
|
4520
|
+
const task = await updateTask(await getGoogleAccessToken(), {
|
|
4521
|
+
taskId: args.taskId,
|
|
4522
|
+
title: args.title,
|
|
4523
|
+
notes: args.notes,
|
|
4524
|
+
due: args.due,
|
|
4525
|
+
taskListId: args.taskListId
|
|
4526
|
+
});
|
|
4527
|
+
log.info("task updated", { id: task.id });
|
|
4528
|
+
return {
|
|
4529
|
+
ok: true,
|
|
4530
|
+
task
|
|
4531
|
+
};
|
|
4532
|
+
}
|
|
4439
4533
|
case "tasksComplete": return {
|
|
4440
4534
|
ok: true,
|
|
4441
4535
|
task: await completeTask(await getGoogleAccessToken(), {
|
|
@@ -4443,6 +4537,23 @@ var src_default = definePlugin(({ log }) => {
|
|
|
4443
4537
|
taskListId: args.taskListId
|
|
4444
4538
|
})
|
|
4445
4539
|
};
|
|
4540
|
+
case "tasksUncomplete": return {
|
|
4541
|
+
ok: true,
|
|
4542
|
+
task: await uncompleteTask(await getGoogleAccessToken(), {
|
|
4543
|
+
taskId: args.taskId,
|
|
4544
|
+
taskListId: args.taskListId
|
|
4545
|
+
})
|
|
4546
|
+
};
|
|
4547
|
+
case "tasksDelete":
|
|
4548
|
+
await deleteTask(await getGoogleAccessToken(), {
|
|
4549
|
+
taskId: args.taskId,
|
|
4550
|
+
taskListId: args.taskListId
|
|
4551
|
+
});
|
|
4552
|
+
log.info("task deleted", { id: args.taskId });
|
|
4553
|
+
return {
|
|
4554
|
+
ok: true,
|
|
4555
|
+
deleted: args.taskId
|
|
4556
|
+
};
|
|
4446
4557
|
case "driveList": return {
|
|
4447
4558
|
ok: true,
|
|
4448
4559
|
files: await listDriveFiles(await getGoogleAccessToken(), { maxResults: args.maxResults ?? DEFAULT_LIST_MAX_RESULTS })
|