gogcli-mcp-calendar 4.2.4 → 4.3.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/dist/index.js +403 -102
- package/manifest.json +9 -2
- package/mint.yaml +1 -1
- package/package.json +2 -2
- package/src/tools/calendar-extra.ts +22 -21
- package/tests/tools/calendar-extra.test.ts +29 -28
- package/vitest.config.ts +5 -0
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-calendar",
|
|
5
5
|
"display_name": "gogcli (Calendar)",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.3.0",
|
|
7
7
|
"description": "Extended Google Calendar for Claude via gogcli — auth + Calendar events + Meet space management",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
],
|
|
36
36
|
"env": {
|
|
37
37
|
"GOG_ACCOUNT": "${user_config.gog_account}",
|
|
38
|
-
"GOG_PATH": "${user_config.gog_path}"
|
|
38
|
+
"GOG_PATH": "${user_config.gog_path}",
|
|
39
|
+
"GOG_FILE_ROOTS": "${user_config.gog_file_roots}"
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
},
|
|
@@ -51,6 +52,12 @@
|
|
|
51
52
|
"title": "gog Executable Path",
|
|
52
53
|
"description": "Path to the gog executable (optional — defaults to 'gog' on your PATH)",
|
|
53
54
|
"required": false
|
|
55
|
+
},
|
|
56
|
+
"gog_file_roots": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"title": "Allowed file directories",
|
|
59
|
+
"description": "Directories tools may read files from (attachments, uploads) or write files to (exports, downloads), separated by ':' (';' on Windows). Optional — defaults to ~/gogcli-mcp-files",
|
|
60
|
+
"required": false
|
|
54
61
|
}
|
|
55
62
|
},
|
|
56
63
|
"tools": [
|
package/mint.yaml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-calendar",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-calendar",
|
|
5
5
|
"description": "Extended Google Calendar + Meet MCP server via gogcli — auth + Calendar events + Meet space management",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test:coverage": "vitest run --coverage"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@chrischall/mcp-utils": "^2.
|
|
27
|
+
"@chrischall/mcp-utils": "^2.4.0",
|
|
28
28
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
29
29
|
"zod": "^4.6.1"
|
|
30
30
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { accountParam, runOrDiagnose, pageTokenParam, pageAliasParam, resolvePageToken} from '../../../gogcli-mcp/src/lib.js';
|
|
3
|
+
import { accountParam, runOrDiagnose, pageTokenParam, pageAliasParam, resolvePageToken, pos} from '../../../gogcli-mcp/src/lib.js';
|
|
4
|
+
import type { GogArg } from '../../../gogcli-mcp/src/lib.js';
|
|
4
5
|
|
|
5
6
|
const meetAccess = z.enum(['open', 'trusted', 'restricted']);
|
|
6
7
|
|
|
@@ -16,7 +17,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
16
17
|
account: accountParam,
|
|
17
18
|
}),
|
|
18
19
|
}, async ({ access, open, account }) => {
|
|
19
|
-
const args = ['meet', 'create'];
|
|
20
|
+
const args: GogArg[] = ['meet', 'create'];
|
|
20
21
|
if (access) args.push(`--access=${access}`);
|
|
21
22
|
if (open) args.push('--open');
|
|
22
23
|
return runOrDiagnose(args, { account });
|
|
@@ -30,7 +31,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
30
31
|
account: accountParam,
|
|
31
32
|
}),
|
|
32
33
|
}, async ({ meetingCode, account }) => {
|
|
33
|
-
return runOrDiagnose(['meet', 'get', meetingCode], { account });
|
|
34
|
+
return runOrDiagnose(['meet', 'get', pos(meetingCode)], { account });
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
server.registerTool('gog_meet_update', {
|
|
@@ -42,7 +43,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
42
43
|
account: accountParam,
|
|
43
44
|
}),
|
|
44
45
|
}, async ({ meetingCode, access, account }) => {
|
|
45
|
-
const args = ['meet', 'update', meetingCode];
|
|
46
|
+
const args: GogArg[] = ['meet', 'update', pos(meetingCode)];
|
|
46
47
|
if (access) args.push(`--access=${access}`);
|
|
47
48
|
return runOrDiagnose(args, { account });
|
|
48
49
|
});
|
|
@@ -55,7 +56,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
55
56
|
account: accountParam,
|
|
56
57
|
}),
|
|
57
58
|
}, async ({ meetingCode, account }) => {
|
|
58
|
-
return runOrDiagnose(['meet', 'end', meetingCode, '--force'], { account }); // gog gates this op; without --force the runner's --no-input makes it refuse
|
|
59
|
+
return runOrDiagnose(['meet', 'end', pos(meetingCode), '--force'], { account }); // gog gates this op; without --force the runner's --no-input makes it refuse
|
|
59
60
|
});
|
|
60
61
|
|
|
61
62
|
server.registerTool('gog_meet_history', {
|
|
@@ -70,7 +71,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
70
71
|
account: accountParam,
|
|
71
72
|
}),
|
|
72
73
|
}, async ({ meetingCode, max, pageToken, page, all, account }) => {
|
|
73
|
-
const args = ['meet', 'history', meetingCode];
|
|
74
|
+
const args: GogArg[] = ['meet', 'history', pos(meetingCode)];
|
|
74
75
|
if (max !== undefined) args.push(`--max=${max}`);
|
|
75
76
|
const token = resolvePageToken({ pageToken, page });
|
|
76
77
|
if (token) args.push(`--page=${token}`);
|
|
@@ -92,7 +93,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
92
93
|
skipValidate: z.boolean().optional().describe('Store credentials without calling Zoom /users/me to validate'),
|
|
93
94
|
}),
|
|
94
95
|
}, async ({ accountId, clientId, clientSecret, alias, skipValidate }) => {
|
|
95
|
-
const args = ['zoom', 'auth', 'setup'];
|
|
96
|
+
const args: GogArg[] = ['zoom', 'auth', 'setup'];
|
|
96
97
|
if (alias) args.push(`--alias=${alias}`);
|
|
97
98
|
args.push(`--account-id=${accountId}`);
|
|
98
99
|
args.push(`--client-id=${clientId}`);
|
|
@@ -108,7 +109,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
108
109
|
alias: z.string().optional().describe('Zoom credential alias to check (default: "default")'),
|
|
109
110
|
}),
|
|
110
111
|
}, async ({ alias }) => {
|
|
111
|
-
const args = ['zoom', 'auth', 'doctor'];
|
|
112
|
+
const args: GogArg[] = ['zoom', 'auth', 'doctor'];
|
|
112
113
|
if (alias) args.push(`--alias=${alias}`);
|
|
113
114
|
return runOrDiagnose(args, {});
|
|
114
115
|
});
|
|
@@ -126,7 +127,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
126
127
|
account: accountParam,
|
|
127
128
|
}),
|
|
128
129
|
}, async ({ max, pageToken, page, all, account }) => {
|
|
129
|
-
const args = ['calendar', 'calendars'];
|
|
130
|
+
const args: GogArg[] = ['calendar', 'calendars'];
|
|
130
131
|
if (max !== undefined) args.push(`--max=${max}`);
|
|
131
132
|
const token = resolvePageToken({ pageToken, page });
|
|
132
133
|
if (token) args.push(`--page=${token}`);
|
|
@@ -156,7 +157,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
156
157
|
account: accountParam,
|
|
157
158
|
}),
|
|
158
159
|
}, async ({ query, from, to, today, tomorrow, week, days, weekStart, calendar, max, account }) => {
|
|
159
|
-
const args = ['calendar', 'search', query];
|
|
160
|
+
const args: GogArg[] = ['calendar', 'search', pos(query)];
|
|
160
161
|
if (from) args.push(`--from=${from}`);
|
|
161
162
|
if (to) args.push(`--to=${to}`);
|
|
162
163
|
if (today) args.push('--today');
|
|
@@ -181,8 +182,8 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
181
182
|
account: accountParam,
|
|
182
183
|
}),
|
|
183
184
|
}, async ({ calendarId, calendarIds, since, max, all, account }) => {
|
|
184
|
-
const args = ['calendar', 'changed'];
|
|
185
|
-
if (calendarId) args.push(calendarId);
|
|
185
|
+
const args: GogArg[] = ['calendar', 'changed'];
|
|
186
|
+
if (calendarId) args.push(pos(calendarId));
|
|
186
187
|
if (calendarIds) args.push(`--calendars=${calendarIds}`);
|
|
187
188
|
if (since) args.push(`--since=${since}`);
|
|
188
189
|
if (max !== undefined) args.push(`--max=${max}`);
|
|
@@ -201,8 +202,8 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
201
202
|
account: accountParam,
|
|
202
203
|
}),
|
|
203
204
|
}, async ({ from, to, calendarIds, all, account }) => {
|
|
204
|
-
const args = ['calendar', 'freebusy'];
|
|
205
|
-
if (calendarIds) args.push(calendarIds);
|
|
205
|
+
const args: GogArg[] = ['calendar', 'freebusy'];
|
|
206
|
+
if (calendarIds) args.push(pos(calendarIds));
|
|
206
207
|
args.push(`--from=${from}`);
|
|
207
208
|
args.push(`--to=${to}`);
|
|
208
209
|
if (all) args.push('--all');
|
|
@@ -231,7 +232,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
231
232
|
account: accountParam,
|
|
232
233
|
}),
|
|
233
234
|
}, async ({ calendarId, max, pageToken, page, all, account }) => {
|
|
234
|
-
const args = ['calendar', 'acl', calendarId];
|
|
235
|
+
const args: GogArg[] = ['calendar', 'acl', pos(calendarId)];
|
|
235
236
|
if (max !== undefined) args.push(`--max=${max}`);
|
|
236
237
|
const token = resolvePageToken({ pageToken, page });
|
|
237
238
|
if (token) args.push(`--page=${token}`);
|
|
@@ -250,7 +251,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
250
251
|
account: accountParam,
|
|
251
252
|
}),
|
|
252
253
|
}, async ({ calendarId, eventId, destinationCalendarId, sendUpdates, account }) => {
|
|
253
|
-
const args = ['calendar', 'move', calendarId, eventId, destinationCalendarId];
|
|
254
|
+
const args: GogArg[] = ['calendar', 'move', pos(calendarId), pos(eventId), pos(destinationCalendarId)];
|
|
254
255
|
if (sendUpdates) args.push(`--send-updates=${sendUpdates}`);
|
|
255
256
|
return runOrDiagnose(args, { account });
|
|
256
257
|
});
|
|
@@ -269,8 +270,8 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
269
270
|
account: accountParam,
|
|
270
271
|
}),
|
|
271
272
|
}, async ({ from, to, calendarId, summary, autoDecline, declineMessage, allDay, account }) => {
|
|
272
|
-
const args = ['calendar', 'out-of-office'];
|
|
273
|
-
if (calendarId) args.push(calendarId);
|
|
273
|
+
const args: GogArg[] = ['calendar', 'out-of-office'];
|
|
274
|
+
if (calendarId) args.push(pos(calendarId));
|
|
274
275
|
args.push(`--from=${from}`);
|
|
275
276
|
args.push(`--to=${to}`);
|
|
276
277
|
if (summary) args.push(`--summary=${summary}`);
|
|
@@ -288,7 +289,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
288
289
|
account: accountParam,
|
|
289
290
|
}),
|
|
290
291
|
}, async ({ calendarId, account }) => {
|
|
291
|
-
return runOrDiagnose(['calendar', 'unsubscribe', calendarId], { account });
|
|
292
|
+
return runOrDiagnose(['calendar', 'unsubscribe', pos(calendarId)], { account });
|
|
292
293
|
});
|
|
293
294
|
|
|
294
295
|
server.registerTool('gog_calendar_delete_calendar', {
|
|
@@ -299,7 +300,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
299
300
|
account: accountParam,
|
|
300
301
|
}),
|
|
301
302
|
}, async ({ calendarId, account }) => {
|
|
302
|
-
return runOrDiagnose(['calendar', 'delete-calendar', calendarId, '--force'], { account }); // gog gates this op; without --force the runner's --no-input makes it refuse
|
|
303
|
+
return runOrDiagnose(['calendar', 'delete-calendar', pos(calendarId), '--force'], { account }); // gog gates this op; without --force the runner's --no-input makes it refuse
|
|
303
304
|
});
|
|
304
305
|
|
|
305
306
|
server.registerTool('gog_meet_participants', {
|
|
@@ -315,7 +316,7 @@ export function registerExtraCalendarTools(server: McpServer): void {
|
|
|
315
316
|
account: accountParam,
|
|
316
317
|
}),
|
|
317
318
|
}, async ({ meetingCode, conference, max, pageToken, page, all, account }) => {
|
|
318
|
-
const args = ['meet', 'participants', meetingCode];
|
|
319
|
+
const args: GogArg[] = ['meet', 'participants', pos(meetingCode)];
|
|
319
320
|
if (conference) args.push(`--conference=${conference}`);
|
|
320
321
|
if (max !== undefined) args.push(`--max=${max}`);
|
|
321
322
|
const token = resolvePageToken({ pageToken, page });
|
|
@@ -3,6 +3,7 @@ import { registerExtraCalendarTools } from '../../src/tools/calendar-extra.js';
|
|
|
3
3
|
import * as lib from '../../../gogcli-mcp/src/lib.js';
|
|
4
4
|
import { createTestHarness, type TestHarness } from '@chrischall/mcp-utils/test';
|
|
5
5
|
import { rawTextResult } from '@chrischall/mcp-utils';
|
|
6
|
+
import { pos } from '../../../gogcli-mcp/src/argv.js';
|
|
6
7
|
|
|
7
8
|
vi.mock('../../../gogcli-mcp/src/lib.js', async (importOriginal) => {
|
|
8
9
|
const actual = await importOriginal<typeof lib>();
|
|
@@ -43,7 +44,7 @@ describe('gog_meet_create', () => {
|
|
|
43
44
|
describe('gog_meet_get', () => {
|
|
44
45
|
it('calls runOrDiagnose with meetingCode', async () => {
|
|
45
46
|
await harness.callTool('gog_meet_get', { meetingCode: 'abc-defg-hij' });
|
|
46
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'get', 'abc-defg-hij'], { account: undefined });
|
|
47
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'get', pos('abc-defg-hij')], { account: undefined });
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
50
|
|
|
@@ -51,28 +52,28 @@ describe('gog_meet_update', () => {
|
|
|
51
52
|
it('calls runOrDiagnose with meetingCode and --access', async () => {
|
|
52
53
|
await harness.callTool('gog_meet_update', { meetingCode: 'abc-defg-hij', access: 'restricted' });
|
|
53
54
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
54
|
-
['meet', 'update', 'abc-defg-hij', '--access=restricted'],
|
|
55
|
+
['meet', 'update', pos('abc-defg-hij'), '--access=restricted'],
|
|
55
56
|
{ account: undefined },
|
|
56
57
|
);
|
|
57
58
|
});
|
|
58
59
|
|
|
59
60
|
it('omits --access when not provided', async () => {
|
|
60
61
|
await harness.callTool('gog_meet_update', { meetingCode: 'abc-defg-hij' });
|
|
61
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'update', 'abc-defg-hij'], { account: undefined });
|
|
62
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'update', pos('abc-defg-hij')], { account: undefined });
|
|
62
63
|
});
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
describe('gog_meet_end', () => {
|
|
66
67
|
it('calls runOrDiagnose with meetingCode', async () => {
|
|
67
68
|
await harness.callTool('gog_meet_end', { meetingCode: 'abc-defg-hij' });
|
|
68
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'end', 'abc-defg-hij', '--force'], { account: undefined });
|
|
69
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'end', pos('abc-defg-hij'), '--force'], { account: undefined });
|
|
69
70
|
});
|
|
70
71
|
});
|
|
71
72
|
|
|
72
73
|
describe('gog_meet_history', () => {
|
|
73
74
|
it('calls runOrDiagnose with meetingCode', async () => {
|
|
74
75
|
await harness.callTool('gog_meet_history', { meetingCode: 'abc-defg-hij' });
|
|
75
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'history', 'abc-defg-hij'], { account: undefined });
|
|
76
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'history', pos('abc-defg-hij')], { account: undefined });
|
|
76
77
|
});
|
|
77
78
|
|
|
78
79
|
it('passes pagination flags', async () => {
|
|
@@ -83,14 +84,14 @@ describe('gog_meet_history', () => {
|
|
|
83
84
|
all: true,
|
|
84
85
|
});
|
|
85
86
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
86
|
-
['meet', 'history', 'abc-defg-hij', '--max=50', '--page=tok', '--all'],
|
|
87
|
+
['meet', 'history', pos('abc-defg-hij'), '--max=50', '--page=tok', '--all'],
|
|
87
88
|
{ account: undefined },
|
|
88
89
|
);
|
|
89
90
|
});
|
|
90
91
|
|
|
91
92
|
it('omits --all when false', async () => {
|
|
92
93
|
await harness.callTool('gog_meet_history', { meetingCode: 'abc-defg-hij', all: false });
|
|
93
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'history', 'abc-defg-hij'], { account: undefined });
|
|
94
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['meet', 'history', pos('abc-defg-hij')], { account: undefined });
|
|
94
95
|
});
|
|
95
96
|
});
|
|
96
97
|
|
|
@@ -169,7 +170,7 @@ describe('gog_calendar_calendars', () => {
|
|
|
169
170
|
describe('gog_calendar_search', () => {
|
|
170
171
|
it('calls runOrDiagnose with just the query', async () => {
|
|
171
172
|
await harness.callTool('gog_calendar_search', { query: 'standup' });
|
|
172
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'search', 'standup'], { account: undefined });
|
|
173
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'search', pos('standup')], { account: undefined });
|
|
173
174
|
});
|
|
174
175
|
|
|
175
176
|
// One case per LEGAL window, not one case passing every flag at once. gog
|
|
@@ -187,7 +188,7 @@ describe('gog_calendar_search', () => {
|
|
|
187
188
|
});
|
|
188
189
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
189
190
|
[
|
|
190
|
-
'calendar', 'search', 'standup',
|
|
191
|
+
'calendar', 'search', pos('standup'),
|
|
191
192
|
'--from=today', '--to=tomorrow',
|
|
192
193
|
'--calendar=primary', '--max=10',
|
|
193
194
|
],
|
|
@@ -198,7 +199,7 @@ describe('gog_calendar_search', () => {
|
|
|
198
199
|
it('anchors --days at --from when both are given', async () => {
|
|
199
200
|
await harness.callTool('gog_calendar_search', { query: 'standup', from: '2026-09-25', days: 7 });
|
|
200
201
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
201
|
-
['calendar', 'search', 'standup', '--from=2026-09-25', '--days=7'],
|
|
202
|
+
['calendar', 'search', pos('standup'), '--from=2026-09-25', '--days=7'],
|
|
202
203
|
{ account: undefined },
|
|
203
204
|
);
|
|
204
205
|
});
|
|
@@ -208,7 +209,7 @@ describe('gog_calendar_search', () => {
|
|
|
208
209
|
vi.mocked(lib.runOrDiagnose).mockClear();
|
|
209
210
|
await harness.callTool('gog_calendar_search', { query: 'standup', [param]: true });
|
|
210
211
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
211
|
-
['calendar', 'search', 'standup', flag],
|
|
212
|
+
['calendar', 'search', pos('standup'), flag],
|
|
212
213
|
{ account: undefined },
|
|
213
214
|
);
|
|
214
215
|
}
|
|
@@ -217,7 +218,7 @@ describe('gog_calendar_search', () => {
|
|
|
217
218
|
it('passes --week-start alongside --week', async () => {
|
|
218
219
|
await harness.callTool('gog_calendar_search', { query: 'standup', week: true, weekStart: 'sun' });
|
|
219
220
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
220
|
-
['calendar', 'search', 'standup', '--week', '--week-start=sun'],
|
|
221
|
+
['calendar', 'search', pos('standup'), '--week', '--week-start=sun'],
|
|
221
222
|
{ account: undefined },
|
|
222
223
|
);
|
|
223
224
|
});
|
|
@@ -226,7 +227,7 @@ describe('gog_calendar_search', () => {
|
|
|
226
227
|
await harness.callTool('gog_calendar_search', {
|
|
227
228
|
query: 'standup', today: false, tomorrow: false, week: false,
|
|
228
229
|
});
|
|
229
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'search', 'standup'], { account: undefined });
|
|
230
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'search', pos('standup')], { account: undefined });
|
|
230
231
|
});
|
|
231
232
|
});
|
|
232
233
|
|
|
@@ -246,7 +247,7 @@ describe('gog_calendar_changed', () => {
|
|
|
246
247
|
account: 'me@example.com',
|
|
247
248
|
});
|
|
248
249
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
249
|
-
['calendar', 'changed', 'primary', '--calendars=work,personal', '--since=48h', '--max=25', '--all'],
|
|
250
|
+
['calendar', 'changed', pos('primary'), '--calendars=work,personal', '--since=48h', '--max=25', '--all'],
|
|
250
251
|
{ account: 'me@example.com' },
|
|
251
252
|
);
|
|
252
253
|
});
|
|
@@ -271,7 +272,7 @@ describe('gog_calendar_freebusy', () => {
|
|
|
271
272
|
from: 'A', to: 'B', calendarIds: 'primary,team@x.com', all: true,
|
|
272
273
|
});
|
|
273
274
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
274
|
-
['calendar', 'freebusy', 'primary,team@x.com', '--from=A', '--to=B', '--all'],
|
|
275
|
+
['calendar', 'freebusy', pos('primary,team@x.com'), '--from=A', '--to=B', '--all'],
|
|
275
276
|
{ account: undefined },
|
|
276
277
|
);
|
|
277
278
|
});
|
|
@@ -295,20 +296,20 @@ describe('gog_calendar_colors', () => {
|
|
|
295
296
|
describe('gog_calendar_acl', () => {
|
|
296
297
|
it('calls runOrDiagnose with calendarId only', async () => {
|
|
297
298
|
await harness.callTool('gog_calendar_acl', { calendarId: 'primary' });
|
|
298
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'acl', 'primary'], { account: undefined });
|
|
299
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'acl', pos('primary')], { account: undefined });
|
|
299
300
|
});
|
|
300
301
|
|
|
301
302
|
it('passes pagination flags', async () => {
|
|
302
303
|
await harness.callTool('gog_calendar_acl', { calendarId: 'primary', max: 25, page: 'tok', all: true });
|
|
303
304
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
304
|
-
['calendar', 'acl', 'primary', '--max=25', '--page=tok', '--all'],
|
|
305
|
+
['calendar', 'acl', pos('primary'), '--max=25', '--page=tok', '--all'],
|
|
305
306
|
{ account: undefined },
|
|
306
307
|
);
|
|
307
308
|
});
|
|
308
309
|
|
|
309
310
|
it('omits --all when false', async () => {
|
|
310
311
|
await harness.callTool('gog_calendar_acl', { calendarId: 'primary', all: false });
|
|
311
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'acl', 'primary'], { account: undefined });
|
|
312
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['calendar', 'acl', pos('primary')], { account: undefined });
|
|
312
313
|
});
|
|
313
314
|
});
|
|
314
315
|
|
|
@@ -318,7 +319,7 @@ describe('gog_calendar_move', () => {
|
|
|
318
319
|
calendarId: 'primary', eventId: 'ev1', destinationCalendarId: 'team@x.com',
|
|
319
320
|
});
|
|
320
321
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
321
|
-
['calendar', 'move', 'primary', 'ev1', 'team@x.com'],
|
|
322
|
+
['calendar', 'move', pos('primary'), pos('ev1'), pos('team@x.com')],
|
|
322
323
|
{ account: undefined },
|
|
323
324
|
);
|
|
324
325
|
});
|
|
@@ -329,7 +330,7 @@ describe('gog_calendar_move', () => {
|
|
|
329
330
|
sendUpdates: 'all',
|
|
330
331
|
});
|
|
331
332
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
332
|
-
['calendar', 'move', 'primary', 'ev1', 'team@x.com', '--send-updates=all'],
|
|
333
|
+
['calendar', 'move', pos('primary'), pos('ev1'), pos('team@x.com'), '--send-updates=all'],
|
|
333
334
|
{ account: undefined },
|
|
334
335
|
);
|
|
335
336
|
});
|
|
@@ -355,7 +356,7 @@ describe('gog_calendar_out_of_office', () => {
|
|
|
355
356
|
});
|
|
356
357
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
357
358
|
[
|
|
358
|
-
'calendar', 'out-of-office', 'primary',
|
|
359
|
+
'calendar', 'out-of-office', pos('primary'),
|
|
359
360
|
'--from=2026-06-01', '--to=2026-06-05',
|
|
360
361
|
'--summary=Vacation', '--auto-decline=new',
|
|
361
362
|
'--decline-message=Away', '--all-day',
|
|
@@ -377,7 +378,7 @@ describe('gog_meet_participants', () => {
|
|
|
377
378
|
it('calls runOrDiagnose with meetingCode', async () => {
|
|
378
379
|
await harness.callTool('gog_meet_participants', { meetingCode: 'abc-defg-hij' });
|
|
379
380
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
380
|
-
['meet', 'participants', 'abc-defg-hij'],
|
|
381
|
+
['meet', 'participants', pos('abc-defg-hij')],
|
|
381
382
|
{ account: undefined },
|
|
382
383
|
);
|
|
383
384
|
});
|
|
@@ -392,7 +393,7 @@ describe('gog_meet_participants', () => {
|
|
|
392
393
|
});
|
|
393
394
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
394
395
|
[
|
|
395
|
-
'meet', 'participants', 'abc-defg-hij',
|
|
396
|
+
'meet', 'participants', pos('abc-defg-hij'),
|
|
396
397
|
'--conference=conf123',
|
|
397
398
|
'--max=100',
|
|
398
399
|
'--page=tok',
|
|
@@ -405,7 +406,7 @@ describe('gog_meet_participants', () => {
|
|
|
405
406
|
it('omits --all when false', async () => {
|
|
406
407
|
await harness.callTool('gog_meet_participants', { meetingCode: 'abc-defg-hij', all: false });
|
|
407
408
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
408
|
-
['meet', 'participants', 'abc-defg-hij'],
|
|
409
|
+
['meet', 'participants', pos('abc-defg-hij')],
|
|
409
410
|
{ account: undefined },
|
|
410
411
|
);
|
|
411
412
|
});
|
|
@@ -415,7 +416,7 @@ describe('gog_calendar_unsubscribe', () => {
|
|
|
415
416
|
it('calls runOrDiagnose with calendarId', async () => {
|
|
416
417
|
await harness.callTool('gog_calendar_unsubscribe', { calendarId: 'cal@group.calendar.google.com' });
|
|
417
418
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
418
|
-
['calendar', 'unsubscribe', 'cal@group.calendar.google.com'],
|
|
419
|
+
['calendar', 'unsubscribe', pos('cal@group.calendar.google.com')],
|
|
419
420
|
{ account: undefined },
|
|
420
421
|
);
|
|
421
422
|
});
|
|
@@ -423,7 +424,7 @@ describe('gog_calendar_unsubscribe', () => {
|
|
|
423
424
|
it('passes account through', async () => {
|
|
424
425
|
await harness.callTool('gog_calendar_unsubscribe', { calendarId: 'cal', account: 'me@x.com' });
|
|
425
426
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
426
|
-
['calendar', 'unsubscribe', 'cal'],
|
|
427
|
+
['calendar', 'unsubscribe', pos('cal')],
|
|
427
428
|
{ account: 'me@x.com' },
|
|
428
429
|
);
|
|
429
430
|
});
|
|
@@ -433,7 +434,7 @@ describe('gog_calendar_delete_calendar', () => {
|
|
|
433
434
|
it('calls runOrDiagnose with calendarId', async () => {
|
|
434
435
|
await harness.callTool('gog_calendar_delete_calendar', { calendarId: 'cal' });
|
|
435
436
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
436
|
-
['calendar', 'delete-calendar', 'cal', '--force'],
|
|
437
|
+
['calendar', 'delete-calendar', pos('cal'), '--force'],
|
|
437
438
|
{ account: undefined },
|
|
438
439
|
);
|
|
439
440
|
});
|
|
@@ -441,7 +442,7 @@ describe('gog_calendar_delete_calendar', () => {
|
|
|
441
442
|
it('passes account through', async () => {
|
|
442
443
|
await harness.callTool('gog_calendar_delete_calendar', { calendarId: 'cal', account: 'me@x.com' });
|
|
443
444
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
444
|
-
['calendar', 'delete-calendar', 'cal', '--force'],
|
|
445
|
+
['calendar', 'delete-calendar', pos('cal'), '--force'],
|
|
445
446
|
{ account: 'me@x.com' },
|
|
446
447
|
);
|
|
447
448
|
});
|
package/vitest.config.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { defineConfig } from 'vitest/config';
|
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
test: {
|
|
5
|
+
// The arg-shape tests pass arbitrary server paths; confinement is exercised
|
|
6
|
+
// explicitly by the tests that narrow GOG_FILE_ROOTS themselves.
|
|
7
|
+
env: {
|
|
8
|
+
GOG_FILE_ROOTS: '/',
|
|
9
|
+
},
|
|
5
10
|
coverage: {
|
|
6
11
|
provider: 'v8',
|
|
7
12
|
include: ['src/**/*.ts'],
|