gogcli-mcp-contacts 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +199 -197
- package/manifest.json +1 -1
- package/mint.yaml +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33896,202 +33896,6 @@ var pageSchema = {
|
|
|
33896
33896
|
|
|
33897
33897
|
// ../gogcli-mcp/src/runner.ts
|
|
33898
33898
|
import { delimiter, join } from "node:path";
|
|
33899
|
-
function isGogFileArg(arg) {
|
|
33900
|
-
return typeof arg !== "string";
|
|
33901
|
-
}
|
|
33902
|
-
var TIMEOUT_MS = 3e4;
|
|
33903
|
-
function readonlyEnvEnabled() {
|
|
33904
|
-
return readEnvVar("GOG_READONLY") !== void 0 && parseBoolEnv("GOG_READONLY", { default: true });
|
|
33905
|
-
}
|
|
33906
|
-
function sanitizedEnv() {
|
|
33907
|
-
const result = {};
|
|
33908
|
-
for (const [key, value] of Object.entries(process.env)) {
|
|
33909
|
-
if (key === "GOG_ACCESS_TOKEN") continue;
|
|
33910
|
-
if (key === "GOOGLE_APPLICATION_CREDENTIALS") continue;
|
|
33911
|
-
if (/(_TOKEN|_SECRET|_KEY|_CREDENTIALS)$/.test(key)) continue;
|
|
33912
|
-
result[key] = value;
|
|
33913
|
-
}
|
|
33914
|
-
return result;
|
|
33915
|
-
}
|
|
33916
|
-
var TOKEN_LEFT_BOUNDARY = "(?<![A-Za-z0-9+/])";
|
|
33917
|
-
var GOOGLE_TOKEN_PATTERNS = [
|
|
33918
|
-
new RegExp(`${TOKEN_LEFT_BOUNDARY}ya29\\.[A-Za-z0-9._\\-]+`, "g"),
|
|
33919
|
-
// OAuth2 access tokens
|
|
33920
|
-
new RegExp(`${TOKEN_LEFT_BOUNDARY}1//[A-Za-z0-9._\\-]+`, "g")
|
|
33921
|
-
// OAuth2 refresh tokens
|
|
33922
|
-
];
|
|
33923
|
-
function redactGoogleTokens(text) {
|
|
33924
|
-
let redacted = text;
|
|
33925
|
-
for (const re of GOOGLE_TOKEN_PATTERNS) {
|
|
33926
|
-
redacted = redacted.replace(re, "[REDACTED]");
|
|
33927
|
-
}
|
|
33928
|
-
return redacted;
|
|
33929
|
-
}
|
|
33930
|
-
function redactSecrets2(text) {
|
|
33931
|
-
return redactGoogleTokens(redactSecrets(text));
|
|
33932
|
-
}
|
|
33933
|
-
var OPAQUE_FIELD_VALUE = "[A-Za-z0-9+/_-]{16,}={0,2}";
|
|
33934
|
-
var opaquePlaceholder = (i) => `\0gogOpaque${i}\0`;
|
|
33935
|
-
function redactPreservingOpaqueFields(text, fields, redact) {
|
|
33936
|
-
const lifted = [];
|
|
33937
|
-
let staged = text;
|
|
33938
|
-
for (const field of fields) {
|
|
33939
|
-
const escaped = field.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
33940
|
-
const re = new RegExp(`("${escaped}"\\s*:\\s*")(${OPAQUE_FIELD_VALUE})(")`, "g");
|
|
33941
|
-
staged = staged.replace(re, (_m, open2, value, close) => {
|
|
33942
|
-
lifted.push(value);
|
|
33943
|
-
return `${open2}${opaquePlaceholder(lifted.length - 1)}${close}`;
|
|
33944
|
-
});
|
|
33945
|
-
}
|
|
33946
|
-
if (lifted.length === 0) return redact(text);
|
|
33947
|
-
let redacted = redact(staged);
|
|
33948
|
-
lifted.forEach((value, i) => {
|
|
33949
|
-
redacted = redacted.split(opaquePlaceholder(i)).join(value);
|
|
33950
|
-
});
|
|
33951
|
-
return redacted;
|
|
33952
|
-
}
|
|
33953
|
-
function augmentedPath() {
|
|
33954
|
-
const home = process.env.HOME;
|
|
33955
|
-
const candidates = [
|
|
33956
|
-
process.env.PATH ?? "",
|
|
33957
|
-
"/opt/homebrew/bin",
|
|
33958
|
-
"/usr/local/bin",
|
|
33959
|
-
home ? `${home}/.local/bin` : "",
|
|
33960
|
-
home ? `${home}/go/bin` : ""
|
|
33961
|
-
];
|
|
33962
|
-
const seen = /* @__PURE__ */ new Set();
|
|
33963
|
-
const parts = [];
|
|
33964
|
-
for (const c of candidates) {
|
|
33965
|
-
if (!c) continue;
|
|
33966
|
-
for (const dir of c.split(delimiter)) {
|
|
33967
|
-
if (!dir || seen.has(dir)) continue;
|
|
33968
|
-
seen.add(dir);
|
|
33969
|
-
parts.push(dir);
|
|
33970
|
-
}
|
|
33971
|
-
}
|
|
33972
|
-
return parts.join(delimiter);
|
|
33973
|
-
}
|
|
33974
|
-
function formatTimeout(ms) {
|
|
33975
|
-
const seconds = Math.round(ms / 1e3);
|
|
33976
|
-
if (seconds >= 60) {
|
|
33977
|
-
const minutes = Math.round(seconds / 60);
|
|
33978
|
-
return `${ms}ms (${minutes} minute${minutes !== 1 ? "s" : ""})`;
|
|
33979
|
-
}
|
|
33980
|
-
return `${ms}ms`;
|
|
33981
|
-
}
|
|
33982
|
-
async function spawnWithTempFiles(args, opts) {
|
|
33983
|
-
const { mkdtemp, mkdir, writeFile, rm } = await import("node:fs/promises");
|
|
33984
|
-
const { tmpdir } = await import("node:os");
|
|
33985
|
-
const dir = await mkdtemp(join(tmpdir(), "gogcli-mcp-"));
|
|
33986
|
-
try {
|
|
33987
|
-
const argv = [];
|
|
33988
|
-
let seq = 0;
|
|
33989
|
-
for (const arg of args) {
|
|
33990
|
-
if (!isGogFileArg(arg)) {
|
|
33991
|
-
argv.push(arg);
|
|
33992
|
-
continue;
|
|
33993
|
-
}
|
|
33994
|
-
const sub = join(dir, String(seq));
|
|
33995
|
-
seq += 1;
|
|
33996
|
-
await mkdir(sub, { recursive: true, mode: 448 });
|
|
33997
|
-
const path = join(sub, arg.filename ?? `${arg.flag}.${arg.ext ?? "txt"}`);
|
|
33998
|
-
const data = arg.encoding === "base64" ? Buffer.from(arg.contents, "base64") : Buffer.from(arg.contents, "utf8");
|
|
33999
|
-
await writeFile(path, data, { mode: 384 });
|
|
34000
|
-
argv.push(arg.positional ? path : `--${arg.flag}=${path}`);
|
|
34001
|
-
}
|
|
34002
|
-
return await spawnGog(argv, opts);
|
|
34003
|
-
} finally {
|
|
34004
|
-
await rm(dir, { recursive: true, force: true }).catch(() => {
|
|
34005
|
-
});
|
|
34006
|
-
}
|
|
34007
|
-
}
|
|
34008
|
-
function spawnExecutor(args, opts) {
|
|
34009
|
-
if (args.some(isGogFileArg)) {
|
|
34010
|
-
return spawnWithTempFiles(args, opts);
|
|
34011
|
-
}
|
|
34012
|
-
return spawnGog(args, opts);
|
|
34013
|
-
}
|
|
34014
|
-
async function spawnGog(fullArgs, opts) {
|
|
34015
|
-
const { timeout, interactive = false, spawner, binary = false } = opts;
|
|
34016
|
-
const spawn = spawner ?? (await import("node:child_process")).spawn;
|
|
34017
|
-
const effectiveTimeout = timeout ?? TIMEOUT_MS;
|
|
34018
|
-
return new Promise((resolve, reject) => {
|
|
34019
|
-
const childEnv = { ...sanitizedEnv(), PATH: augmentedPath() };
|
|
34020
|
-
const child = spawn(readEnvVar("GOG_PATH") ?? "gog", fullArgs, { env: childEnv });
|
|
34021
|
-
const stdoutChunks = [];
|
|
34022
|
-
const stderrChunks = [];
|
|
34023
|
-
let settled = false;
|
|
34024
|
-
const timer = setTimeout(() => {
|
|
34025
|
-
settled = true;
|
|
34026
|
-
child.kill();
|
|
34027
|
-
reject(new Error(`gog timed out after ${formatTimeout(effectiveTimeout)}`));
|
|
34028
|
-
}, effectiveTimeout);
|
|
34029
|
-
child.stdout.on("data", (chunk) => {
|
|
34030
|
-
stdoutChunks.push(chunk);
|
|
34031
|
-
});
|
|
34032
|
-
child.stderr.on("data", (chunk) => {
|
|
34033
|
-
stderrChunks.push(chunk);
|
|
34034
|
-
});
|
|
34035
|
-
child.on("close", (code) => {
|
|
34036
|
-
clearTimeout(timer);
|
|
34037
|
-
if (settled) return;
|
|
34038
|
-
settled = true;
|
|
34039
|
-
const stderr = Buffer.concat(stderrChunks).toString().trim();
|
|
34040
|
-
if (code === 0) {
|
|
34041
|
-
if (binary) {
|
|
34042
|
-
resolve(Buffer.concat(stdoutChunks).toString("base64"));
|
|
34043
|
-
return;
|
|
34044
|
-
}
|
|
34045
|
-
const stdout = Buffer.concat(stdoutChunks).toString();
|
|
34046
|
-
if (interactive && stderr) {
|
|
34047
|
-
resolve(stdout + "\n" + stderr);
|
|
34048
|
-
} else {
|
|
34049
|
-
resolve(stdout);
|
|
34050
|
-
}
|
|
34051
|
-
} else {
|
|
34052
|
-
reject(new Error(stderr || `gog exited with code ${code}`));
|
|
34053
|
-
}
|
|
34054
|
-
});
|
|
34055
|
-
child.on("error", (err) => {
|
|
34056
|
-
clearTimeout(timer);
|
|
34057
|
-
if (settled) return;
|
|
34058
|
-
settled = true;
|
|
34059
|
-
if (err.code === "ENOENT") {
|
|
34060
|
-
reject(new Error(
|
|
34061
|
-
"gog executable not found. Install gogcli (https://github.com/openclaw/gogcli) or set GOG_PATH in your MCP client config to the absolute binary path (run `which gog` in a terminal to find it)."
|
|
34062
|
-
));
|
|
34063
|
-
return;
|
|
34064
|
-
}
|
|
34065
|
-
reject(err);
|
|
34066
|
-
});
|
|
34067
|
-
});
|
|
34068
|
-
}
|
|
34069
|
-
function assembleArgs(args, opts) {
|
|
34070
|
-
const effectiveAccount = opts.account ?? readEnvVar("GOG_ACCOUNT");
|
|
34071
|
-
const fullArgs = ["--json", "--color=never"];
|
|
34072
|
-
if (!opts.interactive) {
|
|
34073
|
-
fullArgs.push("--no-input");
|
|
34074
|
-
}
|
|
34075
|
-
if (opts.readonly || readonlyEnvEnabled()) {
|
|
34076
|
-
fullArgs.push("--readonly");
|
|
34077
|
-
}
|
|
34078
|
-
if (effectiveAccount) {
|
|
34079
|
-
fullArgs.push("--account", effectiveAccount);
|
|
34080
|
-
}
|
|
34081
|
-
fullArgs.push(...args);
|
|
34082
|
-
return fullArgs;
|
|
34083
|
-
}
|
|
34084
|
-
async function run(args, options = {}) {
|
|
34085
|
-
const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full", opaqueFields } = options;
|
|
34086
|
-
const base = redactMode === "tokens" ? redactGoogleTokens : redactSecrets2;
|
|
34087
|
-
const redact = opaqueFields?.length ? (text) => redactPreservingOpaqueFields(text, opaqueFields, base) : base;
|
|
34088
|
-
const fullArgs = assembleArgs(args, { account, interactive, readonly: readonly2 });
|
|
34089
|
-
try {
|
|
34090
|
-
return redact(await spawnExecutor(fullArgs, { timeout, interactive, spawner }));
|
|
34091
|
-
} catch (err) {
|
|
34092
|
-
throw new Error(base(err instanceof Error ? err.message : String(err)));
|
|
34093
|
-
}
|
|
34094
|
-
}
|
|
34095
33899
|
|
|
34096
33900
|
// ../gogcli-mcp/src/timestamps.ts
|
|
34097
33901
|
var DEFAULT_DISPLAY_TZ = "America/New_York";
|
|
@@ -34292,6 +34096,204 @@ function normalizeTimestamps(text, tz = displayTimeZone(), naiveTz = naiveSource
|
|
|
34292
34096
|
return JSON.stringify(parsed, null, detectIndent(text));
|
|
34293
34097
|
}
|
|
34294
34098
|
|
|
34099
|
+
// ../gogcli-mcp/src/runner.ts
|
|
34100
|
+
function isGogFileArg(arg) {
|
|
34101
|
+
return typeof arg !== "string";
|
|
34102
|
+
}
|
|
34103
|
+
var TIMEOUT_MS = 3e4;
|
|
34104
|
+
function readonlyEnvEnabled() {
|
|
34105
|
+
return readEnvVar("GOG_READONLY") !== void 0 && parseBoolEnv("GOG_READONLY", { default: true });
|
|
34106
|
+
}
|
|
34107
|
+
function sanitizedEnv() {
|
|
34108
|
+
const result = {};
|
|
34109
|
+
for (const [key, value] of Object.entries(process.env)) {
|
|
34110
|
+
if (key === "GOG_ACCESS_TOKEN") continue;
|
|
34111
|
+
if (key === "GOOGLE_APPLICATION_CREDENTIALS") continue;
|
|
34112
|
+
if (/(_TOKEN|_SECRET|_KEY|_CREDENTIALS)$/.test(key)) continue;
|
|
34113
|
+
result[key] = value;
|
|
34114
|
+
}
|
|
34115
|
+
return result;
|
|
34116
|
+
}
|
|
34117
|
+
var TOKEN_LEFT_BOUNDARY = "(?<![A-Za-z0-9+/])";
|
|
34118
|
+
var GOOGLE_TOKEN_PATTERNS = [
|
|
34119
|
+
new RegExp(`${TOKEN_LEFT_BOUNDARY}ya29\\.[A-Za-z0-9._\\-]+`, "g"),
|
|
34120
|
+
// OAuth2 access tokens
|
|
34121
|
+
new RegExp(`${TOKEN_LEFT_BOUNDARY}1//[A-Za-z0-9._\\-]+`, "g")
|
|
34122
|
+
// OAuth2 refresh tokens
|
|
34123
|
+
];
|
|
34124
|
+
function redactGoogleTokens(text) {
|
|
34125
|
+
let redacted = text;
|
|
34126
|
+
for (const re of GOOGLE_TOKEN_PATTERNS) {
|
|
34127
|
+
redacted = redacted.replace(re, "[REDACTED]");
|
|
34128
|
+
}
|
|
34129
|
+
return redacted;
|
|
34130
|
+
}
|
|
34131
|
+
function redactSecrets2(text) {
|
|
34132
|
+
return redactGoogleTokens(redactSecrets(text));
|
|
34133
|
+
}
|
|
34134
|
+
var OPAQUE_FIELD_VALUE = "[A-Za-z0-9+/_-]{16,}={0,2}";
|
|
34135
|
+
var opaquePlaceholder = (i) => `\0gogOpaque${i}\0`;
|
|
34136
|
+
function redactPreservingOpaqueFields(text, fields, redact) {
|
|
34137
|
+
const lifted = [];
|
|
34138
|
+
let staged = text;
|
|
34139
|
+
for (const field of fields) {
|
|
34140
|
+
const escaped = field.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
34141
|
+
const re = new RegExp(`("${escaped}"\\s*:\\s*")(${OPAQUE_FIELD_VALUE})(")`, "g");
|
|
34142
|
+
staged = staged.replace(re, (_m, open2, value, close) => {
|
|
34143
|
+
lifted.push(value);
|
|
34144
|
+
return `${open2}${opaquePlaceholder(lifted.length - 1)}${close}`;
|
|
34145
|
+
});
|
|
34146
|
+
}
|
|
34147
|
+
if (lifted.length === 0) return redact(text);
|
|
34148
|
+
let redacted = redact(staged);
|
|
34149
|
+
lifted.forEach((value, i) => {
|
|
34150
|
+
redacted = redacted.split(opaquePlaceholder(i)).join(value);
|
|
34151
|
+
});
|
|
34152
|
+
return redacted;
|
|
34153
|
+
}
|
|
34154
|
+
function augmentedPath() {
|
|
34155
|
+
const home = process.env.HOME;
|
|
34156
|
+
const candidates = [
|
|
34157
|
+
process.env.PATH ?? "",
|
|
34158
|
+
"/opt/homebrew/bin",
|
|
34159
|
+
"/usr/local/bin",
|
|
34160
|
+
home ? `${home}/.local/bin` : "",
|
|
34161
|
+
home ? `${home}/go/bin` : ""
|
|
34162
|
+
];
|
|
34163
|
+
const seen = /* @__PURE__ */ new Set();
|
|
34164
|
+
const parts = [];
|
|
34165
|
+
for (const c of candidates) {
|
|
34166
|
+
if (!c) continue;
|
|
34167
|
+
for (const dir of c.split(delimiter)) {
|
|
34168
|
+
if (!dir || seen.has(dir)) continue;
|
|
34169
|
+
seen.add(dir);
|
|
34170
|
+
parts.push(dir);
|
|
34171
|
+
}
|
|
34172
|
+
}
|
|
34173
|
+
return parts.join(delimiter);
|
|
34174
|
+
}
|
|
34175
|
+
function formatTimeout(ms) {
|
|
34176
|
+
const seconds = Math.round(ms / 1e3);
|
|
34177
|
+
if (seconds >= 60) {
|
|
34178
|
+
const minutes = Math.round(seconds / 60);
|
|
34179
|
+
return `${ms}ms (${minutes} minute${minutes !== 1 ? "s" : ""})`;
|
|
34180
|
+
}
|
|
34181
|
+
return `${ms}ms`;
|
|
34182
|
+
}
|
|
34183
|
+
async function spawnWithTempFiles(args, opts) {
|
|
34184
|
+
const { mkdtemp, mkdir, writeFile, rm } = await import("node:fs/promises");
|
|
34185
|
+
const { tmpdir } = await import("node:os");
|
|
34186
|
+
const dir = await mkdtemp(join(tmpdir(), "gogcli-mcp-"));
|
|
34187
|
+
try {
|
|
34188
|
+
const argv = [];
|
|
34189
|
+
let seq = 0;
|
|
34190
|
+
for (const arg of args) {
|
|
34191
|
+
if (!isGogFileArg(arg)) {
|
|
34192
|
+
argv.push(arg);
|
|
34193
|
+
continue;
|
|
34194
|
+
}
|
|
34195
|
+
const sub = join(dir, String(seq));
|
|
34196
|
+
seq += 1;
|
|
34197
|
+
await mkdir(sub, { recursive: true, mode: 448 });
|
|
34198
|
+
const path = join(sub, arg.filename ?? `${arg.flag}.${arg.ext ?? "txt"}`);
|
|
34199
|
+
const data = arg.encoding === "base64" ? Buffer.from(arg.contents, "base64") : Buffer.from(arg.contents, "utf8");
|
|
34200
|
+
await writeFile(path, data, { mode: 384 });
|
|
34201
|
+
argv.push(arg.positional ? path : `--${arg.flag}=${path}`);
|
|
34202
|
+
}
|
|
34203
|
+
return await spawnGog(argv, opts);
|
|
34204
|
+
} finally {
|
|
34205
|
+
await rm(dir, { recursive: true, force: true }).catch(() => {
|
|
34206
|
+
});
|
|
34207
|
+
}
|
|
34208
|
+
}
|
|
34209
|
+
function spawnExecutor(args, opts) {
|
|
34210
|
+
if (args.some(isGogFileArg)) {
|
|
34211
|
+
return spawnWithTempFiles(args, opts);
|
|
34212
|
+
}
|
|
34213
|
+
return spawnGog(args, opts);
|
|
34214
|
+
}
|
|
34215
|
+
async function spawnGog(fullArgs, opts) {
|
|
34216
|
+
const { timeout, interactive = false, spawner, binary = false } = opts;
|
|
34217
|
+
const spawn = spawner ?? (await import("node:child_process")).spawn;
|
|
34218
|
+
const effectiveTimeout = timeout ?? TIMEOUT_MS;
|
|
34219
|
+
return new Promise((resolve, reject) => {
|
|
34220
|
+
const childEnv = { ...sanitizedEnv(), GOG_TIMEZONE: naiveSourceTimeZone(), PATH: augmentedPath() };
|
|
34221
|
+
const child = spawn(readEnvVar("GOG_PATH") ?? "gog", fullArgs, { env: childEnv });
|
|
34222
|
+
const stdoutChunks = [];
|
|
34223
|
+
const stderrChunks = [];
|
|
34224
|
+
let settled = false;
|
|
34225
|
+
const timer = setTimeout(() => {
|
|
34226
|
+
settled = true;
|
|
34227
|
+
child.kill();
|
|
34228
|
+
reject(new Error(`gog timed out after ${formatTimeout(effectiveTimeout)}`));
|
|
34229
|
+
}, effectiveTimeout);
|
|
34230
|
+
child.stdout.on("data", (chunk) => {
|
|
34231
|
+
stdoutChunks.push(chunk);
|
|
34232
|
+
});
|
|
34233
|
+
child.stderr.on("data", (chunk) => {
|
|
34234
|
+
stderrChunks.push(chunk);
|
|
34235
|
+
});
|
|
34236
|
+
child.on("close", (code) => {
|
|
34237
|
+
clearTimeout(timer);
|
|
34238
|
+
if (settled) return;
|
|
34239
|
+
settled = true;
|
|
34240
|
+
const stderr = Buffer.concat(stderrChunks).toString().trim();
|
|
34241
|
+
if (code === 0) {
|
|
34242
|
+
if (binary) {
|
|
34243
|
+
resolve(Buffer.concat(stdoutChunks).toString("base64"));
|
|
34244
|
+
return;
|
|
34245
|
+
}
|
|
34246
|
+
const stdout = Buffer.concat(stdoutChunks).toString();
|
|
34247
|
+
if (interactive && stderr) {
|
|
34248
|
+
resolve(stdout + "\n" + stderr);
|
|
34249
|
+
} else {
|
|
34250
|
+
resolve(stdout);
|
|
34251
|
+
}
|
|
34252
|
+
} else {
|
|
34253
|
+
reject(new Error(stderr || `gog exited with code ${code}`));
|
|
34254
|
+
}
|
|
34255
|
+
});
|
|
34256
|
+
child.on("error", (err) => {
|
|
34257
|
+
clearTimeout(timer);
|
|
34258
|
+
if (settled) return;
|
|
34259
|
+
settled = true;
|
|
34260
|
+
if (err.code === "ENOENT") {
|
|
34261
|
+
reject(new Error(
|
|
34262
|
+
"gog executable not found. Install gogcli (https://github.com/openclaw/gogcli) or set GOG_PATH in your MCP client config to the absolute binary path (run `which gog` in a terminal to find it)."
|
|
34263
|
+
));
|
|
34264
|
+
return;
|
|
34265
|
+
}
|
|
34266
|
+
reject(err);
|
|
34267
|
+
});
|
|
34268
|
+
});
|
|
34269
|
+
}
|
|
34270
|
+
function assembleArgs(args, opts) {
|
|
34271
|
+
const effectiveAccount = opts.account ?? readEnvVar("GOG_ACCOUNT");
|
|
34272
|
+
const fullArgs = ["--json", "--color=never"];
|
|
34273
|
+
if (!opts.interactive) {
|
|
34274
|
+
fullArgs.push("--no-input");
|
|
34275
|
+
}
|
|
34276
|
+
if (opts.readonly || readonlyEnvEnabled()) {
|
|
34277
|
+
fullArgs.push("--readonly");
|
|
34278
|
+
}
|
|
34279
|
+
if (effectiveAccount) {
|
|
34280
|
+
fullArgs.push("--account", effectiveAccount);
|
|
34281
|
+
}
|
|
34282
|
+
fullArgs.push(...args);
|
|
34283
|
+
return fullArgs;
|
|
34284
|
+
}
|
|
34285
|
+
async function run(args, options = {}) {
|
|
34286
|
+
const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full", opaqueFields } = options;
|
|
34287
|
+
const base = redactMode === "tokens" ? redactGoogleTokens : redactSecrets2;
|
|
34288
|
+
const redact = opaqueFields?.length ? (text) => redactPreservingOpaqueFields(text, opaqueFields, base) : base;
|
|
34289
|
+
const fullArgs = assembleArgs(args, { account, interactive, readonly: readonly2 });
|
|
34290
|
+
try {
|
|
34291
|
+
return redact(await spawnExecutor(fullArgs, { timeout, interactive, spawner }));
|
|
34292
|
+
} catch (err) {
|
|
34293
|
+
throw new Error(base(err instanceof Error ? err.message : String(err)));
|
|
34294
|
+
}
|
|
34295
|
+
}
|
|
34296
|
+
|
|
34295
34297
|
// ../gogcli-mcp/src/pagination.ts
|
|
34296
34298
|
function detectIndent2(text) {
|
|
34297
34299
|
const match = /\n(\s+)\S/.exec(text);
|
|
@@ -34742,7 +34744,7 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
|
|
|
34742
34744
|
);
|
|
34743
34745
|
|
|
34744
34746
|
// ../gogcli-mcp/src/server.ts
|
|
34745
|
-
var VERSION = true ? "4.0.
|
|
34747
|
+
var VERSION = true ? "4.0.1" : "0.0.0";
|
|
34746
34748
|
|
|
34747
34749
|
// ../gogcli-mcp/src/bootstrap-auth.ts
|
|
34748
34750
|
import { join as join2 } from "node:path";
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-contacts",
|
|
5
5
|
"display_name": "gogcli (Contacts)",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.1",
|
|
7
7
|
"description": "Extended Google Contacts for Claude via gogcli — auth + Contacts + Workspace directory (People API)",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
package/mint.yaml
CHANGED
|
@@ -73,10 +73,10 @@ env:
|
|
|
73
73
|
- name: GOG_TIMEZONE
|
|
74
74
|
required: false
|
|
75
75
|
help: >-
|
|
76
|
-
The IANA zone gog
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
America/New_York.
|
|
76
|
+
The IANA zone gog formats its naive timestamps in. The wrapper passes
|
|
77
|
+
it to every spawned gog and reads it back (naiveSourceTimeZone) to
|
|
78
|
+
re-attach the offset, so the two always agree. Unset or invalid, both
|
|
79
|
+
use DISPLAY_TZ, then America/New_York — never the host's local zone.
|
|
80
80
|
- name: DISPLAY_TZ
|
|
81
81
|
required: false
|
|
82
82
|
help: >-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-contacts",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-contacts",
|
|
5
5
|
"description": "Extended Google Contacts + People MCP server via gogcli — auth + Contacts + Workspace directory (People API)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|