gogcli-mcp-slides 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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +448 -135
- package/manifest.json +9 -2
- package/mint.yaml +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/tools/slides-extra.ts +54 -44
- package/tests/tools/slides-extra.test.ts +129 -85
- package/vitest.config.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -2092,8 +2092,8 @@ function emoji() {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
2094
2094
|
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
2095
|
-
var mac = (
|
|
2096
|
-
const escapedDelim = escapeRegex(
|
|
2095
|
+
var mac = (delimiter3) => {
|
|
2096
|
+
const escapedDelim = escapeRegex(delimiter3 ?? ":");
|
|
2097
2097
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
2098
2098
|
};
|
|
2099
2099
|
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
@@ -5121,7 +5121,7 @@ var recursive = /* @__PURE__ */ new WeakMap();
|
|
|
5121
5121
|
var NONE = 0;
|
|
5122
5122
|
var ASSUMED = 1;
|
|
5123
5123
|
var PROVEN = 2;
|
|
5124
|
-
function isRecursive(inst, stack,
|
|
5124
|
+
function isRecursive(inst, stack, resolve4) {
|
|
5125
5125
|
const cached2 = recursive.get(inst);
|
|
5126
5126
|
if (cached2 !== void 0)
|
|
5127
5127
|
return cached2 ? PROVEN : NONE;
|
|
@@ -5131,7 +5131,7 @@ function isRecursive(inst, stack, resolve) {
|
|
|
5131
5131
|
let result = NONE;
|
|
5132
5132
|
const check2 = (child) => {
|
|
5133
5133
|
if (result !== PROVEN && child?._zod) {
|
|
5134
|
-
const answer = isRecursive(child, stack,
|
|
5134
|
+
const answer = isRecursive(child, stack, resolve4);
|
|
5135
5135
|
if (answer > result)
|
|
5136
5136
|
result = answer;
|
|
5137
5137
|
}
|
|
@@ -5142,7 +5142,7 @@ function isRecursive(inst, stack, resolve) {
|
|
|
5142
5142
|
const desc = Object.getOwnPropertyDescriptor(sh, key);
|
|
5143
5143
|
if (spread && !desc.enumerable)
|
|
5144
5144
|
continue;
|
|
5145
|
-
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack,
|
|
5145
|
+
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve4) : NONE;
|
|
5146
5146
|
if (child > answer)
|
|
5147
5147
|
answer = child;
|
|
5148
5148
|
}
|
|
@@ -5206,7 +5206,7 @@ function isRecursive(inst, stack, resolve) {
|
|
|
5206
5206
|
break;
|
|
5207
5207
|
// `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
|
|
5208
5208
|
case "lazy": {
|
|
5209
|
-
const inner = def._cachedInner ?? (
|
|
5209
|
+
const inner = def._cachedInner ?? (resolve4 ? inst._zod.innerType : void 0);
|
|
5210
5210
|
merge2(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
5211
5211
|
break;
|
|
5212
5212
|
}
|
|
@@ -24106,14 +24106,14 @@ function inputRequiredRoundsExceededMessage(method, maxRounds) {
|
|
|
24106
24106
|
return `Multi-round-trip request '${method}' still required input after ${maxRounds} rounds (inputRequired.maxRounds)`;
|
|
24107
24107
|
}
|
|
24108
24108
|
function sleep(ms, signal) {
|
|
24109
|
-
return new Promise((
|
|
24109
|
+
return new Promise((resolve4, reject) => {
|
|
24110
24110
|
if (signal?.aborted) {
|
|
24111
24111
|
reject(signal.reason instanceof SdkError ? signal.reason : new SdkError(SdkErrorCode.RequestTimeout, String(signal.reason)));
|
|
24112
24112
|
return;
|
|
24113
24113
|
}
|
|
24114
24114
|
const timer = setTimeout(() => {
|
|
24115
24115
|
signal?.removeEventListener("abort", onAbort);
|
|
24116
|
-
|
|
24116
|
+
resolve4();
|
|
24117
24117
|
}, ms);
|
|
24118
24118
|
const onAbort = () => {
|
|
24119
24119
|
clearTimeout(timer);
|
|
@@ -24907,7 +24907,7 @@ var Protocol = class {
|
|
|
24907
24907
|
const flowStartedAt = Date.now();
|
|
24908
24908
|
let onAbort;
|
|
24909
24909
|
let cleanupMessageId;
|
|
24910
|
-
return new Promise((
|
|
24910
|
+
return new Promise((resolve4, reject) => {
|
|
24911
24911
|
const earlyReject = (error62) => {
|
|
24912
24912
|
reject(error62);
|
|
24913
24913
|
};
|
|
@@ -24975,7 +24975,7 @@ var Protocol = class {
|
|
|
24975
24975
|
}
|
|
24976
24976
|
if (decoded.kind === "invalid") return reject(decoded.error);
|
|
24977
24977
|
if (decoded.kind === "input_required") {
|
|
24978
|
-
if (options?.allowInputRequired === true) return
|
|
24978
|
+
if (options?.allowInputRequired === true) return resolve4(manualInputRequiredValue(decoded));
|
|
24979
24979
|
const flow = {
|
|
24980
24980
|
codec: codec2,
|
|
24981
24981
|
request,
|
|
@@ -24987,11 +24987,11 @@ var Protocol = class {
|
|
|
24987
24987
|
params
|
|
24988
24988
|
}, resultSchema, legOptions)
|
|
24989
24989
|
};
|
|
24990
|
-
return
|
|
24990
|
+
return resolve4(this._resolveNonCompleteResult(decoded, flow));
|
|
24991
24991
|
}
|
|
24992
24992
|
const result = decoded.result;
|
|
24993
24993
|
validateStandardSchema(resultSchema, result).then((parseResult) => {
|
|
24994
|
-
if (parseResult.success)
|
|
24994
|
+
if (parseResult.success) resolve4(parseResult.data);
|
|
24995
24995
|
else reject(new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${request.method}: ${parseResult.error}`));
|
|
24996
24996
|
}, reject);
|
|
24997
24997
|
});
|
|
@@ -27903,7 +27903,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
27903
27903
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
27904
27904
|
const schOrFunc = root.refs[ref];
|
|
27905
27905
|
if (schOrFunc) return schOrFunc;
|
|
27906
|
-
let _sch =
|
|
27906
|
+
let _sch = resolve4.call(this, root, ref);
|
|
27907
27907
|
if (_sch === void 0) {
|
|
27908
27908
|
const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
|
|
27909
27909
|
const { schemaId } = this.opts;
|
|
@@ -27929,7 +27929,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
27929
27929
|
function sameSchemaEnv(s1, s2) {
|
|
27930
27930
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
27931
27931
|
}
|
|
27932
|
-
function
|
|
27932
|
+
function resolve4(root, ref) {
|
|
27933
27933
|
let sch;
|
|
27934
27934
|
while (typeof (sch = this.refs[ref]) == "string") ref = sch;
|
|
27935
27935
|
return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
|
|
@@ -28379,47 +28379,47 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28379
28379
|
else if (typeof uri === "object") uri = parse3(serialize(uri, options), options);
|
|
28380
28380
|
return uri;
|
|
28381
28381
|
}
|
|
28382
|
-
function
|
|
28382
|
+
function resolve4(baseURI, relativeURI, options) {
|
|
28383
28383
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
28384
28384
|
const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
28385
28385
|
schemelessOptions.skipEscape = true;
|
|
28386
28386
|
return serialize(resolved, schemelessOptions);
|
|
28387
28387
|
}
|
|
28388
|
-
function resolveComponent(base,
|
|
28388
|
+
function resolveComponent(base, relative3, options, skipNormalization) {
|
|
28389
28389
|
const target = {};
|
|
28390
28390
|
if (!skipNormalization) {
|
|
28391
28391
|
base = parse3(serialize(base, options), options);
|
|
28392
|
-
|
|
28392
|
+
relative3 = parse3(serialize(relative3, options), options);
|
|
28393
28393
|
}
|
|
28394
28394
|
options = options || {};
|
|
28395
|
-
if (!options.tolerant &&
|
|
28396
|
-
target.scheme =
|
|
28397
|
-
target.userinfo =
|
|
28398
|
-
target.host =
|
|
28399
|
-
target.port =
|
|
28400
|
-
target.path = removeDotSegments(
|
|
28401
|
-
target.query =
|
|
28395
|
+
if (!options.tolerant && relative3.scheme) {
|
|
28396
|
+
target.scheme = relative3.scheme;
|
|
28397
|
+
target.userinfo = relative3.userinfo;
|
|
28398
|
+
target.host = relative3.host;
|
|
28399
|
+
target.port = relative3.port;
|
|
28400
|
+
target.path = removeDotSegments(relative3.path || "");
|
|
28401
|
+
target.query = relative3.query;
|
|
28402
28402
|
} else {
|
|
28403
|
-
if (
|
|
28404
|
-
target.userinfo =
|
|
28405
|
-
target.host =
|
|
28406
|
-
target.port =
|
|
28407
|
-
target.path = removeDotSegments(
|
|
28408
|
-
target.query =
|
|
28403
|
+
if (relative3.userinfo !== void 0 || relative3.host !== void 0 || relative3.port !== void 0) {
|
|
28404
|
+
target.userinfo = relative3.userinfo;
|
|
28405
|
+
target.host = relative3.host;
|
|
28406
|
+
target.port = relative3.port;
|
|
28407
|
+
target.path = removeDotSegments(relative3.path || "");
|
|
28408
|
+
target.query = relative3.query;
|
|
28409
28409
|
} else {
|
|
28410
|
-
if (!
|
|
28410
|
+
if (!relative3.path) {
|
|
28411
28411
|
target.path = base.path;
|
|
28412
|
-
if (
|
|
28412
|
+
if (relative3.query !== void 0) target.query = relative3.query;
|
|
28413
28413
|
else target.query = base.query;
|
|
28414
28414
|
} else {
|
|
28415
|
-
if (
|
|
28415
|
+
if (relative3.path[0] === "/") target.path = removeDotSegments(relative3.path);
|
|
28416
28416
|
else {
|
|
28417
|
-
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" +
|
|
28418
|
-
else if (!base.path) target.path =
|
|
28419
|
-
else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) +
|
|
28417
|
+
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = "/" + relative3.path;
|
|
28418
|
+
else if (!base.path) target.path = relative3.path;
|
|
28419
|
+
else target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative3.path;
|
|
28420
28420
|
target.path = removeDotSegments(target.path);
|
|
28421
28421
|
}
|
|
28422
|
-
target.query =
|
|
28422
|
+
target.query = relative3.query;
|
|
28423
28423
|
}
|
|
28424
28424
|
target.userinfo = base.userinfo;
|
|
28425
28425
|
target.host = base.host;
|
|
@@ -28427,7 +28427,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28427
28427
|
}
|
|
28428
28428
|
target.scheme = base.scheme;
|
|
28429
28429
|
}
|
|
28430
|
-
target.fragment =
|
|
28430
|
+
target.fragment = relative3.fragment;
|
|
28431
28431
|
return target;
|
|
28432
28432
|
}
|
|
28433
28433
|
function equal(uriA, uriB, options) {
|
|
@@ -28553,7 +28553,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
28553
28553
|
const fastUri = {
|
|
28554
28554
|
SCHEMES,
|
|
28555
28555
|
normalize,
|
|
28556
|
-
resolve,
|
|
28556
|
+
resolve: resolve4,
|
|
28557
28557
|
resolveComponent,
|
|
28558
28558
|
equal,
|
|
28559
28559
|
serialize,
|
|
@@ -29335,14 +29335,14 @@ var require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
29335
29335
|
function ucs2length(str) {
|
|
29336
29336
|
const len = str.length;
|
|
29337
29337
|
let length = 0;
|
|
29338
|
-
let
|
|
29338
|
+
let pos2 = 0;
|
|
29339
29339
|
let value;
|
|
29340
|
-
while (
|
|
29340
|
+
while (pos2 < len) {
|
|
29341
29341
|
length++;
|
|
29342
|
-
value = str.charCodeAt(
|
|
29343
|
-
if (value >= 55296 && value <= 56319 &&
|
|
29344
|
-
value = str.charCodeAt(
|
|
29345
|
-
if ((value & 64512) === 56320)
|
|
29342
|
+
value = str.charCodeAt(pos2++);
|
|
29343
|
+
if (value >= 55296 && value <= 56319 && pos2 < len) {
|
|
29344
|
+
value = str.charCodeAt(pos2);
|
|
29345
|
+
if ((value & 64512) === 56320) pos2++;
|
|
29346
29346
|
}
|
|
29347
29347
|
}
|
|
29348
29348
|
return length;
|
|
@@ -33926,7 +33926,7 @@ var StdioServerTransport = class {
|
|
|
33926
33926
|
}
|
|
33927
33927
|
send(message) {
|
|
33928
33928
|
if (this._closed) return Promise.reject(/* @__PURE__ */ new Error("StdioServerTransport is closed"));
|
|
33929
|
-
return new Promise((
|
|
33929
|
+
return new Promise((resolve4, reject) => {
|
|
33930
33930
|
const json2 = serializeMessage(message);
|
|
33931
33931
|
let settled = false;
|
|
33932
33932
|
const onError = (error62) => {
|
|
@@ -33941,14 +33941,14 @@ var StdioServerTransport = class {
|
|
|
33941
33941
|
settled = true;
|
|
33942
33942
|
this._stdout.off("error", onError);
|
|
33943
33943
|
this._stdout.off("drain", onDrain);
|
|
33944
|
-
|
|
33944
|
+
resolve4();
|
|
33945
33945
|
};
|
|
33946
33946
|
this._stdout.once("error", onError);
|
|
33947
33947
|
if (this._stdout.write(json2)) {
|
|
33948
33948
|
if (settled) return;
|
|
33949
33949
|
settled = true;
|
|
33950
33950
|
this._stdout.off("error", onError);
|
|
33951
|
-
|
|
33951
|
+
resolve4();
|
|
33952
33952
|
} else if (!settled) this._stdout.once("drain", onDrain);
|
|
33953
33953
|
});
|
|
33954
33954
|
}
|
|
@@ -34002,14 +34002,14 @@ var StdioConnectionChannel = class {
|
|
|
34002
34002
|
*/
|
|
34003
34003
|
async whenRequestsAnswered(timeoutMs) {
|
|
34004
34004
|
if (this._closed || this._pendingRequests.size === 0) return true;
|
|
34005
|
-
return await new Promise((
|
|
34005
|
+
return await new Promise((resolve4) => {
|
|
34006
34006
|
const waiter = () => {
|
|
34007
34007
|
clearTimeout(timer);
|
|
34008
|
-
|
|
34008
|
+
resolve4(true);
|
|
34009
34009
|
};
|
|
34010
34010
|
const timer = setTimeout(() => {
|
|
34011
34011
|
this._drainWaiters = this._drainWaiters.filter((pending) => pending !== waiter);
|
|
34012
|
-
|
|
34012
|
+
resolve4(false);
|
|
34013
34013
|
}, timeoutMs);
|
|
34014
34014
|
this._drainWaiters.push(waiter);
|
|
34015
34015
|
});
|
|
@@ -34379,13 +34379,28 @@ var API_KEY_RE = new RegExp([
|
|
|
34379
34379
|
"whsec_[A-Za-z0-9]{16,}\\b"
|
|
34380
34380
|
// webhook signing secret (Stripe-style)
|
|
34381
34381
|
].map((p) => `\\b${p}`).join("|"), "g");
|
|
34382
|
-
var QUERY_SECRET_RE = /([?&](?:
|
|
34382
|
+
var QUERY_SECRET_RE = /([?&](?:(?:access|refresh|id|auth|session|csrf|xsrf)[_-]?token|client[_-]?secret|api[_-]?secret|api[_-]?key|password|passwd|signature|token|key|sig)=)[^&#\s"'<>`]+/gi;
|
|
34383
|
+
var OAUTH_CODE_RE = /([?&]code=)(?=[^&#\s"'<>`]{16,})[^&#\s"'<>`]+/gi;
|
|
34384
|
+
var FORM_PASSWORD_RE = /((?:^|[\s,;:"'(\[{])(?:password|passwd)=)[^&#\s"'<>`]+/gim;
|
|
34385
|
+
var HEADER_SECRET_RE = /(\b(?:x[-_][a-z0-9_-]*?(?:api[-_]?key|token|secret|auth)[a-z0-9_-]*|api[-_]?key)\s*:\s*)[^\s,;"'<>`]+/gi;
|
|
34383
34386
|
var AWS_SIGV4_RE = /([?&]X-Amz-(?:Signature|Security-Token|Credential)=)[^&#\s"'<>`]+/gi;
|
|
34384
|
-
var JSON_SECRET_KEYS =
|
|
34385
|
-
|
|
34386
|
-
|
|
34387
|
+
var JSON_SECRET_KEYS = [
|
|
34388
|
+
"(?:access|refresh|id|auth|session|bearer|csrf|xsrf)[_-]?token",
|
|
34389
|
+
"client[_-]?secret",
|
|
34390
|
+
"api[_-]?secret",
|
|
34391
|
+
"(?:x[_-])?api[_-]?key",
|
|
34392
|
+
"private[_-]?key",
|
|
34393
|
+
"x[_-][a-z0-9_-]*?(?:api[_-]?key|token|secret|auth)[a-z0-9_-]*",
|
|
34394
|
+
"(?:proxy-)?authorization",
|
|
34395
|
+
"password",
|
|
34396
|
+
"passwd",
|
|
34397
|
+
"secret",
|
|
34398
|
+
"token"
|
|
34399
|
+
].join("|");
|
|
34400
|
+
var JSON_SECRET_DQ_RE = new RegExp(`("(?:${JSON_SECRET_KEYS})"\\s*:\\s*")(?:[^"\\\\]|\\\\.)*(")`, "gi");
|
|
34401
|
+
var JSON_SECRET_SQ_RE = new RegExp(`('(?:${JSON_SECRET_KEYS})'\\s*:\\s*')(?:[^'\\\\]|\\\\.)*(')`, "gi");
|
|
34387
34402
|
function redactSecrets(text) {
|
|
34388
|
-
return text.replace(BEARER_RE, "$1[REDACTED]").replace(BASIC_AUTH_RE, "$1[REDACTED]").replace(SET_COOKIE_RE, "$1$2=[REDACTED]").replace(COOKIE_HEADER_RE, (_m, prefix, pairs) => `${prefix}${pairs.replace(/=[^;,\s]*/g, "=[REDACTED]")}`).replace(API_KEY_RE, "[REDACTED]").replace(QUERY_SECRET_RE, "$1[REDACTED]").replace(AWS_SIGV4_RE, "$1[REDACTED]").replace(JSON_SECRET_DQ_RE, "$1[REDACTED]$2").replace(JSON_SECRET_SQ_RE, "$1[REDACTED]$2").replace(JWT_RE, "[REDACTED]");
|
|
34403
|
+
return text.replace(BEARER_RE, "$1[REDACTED]").replace(BASIC_AUTH_RE, "$1[REDACTED]").replace(SET_COOKIE_RE, "$1$2=[REDACTED]").replace(COOKIE_HEADER_RE, (_m, prefix, pairs) => `${prefix}${pairs.replace(/=[^;,\s]*/g, "=[REDACTED]")}`).replace(API_KEY_RE, "[REDACTED]").replace(HEADER_SECRET_RE, "$1[REDACTED]").replace(QUERY_SECRET_RE, "$1[REDACTED]").replace(OAUTH_CODE_RE, "$1[REDACTED]").replace(FORM_PASSWORD_RE, "$1[REDACTED]").replace(AWS_SIGV4_RE, "$1[REDACTED]").replace(JSON_SECRET_DQ_RE, "$1[REDACTED]$2").replace(JSON_SECRET_SQ_RE, "$1[REDACTED]$2").replace(JWT_RE, "[REDACTED]");
|
|
34389
34404
|
}
|
|
34390
34405
|
|
|
34391
34406
|
// ../../node_modules/@chrischall/mcp-utils/dist/response/view.js
|
|
@@ -34547,13 +34562,47 @@ async function createMcpServer(opts) {
|
|
|
34547
34562
|
}
|
|
34548
34563
|
return server;
|
|
34549
34564
|
}
|
|
34565
|
+
var DEFAULT_SHUTDOWN_TIMEOUT_MS = 5e3;
|
|
34566
|
+
var DEFAULT_REPEAT_SIGNAL_GRACE_MS = 500;
|
|
34550
34567
|
function withGracefulShutdown(target, opts = {}) {
|
|
34551
34568
|
const shouldExit = opts.exit ?? true;
|
|
34569
|
+
if (opts.timeoutMs !== void 0 && !(Number.isFinite(opts.timeoutMs) && opts.timeoutMs > 0)) {
|
|
34570
|
+
throw new RangeError("withGracefulShutdown: timeoutMs must be a finite number greater than 0.");
|
|
34571
|
+
}
|
|
34572
|
+
const timeoutMs = opts.timeoutMs ?? DEFAULT_SHUTDOWN_TIMEOUT_MS;
|
|
34573
|
+
if (opts.repeatSignalGraceMs !== void 0 && !(Number.isFinite(opts.repeatSignalGraceMs) && opts.repeatSignalGraceMs >= 0)) {
|
|
34574
|
+
throw new RangeError("withGracefulShutdown: repeatSignalGraceMs must be a finite number >= 0.");
|
|
34575
|
+
}
|
|
34576
|
+
const repeatGraceMs = opts.repeatSignalGraceMs ?? DEFAULT_REPEAT_SIGNAL_GRACE_MS;
|
|
34552
34577
|
let shuttingDown = false;
|
|
34578
|
+
let firstSignalAt = 0;
|
|
34579
|
+
let exited = false;
|
|
34580
|
+
const exitOnce = () => {
|
|
34581
|
+
if (exited)
|
|
34582
|
+
return;
|
|
34583
|
+
exited = true;
|
|
34584
|
+
process.exit(0);
|
|
34585
|
+
};
|
|
34553
34586
|
const handler = (signal) => {
|
|
34554
|
-
if (shuttingDown)
|
|
34587
|
+
if (shuttingDown) {
|
|
34588
|
+
if (Date.now() - firstSignalAt < repeatGraceMs)
|
|
34589
|
+
return;
|
|
34590
|
+
if (shouldExit) {
|
|
34591
|
+
console.error(`[mcp-utils] second ${signal} during shutdown \u2014 exiting now`);
|
|
34592
|
+
exitOnce();
|
|
34593
|
+
}
|
|
34555
34594
|
return;
|
|
34595
|
+
}
|
|
34556
34596
|
shuttingDown = true;
|
|
34597
|
+
firstSignalAt = Date.now();
|
|
34598
|
+
let timer;
|
|
34599
|
+
if (shouldExit) {
|
|
34600
|
+
timer = setTimeout(() => {
|
|
34601
|
+
console.error(`[mcp-utils] graceful shutdown on ${signal} did not finish in ${timeoutMs}ms \u2014 exiting`);
|
|
34602
|
+
exitOnce();
|
|
34603
|
+
}, timeoutMs);
|
|
34604
|
+
timer.unref?.();
|
|
34605
|
+
}
|
|
34557
34606
|
void (async () => {
|
|
34558
34607
|
try {
|
|
34559
34608
|
if (opts.onSignal)
|
|
@@ -34562,8 +34611,10 @@ function withGracefulShutdown(target, opts = {}) {
|
|
|
34562
34611
|
} catch (err) {
|
|
34563
34612
|
console.error(`[mcp-utils] error during graceful shutdown on ${signal}: ${err instanceof Error ? err.message : String(err)}`);
|
|
34564
34613
|
} finally {
|
|
34614
|
+
if (timer !== void 0)
|
|
34615
|
+
clearTimeout(timer);
|
|
34565
34616
|
if (shouldExit)
|
|
34566
|
-
|
|
34617
|
+
exitOnce();
|
|
34567
34618
|
}
|
|
34568
34619
|
})();
|
|
34569
34620
|
};
|
|
@@ -34593,6 +34644,8 @@ function runMcp(opts) {
|
|
|
34593
34644
|
}
|
|
34594
34645
|
|
|
34595
34646
|
// ../../node_modules/@chrischall/mcp-utils/dist/config/index.js
|
|
34647
|
+
import { homedir } from "node:os";
|
|
34648
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
34596
34649
|
var PLACEHOLDER_RE = /^\$\{[^}]*\}$/;
|
|
34597
34650
|
function readEnvVar(key, opts = {}) {
|
|
34598
34651
|
const env = opts.env ?? process.env;
|
|
@@ -34619,6 +34672,50 @@ function parseBoolEnv(key, opts = {}) {
|
|
|
34619
34672
|
return false;
|
|
34620
34673
|
return fallback;
|
|
34621
34674
|
}
|
|
34675
|
+
function expandPath(p) {
|
|
34676
|
+
let expanded = p;
|
|
34677
|
+
if (p === "~") {
|
|
34678
|
+
expanded = homedir();
|
|
34679
|
+
} else if (p.startsWith("~/")) {
|
|
34680
|
+
expanded = join(homedir(), p.slice(2));
|
|
34681
|
+
}
|
|
34682
|
+
return isAbsolute(expanded) ? expanded : resolve(expanded);
|
|
34683
|
+
}
|
|
34684
|
+
|
|
34685
|
+
// ../../node_modules/@chrischall/mcp-utils/dist/fs/confine.js
|
|
34686
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
34687
|
+
import { dirname, isAbsolute as isAbsolute2, relative, resolve as resolve2, sep } from "node:path";
|
|
34688
|
+
function isInside(root, target) {
|
|
34689
|
+
const rel = relative(root, target);
|
|
34690
|
+
return rel === "" || !rel.startsWith(`..${sep}`) && rel !== ".." && !isAbsolute2(rel);
|
|
34691
|
+
}
|
|
34692
|
+
function realPathAllowingMissing(p) {
|
|
34693
|
+
const abs = resolve2(p);
|
|
34694
|
+
let existing = abs;
|
|
34695
|
+
const tail = [];
|
|
34696
|
+
while (!existsSync(existing)) {
|
|
34697
|
+
const parent = dirname(existing);
|
|
34698
|
+
if (parent === existing)
|
|
34699
|
+
break;
|
|
34700
|
+
tail.unshift(existing.slice(parent.length).replace(/^[/\\]+/, ""));
|
|
34701
|
+
existing = parent;
|
|
34702
|
+
}
|
|
34703
|
+
let real;
|
|
34704
|
+
try {
|
|
34705
|
+
real = realpathSync(existing);
|
|
34706
|
+
} catch {
|
|
34707
|
+
real = existing;
|
|
34708
|
+
}
|
|
34709
|
+
return tail.length > 0 ? resolve2(real, ...tail) : real;
|
|
34710
|
+
}
|
|
34711
|
+
function assertPathWithinRoots(path, roots) {
|
|
34712
|
+
const target = realPathAllowingMissing(expandPath(path));
|
|
34713
|
+
for (const root of roots) {
|
|
34714
|
+
if (isInside(realPathAllowingMissing(expandPath(root)), target))
|
|
34715
|
+
return target;
|
|
34716
|
+
}
|
|
34717
|
+
throw new Error(`Path is outside the allowed directories: ${path}`);
|
|
34718
|
+
}
|
|
34622
34719
|
|
|
34623
34720
|
// ../../node_modules/@chrischall/mcp-utils/dist/zod/index.js
|
|
34624
34721
|
var PositiveInt = external_exports.number().int().positive();
|
|
@@ -34640,7 +34737,7 @@ var pageSchema = {
|
|
|
34640
34737
|
};
|
|
34641
34738
|
|
|
34642
34739
|
// ../gogcli-mcp/src/runner.ts
|
|
34643
|
-
import { delimiter, join } from "node:path";
|
|
34740
|
+
import { delimiter, join as join2 } from "node:path";
|
|
34644
34741
|
|
|
34645
34742
|
// ../gogcli-mcp/src/timestamps.ts
|
|
34646
34743
|
var DEFAULT_DISPLAY_TZ = "America/New_York";
|
|
@@ -34841,9 +34938,48 @@ function normalizeTimestamps(text, tz = displayTimeZone(), naiveTz = naiveSource
|
|
|
34841
34938
|
return JSON.stringify(parsed, null, detectIndent(text));
|
|
34842
34939
|
}
|
|
34843
34940
|
|
|
34941
|
+
// ../gogcli-mcp/src/arg-guard.ts
|
|
34942
|
+
var FORBIDDEN_LONG_FLAG = /^--(readonly|enable-commands|enable-commands-exact|disable-commands|access-token|home|account|acct|client|gmail-no-send|no-input|non-interactive|noninteractive)(=|$)/i;
|
|
34943
|
+
var SHORT_ACCOUNT_CLUSTER = /^-(?!-)[A-Za-z]*a/;
|
|
34944
|
+
function forbiddenArgReason(arg) {
|
|
34945
|
+
if (arg === "--") {
|
|
34946
|
+
return 'The argument "--" is not allowed: it ends flag parsing and would disable safety flags appended after it.';
|
|
34947
|
+
}
|
|
34948
|
+
const match = FORBIDDEN_LONG_FLAG.exec(arg);
|
|
34949
|
+
if (match) {
|
|
34950
|
+
return `The flag ${arg} is not allowed here: --${match[1].toLowerCase()} is a safety/credential control set by the server operator, not a per-call option.`;
|
|
34951
|
+
}
|
|
34952
|
+
if (SHORT_ACCOUNT_CLUSTER.test(arg)) {
|
|
34953
|
+
return `The flag ${arg} is not allowed here: -a selects the account. Use the tool's account parameter instead.`;
|
|
34954
|
+
}
|
|
34955
|
+
return void 0;
|
|
34956
|
+
}
|
|
34957
|
+
function assertSafeForwardedArgs(args) {
|
|
34958
|
+
for (const arg of args) {
|
|
34959
|
+
const reason = forbiddenArgReason(arg);
|
|
34960
|
+
if (reason) throw new Error(reason);
|
|
34961
|
+
}
|
|
34962
|
+
}
|
|
34963
|
+
var SUBCOMMAND_SHAPE = /^[a-z][a-z0-9-]*$/;
|
|
34964
|
+
function assertSafeSubcommand(subcommand) {
|
|
34965
|
+
if (!SUBCOMMAND_SHAPE.test(subcommand)) {
|
|
34966
|
+
throw new Error(
|
|
34967
|
+
`Invalid subcommand ${JSON.stringify(subcommand)}: pass a single gog subcommand name such as "list" or "mark-read", and put its arguments in args.`
|
|
34968
|
+
);
|
|
34969
|
+
}
|
|
34970
|
+
}
|
|
34971
|
+
|
|
34972
|
+
// ../gogcli-mcp/src/argv.ts
|
|
34973
|
+
function pos(value) {
|
|
34974
|
+
return { kind: "positional", value };
|
|
34975
|
+
}
|
|
34976
|
+
function isGogPositional(arg) {
|
|
34977
|
+
return typeof arg === "object" && arg !== null && arg.kind === "positional";
|
|
34978
|
+
}
|
|
34979
|
+
|
|
34844
34980
|
// ../gogcli-mcp/src/runner.ts
|
|
34845
34981
|
function isGogFileArg(arg) {
|
|
34846
|
-
return typeof arg !== "string";
|
|
34982
|
+
return typeof arg !== "string" && arg.kind === "file";
|
|
34847
34983
|
}
|
|
34848
34984
|
var TIMEOUT_MS = 3e4;
|
|
34849
34985
|
function readonlyEnvEnabled() {
|
|
@@ -34927,8 +35063,8 @@ function formatTimeout(ms) {
|
|
|
34927
35063
|
}
|
|
34928
35064
|
async function spawnWithTempFiles(args, opts) {
|
|
34929
35065
|
const { mkdtemp, mkdir, writeFile, rm } = await import("node:fs/promises");
|
|
34930
|
-
const { tmpdir } = await import("node:os");
|
|
34931
|
-
const dir = await mkdtemp(
|
|
35066
|
+
const { tmpdir: tmpdir2 } = await import("node:os");
|
|
35067
|
+
const dir = await mkdtemp(join2(tmpdir2(), "gogcli-mcp-"));
|
|
34932
35068
|
try {
|
|
34933
35069
|
const argv = [];
|
|
34934
35070
|
let seq = 0;
|
|
@@ -34937,10 +35073,10 @@ async function spawnWithTempFiles(args, opts) {
|
|
|
34937
35073
|
argv.push(arg);
|
|
34938
35074
|
continue;
|
|
34939
35075
|
}
|
|
34940
|
-
const sub =
|
|
35076
|
+
const sub = join2(dir, String(seq));
|
|
34941
35077
|
seq += 1;
|
|
34942
35078
|
await mkdir(sub, { recursive: true, mode: 448 });
|
|
34943
|
-
const path =
|
|
35079
|
+
const path = join2(sub, arg.filename ?? `${arg.flag}.${arg.ext ?? "txt"}`);
|
|
34944
35080
|
const data = arg.encoding === "base64" ? Buffer.from(arg.contents, "base64") : Buffer.from(arg.contents, "utf8");
|
|
34945
35081
|
await writeFile(path, data, { mode: 384 });
|
|
34946
35082
|
argv.push(arg.positional ? path : `--${arg.flag}=${path}`);
|
|
@@ -34958,10 +35094,10 @@ function spawnExecutor(args, opts) {
|
|
|
34958
35094
|
return spawnGog(args, opts);
|
|
34959
35095
|
}
|
|
34960
35096
|
async function spawnGog(fullArgs, opts) {
|
|
34961
|
-
const { timeout, interactive = false, spawner, binary = false } = opts;
|
|
35097
|
+
const { timeout, interactive = false, spawner, binary = false, maxOutputBytes } = opts;
|
|
34962
35098
|
const spawn = spawner ?? (await import("node:child_process")).spawn;
|
|
34963
35099
|
const effectiveTimeout = timeout ?? TIMEOUT_MS;
|
|
34964
|
-
return new Promise((
|
|
35100
|
+
return new Promise((resolve4, reject) => {
|
|
34965
35101
|
const childEnv = { ...sanitizedEnv(), GOG_TIMEZONE: naiveSourceTimeZone(), PATH: augmentedPath() };
|
|
34966
35102
|
const child = spawn(readEnvVar("GOG_PATH") ?? "gog", fullArgs, { env: childEnv });
|
|
34967
35103
|
const stdoutChunks = [];
|
|
@@ -34979,7 +35115,17 @@ async function spawnGog(fullArgs, opts) {
|
|
|
34979
35115
|
child.kill();
|
|
34980
35116
|
reject(new Error(`gog timed out after ${formatTimeout(effectiveTimeout)}`));
|
|
34981
35117
|
}, effectiveTimeout);
|
|
35118
|
+
let stdoutBytes = 0;
|
|
34982
35119
|
child.stdout.on("data", (chunk) => {
|
|
35120
|
+
if (settled) return;
|
|
35121
|
+
stdoutBytes += chunk.length;
|
|
35122
|
+
if (maxOutputBytes !== void 0 && stdoutBytes > maxOutputBytes) {
|
|
35123
|
+
settled = true;
|
|
35124
|
+
stopWatching();
|
|
35125
|
+
child.kill();
|
|
35126
|
+
reject(new Error(`gog output exceeded the limit: more than ${maxOutputBytes} bytes`));
|
|
35127
|
+
return;
|
|
35128
|
+
}
|
|
34983
35129
|
stdoutChunks.push(chunk);
|
|
34984
35130
|
});
|
|
34985
35131
|
child.stderr.on("data", (chunk) => {
|
|
@@ -34996,14 +35142,14 @@ async function spawnGog(fullArgs, opts) {
|
|
|
34996
35142
|
const stderr = Buffer.concat(stderrChunks).toString().trim();
|
|
34997
35143
|
if (code === 0) {
|
|
34998
35144
|
if (binary) {
|
|
34999
|
-
|
|
35145
|
+
resolve4(Buffer.concat(stdoutChunks).toString("base64"));
|
|
35000
35146
|
return;
|
|
35001
35147
|
}
|
|
35002
35148
|
const stdout = Buffer.concat(stdoutChunks).toString();
|
|
35003
35149
|
if (interactive && stderr) {
|
|
35004
|
-
|
|
35150
|
+
resolve4(stdout + "\n" + stderr);
|
|
35005
35151
|
} else {
|
|
35006
|
-
|
|
35152
|
+
resolve4(stdout);
|
|
35007
35153
|
}
|
|
35008
35154
|
} else {
|
|
35009
35155
|
reject(new Error(stderr || `gog exited with code ${code}`));
|
|
@@ -35023,7 +35169,33 @@ async function spawnGog(fullArgs, opts) {
|
|
|
35023
35169
|
});
|
|
35024
35170
|
});
|
|
35025
35171
|
}
|
|
35172
|
+
function placePositionals(args) {
|
|
35173
|
+
const flags = [];
|
|
35174
|
+
const positionals = [];
|
|
35175
|
+
let afterSeparator = false;
|
|
35176
|
+
for (const arg of args) {
|
|
35177
|
+
if (arg === "--") {
|
|
35178
|
+
afterSeparator = true;
|
|
35179
|
+
} else if (isGogPositional(arg)) {
|
|
35180
|
+
positionals.push(arg.value);
|
|
35181
|
+
} else if (afterSeparator || isGogFileArg(arg) && arg.positional) {
|
|
35182
|
+
positionals.push(arg);
|
|
35183
|
+
} else {
|
|
35184
|
+
flags.push(arg);
|
|
35185
|
+
}
|
|
35186
|
+
}
|
|
35187
|
+
return { flags, positionals };
|
|
35188
|
+
}
|
|
35189
|
+
function assertNoSafetyOverrides(flags) {
|
|
35190
|
+
for (const arg of flags) {
|
|
35191
|
+
if (typeof arg !== "string") continue;
|
|
35192
|
+
const reason = forbiddenArgReason(arg);
|
|
35193
|
+
if (reason) throw new Error(reason);
|
|
35194
|
+
}
|
|
35195
|
+
}
|
|
35026
35196
|
function assembleArgs(args, opts) {
|
|
35197
|
+
const { flags, positionals } = placePositionals(args);
|
|
35198
|
+
assertNoSafetyOverrides(flags);
|
|
35027
35199
|
const effectiveAccount = opts.account ?? readEnvVar("GOG_ACCOUNT");
|
|
35028
35200
|
const fullArgs = ["--json", "--color=never"];
|
|
35029
35201
|
if (!opts.interactive) {
|
|
@@ -35032,17 +35204,21 @@ function assembleArgs(args, opts) {
|
|
|
35032
35204
|
if (opts.readonly || readonlyEnvEnabled()) {
|
|
35033
35205
|
fullArgs.push("--readonly");
|
|
35034
35206
|
}
|
|
35207
|
+
if (opts.gmailNoSend) {
|
|
35208
|
+
fullArgs.push("--gmail-no-send");
|
|
35209
|
+
}
|
|
35035
35210
|
if (effectiveAccount) {
|
|
35036
35211
|
fullArgs.push("--account", effectiveAccount);
|
|
35037
35212
|
}
|
|
35038
|
-
fullArgs.push(...
|
|
35213
|
+
fullArgs.push(...flags);
|
|
35214
|
+
if (positionals.length > 0) fullArgs.push("--", ...positionals);
|
|
35039
35215
|
return fullArgs;
|
|
35040
35216
|
}
|
|
35041
35217
|
async function run(args, options = {}) {
|
|
35042
|
-
const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full", opaqueFields } = options;
|
|
35218
|
+
const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full", opaqueFields, gmailNoSend = false } = options;
|
|
35043
35219
|
const base = redactMode === "tokens" ? redactGoogleTokens : redactSecrets2;
|
|
35044
35220
|
const redact = opaqueFields?.length ? (text) => redactPreservingOpaqueFields(text, opaqueFields, base) : base;
|
|
35045
|
-
const fullArgs = assembleArgs(args, { account, interactive, readonly: readonly2 });
|
|
35221
|
+
const fullArgs = assembleArgs(args, { account, interactive, readonly: readonly2, gmailNoSend });
|
|
35046
35222
|
try {
|
|
35047
35223
|
return redact(await spawnExecutor(fullArgs, { timeout, interactive, spawner }));
|
|
35048
35224
|
} catch (err) {
|
|
@@ -35070,6 +35246,107 @@ function stripConsumedPageToken(text) {
|
|
|
35070
35246
|
return JSON.stringify(obj, null, detectIndent2(text));
|
|
35071
35247
|
}
|
|
35072
35248
|
|
|
35249
|
+
// ../gogcli-mcp/src/file-roots.ts
|
|
35250
|
+
import { homedir as homedir2 } from "node:os";
|
|
35251
|
+
import { delimiter as delimiter2, join as join4 } from "node:path";
|
|
35252
|
+
|
|
35253
|
+
// ../gogcli-mcp/src/attachment-root.ts
|
|
35254
|
+
import { tmpdir, userInfo } from "node:os";
|
|
35255
|
+
import { dirname as dirname2, join as join3, relative as relative2, resolve as resolve3, isAbsolute as isAbsolute3, sep as sep2 } from "node:path";
|
|
35256
|
+
var ATTACHMENT_DOWNLOAD_ROOT = join3(tmpdir(), `gogcli-mcp-attachments-${userInfo().uid}`);
|
|
35257
|
+
var ATTACHMENT_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
35258
|
+
|
|
35259
|
+
// ../gogcli-mcp/src/file-roots.ts
|
|
35260
|
+
var FILE_ROOTS_ENV = "GOG_FILE_ROOTS";
|
|
35261
|
+
function defaultFileRoot() {
|
|
35262
|
+
return join4(homedir2(), "gogcli-mcp-files");
|
|
35263
|
+
}
|
|
35264
|
+
function fileRoots() {
|
|
35265
|
+
const raw = readEnvVar(FILE_ROOTS_ENV);
|
|
35266
|
+
const roots = (raw ?? "").split(delimiter2).map((r) => r.trim()).filter(Boolean);
|
|
35267
|
+
return roots.length > 0 ? roots : [defaultFileRoot()];
|
|
35268
|
+
}
|
|
35269
|
+
function confinePath(path, param, opts = {}) {
|
|
35270
|
+
if (opts.allowDash && path === "-") return path;
|
|
35271
|
+
const roots = [...fileRoots(), ATTACHMENT_DOWNLOAD_ROOT];
|
|
35272
|
+
try {
|
|
35273
|
+
assertPathWithinRoots(path, roots);
|
|
35274
|
+
} catch {
|
|
35275
|
+
throw new Error(
|
|
35276
|
+
`${param} ${JSON.stringify(path)} is outside the directories this server may read or write (${roots.join(", ")}). Put the file in one of them, or ask the server operator to widen ${FILE_ROOTS_ENV}.`
|
|
35277
|
+
);
|
|
35278
|
+
}
|
|
35279
|
+
return path;
|
|
35280
|
+
}
|
|
35281
|
+
|
|
35282
|
+
// ../gogcli-mcp/src/run-path-guard.ts
|
|
35283
|
+
var POSITIONAL_PATH_SUBCOMMANDS = {
|
|
35284
|
+
appscript: { pull: "gog_appscript_pull" },
|
|
35285
|
+
drive: { upload: "gog_drive_upload", sync: "gog_drive_sync_push" },
|
|
35286
|
+
gmail: { import: "gog_gmail_import" },
|
|
35287
|
+
slides: {
|
|
35288
|
+
"add-slide": "gog_slides_add_slide",
|
|
35289
|
+
"insert-image": "gog_slides_insert_image",
|
|
35290
|
+
"replace-slide": "gog_slides_replace_slide"
|
|
35291
|
+
}
|
|
35292
|
+
};
|
|
35293
|
+
var PATH_FLAGS = /* @__PURE__ */ new Set(["out", "output", "out-dir", "output-dir", "dir", "worker-dir", "attach", "file", "key", "cert", "replacements"]);
|
|
35294
|
+
var ID_FLAGS = {
|
|
35295
|
+
drive: /* @__PURE__ */ new Set(["file", "filter-file"])
|
|
35296
|
+
};
|
|
35297
|
+
var EXEC_FLAGS = /* @__PURE__ */ new Set(["on-change", "on-new", "mmdc"]);
|
|
35298
|
+
var SHORT_PATH_CLUSTER = /^-(?!-)[A-Za-z]*[of]/;
|
|
35299
|
+
var LONG_FLAG = /^--([A-Za-z0-9][A-Za-z0-9-]*)(?:=([\s\S]*))?$/;
|
|
35300
|
+
function isPathFlag(service, name) {
|
|
35301
|
+
if (ID_FLAGS[service]?.has(name)) return false;
|
|
35302
|
+
return PATH_FLAGS.has(name) || name.endsWith("-file");
|
|
35303
|
+
}
|
|
35304
|
+
function confineFlagValue(flag, value) {
|
|
35305
|
+
if (value === "-") return;
|
|
35306
|
+
confinePath(value, flag);
|
|
35307
|
+
for (const part of value.split(",")) {
|
|
35308
|
+
if (part !== "" && part !== "-") confinePath(part, flag);
|
|
35309
|
+
}
|
|
35310
|
+
}
|
|
35311
|
+
function positionalPathTool(service, subcommand) {
|
|
35312
|
+
return POSITIONAL_PATH_SUBCOMMANDS[service]?.[subcommand];
|
|
35313
|
+
}
|
|
35314
|
+
function assertRunPathsConfined(service, subcommand, args) {
|
|
35315
|
+
const dedicated = positionalPathTool(service, subcommand);
|
|
35316
|
+
if (dedicated) {
|
|
35317
|
+
throw new Error(
|
|
35318
|
+
`gog ${service} ${subcommand} reads or writes a local path given as a positional argument, so it is not available through gog_${service}_run. Use ${dedicated}, which confines the path to GOG_FILE_ROOTS.`
|
|
35319
|
+
);
|
|
35320
|
+
}
|
|
35321
|
+
for (let i = 0; i < args.length; i++) {
|
|
35322
|
+
const arg = args[i];
|
|
35323
|
+
if (SHORT_PATH_CLUSTER.test(arg)) {
|
|
35324
|
+
throw new Error(
|
|
35325
|
+
`The flag ${arg} is not allowed here: spell a path flag out as --out or --file (e.g. --out=<path>) so its path can be checked against GOG_FILE_ROOTS.`
|
|
35326
|
+
);
|
|
35327
|
+
}
|
|
35328
|
+
const match = LONG_FLAG.exec(arg);
|
|
35329
|
+
if (!match) continue;
|
|
35330
|
+
const name = match[1].toLowerCase();
|
|
35331
|
+
if (EXEC_FLAGS.has(name)) {
|
|
35332
|
+
throw new Error(`The flag --${name} is not allowed here: it runs a local program chosen by the caller.`);
|
|
35333
|
+
}
|
|
35334
|
+
const isJson = name.endsWith("-json");
|
|
35335
|
+
if (!isJson && !isPathFlag(service, name)) continue;
|
|
35336
|
+
let value = match[2];
|
|
35337
|
+
if (value === void 0) {
|
|
35338
|
+
value = args[i + 1];
|
|
35339
|
+
if (value === void 0) continue;
|
|
35340
|
+
i++;
|
|
35341
|
+
}
|
|
35342
|
+
if (isJson) {
|
|
35343
|
+
if (value.startsWith("@")) confineFlagValue(`--${name}`, value.slice(1));
|
|
35344
|
+
continue;
|
|
35345
|
+
}
|
|
35346
|
+
confineFlagValue(`--${name}`, value);
|
|
35347
|
+
}
|
|
35348
|
+
}
|
|
35349
|
+
|
|
35073
35350
|
// ../gogcli-mcp/src/tools/utils.ts
|
|
35074
35351
|
var PAYLOAD_INLINE_MAX = 4096;
|
|
35075
35352
|
function payloadArg(inlineFlag, fileFlag, value, ext) {
|
|
@@ -35118,9 +35395,17 @@ var paginationParams = {
|
|
|
35118
35395
|
all: external_exports.boolean().optional().describe("Fetch all pages")
|
|
35119
35396
|
};
|
|
35120
35397
|
function registerRunTool(server, options) {
|
|
35121
|
-
const { service, examples, omitAccount = false, note } = options;
|
|
35398
|
+
const { service, examples, omitAccount = false, note, allowedSubcommands, vet, gmailNoSend = false } = options;
|
|
35399
|
+
for (const [, example] of examples.matchAll(/"([^"]+)"/g)) {
|
|
35400
|
+
const refused = allowedSubcommands && !allowedSubcommands.includes(example) || vet?.(example, []) || positionalPathTool(service, example);
|
|
35401
|
+
if (refused) {
|
|
35402
|
+
throw new Error(`gog_${service}_run example "${example}" is refused by the tool itself; list a subcommand it runs.`);
|
|
35403
|
+
}
|
|
35404
|
+
}
|
|
35122
35405
|
const baseDescription = `Run any gog ${service} subcommand not covered by the other tools. Run \`gog ${service} --help\` for the full list of subcommands, or \`gog ${service} <subcommand> --help\` for flags on a specific subcommand.`;
|
|
35123
|
-
const
|
|
35406
|
+
const restriction = allowedSubcommands ? ` Only these subcommands are available: ${allowedSubcommands.join(", ")}.` : "";
|
|
35407
|
+
const safety = ' Flags that override server safety controls (--readonly, --enable-commands, --disable-commands, --account, --access-token, --home, --client, --gmail-no-send, --no-input) and a bare "--" are refused. Local file paths (--out, --out-dir, --attach, --file, --*-file, @file JSON) must be inside GOG_FILE_ROOTS; subcommands that take a local path positionally (e.g. drive upload) are refused in favour of their dedicated tools.';
|
|
35408
|
+
const description = `${baseDescription}${restriction}${safety}${note ? ` ${note}` : ""}`;
|
|
35124
35409
|
const inputSchema = {
|
|
35125
35410
|
subcommand: external_exports.string().describe(`The gog ${service} subcommand to run, e.g. ${examples}`),
|
|
35126
35411
|
args: external_exports.array(external_exports.string()).describe("Additional positional args and flags")
|
|
@@ -35134,7 +35419,21 @@ function registerRunTool(server, options) {
|
|
|
35134
35419
|
inputSchema: external_exports.object(inputSchema)
|
|
35135
35420
|
}, async (rawArgs) => {
|
|
35136
35421
|
const { subcommand, args, account } = rawArgs;
|
|
35137
|
-
|
|
35422
|
+
try {
|
|
35423
|
+
assertSafeSubcommand(subcommand);
|
|
35424
|
+
assertSafeForwardedArgs(args);
|
|
35425
|
+
if (allowedSubcommands && !allowedSubcommands.includes(subcommand)) {
|
|
35426
|
+
throw new Error(
|
|
35427
|
+
`gog ${service} ${subcommand} is not available through gog_${service}_run. Allowed: ${allowedSubcommands.join(", ")}.`
|
|
35428
|
+
);
|
|
35429
|
+
}
|
|
35430
|
+
const refusal = vet?.(subcommand, args);
|
|
35431
|
+
if (refusal) throw new Error(refusal);
|
|
35432
|
+
assertRunPathsConfined(service, subcommand, args);
|
|
35433
|
+
} catch (err) {
|
|
35434
|
+
return errorResult(errorText(err));
|
|
35435
|
+
}
|
|
35436
|
+
return runOrDiagnose([service, subcommand, ...args], gmailNoSend ? { account, gmailNoSend } : { account });
|
|
35138
35437
|
});
|
|
35139
35438
|
}
|
|
35140
35439
|
function errorText(err) {
|
|
@@ -35256,6 +35555,7 @@ function formatAuthHealth(raw, now) {
|
|
|
35256
35555
|
}
|
|
35257
35556
|
|
|
35258
35557
|
// ../gogcli-mcp/src/tools/auth.ts
|
|
35558
|
+
var AUTH_RUN_SUBCOMMANDS = ["list", "status", "services", "remove", "alias"];
|
|
35259
35559
|
function registerAuthToolsWith(server, defaultServices) {
|
|
35260
35560
|
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.`;
|
|
35261
35561
|
const extraScopesDescribe = "Additional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers \u2014 e.g. https://www.googleapis.com/auth/bigquery.readonly, required before gog_sheets_datasource_* can read BigQuery-backed Connected Sheets. Leave unset otherwise: an extra scope whose API is not enabled on the OAuth client project makes Google reject the WHOLE authorization with invalid_scope.";
|
|
@@ -35313,7 +35613,7 @@ function registerAuthToolsWith(server, defaultServices) {
|
|
|
35313
35613
|
})
|
|
35314
35614
|
}, async ({ email: email3, services = defaultServices, extraScopes }) => {
|
|
35315
35615
|
try {
|
|
35316
|
-
const args = ["auth", "add", email3, "--services", services];
|
|
35616
|
+
const args = ["auth", "add", pos(email3), "--services", services];
|
|
35317
35617
|
if (extraScopes) args.push(`--extra-scopes=${extraScopes}`, "--force-consent");
|
|
35318
35618
|
return rawTextResult(await run(args, {
|
|
35319
35619
|
interactive: true,
|
|
@@ -35333,7 +35633,7 @@ function registerAuthToolsWith(server, defaultServices) {
|
|
|
35333
35633
|
})
|
|
35334
35634
|
}, async ({ email: email3, services = defaultServices, extraScopes }) => {
|
|
35335
35635
|
try {
|
|
35336
|
-
const args = ["auth", "add", email3, "--remote", "--step", "1", "--services", services, "--force-consent"];
|
|
35636
|
+
const args = ["auth", "add", pos(email3), "--remote", "--step", "1", "--services", services, "--force-consent"];
|
|
35337
35637
|
if (extraScopes) args.push(`--extra-scopes=${extraScopes}`);
|
|
35338
35638
|
return rawTextResult(await run(args, { redactMode: "tokens" }));
|
|
35339
35639
|
} catch (err) {
|
|
@@ -35360,7 +35660,7 @@ function registerAuthToolsWith(server, defaultServices) {
|
|
|
35360
35660
|
const args = [
|
|
35361
35661
|
"auth",
|
|
35362
35662
|
"add",
|
|
35363
|
-
email3,
|
|
35663
|
+
pos(email3),
|
|
35364
35664
|
"--remote",
|
|
35365
35665
|
"--step",
|
|
35366
35666
|
"2",
|
|
@@ -35380,6 +35680,7 @@ function registerAuthToolsWith(server, defaultServices) {
|
|
|
35380
35680
|
service: "auth",
|
|
35381
35681
|
examples: '"remove", "alias", "list"',
|
|
35382
35682
|
omitAccount: true,
|
|
35683
|
+
allowedSubcommands: AUTH_RUN_SUBCOMMANDS,
|
|
35383
35684
|
note: "For browser-based authorization, use gog_auth_add instead."
|
|
35384
35685
|
});
|
|
35385
35686
|
}
|
|
@@ -35429,7 +35730,7 @@ var replySchema = {
|
|
|
35429
35730
|
remove: external_exports.array(external_exports.string()).optional().describe("Remove these recipients from all fields (repeatable) \u2014 e.g. to drop someone from a reply-all."),
|
|
35430
35731
|
subject: external_exports.string().optional().describe('Override reply subject (default: "Re: <original>"). A changed subject starts a NEW Gmail thread.'),
|
|
35431
35732
|
noQuote: external_exports.boolean().optional().describe("Do not include the original message quoted below the reply (default: the original is quoted)"),
|
|
35432
|
-
attach: external_exports.array(external_exports.string()).optional().describe(`File paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem \u2014 NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-host) these paths do not exist and the call fails with "no such file or directory" \u2014 use attachInline there. Read on the server, base64-encoded with a MIME type inferred from the extension.`),
|
|
35733
|
+
attach: external_exports.array(external_exports.string()).optional().describe(`File paths to attach (repeatable), resolved ON THE GOG SERVER's filesystem \u2014 NOT this client's. Only usable when gog runs on the same machine you do (local stdio); on a hosted deployment (e.g. mcp-host) these paths do not exist and the call fails with "no such file or directory" \u2014 use attachInline there. Read on the server, base64-encoded with a MIME type inferred from the extension. Must be inside the server's GOG_FILE_ROOTS directories (default ~/gogcli-mcp-files).`),
|
|
35433
35734
|
attachInline: attachInlineParam,
|
|
35434
35735
|
from: external_exports.string().optional().describe("Send from this email address (must be a verified send-as alias)"),
|
|
35435
35736
|
autoFromAddressedAlias: external_exports.boolean().optional().describe("When from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address \u2014 so a reply to mail sent to an alias goes back out from that alias. Ignored when from is set."),
|
|
@@ -35452,8 +35753,9 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
|
|
|
35452
35753
|
// ../gogcli-mcp/src/tools/slides.ts
|
|
35453
35754
|
function registerSlidesTools(server) {
|
|
35454
35755
|
server.registerTool("gog_slides_export", {
|
|
35455
|
-
description: "Export a Google Slides presentation to a local file (pdf or pptx).",
|
|
35456
|
-
|
|
35756
|
+
description: "Export a Google Slides presentation to a local file (pdf or pptx). The out path must be inside the server's GOG_FILE_ROOTS directories.",
|
|
35757
|
+
// Writes a file on the gog host and can overwrite one: not read-only.
|
|
35758
|
+
annotations: { readOnlyHint: false, destructiveHint: true },
|
|
35457
35759
|
inputSchema: external_exports.object({
|
|
35458
35760
|
presentationId: external_exports.string().describe("Presentation ID"),
|
|
35459
35761
|
out: external_exports.string().optional().describe("Output file path"),
|
|
@@ -35462,7 +35764,8 @@ function registerSlidesTools(server) {
|
|
|
35462
35764
|
account: accountParam
|
|
35463
35765
|
})
|
|
35464
35766
|
}, async ({ presentationId, out, format, overwrite, account }) => {
|
|
35465
|
-
|
|
35767
|
+
if (out) confinePath(out, "out");
|
|
35768
|
+
const args = ["slides", "export", pos(presentationId)];
|
|
35466
35769
|
if (out) args.push(`--out=${out}`);
|
|
35467
35770
|
if (format) args.push(`--format=${format}`);
|
|
35468
35771
|
if (overwrite) args.push("--overwrite");
|
|
@@ -35476,7 +35779,7 @@ function registerSlidesTools(server) {
|
|
|
35476
35779
|
account: accountParam
|
|
35477
35780
|
})
|
|
35478
35781
|
}, async ({ presentationId, account }) => {
|
|
35479
|
-
return runOrDiagnose(["slides", "info", presentationId], { account });
|
|
35782
|
+
return runOrDiagnose(["slides", "info", pos(presentationId)], { account });
|
|
35480
35783
|
});
|
|
35481
35784
|
server.registerTool("gog_slides_create", {
|
|
35482
35785
|
description: "Create a new Google Slides presentation, optionally in a folder or copying from a template.",
|
|
@@ -35488,7 +35791,7 @@ function registerSlidesTools(server) {
|
|
|
35488
35791
|
account: accountParam
|
|
35489
35792
|
})
|
|
35490
35793
|
}, async ({ title, parent, template, account }) => {
|
|
35491
|
-
const args = ["slides", "create", title];
|
|
35794
|
+
const args = ["slides", "create", pos(title)];
|
|
35492
35795
|
if (parent) args.push(`--parent=${parent}`);
|
|
35493
35796
|
if (template) args.push(`--template=${template}`);
|
|
35494
35797
|
return runOrDiagnose(args, { account });
|
|
@@ -35503,7 +35806,7 @@ function registerSlidesTools(server) {
|
|
|
35503
35806
|
account: accountParam
|
|
35504
35807
|
})
|
|
35505
35808
|
}, async ({ presentationId, title, parent, account }) => {
|
|
35506
|
-
const args = ["slides", "copy", presentationId, title];
|
|
35809
|
+
const args = ["slides", "copy", pos(presentationId), pos(title)];
|
|
35507
35810
|
if (parent) args.push(`--parent=${parent}`);
|
|
35508
35811
|
return runOrDiagnose(args, { account });
|
|
35509
35812
|
});
|
|
@@ -35515,7 +35818,7 @@ function registerSlidesTools(server) {
|
|
|
35515
35818
|
account: accountParam
|
|
35516
35819
|
})
|
|
35517
35820
|
}, async ({ presentationId, account }) => {
|
|
35518
|
-
return runOrDiagnose(["slides", "list-slides", presentationId], { account });
|
|
35821
|
+
return runOrDiagnose(["slides", "list-slides", pos(presentationId)], { account });
|
|
35519
35822
|
});
|
|
35520
35823
|
server.registerTool("gog_slides_read_slide", {
|
|
35521
35824
|
description: "Read the content of a slide (text, shapes, speaker notes). Set detail=true to also include normalized element geometry, styled text runs, paragraphs, table-cell content, and image source URLs.",
|
|
@@ -35527,18 +35830,18 @@ function registerSlidesTools(server) {
|
|
|
35527
35830
|
account: accountParam
|
|
35528
35831
|
})
|
|
35529
35832
|
}, async ({ presentationId, slideId, detail, account }) => {
|
|
35530
|
-
const args = ["slides", "read-slide", presentationId, slideId];
|
|
35833
|
+
const args = ["slides", "read-slide", pos(presentationId), pos(slideId)];
|
|
35531
35834
|
if (detail) args.push("--detail");
|
|
35532
35835
|
return runOrDiagnose(args, { account });
|
|
35533
35836
|
});
|
|
35534
|
-
registerRunTool(server, { service: "slides", examples: '"
|
|
35837
|
+
registerRunTool(server, { service: "slides", examples: '"delete-slide", "update-notes"' });
|
|
35535
35838
|
}
|
|
35536
35839
|
|
|
35537
35840
|
// ../gogcli-mcp/src/server.ts
|
|
35538
|
-
var VERSION = true ? "4.
|
|
35841
|
+
var VERSION = true ? "4.3.0" : "0.0.0";
|
|
35539
35842
|
|
|
35540
35843
|
// ../gogcli-mcp/src/bootstrap-auth.ts
|
|
35541
|
-
import { join as
|
|
35844
|
+
import { join as join5 } from "node:path";
|
|
35542
35845
|
var AUTH_BOOTSTRAP_MARKER = "auth-bootstrap.sha256";
|
|
35543
35846
|
var VARS = ["GOG_CLIENT_ID", "GOG_CLIENT_SECRET", "GOG_REFRESH_TOKEN", "GOG_ACCOUNT"];
|
|
35544
35847
|
var log = (line) => {
|
|
@@ -35575,8 +35878,8 @@ async function bootstrapGogAuth(env = process.env, options = {}) {
|
|
|
35575
35878
|
const { createHash } = await import("node:crypto");
|
|
35576
35879
|
const { mkdir, readFile, writeFile, chmod } = await import("node:fs/promises");
|
|
35577
35880
|
const home = options.home ?? (await import("node:os")).homedir();
|
|
35578
|
-
const dir =
|
|
35579
|
-
const marker =
|
|
35881
|
+
const dir = join5(home, ".gogcli-mcp");
|
|
35882
|
+
const marker = join5(dir, AUTH_BOOTSTRAP_MARKER);
|
|
35580
35883
|
const fingerprint = createHash("sha256").update(values.join("\0")).digest("hex");
|
|
35581
35884
|
const previous = await readFile(marker, "utf8").catch(() => void 0);
|
|
35582
35885
|
if (previous === fingerprint && await accountListed(account, spawner)) return "present";
|
|
@@ -35623,7 +35926,8 @@ function registerExtraSlidesTools(server) {
|
|
|
35623
35926
|
account: accountParam
|
|
35624
35927
|
})
|
|
35625
35928
|
}, async ({ title, content, contentFile, parent, debug, account }) => {
|
|
35626
|
-
|
|
35929
|
+
if (contentFile) confinePath(contentFile, "contentFile");
|
|
35930
|
+
const args = ["slides", "create-from-markdown", pos(title)];
|
|
35627
35931
|
if (content) args.push(payloadArg("content", "content-file", content, "md"));
|
|
35628
35932
|
if (contentFile) args.push(`--content-file=${contentFile}`);
|
|
35629
35933
|
if (parent) args.push(`--parent=${parent}`);
|
|
@@ -35643,7 +35947,8 @@ function registerExtraSlidesTools(server) {
|
|
|
35643
35947
|
account: accountParam
|
|
35644
35948
|
})
|
|
35645
35949
|
}, async ({ templateId, title, replacements, replacementsFile, parent, exact, account }) => {
|
|
35646
|
-
|
|
35950
|
+
if (replacementsFile) confinePath(replacementsFile, "replacementsFile");
|
|
35951
|
+
const args = ["slides", "create-from-template", pos(templateId), pos(title)];
|
|
35647
35952
|
if (replacements) {
|
|
35648
35953
|
for (const [k, v] of Object.entries(replacements)) {
|
|
35649
35954
|
args.push(`--replace=${k}=${v}`);
|
|
@@ -35666,7 +35971,9 @@ function registerExtraSlidesTools(server) {
|
|
|
35666
35971
|
account: accountParam
|
|
35667
35972
|
})
|
|
35668
35973
|
}, async ({ presentationId, image, notes, notesFile, before, account }) => {
|
|
35669
|
-
|
|
35974
|
+
confinePath(image, "image");
|
|
35975
|
+
if (notesFile) confinePath(notesFile, "notesFile");
|
|
35976
|
+
const args = ["slides", "add-slide", pos(presentationId), pos(image)];
|
|
35670
35977
|
if (notes) args.push(payloadArg("notes", "notes-file", notes));
|
|
35671
35978
|
if (notesFile) args.push(`--notes-file=${notesFile}`);
|
|
35672
35979
|
if (before) args.push(`--before=${before}`);
|
|
@@ -35688,8 +35995,9 @@ function registerExtraSlidesTools(server) {
|
|
|
35688
35995
|
account: accountParam
|
|
35689
35996
|
})
|
|
35690
35997
|
}, async ({ presentationId, slideId, image, url: url2, width, height, x, y, unit, account }) => {
|
|
35691
|
-
|
|
35692
|
-
|
|
35998
|
+
if (image) confinePath(image, "image");
|
|
35999
|
+
const args = ["slides", "insert-image", pos(presentationId), pos(slideId)];
|
|
36000
|
+
if (image) args.push(pos(image));
|
|
35693
36001
|
args.push(`--width=${width}`);
|
|
35694
36002
|
if (url2) args.push(`--url=${url2}`);
|
|
35695
36003
|
if (height !== void 0) args.push(`--height=${height}`);
|
|
@@ -35707,7 +36015,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35707
36015
|
account: accountParam
|
|
35708
36016
|
})
|
|
35709
36017
|
}, async ({ presentationId, slideId, account }) => {
|
|
35710
|
-
return runOrDiagnose(["slides", "delete-slide", presentationId, slideId, "--force"], { account });
|
|
36018
|
+
return runOrDiagnose(["slides", "delete-slide", pos(presentationId), pos(slideId), "--force"], { account });
|
|
35711
36019
|
});
|
|
35712
36020
|
server.registerTool("gog_slides_skip_slide", {
|
|
35713
36021
|
description: "Skip a slide during presentation \u2014 it stays in the deck at its current position but is not shown when presenting (and is left out of a PDF export). Use this instead of gog_slides_delete_slide when a slide should be omitted from a talk without losing it. Reverse with gog_slides_unskip_slide; gog_slides_list_slides reports which slides are skipped.",
|
|
@@ -35718,7 +36026,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35718
36026
|
account: accountParam
|
|
35719
36027
|
})
|
|
35720
36028
|
}, async ({ presentationId, slideId, account }) => {
|
|
35721
|
-
return runOrDiagnose(["slides", "skip-slide", presentationId, slideId], { account });
|
|
36029
|
+
return runOrDiagnose(["slides", "skip-slide", pos(presentationId), pos(slideId)], { account });
|
|
35722
36030
|
});
|
|
35723
36031
|
server.registerTool("gog_slides_unskip_slide", {
|
|
35724
36032
|
description: "Include a previously skipped slide again when the deck is presented. Safe to call on a slide that was never skipped.",
|
|
@@ -35729,7 +36037,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35729
36037
|
account: accountParam
|
|
35730
36038
|
})
|
|
35731
36039
|
}, async ({ presentationId, slideId, account }) => {
|
|
35732
|
-
return runOrDiagnose(["slides", "unskip-slide", presentationId, slideId], { account });
|
|
36040
|
+
return runOrDiagnose(["slides", "unskip-slide", pos(presentationId), pos(slideId)], { account });
|
|
35733
36041
|
});
|
|
35734
36042
|
server.registerTool("gog_slides_update_notes", {
|
|
35735
36043
|
description: "Update the speaker notes on a slide (inline text or from a file).",
|
|
@@ -35742,7 +36050,8 @@ function registerExtraSlidesTools(server) {
|
|
|
35742
36050
|
account: accountParam
|
|
35743
36051
|
})
|
|
35744
36052
|
}, async ({ presentationId, slideId, notes, notesFile, account }) => {
|
|
35745
|
-
|
|
36053
|
+
if (notesFile) confinePath(notesFile, "notesFile");
|
|
36054
|
+
const args = ["slides", "update-notes", pos(presentationId), pos(slideId)];
|
|
35746
36055
|
if (notes) args.push(payloadArg("notes", "notes-file", notes));
|
|
35747
36056
|
if (notesFile) args.push(`--notes-file=${notesFile}`);
|
|
35748
36057
|
return runOrDiagnose(args, { account });
|
|
@@ -35760,8 +36069,10 @@ function registerExtraSlidesTools(server) {
|
|
|
35760
36069
|
account: accountParam
|
|
35761
36070
|
})
|
|
35762
36071
|
}, async ({ presentationId, slideId, image, url: url2, notes, notesFile, account }) => {
|
|
35763
|
-
|
|
35764
|
-
if (
|
|
36072
|
+
if (image) confinePath(image, "image");
|
|
36073
|
+
if (notesFile) confinePath(notesFile, "notesFile");
|
|
36074
|
+
const args = ["slides", "replace-slide", pos(presentationId), pos(slideId)];
|
|
36075
|
+
if (image) args.push(pos(image));
|
|
35765
36076
|
if (url2) args.push(`--url=${url2}`);
|
|
35766
36077
|
if (notes) args.push(payloadArg("notes", "notes-file", notes));
|
|
35767
36078
|
if (notesFile) args.push(`--notes-file=${notesFile}`);
|
|
@@ -35776,7 +36087,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35776
36087
|
account: accountParam
|
|
35777
36088
|
})
|
|
35778
36089
|
}, async ({ presentationId, pretty, account }) => {
|
|
35779
|
-
const args = ["slides", "raw", presentationId];
|
|
36090
|
+
const args = ["slides", "raw", pos(presentationId)];
|
|
35780
36091
|
if (pretty) args.push("--pretty");
|
|
35781
36092
|
return runOrDiagnose(args, { account, lossless: true });
|
|
35782
36093
|
});
|
|
@@ -35794,7 +36105,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35794
36105
|
account: accountParam
|
|
35795
36106
|
})
|
|
35796
36107
|
}, async ({ presentationId, text, page, occurrence, all, matchCase, failEmpty, account }) => {
|
|
35797
|
-
const args = ["slides", "locate", presentationId, text];
|
|
36108
|
+
const args = ["slides", "locate", pos(presentationId), pos(text)];
|
|
35798
36109
|
if (page) args.push(`--page=${page}`);
|
|
35799
36110
|
if (occurrence !== void 0) args.push(`--occurrence=${occurrence}`);
|
|
35800
36111
|
if (all) args.push("--all");
|
|
@@ -35804,7 +36115,8 @@ function registerExtraSlidesTools(server) {
|
|
|
35804
36115
|
});
|
|
35805
36116
|
server.registerTool("gog_slides_thumbnail", {
|
|
35806
36117
|
description: "Get or download a rendered thumbnail image for a single slide.",
|
|
35807
|
-
|
|
36118
|
+
// Writes a file on the gog host and can overwrite one: not read-only (audit SEC-4).
|
|
36119
|
+
annotations: { readOnlyHint: false, destructiveHint: true },
|
|
35808
36120
|
inputSchema: external_exports.object({
|
|
35809
36121
|
presentationId: external_exports.string().describe("Presentation ID"),
|
|
35810
36122
|
slideId: external_exports.string().describe("Slide object ID"),
|
|
@@ -35815,7 +36127,8 @@ function registerExtraSlidesTools(server) {
|
|
|
35815
36127
|
account: accountParam
|
|
35816
36128
|
})
|
|
35817
36129
|
}, async ({ presentationId, slideId, format, size, out, overwrite, account }) => {
|
|
35818
|
-
|
|
36130
|
+
if (out) confinePath(out, "out");
|
|
36131
|
+
const args = ["slides", "thumbnail", pos(presentationId), pos(slideId)];
|
|
35819
36132
|
if (format) args.push(`--format=${format}`);
|
|
35820
36133
|
if (size) args.push(`--size=${size}`);
|
|
35821
36134
|
if (out) args.push(`--out=${out}`);
|
|
@@ -35833,7 +36146,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35833
36146
|
account: accountParam
|
|
35834
36147
|
})
|
|
35835
36148
|
}, async ({ presentationId, layout, layoutId, index, account }) => {
|
|
35836
|
-
const args = ["slides", "new-slide", presentationId];
|
|
36149
|
+
const args = ["slides", "new-slide", pos(presentationId)];
|
|
35837
36150
|
if (layout) args.push(`--layout=${layout}`);
|
|
35838
36151
|
if (layoutId) args.push(`--layout-id=${layoutId}`);
|
|
35839
36152
|
if (index !== void 0) args.push(`--index=${index}`);
|
|
@@ -35849,7 +36162,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35849
36162
|
account: accountParam
|
|
35850
36163
|
})
|
|
35851
36164
|
}, async ({ presentationId, slideId, toIndex, account }) => {
|
|
35852
|
-
const args = ["slides", "duplicate-slide", presentationId, slideId];
|
|
36165
|
+
const args = ["slides", "duplicate-slide", pos(presentationId), pos(slideId)];
|
|
35853
36166
|
if (toIndex !== void 0) args.push(`--to-index=${toIndex}`);
|
|
35854
36167
|
return runOrDiagnose(args, { account });
|
|
35855
36168
|
});
|
|
@@ -35863,7 +36176,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35863
36176
|
account: accountParam
|
|
35864
36177
|
})
|
|
35865
36178
|
}, async ({ presentationId, slideId, toIndex, account }) => {
|
|
35866
|
-
return runOrDiagnose(["slides", "move-slide", presentationId, slideId, `--to-index=${toIndex}`], { account });
|
|
36179
|
+
return runOrDiagnose(["slides", "move-slide", pos(presentationId), pos(slideId), `--to-index=${toIndex}`], { account });
|
|
35867
36180
|
});
|
|
35868
36181
|
server.registerTool("gog_slides_insert_text", {
|
|
35869
36182
|
description: "Insert text into an existing page element (shape or table cell) by object ID. Target a table cell with zero-based row + col. Use replace=true to clear the element's existing text first.",
|
|
@@ -35879,7 +36192,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35879
36192
|
account: accountParam
|
|
35880
36193
|
})
|
|
35881
36194
|
}, async ({ presentationId, objectId, text, row, col, insertionIndex, replace, account }) => {
|
|
35882
|
-
const args = ["slides", "insert-text", presentationId, objectId, text];
|
|
36195
|
+
const args = ["slides", "insert-text", pos(presentationId), pos(objectId), pos(text)];
|
|
35883
36196
|
if (row !== void 0) args.push(`--row=${row}`);
|
|
35884
36197
|
if (col !== void 0) args.push(`--col=${col}`);
|
|
35885
36198
|
if (insertionIndex !== void 0) args.push(`--insertion-index=${insertionIndex}`);
|
|
@@ -35905,7 +36218,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35905
36218
|
account: accountParam
|
|
35906
36219
|
})
|
|
35907
36220
|
}, async ({ presentationId, objectId, range, font, size, textColor, bold, noBold, italic, noItalic, underline, noUnderline, account }) => {
|
|
35908
|
-
const args = ["slides", "style-text", presentationId, objectId, `--range=${range}`];
|
|
36221
|
+
const args = ["slides", "style-text", pos(presentationId), pos(objectId), `--range=${range}`];
|
|
35909
36222
|
if (font) args.push(`--font=${font}`);
|
|
35910
36223
|
if (size !== void 0) args.push(`--size=${size}`);
|
|
35911
36224
|
if (textColor) args.push(`--text-color=${textColor}`);
|
|
@@ -35929,7 +36242,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35929
36242
|
account: accountParam
|
|
35930
36243
|
})
|
|
35931
36244
|
}, async ({ presentationId, objectId, range, url: url2, clear, account }) => {
|
|
35932
|
-
const args = ["slides", "link", presentationId, objectId, `--range=${range}`];
|
|
36245
|
+
const args = ["slides", "link", pos(presentationId), pos(objectId), `--range=${range}`];
|
|
35933
36246
|
if (url2) args.push(`--url=${url2}`);
|
|
35934
36247
|
if (clear) args.push("--clear");
|
|
35935
36248
|
return runOrDiagnose(args, { account });
|
|
@@ -35947,7 +36260,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35947
36260
|
account: accountParam
|
|
35948
36261
|
})
|
|
35949
36262
|
}, async ({ presentationId, objectId, range, on, off, preset, account }) => {
|
|
35950
|
-
const args = ["slides", "bullets", presentationId, objectId, `--range=${range}`];
|
|
36263
|
+
const args = ["slides", "bullets", pos(presentationId), pos(objectId), `--range=${range}`];
|
|
35951
36264
|
if (on) args.push("--on");
|
|
35952
36265
|
if (off) args.push("--off");
|
|
35953
36266
|
if (preset) args.push(`--preset=${preset}`);
|
|
@@ -35967,7 +36280,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35967
36280
|
account: accountParam
|
|
35968
36281
|
})
|
|
35969
36282
|
}, async ({ presentationId, find, replacement, object: object2, pages, all, matchCase, account }) => {
|
|
35970
|
-
const args = ["slides", "replace-text", presentationId, find, replacement];
|
|
36283
|
+
const args = ["slides", "replace-text", pos(presentationId), pos(find), pos(replacement)];
|
|
35971
36284
|
if (object2) args.push(`--object=${object2}`);
|
|
35972
36285
|
if (pages) for (const p of pages) args.push(`--page=${p}`);
|
|
35973
36286
|
if (all) args.push("--all");
|
|
@@ -35990,7 +36303,7 @@ function registerExtraSlidesTools(server) {
|
|
|
35990
36303
|
account: accountParam
|
|
35991
36304
|
})
|
|
35992
36305
|
}, async ({ presentationId, slideId, type, x, y, width, height, unit, objectId, account }) => {
|
|
35993
|
-
const args = ["slides", "element", "create-shape", presentationId, slideId];
|
|
36306
|
+
const args = ["slides", "element", "create-shape", pos(presentationId), pos(slideId)];
|
|
35994
36307
|
if (type) args.push(`--type=${type}`);
|
|
35995
36308
|
if (x !== void 0) args.push(`--x=${x}`);
|
|
35996
36309
|
if (y !== void 0) args.push(`--y=${y}`);
|
|
@@ -36016,7 +36329,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36016
36329
|
account: accountParam
|
|
36017
36330
|
})
|
|
36018
36331
|
}, async ({ presentationId, slideId, category, x, y, width, height, unit, objectId, account }) => {
|
|
36019
|
-
const args = ["slides", "element", "create-line", presentationId, slideId];
|
|
36332
|
+
const args = ["slides", "element", "create-line", pos(presentationId), pos(slideId)];
|
|
36020
36333
|
if (category) args.push(`--category=${category}`);
|
|
36021
36334
|
if (x !== void 0) args.push(`--x=${x}`);
|
|
36022
36335
|
if (y !== void 0) args.push(`--y=${y}`);
|
|
@@ -36042,7 +36355,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36042
36355
|
account: accountParam
|
|
36043
36356
|
})
|
|
36044
36357
|
}, async ({ presentationId, objectId, kind, fillColor, fillTransparent, outlineColor, outlineWeight, outlineDash, outlineTransparent, account }) => {
|
|
36045
|
-
const args = ["slides", "element", "style", presentationId, objectId];
|
|
36358
|
+
const args = ["slides", "element", "style", pos(presentationId), pos(objectId)];
|
|
36046
36359
|
if (kind) args.push(`--kind=${kind}`);
|
|
36047
36360
|
if (fillColor) args.push(`--fill-color=${fillColor}`);
|
|
36048
36361
|
if (fillTransparent) args.push("--fill-transparent");
|
|
@@ -36070,7 +36383,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36070
36383
|
account: accountParam
|
|
36071
36384
|
})
|
|
36072
36385
|
}, async ({ presentationId, objectId, translateX, translateY, scaleX, scaleY, shearX, shearY, rotate, applyMode, unit, account }) => {
|
|
36073
|
-
const args = ["slides", "element", "transform", presentationId, objectId];
|
|
36386
|
+
const args = ["slides", "element", "transform", pos(presentationId), pos(objectId)];
|
|
36074
36387
|
if (translateX !== void 0) args.push(`--translate-x=${translateX}`);
|
|
36075
36388
|
if (translateY !== void 0) args.push(`--translate-y=${translateY}`);
|
|
36076
36389
|
if (scaleX !== void 0) args.push(`--scale-x=${scaleX}`);
|
|
@@ -36092,7 +36405,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36092
36405
|
account: accountParam
|
|
36093
36406
|
})
|
|
36094
36407
|
}, async ({ presentationId, objectId, operation, account }) => {
|
|
36095
|
-
return runOrDiagnose(["slides", "element", "z-order", presentationId, objectId, `--operation=${operation}`], { account });
|
|
36408
|
+
return runOrDiagnose(["slides", "element", "z-order", pos(presentationId), pos(objectId), `--operation=${operation}`], { account });
|
|
36096
36409
|
});
|
|
36097
36410
|
server.registerTool("gog_slides_element_group", {
|
|
36098
36411
|
description: "Group two or more page elements into a single group.",
|
|
@@ -36104,7 +36417,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36104
36417
|
account: accountParam
|
|
36105
36418
|
})
|
|
36106
36419
|
}, async ({ presentationId, objectIds, groupId, account }) => {
|
|
36107
|
-
const args = ["slides", "element", "group", presentationId, ...objectIds];
|
|
36420
|
+
const args = ["slides", "element", "group", pos(presentationId), ...objectIds.map(pos)];
|
|
36108
36421
|
if (groupId) args.push(`--group-id=${groupId}`);
|
|
36109
36422
|
return runOrDiagnose(args, { account });
|
|
36110
36423
|
});
|
|
@@ -36117,7 +36430,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36117
36430
|
account: accountParam
|
|
36118
36431
|
})
|
|
36119
36432
|
}, async ({ presentationId, groupIds, account }) => {
|
|
36120
|
-
return runOrDiagnose(["slides", "element", "ungroup", presentationId, ...groupIds], { account });
|
|
36433
|
+
return runOrDiagnose(["slides", "element", "ungroup", pos(presentationId), ...groupIds.map(pos)], { account });
|
|
36121
36434
|
});
|
|
36122
36435
|
server.registerTool("gog_slides_element_alt_text", {
|
|
36123
36436
|
description: "Set or clear a page element's accessibility title and/or description. Pass an empty string to clear a field.",
|
|
@@ -36130,7 +36443,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36130
36443
|
account: accountParam
|
|
36131
36444
|
})
|
|
36132
36445
|
}, async ({ presentationId, objectId, title, description, account }) => {
|
|
36133
|
-
const args = ["slides", "element", "alt-text", presentationId, objectId];
|
|
36446
|
+
const args = ["slides", "element", "alt-text", pos(presentationId), pos(objectId)];
|
|
36134
36447
|
if (title !== void 0) args.push(`--title=${title}`);
|
|
36135
36448
|
if (description !== void 0) args.push(`--description=${description}`);
|
|
36136
36449
|
return runOrDiagnose(args, { account });
|
|
@@ -36144,7 +36457,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36144
36457
|
account: accountParam
|
|
36145
36458
|
})
|
|
36146
36459
|
}, async ({ presentationId, objectId, account }) => {
|
|
36147
|
-
return runOrDiagnose(["slides", "element", "delete", presentationId, objectId, "--force"], { account });
|
|
36460
|
+
return runOrDiagnose(["slides", "element", "delete", pos(presentationId), pos(objectId), "--force"], { account });
|
|
36148
36461
|
});
|
|
36149
36462
|
server.registerTool("gog_slides_table_create", {
|
|
36150
36463
|
description: "Create an auto-sized native table on a slide with the given row and column counts.",
|
|
@@ -36158,7 +36471,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36158
36471
|
account: accountParam
|
|
36159
36472
|
})
|
|
36160
36473
|
}, async ({ presentationId, slideId, rows, cols, objectId, account }) => {
|
|
36161
|
-
const args = ["slides", "table", "create", presentationId, slideId, `--rows=${rows}`, `--cols=${cols}`];
|
|
36474
|
+
const args = ["slides", "table", "create", pos(presentationId), pos(slideId), `--rows=${rows}`, `--cols=${cols}`];
|
|
36162
36475
|
if (objectId) args.push(`--object-id=${objectId}`);
|
|
36163
36476
|
return runOrDiagnose(args, { account });
|
|
36164
36477
|
});
|
|
@@ -36186,7 +36499,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36186
36499
|
account: accountParam
|
|
36187
36500
|
})
|
|
36188
36501
|
}, async ({ presentationId, tableObjectId, row, col, range, fillColor, fillTransparent, contentAlign, font, size, textColor, bold, noBold, italic, noItalic, underline, noUnderline, account }) => {
|
|
36189
|
-
const args = ["slides", "table", "cell", "style", presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
36502
|
+
const args = ["slides", "table", "cell", "style", pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
36190
36503
|
if (range) args.push(`--range=${range}`);
|
|
36191
36504
|
if (fillColor) args.push(`--fill-color=${fillColor}`);
|
|
36192
36505
|
if (fillTransparent) args.push("--fill-transparent");
|
|
@@ -36220,7 +36533,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36220
36533
|
account: accountParam
|
|
36221
36534
|
})
|
|
36222
36535
|
}, async ({ presentationId, tableObjectId, row, col, rowSpan, colSpan, position, borderColor, weight, dash, transparent, account }) => {
|
|
36223
|
-
const args = ["slides", "table", "border", "style", presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
36536
|
+
const args = ["slides", "table", "border", "style", pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
36224
36537
|
if (rowSpan !== void 0) args.push(`--row-span=${rowSpan}`);
|
|
36225
36538
|
if (colSpan !== void 0) args.push(`--col-span=${colSpan}`);
|
|
36226
36539
|
if (position) args.push(`--position=${position}`);
|
|
@@ -36242,7 +36555,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36242
36555
|
account: accountParam
|
|
36243
36556
|
})
|
|
36244
36557
|
}, async ({ presentationId, tableObjectId, col, count, right, account }) => {
|
|
36245
|
-
const args = ["slides", "table", "column", "insert", presentationId, tableObjectId, `--col=${col}`];
|
|
36558
|
+
const args = ["slides", "table", "column", "insert", pos(presentationId), pos(tableObjectId), `--col=${col}`];
|
|
36246
36559
|
if (count !== void 0) args.push(`--count=${count}`);
|
|
36247
36560
|
if (right) args.push("--right");
|
|
36248
36561
|
return runOrDiagnose(args, { account });
|
|
@@ -36257,7 +36570,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36257
36570
|
account: accountParam
|
|
36258
36571
|
})
|
|
36259
36572
|
}, async ({ presentationId, tableObjectId, col, account }) => {
|
|
36260
|
-
return runOrDiagnose(["slides", "table", "column", "delete", presentationId, tableObjectId, `--col=${col}`, "--force"], { account });
|
|
36573
|
+
return runOrDiagnose(["slides", "table", "column", "delete", pos(presentationId), pos(tableObjectId), `--col=${col}`, "--force"], { account });
|
|
36261
36574
|
});
|
|
36262
36575
|
server.registerTool("gog_slides_table_column_size", {
|
|
36263
36576
|
description: "Set the width of a zero-based table column.",
|
|
@@ -36270,7 +36583,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36270
36583
|
account: accountParam
|
|
36271
36584
|
})
|
|
36272
36585
|
}, async ({ presentationId, tableObjectId, col, width, account }) => {
|
|
36273
|
-
return runOrDiagnose(["slides", "table", "column", "size", presentationId, tableObjectId, `--col=${col}`, `--width=${width}`], { account });
|
|
36586
|
+
return runOrDiagnose(["slides", "table", "column", "size", pos(presentationId), pos(tableObjectId), `--col=${col}`, `--width=${width}`], { account });
|
|
36274
36587
|
});
|
|
36275
36588
|
server.registerTool("gog_slides_table_row_insert", {
|
|
36276
36589
|
description: "Insert one or more rows relative to a zero-based table row. Inserts above by default, or below with below=true.",
|
|
@@ -36284,7 +36597,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36284
36597
|
account: accountParam
|
|
36285
36598
|
})
|
|
36286
36599
|
}, async ({ presentationId, tableObjectId, row, count, below, account }) => {
|
|
36287
|
-
const args = ["slides", "table", "row", "insert", presentationId, tableObjectId, `--row=${row}`];
|
|
36600
|
+
const args = ["slides", "table", "row", "insert", pos(presentationId), pos(tableObjectId), `--row=${row}`];
|
|
36288
36601
|
if (count !== void 0) args.push(`--count=${count}`);
|
|
36289
36602
|
if (below) args.push("--below");
|
|
36290
36603
|
return runOrDiagnose(args, { account });
|
|
@@ -36299,7 +36612,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36299
36612
|
account: accountParam
|
|
36300
36613
|
})
|
|
36301
36614
|
}, async ({ presentationId, tableObjectId, row, account }) => {
|
|
36302
|
-
return runOrDiagnose(["slides", "table", "row", "delete", presentationId, tableObjectId, `--row=${row}`, "--force"], { account });
|
|
36615
|
+
return runOrDiagnose(["slides", "table", "row", "delete", pos(presentationId), pos(tableObjectId), `--row=${row}`, "--force"], { account });
|
|
36303
36616
|
});
|
|
36304
36617
|
server.registerTool("gog_slides_table_row_size", {
|
|
36305
36618
|
description: "Set the minimum height of a zero-based table row.",
|
|
@@ -36312,7 +36625,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36312
36625
|
account: accountParam
|
|
36313
36626
|
})
|
|
36314
36627
|
}, async ({ presentationId, tableObjectId, row, height, account }) => {
|
|
36315
|
-
return runOrDiagnose(["slides", "table", "row", "size", presentationId, tableObjectId, `--row=${row}`, `--height=${height}`], { account });
|
|
36628
|
+
return runOrDiagnose(["slides", "table", "row", "size", pos(presentationId), pos(tableObjectId), `--row=${row}`, `--height=${height}`], { account });
|
|
36316
36629
|
});
|
|
36317
36630
|
server.registerTool("gog_slides_table_merge", {
|
|
36318
36631
|
description: "Merge a rectangular table cell range starting at a zero-based cell. Content of non-anchor cells is absorbed by the merge; use gog_slides_table_unmerge to split back.",
|
|
@@ -36327,7 +36640,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36327
36640
|
account: accountParam
|
|
36328
36641
|
})
|
|
36329
36642
|
}, async ({ presentationId, tableObjectId, row, col, rowSpan, colSpan, account }) => {
|
|
36330
|
-
const args = ["slides", "table", "merge", presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
36643
|
+
const args = ["slides", "table", "merge", pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
36331
36644
|
if (rowSpan !== void 0) args.push(`--row-span=${rowSpan}`);
|
|
36332
36645
|
if (colSpan !== void 0) args.push(`--col-span=${colSpan}`);
|
|
36333
36646
|
return runOrDiagnose(args, { account });
|
|
@@ -36345,7 +36658,7 @@ function registerExtraSlidesTools(server) {
|
|
|
36345
36658
|
account: accountParam
|
|
36346
36659
|
})
|
|
36347
36660
|
}, async ({ presentationId, tableObjectId, row, col, rowSpan, colSpan, account }) => {
|
|
36348
|
-
const args = ["slides", "table", "unmerge", presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
36661
|
+
const args = ["slides", "table", "unmerge", pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
36349
36662
|
if (rowSpan !== void 0) args.push(`--row-span=${rowSpan}`);
|
|
36350
36663
|
if (colSpan !== void 0) args.push(`--col-span=${colSpan}`);
|
|
36351
36664
|
return runOrDiagnose(args, { account });
|