gogcli-mcp 2.25.0 → 2.26.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +9 -4
- package/SKILL.md +10 -5
- package/dist/index.js +483 -124
- package/dist/lib.js +407 -85
- package/manifest.json +81 -1
- package/mint.yaml +106 -0
- package/package.json +5 -5
- package/server.json +2 -2
- package/src/gmail-results.ts +29 -2
- package/src/lib.ts +2 -0
- package/src/runner.ts +1 -1
- package/src/server.ts +6 -0
- package/src/tools/appscript.ts +173 -0
- package/src/tools/calendar.ts +56 -2
- package/src/tools/chat.ts +253 -0
- package/src/worker.ts +1 -1
- package/tests/gmail-results.test.ts +47 -0
- package/tests/server.test.ts +2 -0
- package/tests/tools/appscript.test.ts +159 -0
- package/tests/tools/calendar.test.ts +121 -0
- package/tests/tools/chat.test.ts +284 -0
package/dist/lib.js
CHANGED
|
@@ -23042,7 +23042,7 @@ function activeExecutor() {
|
|
|
23042
23042
|
return runExecutor.getStore() ?? defaultExecutor;
|
|
23043
23043
|
}
|
|
23044
23044
|
var TIMEOUT_MS = 3e4;
|
|
23045
|
-
var MIN_GOG_VERSION = "0.
|
|
23045
|
+
var MIN_GOG_VERSION = "0.38.1";
|
|
23046
23046
|
function readonlyEnvEnabled() {
|
|
23047
23047
|
return readEnvVar("GOG_READONLY") !== void 0 && parseBoolEnv("GOG_READONLY", { default: true });
|
|
23048
23048
|
}
|
|
@@ -23736,6 +23736,117 @@ function registerApiTools(server) {
|
|
|
23736
23736
|
});
|
|
23737
23737
|
}
|
|
23738
23738
|
|
|
23739
|
+
// src/tools/appscript.ts
|
|
23740
|
+
function registerAppScriptTools(server) {
|
|
23741
|
+
const scriptIdParam = external_exports.string().describe(
|
|
23742
|
+
"Apps Script project ID \u2014 the long ID in script.google.com/\u2026/projects/<scriptId>/\u2026, NOT the Drive file ID of a container document"
|
|
23743
|
+
);
|
|
23744
|
+
const apiEnableNote = " Needs the Apps Script API enabled on the OAuth client's Google Cloud project; if it is not, gog says so and prints the console URL to enable it. That is a project setting, not a missing scope \u2014 re-authorizing will not fix it.";
|
|
23745
|
+
server.registerTool("gog_appscript_get", {
|
|
23746
|
+
description: "Get an Apps Script project's metadata: title, creator, create/update times, and the parent Drive file when the project is bound to a Sheet, Doc or Form. Use gog_appscript_content to read the actual code." + apiEnableNote,
|
|
23747
|
+
annotations: { readOnlyHint: true },
|
|
23748
|
+
inputSchema: {
|
|
23749
|
+
scriptId: scriptIdParam,
|
|
23750
|
+
account: accountParam
|
|
23751
|
+
}
|
|
23752
|
+
}, async ({ scriptId, account }) => {
|
|
23753
|
+
return runOrDiagnose(["appscript", "get", scriptId], { account });
|
|
23754
|
+
});
|
|
23755
|
+
server.registerTool("gog_appscript_content", {
|
|
23756
|
+
description: `Read a project's source \u2014 every .gs file and its appsscript.json manifest \u2014 INLINE in the response. This is the tool to reach for when the question is "what does this script do"; it needs no filesystem, so it works the same on a hosted deployment as it does locally, unlike gog_appscript_pull.` + apiEnableNote,
|
|
23757
|
+
annotations: { readOnlyHint: true },
|
|
23758
|
+
inputSchema: {
|
|
23759
|
+
scriptId: scriptIdParam,
|
|
23760
|
+
account: accountParam
|
|
23761
|
+
}
|
|
23762
|
+
}, async ({ scriptId, account }) => {
|
|
23763
|
+
return runOrDiagnose(["appscript", "content", scriptId], { account });
|
|
23764
|
+
});
|
|
23765
|
+
server.registerTool("gog_appscript_pull", {
|
|
23766
|
+
description: "Write a project's files into a local directory, for editing a script as ordinary files. THE DIRECTORY IS RESOLVED WHERE GOG RUNS, which is the caller's own machine only on a local (stdio) deployment: on the hosted connector, or any GOG_RUNNER_URL backend, the files land on that server where the caller cannot reach them. Use gog_appscript_content there instead \u2014 it returns the same source in the response. Existing files are left alone unless overwrite is set. Read-only as far as Google is concerned: nothing is pushed back." + apiEnableNote,
|
|
23767
|
+
inputSchema: {
|
|
23768
|
+
scriptId: scriptIdParam,
|
|
23769
|
+
dir: external_exports.string().describe("Destination directory, resolved on the machine where gog runs"),
|
|
23770
|
+
overwrite: external_exports.boolean().optional().describe("Overwrite files that already exist in dir"),
|
|
23771
|
+
account: accountParam
|
|
23772
|
+
}
|
|
23773
|
+
}, async ({ scriptId, dir, overwrite, account }) => {
|
|
23774
|
+
const args = ["appscript", "pull", scriptId, dir];
|
|
23775
|
+
if (overwrite) args.push("--overwrite");
|
|
23776
|
+
return runOrDiagnose(args, { account });
|
|
23777
|
+
});
|
|
23778
|
+
server.registerTool("gog_appscript_create", {
|
|
23779
|
+
description: "Create a new, empty Apps Script project. Pass parentId to bind it to a Drive file (a Sheet, Doc or Form), which is what makes the script a container-bound script with access to that document; omit it for a standalone project. gog cannot upload code, so the project starts empty either way." + apiEnableNote,
|
|
23780
|
+
inputSchema: {
|
|
23781
|
+
title: external_exports.string().describe("Project title"),
|
|
23782
|
+
parentId: external_exports.string().optional().describe("Drive file ID to bind the project to (Sheet, Doc or Form). Omit for a standalone project."),
|
|
23783
|
+
account: accountParam
|
|
23784
|
+
}
|
|
23785
|
+
}, async ({ title, parentId, account }) => {
|
|
23786
|
+
const args = ["appscript", "create", `--title=${title}`];
|
|
23787
|
+
if (parentId) args.push(`--parent-id=${parentId}`);
|
|
23788
|
+
return runOrDiagnose(args, { account });
|
|
23789
|
+
});
|
|
23790
|
+
server.registerTool("gog_appscript_deployments", {
|
|
23791
|
+
description: "List a project's deployments \u2014 the published web apps, add-ons and API executables, each pinned to a version. A deployment ID from here is what gog_appscript_run_function needs when a script is not running in dev mode." + apiEnableNote,
|
|
23792
|
+
annotations: { readOnlyHint: true },
|
|
23793
|
+
inputSchema: {
|
|
23794
|
+
scriptId: scriptIdParam,
|
|
23795
|
+
...paginationParams,
|
|
23796
|
+
account: accountParam
|
|
23797
|
+
}
|
|
23798
|
+
}, async ({ scriptId, max, pageToken, page, all, account }) => {
|
|
23799
|
+
const args = ["appscript", "deployments", scriptId];
|
|
23800
|
+
pushPaginationFlags(args, { max, pageToken, page, all });
|
|
23801
|
+
return runOrDiagnose(args, { account });
|
|
23802
|
+
});
|
|
23803
|
+
server.registerTool("gog_appscript_versions", {
|
|
23804
|
+
description: `List a project's saved versions \u2014 the immutable snapshots deployments point at, with their numbers and descriptions. Useful for answering "what is actually deployed" next to gog_appscript_deployments.` + apiEnableNote,
|
|
23805
|
+
annotations: { readOnlyHint: true },
|
|
23806
|
+
inputSchema: {
|
|
23807
|
+
scriptId: scriptIdParam,
|
|
23808
|
+
...paginationParams,
|
|
23809
|
+
account: accountParam
|
|
23810
|
+
}
|
|
23811
|
+
}, async ({ scriptId, max, pageToken, page, all, account }) => {
|
|
23812
|
+
const args = ["appscript", "versions", scriptId];
|
|
23813
|
+
pushPaginationFlags(args, { max, pageToken, page, all });
|
|
23814
|
+
return runOrDiagnose(args, { account });
|
|
23815
|
+
});
|
|
23816
|
+
server.registerTool("gog_appscript_run_function", {
|
|
23817
|
+
description: "Execute a function in a deployed Apps Script project. TREAT THIS AS ARBITRARY CODE EXECUTION: the script runs with this Google account's authority and can send mail, edit Drive files or call external services, and the wrapper cannot tell a read from a write \u2014 read the code with gog_appscript_content first if you did not write it. Requires the project to be deployed as an API executable and to share the OAuth client with the calling credentials, otherwise Google refuses regardless of scopes. devMode runs the latest saved code instead of the deployed version, and only works if the account owns the script. This is NOT the escape hatch \u2014 gog_appscript_run is that." + apiEnableNote,
|
|
23818
|
+
annotations: { destructiveHint: true },
|
|
23819
|
+
inputSchema: {
|
|
23820
|
+
scriptId: scriptIdParam,
|
|
23821
|
+
functionName: external_exports.string().describe('Name of the function to call, e.g. "doWork"'),
|
|
23822
|
+
params: external_exports.string().optional().describe(`Function parameters as a JSON ARRAY of positional arguments, e.g. '["a", 1]' \u2014 not an object`),
|
|
23823
|
+
devMode: external_exports.boolean().optional().describe("Run the latest saved code rather than the deployed version (owner only)"),
|
|
23824
|
+
account: accountParam
|
|
23825
|
+
}
|
|
23826
|
+
}, async ({ scriptId, functionName, params, devMode, account }) => {
|
|
23827
|
+
if (params !== void 0) {
|
|
23828
|
+
let parsed;
|
|
23829
|
+
try {
|
|
23830
|
+
parsed = JSON.parse(params);
|
|
23831
|
+
} catch {
|
|
23832
|
+
throw new Error(`params must be a JSON array of positional arguments, e.g. '["a", 1]'. Received: ${params}`);
|
|
23833
|
+
}
|
|
23834
|
+
if (!Array.isArray(parsed)) {
|
|
23835
|
+
throw new Error(`params must be a JSON ARRAY of positional arguments, e.g. '["a", 1]' \u2014 Apps Script takes positional arguments, not named ones. Received: ${params}`);
|
|
23836
|
+
}
|
|
23837
|
+
}
|
|
23838
|
+
const args = ["appscript", "run", scriptId, functionName];
|
|
23839
|
+
if (params !== void 0) args.push(`--params=${params}`);
|
|
23840
|
+
if (devMode) args.push("--dev-mode");
|
|
23841
|
+
return runOrDiagnose(args, { account });
|
|
23842
|
+
});
|
|
23843
|
+
registerRunTool(server, {
|
|
23844
|
+
service: "appscript",
|
|
23845
|
+
examples: '"get", "content", "deployments"',
|
|
23846
|
+
note: "To execute a function, use gog_appscript_run_function \u2014 this tool is the generic escape hatch."
|
|
23847
|
+
});
|
|
23848
|
+
}
|
|
23849
|
+
|
|
23739
23850
|
// src/tools/auth.ts
|
|
23740
23851
|
function registerAuthToolsWith(server, defaultServices) {
|
|
23741
23852
|
const servicesDescribe = `Services to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "${defaultServices}". Prefer the narrowest set you need \u2014 requesting a service whose Google API is not enabled on the OAuth client's project makes Google reject the WHOLE request with invalid_scope.`;
|
|
@@ -23871,6 +23982,29 @@ function authToolsFor(defaultServices) {
|
|
|
23871
23982
|
}
|
|
23872
23983
|
|
|
23873
23984
|
// src/tools/calendar.ts
|
|
23985
|
+
var reminderParams = {
|
|
23986
|
+
reminders: external_exports.array(external_exports.string()).max(5).optional().describe(
|
|
23987
|
+
`Reminders as method:duration, e.g. ["popup:30m", "email:1d"]. Method is popup or email; duration accepts m/h/d (max 40320 minutes = 4 weeks). Google allows at most 5. These REPLACE the event's reminders \u2014 on update, pass an EMPTY array to drop custom reminders and go back to the calendar's defaults. Cannot be combined with noReminders.`
|
|
23988
|
+
),
|
|
23989
|
+
noReminders: external_exports.boolean().optional().describe(
|
|
23990
|
+
"Give the event no reminders at all, overriding the calendar's defaults. Different from an empty reminders array, which RESTORES those defaults. Cannot be combined with reminders."
|
|
23991
|
+
)
|
|
23992
|
+
};
|
|
23993
|
+
function pushReminderFlags(args, p) {
|
|
23994
|
+
if (p.noReminders) {
|
|
23995
|
+
if (p.reminders !== void 0) {
|
|
23996
|
+
throw new Error("reminders and noReminders are mutually exclusive: pass reminders to set custom ones, noReminders for none, or an empty reminders array to restore the calendar defaults.");
|
|
23997
|
+
}
|
|
23998
|
+
args.push("--no-reminders");
|
|
23999
|
+
return;
|
|
24000
|
+
}
|
|
24001
|
+
if (p.reminders === void 0) return;
|
|
24002
|
+
if (p.reminders.length === 0) {
|
|
24003
|
+
args.push("--reminder=");
|
|
24004
|
+
return;
|
|
24005
|
+
}
|
|
24006
|
+
for (const reminder of p.reminders) args.push(`--reminder=${reminder}`);
|
|
24007
|
+
}
|
|
23874
24008
|
function registerCalendarTools(server) {
|
|
23875
24009
|
server.registerTool("gog_calendar_events", {
|
|
23876
24010
|
description: 'List calendar events. Describe the window ONE way and one way only (gog >= 0.36.0 rejects the rest as ambiguous rather than silently discarding a flag): today on its own; or from + to; or from + days; or days on its own (a window of that many days starting today). today cannot be combined with from, to or days, and days cannot be combined with to. gog returns only 10 events by default, so a wide date range is USUALLY INCOMPLETE: raise max, or page with pageToken until the response carries no nextPageToken. A response carrying "truncated": true is an incomplete view \u2014 never conclude an event does not exist from one.',
|
|
@@ -23940,9 +24074,10 @@ function registerCalendarTools(server) {
|
|
|
23940
24074
|
allDay: external_exports.boolean().optional().describe("All-day event (use date-only in from/to)"),
|
|
23941
24075
|
timezone: external_exports.string().optional().describe("IANA timezone metadata applied to from/to (e.g. America/New_York). Sets both start and end timezone unless start/end timezone are overridden."),
|
|
23942
24076
|
withZoom: external_exports.boolean().optional().describe("Create a Zoom video conference for this event (requires Zoom S2S OAuth setup)"),
|
|
24077
|
+
...reminderParams,
|
|
23943
24078
|
account: accountParam
|
|
23944
24079
|
}
|
|
23945
|
-
}, async ({ calendarId, summary, from, to, description, location, attendees, allDay, timezone, withZoom, account }) => {
|
|
24080
|
+
}, async ({ calendarId, summary, from, to, description, location, attendees, allDay, timezone, withZoom, reminders, noReminders, account }) => {
|
|
23946
24081
|
const args = ["calendar", "create", calendarId, `--summary=${summary}`, `--from=${from}`, `--to=${to}`];
|
|
23947
24082
|
if (description) args.push(`--description=${description}`);
|
|
23948
24083
|
if (location) args.push(`--location=${location}`);
|
|
@@ -23950,6 +24085,7 @@ function registerCalendarTools(server) {
|
|
|
23950
24085
|
if (allDay) args.push("--all-day");
|
|
23951
24086
|
if (timezone) args.push(`--timezone=${timezone}`);
|
|
23952
24087
|
if (withZoom) args.push("--with-zoom");
|
|
24088
|
+
pushReminderFlags(args, { reminders, noReminders });
|
|
23953
24089
|
return runOrDiagnose(args, { account });
|
|
23954
24090
|
});
|
|
23955
24091
|
server.registerTool("gog_calendar_update", {
|
|
@@ -23970,9 +24106,10 @@ function registerCalendarTools(server) {
|
|
|
23970
24106
|
regenerateZoom: external_exports.boolean().optional().describe("Replace the event's existing Zoom video conference"),
|
|
23971
24107
|
removeZoom: external_exports.boolean().optional().describe("Remove the event's Zoom video conference"),
|
|
23972
24108
|
removeMeet: external_exports.boolean().optional().describe("Remove the event's Google Meet video conference (clears conference data only)"),
|
|
24109
|
+
...reminderParams,
|
|
23973
24110
|
account: accountParam
|
|
23974
24111
|
}
|
|
23975
|
-
}, async ({ calendarId, eventId, summary, from, to, description, location, attendees, addAttendees, attachments, withZoom, regenerateZoom, removeZoom, removeMeet, account }) => {
|
|
24112
|
+
}, async ({ calendarId, eventId, summary, from, to, description, location, attendees, addAttendees, attachments, withZoom, regenerateZoom, removeZoom, removeMeet, reminders, noReminders, account }) => {
|
|
23976
24113
|
const args = ["calendar", "update", calendarId, eventId];
|
|
23977
24114
|
if (summary !== void 0) args.push(`--summary=${summary}`);
|
|
23978
24115
|
if (from !== void 0) args.push(`--from=${from}`);
|
|
@@ -23986,6 +24123,7 @@ function registerCalendarTools(server) {
|
|
|
23986
24123
|
if (regenerateZoom) args.push("--regenerate-zoom");
|
|
23987
24124
|
if (removeZoom) args.push("--remove-zoom");
|
|
23988
24125
|
if (removeMeet) args.push("--remove-meet");
|
|
24126
|
+
pushReminderFlags(args, { reminders, noReminders });
|
|
23989
24127
|
return runOrDiagnose(args, { account });
|
|
23990
24128
|
});
|
|
23991
24129
|
server.registerTool("gog_calendar_delete", {
|
|
@@ -24017,6 +24155,255 @@ function registerCalendarTools(server) {
|
|
|
24017
24155
|
registerRunTool(server, { service: "calendar", examples: '"calendars", "freebusy"' });
|
|
24018
24156
|
}
|
|
24019
24157
|
|
|
24158
|
+
// src/attachments.ts
|
|
24159
|
+
var MAX_INLINE_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
24160
|
+
var RUNNER_MAX_BODY_BYTES = 32 * 1024 * 1024;
|
|
24161
|
+
var RUNNER_BODY_JSON_RESERVE_BYTES = 256 * 1024;
|
|
24162
|
+
var MAX_REQUEST_PAYLOAD_WIRE_BYTES = RUNNER_MAX_BODY_BYTES - RUNNER_BODY_JSON_RESERVE_BYTES;
|
|
24163
|
+
var MAX_INLINE_ATTACHMENT_TOTAL_BYTES = Math.floor(MAX_REQUEST_PAYLOAD_WIRE_BYTES * 3 / 4);
|
|
24164
|
+
function wireBytesOf(arg) {
|
|
24165
|
+
if (typeof arg === "string") return Buffer.byteLength(arg, "utf8");
|
|
24166
|
+
return arg.encoding === "base64" ? arg.contents.length : Buffer.byteLength(arg.contents, "utf8");
|
|
24167
|
+
}
|
|
24168
|
+
var formatMiB = (bytes) => `${Math.floor(bytes / (1024 * 1024))} MiB`;
|
|
24169
|
+
var INLINE_ATTACHMENT_LIMITS_TEXT = `up to ${formatMiB(MAX_INLINE_ATTACHMENT_BYTES)} per file and ${formatMiB(MAX_INLINE_ATTACHMENT_TOTAL_BYTES)} in total`;
|
|
24170
|
+
var inlineAttachmentSchema = external_exports.object({
|
|
24171
|
+
filename: external_exports.string().min(1).describe(
|
|
24172
|
+
`Filename the recipient will see, e.g. "pendant-layouts.png". gog infers the attachment's MIME type from this extension, so give it the right one \u2014 a .png sent as "layouts" arrives as an untyped blob. Must be a single filename, not a path.`
|
|
24173
|
+
),
|
|
24174
|
+
contentBase64: external_exports.string().min(1).describe(
|
|
24175
|
+
"The file's bytes, base64-encoded (standard alphabet, with padding). This is the whole point of this parameter: the bytes travel with the request, so nothing needs to exist on the gog server's filesystem."
|
|
24176
|
+
)
|
|
24177
|
+
});
|
|
24178
|
+
var attachInlineParam = external_exports.array(inlineAttachmentSchema).optional().describe(
|
|
24179
|
+
`Attachments supplied as BYTES rather than as server-side paths \u2014 use this whenever you hold a file and the gog server does not, which is always the case on the hosted connector and on any remote deployment. Each entry is {filename, contentBase64} (${INLINE_ATTACHMENT_LIMITS_TEXT}). Can be combined with \`attach\`: the two name disjoint files (paths read on the server vs. bytes sent with the call), and both end up as ordinary attachments on the message.`
|
|
24180
|
+
);
|
|
24181
|
+
function validateFilename(filename, where) {
|
|
24182
|
+
if (/[/\\]/.test(filename)) {
|
|
24183
|
+
throw new Error(
|
|
24184
|
+
`${where}: filename ${JSON.stringify(filename)} must be a bare filename, not a path. Pass just the name the recipient should see, e.g. "report.pdf".`
|
|
24185
|
+
);
|
|
24186
|
+
}
|
|
24187
|
+
if (/[\x00-\x1f]/.test(filename) || /^\.+$/.test(filename) || filename.length > 200) {
|
|
24188
|
+
throw new Error(
|
|
24189
|
+
`${where}: filename ${JSON.stringify(filename)} is not a usable filename (no control characters, not "."/"..", 200 characters max).`
|
|
24190
|
+
);
|
|
24191
|
+
}
|
|
24192
|
+
}
|
|
24193
|
+
function decodedLength(contentBase64) {
|
|
24194
|
+
const buf = Buffer.from(contentBase64, "base64");
|
|
24195
|
+
return buf.toString("base64") === contentBase64 ? buf.length : null;
|
|
24196
|
+
}
|
|
24197
|
+
function inlineFileArg(flag, attachment, opts = {}) {
|
|
24198
|
+
const { filename, contentBase64 } = attachment;
|
|
24199
|
+
const where = opts.where ?? `attachInline entry ${JSON.stringify(filename)}`;
|
|
24200
|
+
validateFilename(filename, where);
|
|
24201
|
+
const bytes = decodedLength(contentBase64);
|
|
24202
|
+
if (bytes === null) {
|
|
24203
|
+
throw new Error(
|
|
24204
|
+
`${where}: contents are not valid base64. Send the standard alphabet with padding and no line breaks \u2014 the value must survive a decode/re-encode round trip unchanged.`
|
|
24205
|
+
);
|
|
24206
|
+
}
|
|
24207
|
+
if (bytes > MAX_INLINE_ATTACHMENT_BYTES) {
|
|
24208
|
+
throw new Error(
|
|
24209
|
+
`${where}: ${bytes} bytes exceeds the ${MAX_INLINE_ATTACHMENT_BYTES}-byte (${formatMiB(MAX_INLINE_ATTACHMENT_BYTES)}) per-file limit for inline content. Upload it to Drive and link to it instead, or send it from a local (stdio) deployment using a real server-side path.`
|
|
24210
|
+
);
|
|
24211
|
+
}
|
|
24212
|
+
const arg = { kind: "file", flag, contents: contentBase64, encoding: "base64", filename };
|
|
24213
|
+
if (opts.positional) arg.positional = true;
|
|
24214
|
+
return { arg, bytes };
|
|
24215
|
+
}
|
|
24216
|
+
function inlineAttachmentArgs(flag, attachments, siblingArgs = []) {
|
|
24217
|
+
if (!attachments?.length) return [];
|
|
24218
|
+
const args = [];
|
|
24219
|
+
const siblingWire = siblingArgs.reduce((sum, arg) => sum + wireBytesOf(arg), 0);
|
|
24220
|
+
let attachmentWire = 0;
|
|
24221
|
+
let decodedTotal = 0;
|
|
24222
|
+
for (const attachment of attachments) {
|
|
24223
|
+
const { arg, bytes } = inlineFileArg(flag, attachment);
|
|
24224
|
+
attachmentWire += arg.contents.length;
|
|
24225
|
+
decodedTotal += bytes;
|
|
24226
|
+
if (siblingWire + attachmentWire > MAX_REQUEST_PAYLOAD_WIRE_BYTES) {
|
|
24227
|
+
const blame = attachmentWire <= MAX_REQUEST_PAYLOAD_WIRE_BYTES ? ` These attachments would fit on their own; the rest of the message (its body, mostly) spends ${siblingWire} bytes of the same budget.` : "";
|
|
24228
|
+
throw new Error(
|
|
24229
|
+
`This message is too large to send: ${decodedTotal} bytes of attachments (${attachmentWire} bytes once base64-encoded for transit) exceed the ${MAX_REQUEST_PAYLOAD_WIRE_BYTES}-byte request limit.${blame} The ceiling for attachments alone is ${MAX_INLINE_ATTACHMENT_TOTAL_BYTES} bytes (${formatMiB(MAX_INLINE_ATTACHMENT_TOTAL_BYTES)}); a long body lowers it. Send fewer or smaller files per message, shorten the body, or upload the large files to Drive and link them.`
|
|
24230
|
+
);
|
|
24231
|
+
}
|
|
24232
|
+
args.push(arg);
|
|
24233
|
+
}
|
|
24234
|
+
return args;
|
|
24235
|
+
}
|
|
24236
|
+
|
|
24237
|
+
// src/tools/chat.ts
|
|
24238
|
+
function registerChatTools(server) {
|
|
24239
|
+
const workspaceOnlyNote = ' WORKSPACE ONLY: Google Chat has no API for consumer accounts, so this fails on an @gmail.com account with "chat requires a Google Workspace account". That is the ACCOUNT, not the token \u2014 re-authorizing or adding scopes will not help.';
|
|
24240
|
+
const spaceParam = external_exports.string().describe(
|
|
24241
|
+
'Space resource name, e.g. "spaces/AAAAsomeID" (from gog_chat_spaces_list, gog_chat_spaces_find or gog_chat_dm_space)'
|
|
24242
|
+
);
|
|
24243
|
+
const threadParam = external_exports.string().optional().describe(
|
|
24244
|
+
'Thread resource name, e.g. "spaces/AAAA/threads/CCCC" \u2014 reply inside that thread instead of starting a new one'
|
|
24245
|
+
);
|
|
24246
|
+
server.registerTool("gog_chat_spaces_list", {
|
|
24247
|
+
description: "List the Google Chat spaces the account belongs to \u2014 named rooms and DMs alike \u2014 with their resource names. Start here when you do not yet have a space name; gog_chat_spaces_find is faster when you know the room's title." + workspaceOnlyNote,
|
|
24248
|
+
annotations: { readOnlyHint: true },
|
|
24249
|
+
inputSchema: {
|
|
24250
|
+
...paginationParams,
|
|
24251
|
+
account: accountParam
|
|
24252
|
+
}
|
|
24253
|
+
}, async ({ max, pageToken, page, all, account }) => {
|
|
24254
|
+
const args = ["chat", "spaces", "list"];
|
|
24255
|
+
pushPaginationFlags(args, { max, pageToken, page, all });
|
|
24256
|
+
return runOrDiagnose(args, { account });
|
|
24257
|
+
});
|
|
24258
|
+
server.registerTool("gog_chat_spaces_find", {
|
|
24259
|
+
description: 'Find spaces whose display name matches. Substring and case-insensitive by default, which is what you want when the user names a room approximately ("the launch room"); pass exact=true to require the whole title. DMs have no display name \u2014 use gog_chat_dm_space to reach a person.' + workspaceOnlyNote,
|
|
24260
|
+
annotations: { readOnlyHint: true },
|
|
24261
|
+
inputSchema: {
|
|
24262
|
+
displayName: external_exports.string().describe("Space display name, or part of one"),
|
|
24263
|
+
exact: external_exports.boolean().optional().describe("Require an exact (still case-insensitive) match on the whole display name"),
|
|
24264
|
+
max: external_exports.number().int().optional().describe("Max results per page"),
|
|
24265
|
+
account: accountParam
|
|
24266
|
+
}
|
|
24267
|
+
}, async ({ displayName, exact, max, account }) => {
|
|
24268
|
+
const args = ["chat", "spaces", "find", displayName];
|
|
24269
|
+
if (exact) args.push("--exact");
|
|
24270
|
+
if (max !== void 0) args.push(`--max=${max}`);
|
|
24271
|
+
return runOrDiagnose(args, { account });
|
|
24272
|
+
});
|
|
24273
|
+
server.registerTool("gog_chat_spaces_create", {
|
|
24274
|
+
description: "Create a named Chat space, optionally seeding its membership. Members are added immediately and are notified \u2014 this is visible to other people the moment it runs, so confirm the member list before calling it." + workspaceOnlyNote,
|
|
24275
|
+
inputSchema: {
|
|
24276
|
+
displayName: external_exports.string().describe("Display name for the new space"),
|
|
24277
|
+
members: external_exports.array(external_exports.string()).optional().describe('Initial members, as email addresses or "users/..." resource names'),
|
|
24278
|
+
account: accountParam
|
|
24279
|
+
}
|
|
24280
|
+
}, async ({ displayName, members, account }) => {
|
|
24281
|
+
const args = ["chat", "spaces", "create", displayName];
|
|
24282
|
+
if (members) for (const member of members) args.push(`--member=${member}`);
|
|
24283
|
+
return runOrDiagnose(args, { account });
|
|
24284
|
+
});
|
|
24285
|
+
server.registerTool("gog_chat_threads_list", {
|
|
24286
|
+
description: "List the threads in a space, so a reply can be targeted at an existing conversation rather than starting a new one. Pass a thread name from here as `thread` to gog_chat_messages_send." + workspaceOnlyNote,
|
|
24287
|
+
annotations: { readOnlyHint: true },
|
|
24288
|
+
inputSchema: {
|
|
24289
|
+
space: spaceParam,
|
|
24290
|
+
...paginationParams,
|
|
24291
|
+
account: accountParam
|
|
24292
|
+
}
|
|
24293
|
+
}, async ({ space, max, pageToken, page, all, account }) => {
|
|
24294
|
+
const args = ["chat", "threads", "list", space];
|
|
24295
|
+
pushPaginationFlags(args, { max, pageToken, page, all });
|
|
24296
|
+
return runOrDiagnose(args, { account });
|
|
24297
|
+
});
|
|
24298
|
+
server.registerTool("gog_chat_messages_list", {
|
|
24299
|
+
description: `Read messages in a space. The JSON carries each message's @-mentions and a summary of its emoji reactions (gog >= 0.38.0) alongside the text, so "who was tagged" and "did anyone react" are answerable without extra calls. unread=true returns only what arrived after the account last read the space \u2014 the cheap way to answer "what did I miss". Newest-first needs an explicit order="createTime desc"; Chat's own default is oldest-first.` + workspaceOnlyNote,
|
|
24300
|
+
annotations: { readOnlyHint: true },
|
|
24301
|
+
inputSchema: {
|
|
24302
|
+
space: spaceParam,
|
|
24303
|
+
thread: threadParam,
|
|
24304
|
+
unread: external_exports.boolean().optional().describe("Only messages posted after the account last read this space"),
|
|
24305
|
+
order: external_exports.enum(["createTime asc", "createTime desc", "lastUpdateTime asc", "lastUpdateTime desc"]).optional().describe('Sort order (Chat default: "createTime asc", i.e. OLDEST first \u2014 ask for "createTime desc" when you want the latest messages)'),
|
|
24306
|
+
...paginationParams,
|
|
24307
|
+
account: accountParam
|
|
24308
|
+
}
|
|
24309
|
+
}, async ({ space, thread, unread, order, max, pageToken, page, all, account }) => {
|
|
24310
|
+
const args = ["chat", "messages", "list", space];
|
|
24311
|
+
if (thread) args.push(`--thread=${thread}`);
|
|
24312
|
+
if (unread) args.push("--unread");
|
|
24313
|
+
if (order) args.push(`--order=${order}`);
|
|
24314
|
+
pushPaginationFlags(args, { max, pageToken, page, all });
|
|
24315
|
+
return runOrDiagnose(args, { account });
|
|
24316
|
+
});
|
|
24317
|
+
server.registerTool("gog_chat_messages_send", {
|
|
24318
|
+
description: "Post a message to a Chat space. THIS IS IMMEDIATELY VISIBLE TO EVERYONE IN THE SPACE and cannot be unsent through this tool, so treat it like sending mail, not like saving a draft. Pass `thread` to reply inside an existing conversation (from gog_chat_threads_list or a message's thread field); omit it to start a new one. Text supports Chat's markdown-ish formatting (*bold*, _italic_, `code`)." + workspaceOnlyNote,
|
|
24319
|
+
inputSchema: {
|
|
24320
|
+
space: spaceParam,
|
|
24321
|
+
text: external_exports.string().optional().describe("Message text. Optional only when an attachment is supplied."),
|
|
24322
|
+
thread: threadParam,
|
|
24323
|
+
attach: external_exports.array(external_exports.string()).optional().describe(
|
|
24324
|
+
"Attachment file paths, read WHERE GOG RUNS. On a hosted or remote deployment that is not your machine \u2014 use attachInline there instead."
|
|
24325
|
+
),
|
|
24326
|
+
attachInline: attachInlineParam,
|
|
24327
|
+
account: accountParam
|
|
24328
|
+
}
|
|
24329
|
+
}, async ({ space, text, thread, attach, attachInline, account }) => {
|
|
24330
|
+
if (text === void 0 && !attach?.length && !attachInline?.length) {
|
|
24331
|
+
throw new Error("A Chat message needs text, an attachment, or both.");
|
|
24332
|
+
}
|
|
24333
|
+
const args = ["chat", "messages", "send", space];
|
|
24334
|
+
if (text !== void 0) args.push(`--text=${text}`);
|
|
24335
|
+
if (thread) args.push(`--thread=${thread}`);
|
|
24336
|
+
if (attach) for (const path of attach) args.push(`--attach=${path}`);
|
|
24337
|
+
args.push(...inlineAttachmentArgs("attach", attachInline, args));
|
|
24338
|
+
return runOrDiagnose(args, { account });
|
|
24339
|
+
});
|
|
24340
|
+
server.registerTool("gog_chat_dm_send", {
|
|
24341
|
+
description: "Send a direct message to one person by email address, creating the DM space if this is the first message. Delivered immediately and cannot be unsent through this tool. For a room rather than a person, use gog_chat_messages_send." + workspaceOnlyNote,
|
|
24342
|
+
inputSchema: {
|
|
24343
|
+
email: external_exports.string().describe("Recipient email address"),
|
|
24344
|
+
text: external_exports.string().describe("Message text"),
|
|
24345
|
+
thread: threadParam,
|
|
24346
|
+
account: accountParam
|
|
24347
|
+
}
|
|
24348
|
+
}, async ({ email: email3, text, thread, account }) => {
|
|
24349
|
+
const args = ["chat", "dm", "send", email3, `--text=${text}`];
|
|
24350
|
+
if (thread) args.push(`--thread=${thread}`);
|
|
24351
|
+
return runOrDiagnose(args, { account });
|
|
24352
|
+
});
|
|
24353
|
+
server.registerTool("gog_chat_dm_space", {
|
|
24354
|
+
description: 'Resolve the DM space for an email address \u2014 the bridge from a person to the "spaces/..." name the message tools want. Creates the space if none exists yet, which is silent: it does not message the person.' + workspaceOnlyNote,
|
|
24355
|
+
inputSchema: {
|
|
24356
|
+
email: external_exports.string().describe("The other person's email address"),
|
|
24357
|
+
account: accountParam
|
|
24358
|
+
}
|
|
24359
|
+
}, async ({ email: email3, account }) => {
|
|
24360
|
+
return runOrDiagnose(["chat", "dm", "space", email3], { account });
|
|
24361
|
+
});
|
|
24362
|
+
server.registerTool("gog_chat_reactions_list", {
|
|
24363
|
+
description: "List the emoji reactions on one message, with who reacted. gog_chat_messages_list already returns a reaction SUMMARY per message; come here when you need the individual reactors, or the reaction resource names that gog_chat_reactions_delete takes." + workspaceOnlyNote,
|
|
24364
|
+
annotations: { readOnlyHint: true },
|
|
24365
|
+
inputSchema: {
|
|
24366
|
+
message: external_exports.string().describe('Message resource name ("spaces/AAAA/messages/BBBB"), or a bare message ID together with `space`'),
|
|
24367
|
+
space: external_exports.string().optional().describe("Space resource name \u2014 required only when `message` is a bare ID"),
|
|
24368
|
+
...paginationParams,
|
|
24369
|
+
account: accountParam
|
|
24370
|
+
}
|
|
24371
|
+
}, async ({ message, space, max, pageToken, page, all, account }) => {
|
|
24372
|
+
const args = ["chat", "messages", "reactions", "list", message];
|
|
24373
|
+
if (space) args.push(`--space=${space}`);
|
|
24374
|
+
pushPaginationFlags(args, { max, pageToken, page, all });
|
|
24375
|
+
return runOrDiagnose(args, { account });
|
|
24376
|
+
});
|
|
24377
|
+
server.registerTool("gog_chat_reactions_create", {
|
|
24378
|
+
description: 'React to a message with an emoji. Visible to the space immediately. Pass the emoji itself ("\u{1F44D}"), not a :shortcode:.' + workspaceOnlyNote,
|
|
24379
|
+
inputSchema: {
|
|
24380
|
+
message: external_exports.string().describe('Message resource name ("spaces/AAAA/messages/BBBB"), or a bare message ID together with `space`'),
|
|
24381
|
+
emoji: external_exports.string().describe('The emoji character to react with, e.g. "\u{1F44D}"'),
|
|
24382
|
+
space: external_exports.string().optional().describe("Space resource name \u2014 required only when `message` is a bare ID"),
|
|
24383
|
+
account: accountParam
|
|
24384
|
+
}
|
|
24385
|
+
}, async ({ message, emoji: emoji3, space, account }) => {
|
|
24386
|
+
const args = ["chat", "messages", "reactions", "create", message, emoji3];
|
|
24387
|
+
if (space) args.push(`--space=${space}`);
|
|
24388
|
+
return runOrDiagnose(args, { account });
|
|
24389
|
+
});
|
|
24390
|
+
server.registerTool("gog_chat_reactions_delete", {
|
|
24391
|
+
description: `Remove one emoji reaction. Takes the REACTION's own resource name ("spaces/.../messages/.../reactions/..."), not the message's and not the emoji \u2014 get it from gog_chat_reactions_list. An account can only remove its own reaction.` + workspaceOnlyNote,
|
|
24392
|
+
annotations: { destructiveHint: true },
|
|
24393
|
+
inputSchema: {
|
|
24394
|
+
reaction: external_exports.string().describe('Reaction resource name, e.g. "spaces/AAAA/messages/BBBB/reactions/CCCC"'),
|
|
24395
|
+
account: accountParam
|
|
24396
|
+
}
|
|
24397
|
+
}, async ({ reaction, account }) => {
|
|
24398
|
+
return runOrDiagnose(["chat", "messages", "reactions", "delete", reaction], { account });
|
|
24399
|
+
});
|
|
24400
|
+
registerRunTool(server, {
|
|
24401
|
+
service: "chat",
|
|
24402
|
+
examples: '"spaces", "messages", "dm"',
|
|
24403
|
+
note: "Google Chat has no API for consumer accounts: every chat subcommand fails on an @gmail.com account regardless of scopes."
|
|
24404
|
+
});
|
|
24405
|
+
}
|
|
24406
|
+
|
|
24020
24407
|
// src/tools/classroom.ts
|
|
24021
24408
|
function registerClassroomTools(server) {
|
|
24022
24409
|
server.registerTool("gog_classroom_courses_list", {
|
|
@@ -24832,6 +25219,7 @@ async function fetchGmailPages(runPage, itemsKey, maxPages, startToken) {
|
|
|
24832
25219
|
const merged = [];
|
|
24833
25220
|
let base;
|
|
24834
25221
|
let token = startToken;
|
|
25222
|
+
const fetched = new Set(startToken === void 0 ? [] : [startToken]);
|
|
24835
25223
|
for (let pages = 0; pages < maxPages; pages++) {
|
|
24836
25224
|
const result = await runPage(token);
|
|
24837
25225
|
const parsed = parsePage(result, itemsKey);
|
|
@@ -24840,8 +25228,17 @@ async function fetchGmailPages(runPage, itemsKey, maxPages, startToken) {
|
|
|
24840
25228
|
}
|
|
24841
25229
|
base = parsed;
|
|
24842
25230
|
merged.push(...parsed[itemsKey]);
|
|
24843
|
-
|
|
24844
|
-
if (
|
|
25231
|
+
const next = typeof parsed.nextPageToken === "string" && parsed.nextPageToken !== "" ? parsed.nextPageToken : void 0;
|
|
25232
|
+
if (next === void 0) {
|
|
25233
|
+
token = void 0;
|
|
25234
|
+
break;
|
|
25235
|
+
}
|
|
25236
|
+
if (fetched.has(next)) {
|
|
25237
|
+
token = next;
|
|
25238
|
+
break;
|
|
25239
|
+
}
|
|
25240
|
+
fetched.add(next);
|
|
25241
|
+
token = next;
|
|
24845
25242
|
}
|
|
24846
25243
|
return finish(base, itemsKey, merged, token);
|
|
24847
25244
|
}
|
|
@@ -24865,85 +25262,6 @@ function finish(base, itemsKey, merged, token) {
|
|
|
24865
25262
|
return rawTextResult(JSON.stringify(out));
|
|
24866
25263
|
}
|
|
24867
25264
|
|
|
24868
|
-
// src/attachments.ts
|
|
24869
|
-
var MAX_INLINE_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
24870
|
-
var RUNNER_MAX_BODY_BYTES = 32 * 1024 * 1024;
|
|
24871
|
-
var RUNNER_BODY_JSON_RESERVE_BYTES = 256 * 1024;
|
|
24872
|
-
var MAX_REQUEST_PAYLOAD_WIRE_BYTES = RUNNER_MAX_BODY_BYTES - RUNNER_BODY_JSON_RESERVE_BYTES;
|
|
24873
|
-
var MAX_INLINE_ATTACHMENT_TOTAL_BYTES = Math.floor(MAX_REQUEST_PAYLOAD_WIRE_BYTES * 3 / 4);
|
|
24874
|
-
function wireBytesOf(arg) {
|
|
24875
|
-
if (typeof arg === "string") return Buffer.byteLength(arg, "utf8");
|
|
24876
|
-
return arg.encoding === "base64" ? arg.contents.length : Buffer.byteLength(arg.contents, "utf8");
|
|
24877
|
-
}
|
|
24878
|
-
var formatMiB = (bytes) => `${Math.floor(bytes / (1024 * 1024))} MiB`;
|
|
24879
|
-
var INLINE_ATTACHMENT_LIMITS_TEXT = `up to ${formatMiB(MAX_INLINE_ATTACHMENT_BYTES)} per file and ${formatMiB(MAX_INLINE_ATTACHMENT_TOTAL_BYTES)} in total`;
|
|
24880
|
-
var inlineAttachmentSchema = external_exports.object({
|
|
24881
|
-
filename: external_exports.string().min(1).describe(
|
|
24882
|
-
`Filename the recipient will see, e.g. "pendant-layouts.png". gog infers the attachment's MIME type from this extension, so give it the right one \u2014 a .png sent as "layouts" arrives as an untyped blob. Must be a single filename, not a path.`
|
|
24883
|
-
),
|
|
24884
|
-
contentBase64: external_exports.string().min(1).describe(
|
|
24885
|
-
"The file's bytes, base64-encoded (standard alphabet, with padding). This is the whole point of this parameter: the bytes travel with the request, so nothing needs to exist on the gog server's filesystem."
|
|
24886
|
-
)
|
|
24887
|
-
});
|
|
24888
|
-
var attachInlineParam = external_exports.array(inlineAttachmentSchema).optional().describe(
|
|
24889
|
-
`Attachments supplied as BYTES rather than as server-side paths \u2014 use this whenever you hold a file and the gog server does not, which is always the case on the hosted connector and on any remote deployment. Each entry is {filename, contentBase64} (${INLINE_ATTACHMENT_LIMITS_TEXT}). Can be combined with \`attach\`: the two name disjoint files (paths read on the server vs. bytes sent with the call), and both end up as ordinary attachments on the message.`
|
|
24890
|
-
);
|
|
24891
|
-
function validateFilename(filename, where) {
|
|
24892
|
-
if (/[/\\]/.test(filename)) {
|
|
24893
|
-
throw new Error(
|
|
24894
|
-
`${where}: filename ${JSON.stringify(filename)} must be a bare filename, not a path. Pass just the name the recipient should see, e.g. "report.pdf".`
|
|
24895
|
-
);
|
|
24896
|
-
}
|
|
24897
|
-
if (/[\x00-\x1f]/.test(filename) || /^\.+$/.test(filename) || filename.length > 200) {
|
|
24898
|
-
throw new Error(
|
|
24899
|
-
`${where}: filename ${JSON.stringify(filename)} is not a usable filename (no control characters, not "."/"..", 200 characters max).`
|
|
24900
|
-
);
|
|
24901
|
-
}
|
|
24902
|
-
}
|
|
24903
|
-
function decodedLength(contentBase64) {
|
|
24904
|
-
const buf = Buffer.from(contentBase64, "base64");
|
|
24905
|
-
return buf.toString("base64") === contentBase64 ? buf.length : null;
|
|
24906
|
-
}
|
|
24907
|
-
function inlineFileArg(flag, attachment, opts = {}) {
|
|
24908
|
-
const { filename, contentBase64 } = attachment;
|
|
24909
|
-
const where = opts.where ?? `attachInline entry ${JSON.stringify(filename)}`;
|
|
24910
|
-
validateFilename(filename, where);
|
|
24911
|
-
const bytes = decodedLength(contentBase64);
|
|
24912
|
-
if (bytes === null) {
|
|
24913
|
-
throw new Error(
|
|
24914
|
-
`${where}: contents are not valid base64. Send the standard alphabet with padding and no line breaks \u2014 the value must survive a decode/re-encode round trip unchanged.`
|
|
24915
|
-
);
|
|
24916
|
-
}
|
|
24917
|
-
if (bytes > MAX_INLINE_ATTACHMENT_BYTES) {
|
|
24918
|
-
throw new Error(
|
|
24919
|
-
`${where}: ${bytes} bytes exceeds the ${MAX_INLINE_ATTACHMENT_BYTES}-byte (${formatMiB(MAX_INLINE_ATTACHMENT_BYTES)}) per-file limit for inline content. Upload it to Drive and link to it instead, or send it from a local (stdio) deployment using a real server-side path.`
|
|
24920
|
-
);
|
|
24921
|
-
}
|
|
24922
|
-
const arg = { kind: "file", flag, contents: contentBase64, encoding: "base64", filename };
|
|
24923
|
-
if (opts.positional) arg.positional = true;
|
|
24924
|
-
return { arg, bytes };
|
|
24925
|
-
}
|
|
24926
|
-
function inlineAttachmentArgs(flag, attachments, siblingArgs = []) {
|
|
24927
|
-
if (!attachments?.length) return [];
|
|
24928
|
-
const args = [];
|
|
24929
|
-
const siblingWire = siblingArgs.reduce((sum, arg) => sum + wireBytesOf(arg), 0);
|
|
24930
|
-
let attachmentWire = 0;
|
|
24931
|
-
let decodedTotal = 0;
|
|
24932
|
-
for (const attachment of attachments) {
|
|
24933
|
-
const { arg, bytes } = inlineFileArg(flag, attachment);
|
|
24934
|
-
attachmentWire += arg.contents.length;
|
|
24935
|
-
decodedTotal += bytes;
|
|
24936
|
-
if (siblingWire + attachmentWire > MAX_REQUEST_PAYLOAD_WIRE_BYTES) {
|
|
24937
|
-
const blame = attachmentWire <= MAX_REQUEST_PAYLOAD_WIRE_BYTES ? ` These attachments would fit on their own; the rest of the message (its body, mostly) spends ${siblingWire} bytes of the same budget.` : "";
|
|
24938
|
-
throw new Error(
|
|
24939
|
-
`This message is too large to send: ${decodedTotal} bytes of attachments (${attachmentWire} bytes once base64-encoded for transit) exceed the ${MAX_REQUEST_PAYLOAD_WIRE_BYTES}-byte request limit.${blame} The ceiling for attachments alone is ${MAX_INLINE_ATTACHMENT_TOTAL_BYTES} bytes (${formatMiB(MAX_INLINE_ATTACHMENT_TOTAL_BYTES)}); a long body lowers it. Send fewer or smaller files per message, shorten the body, or upload the large files to Drive and link them.`
|
|
24940
|
-
);
|
|
24941
|
-
}
|
|
24942
|
-
args.push(arg);
|
|
24943
|
-
}
|
|
24944
|
-
return args;
|
|
24945
|
-
}
|
|
24946
|
-
|
|
24947
25265
|
// src/tools/gmail.ts
|
|
24948
25266
|
function registerGmailTools(server) {
|
|
24949
25267
|
server.registerTool("gog_gmail_search", {
|
|
@@ -25349,11 +25667,13 @@ function registerTasksTools(server) {
|
|
|
25349
25667
|
}
|
|
25350
25668
|
|
|
25351
25669
|
// src/server.ts
|
|
25352
|
-
var VERSION = true ? "2.
|
|
25670
|
+
var VERSION = true ? "2.26.0" : "0.0.0";
|
|
25353
25671
|
var BASE_TOOL_REGISTRARS = [
|
|
25354
25672
|
registerApiTools,
|
|
25673
|
+
registerAppScriptTools,
|
|
25355
25674
|
registerAuthTools,
|
|
25356
25675
|
registerCalendarTools,
|
|
25676
|
+
registerChatTools,
|
|
25357
25677
|
registerClassroomTools,
|
|
25358
25678
|
registerContactsTools,
|
|
25359
25679
|
registerDocsTools,
|
|
@@ -25876,8 +26196,10 @@ export {
|
|
|
25876
26196
|
payloadArg,
|
|
25877
26197
|
pushPaginationFlags,
|
|
25878
26198
|
registerApiTools,
|
|
26199
|
+
registerAppScriptTools,
|
|
25879
26200
|
registerAuthTools,
|
|
25880
26201
|
registerCalendarTools,
|
|
26202
|
+
registerChatTools,
|
|
25881
26203
|
registerClassroomTools,
|
|
25882
26204
|
registerContactsTools,
|
|
25883
26205
|
registerDocsTools,
|