gogcli-mcp-classroom 2.21.1 → 2.23.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 +119 -8
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "Extended Google Classroom for Claude via gogcli — auth + full Classroom support (courses, rosters, coursework, submissions, announcements, topics, invitations)",
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.23.0"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "gogcli (Classroom)",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "Extended Google Classroom for Claude via gogcli — auth + full Classroom support (courses, rosters, coursework, submissions, announcements, topics, invitations)",
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.23.0",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-classroom",
|
|
3
3
|
"displayName": "gogcli (Classroom)",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.23.0",
|
|
5
5
|
"description": "Extended Google Classroom for Claude via gogcli — auth + full Classroom support (courses, rosters, coursework, submissions, announcements, topics, invitations)",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
package/dist/index.js
CHANGED
|
@@ -31430,6 +31430,13 @@ var TIMESTAMP_KEYS = /* @__PURE__ */ new Set([
|
|
|
31430
31430
|
// Calendar event start/end
|
|
31431
31431
|
"internalDate",
|
|
31432
31432
|
// Gmail, epoch milliseconds (authoritative)
|
|
31433
|
+
// gog >= 0.35.0 Gmail message AND thread listings. Already offset-bearing
|
|
31434
|
+
// (RFC3339 from internalDate), so it needs no offset repair — it is
|
|
31435
|
+
// allowlisted purely to gain a Display sibling, and to be re-rendered in
|
|
31436
|
+
// DISPLAY_TZ like every other instant. Separately sourced from the sibling
|
|
31437
|
+
// `date`, which is a naive re-format of the sender's Date header; the two may
|
|
31438
|
+
// legitimately disagree. See docs/timestamps.md.
|
|
31439
|
+
"internalDateIso",
|
|
31433
31440
|
"modifiedTime",
|
|
31434
31441
|
// Drive
|
|
31435
31442
|
"createdTime",
|
|
@@ -31659,8 +31666,8 @@ function formatOneAccountHealth(a, now) {
|
|
|
31659
31666
|
const age = ageInDays(a.created_at, now);
|
|
31660
31667
|
const ageStr = age === null ? "" : ` Authorized ${age.toFixed(1)} day(s) ago.`;
|
|
31661
31668
|
if (a.valid === false) {
|
|
31662
|
-
const
|
|
31663
|
-
return `\u2717 ${email3}: NEEDS RE-AUTH \u2014 ${
|
|
31669
|
+
const cause2 = INVALID_GRANT_PATTERN.test(a.error ?? "") ? 'refresh token expired or revoked \u2014 commonly the 7-day limit on OAuth consent screens still in "Testing" mode' : a.error?.trim() || "unknown error";
|
|
31670
|
+
return `\u2717 ${email3}: NEEDS RE-AUTH \u2014 ${cause2}.${ageStr} Re-authorize with gog_auth_add (browser) or gog_auth_add_url + gog_auth_add_complete (remote/headless).`;
|
|
31664
31671
|
}
|
|
31665
31672
|
if (a.valid === true) {
|
|
31666
31673
|
let line = `\u2713 ${email3}: token valid.${ageStr}`;
|
|
@@ -31702,7 +31709,7 @@ function registerAuthToolsWith(server, defaultServices) {
|
|
|
31702
31709
|
}
|
|
31703
31710
|
});
|
|
31704
31711
|
server.registerTool("gog_auth_status", {
|
|
31705
|
-
description: "Show gogcli auth
|
|
31712
|
+
description: "Show gogcli auth CONFIGURATION: keyring backend, credential files, and auth setup. Despite the name this is not a health check \u2014 it reads local setup and does not contact Google, so it says nothing about whether an account can still authenticate. Use gog_auth_health for that.",
|
|
31706
31713
|
annotations: { readOnlyHint: true },
|
|
31707
31714
|
inputSchema: {}
|
|
31708
31715
|
}, async () => {
|
|
@@ -31713,7 +31720,7 @@ function registerAuthToolsWith(server, defaultServices) {
|
|
|
31713
31720
|
}
|
|
31714
31721
|
});
|
|
31715
31722
|
server.registerTool("gog_auth_health", {
|
|
31716
|
-
description: 'Check the LIVE health of each stored Google account. Unlike gog_auth_status (which only reports keyring/config setup), this performs a real token refresh against Google, so it detects expired or revoked (invalid_grant) refresh tokens \u2014 the account-wide sign-out that blocks every service. Reports per account: whether the token is currently valid, the mapped cause when it is not, how long ago it was authorized, and a warning as it approaches the 7-day refresh-token limit that applies to OAuth apps whose consent screen is still in "Testing" mode. Run it proactively to re-authorize on your own schedule instead of mid-task.',
|
|
31723
|
+
description: 'Check the LIVE health of each stored Google account. Unlike gog_auth_status (which only reports keyring/config setup), this performs a real token refresh against Google, so it detects expired or revoked (invalid_grant) refresh tokens \u2014 the account-wide sign-out that blocks every service. Reports per account: whether the token is currently valid, the mapped cause when it is not, how long ago it was authorized, and a warning as it approaches the 7-day refresh-token limit that applies to OAuth apps whose consent screen is still in "Testing" mode. Run it proactively to re-authorize on your own schedule instead of mid-task. On the hosted connector this is the ONLY check that measures Google: a connector showing "connected" or "refreshed" has verified the connector key that reaches the gog machine, and nothing else \u2014 the Google credential lives on that machine and can be dead while the connection looks perfectly healthy.',
|
|
31717
31724
|
annotations: { readOnlyHint: true },
|
|
31718
31725
|
inputSchema: {}
|
|
31719
31726
|
}, async () => {
|
|
@@ -32190,14 +32197,29 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
|
|
|
32190
32197
|
);
|
|
32191
32198
|
|
|
32192
32199
|
// ../gogcli-mcp/src/server.ts
|
|
32193
|
-
var VERSION = true ? "2.
|
|
32200
|
+
var VERSION = true ? "2.23.0" : "0.0.0";
|
|
32194
32201
|
|
|
32195
32202
|
// ../gogcli-mcp/src/auth-log.ts
|
|
32196
32203
|
var FAILURES = /* @__PURE__ */ new Set([
|
|
32197
32204
|
"token.mint-failed",
|
|
32198
32205
|
"grant.dead",
|
|
32199
32206
|
"replay.failed",
|
|
32200
|
-
"runner.auth-failed"
|
|
32207
|
+
"runner.auth-failed",
|
|
32208
|
+
"connect.key-rejected",
|
|
32209
|
+
// An enrolment that could not proceed is a failure even though nobody is at
|
|
32210
|
+
// fault: it is the only trace a half-enrolled connector leaves behind, and
|
|
32211
|
+
// the absence of exactly this record is why DEFECT 4 could not be explained.
|
|
32212
|
+
"connect.runner-unreachable",
|
|
32213
|
+
"connect.google-unhealthy",
|
|
32214
|
+
"refusal.google-unhealthy",
|
|
32215
|
+
// The loudest record on this branch, and the only one that means "we cannot
|
|
32216
|
+
// explain this". Google refused a real call while a live check of the same
|
|
32217
|
+
// credential, taken seconds later, succeeded — so neither the 7-day cliff nor
|
|
32218
|
+
// a revoked grant accounts for it. It is filed as a failure precisely because
|
|
32219
|
+
// it is the record nobody may scroll past: it is the only evidence that could
|
|
32220
|
+
// ever justify building something on the hosted path, and its absence over
|
|
32221
|
+
// time is what retires that theory for good.
|
|
32222
|
+
"refusal.google-ok"
|
|
32201
32223
|
]);
|
|
32202
32224
|
var PREFIX = "gog-auth ";
|
|
32203
32225
|
var TAG_CHARS = 12;
|
|
@@ -32344,10 +32366,39 @@ async function exchange(refreshToken, clientId, clientSecret) {
|
|
|
32344
32366
|
return { accessToken: body.access_token, expiresAt: Date.now() + expiresInMs };
|
|
32345
32367
|
}
|
|
32346
32368
|
|
|
32369
|
+
// ../gogcli-mcp/src/google-probe.ts
|
|
32370
|
+
var bool = (value) => typeof value === "boolean" ? value : void 0;
|
|
32371
|
+
var cause = (value) => typeof value === "string" && value.length > 0 ? value : void 0;
|
|
32372
|
+
function readGoogleProbe(body) {
|
|
32373
|
+
const record2 = typeof body === "object" && body !== null ? body : {};
|
|
32374
|
+
const measured = bool(record2.measured);
|
|
32375
|
+
const reported = cause(record2.error);
|
|
32376
|
+
if (measured === false) {
|
|
32377
|
+
return {
|
|
32378
|
+
kind: "unmeasured",
|
|
32379
|
+
reason: reported ?? "the runner reported it could not measure the Google layer"
|
|
32380
|
+
};
|
|
32381
|
+
}
|
|
32382
|
+
if (measured === true) {
|
|
32383
|
+
if (bool(record2.ok) === true) return { kind: "ok" };
|
|
32384
|
+
return {
|
|
32385
|
+
kind: "unhealthy",
|
|
32386
|
+
reason: reported ?? "the runner reported the Google layer unhealthy with no cause"
|
|
32387
|
+
};
|
|
32388
|
+
}
|
|
32389
|
+
return {
|
|
32390
|
+
kind: "unmeasured",
|
|
32391
|
+
reason: reported ? `the runner did not report whether it measured the Google layer; it said: ${reported}` : "the runner did not report whether it measured the Google layer"
|
|
32392
|
+
};
|
|
32393
|
+
}
|
|
32394
|
+
|
|
32347
32395
|
// ../gogcli-mcp/src/connector-runtime.ts
|
|
32348
32396
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
32349
32397
|
var DEADLINE_GRACE_MS = 5e3;
|
|
32350
32398
|
var MIN_REPLAY_BUDGET_MS = 1e3;
|
|
32399
|
+
var REFUSAL_PROBE_TIMEOUT_MS = 4e3;
|
|
32400
|
+
var MIN_PROBE_BUDGET_MS = 1e3;
|
|
32401
|
+
var PROBE_INTERVAL_MS = 6e4;
|
|
32351
32402
|
var RUNNER_GOG_FAILED = 422;
|
|
32352
32403
|
var RUNNER_DRAINING = 503;
|
|
32353
32404
|
var RUNNER_BAD_REQUEST = 400;
|
|
@@ -32394,7 +32445,7 @@ function gogTarget(args) {
|
|
|
32394
32445
|
}
|
|
32395
32446
|
return { service };
|
|
32396
32447
|
}
|
|
32397
|
-
async function remintAfterGoogleRejection(err, used, args, readAccessToken, deadlineAt) {
|
|
32448
|
+
async function remintAfterGoogleRejection(err, used, args, readAccessToken, deadlineAt, probeGoogle) {
|
|
32398
32449
|
if (!(err instanceof GogFailedError)) return void 0;
|
|
32399
32450
|
const grantDead = REFRESH_TOKEN_DEAD_PATTERN.test(err.stderr);
|
|
32400
32451
|
if (!grantDead && !GOOGLE_TOKEN_REJECTED_PATTERN.test(err.stderr)) return void 0;
|
|
@@ -32409,6 +32460,7 @@ async function remintAfterGoogleRejection(err, used, args, readAccessToken, dead
|
|
|
32409
32460
|
return void 0;
|
|
32410
32461
|
}
|
|
32411
32462
|
if (!used) {
|
|
32463
|
+
await probeGoogle(where);
|
|
32412
32464
|
logAuthTransition("replay.declined", {
|
|
32413
32465
|
...where,
|
|
32414
32466
|
reason: "no access token was supplied with the call, so gog acted as the backend volume\u2019s own identity"
|
|
@@ -32456,6 +32508,64 @@ async function remintAfterGoogleRejection(err, used, args, readAccessToken, dead
|
|
|
32456
32508
|
return { token: fresh, budgetMs, invalidate: readAccessToken.invalidate, ...where };
|
|
32457
32509
|
}
|
|
32458
32510
|
function makeFlyExecutor(endpoint, key, readAccessToken) {
|
|
32511
|
+
let lastProbeAt = Number.NEGATIVE_INFINITY;
|
|
32512
|
+
const probeGoogleAfterRefusal = async (where, deadlineAt) => {
|
|
32513
|
+
const record2 = { ...where, endpoint };
|
|
32514
|
+
const now = Date.now();
|
|
32515
|
+
const remainingMs = deadlineAt - now;
|
|
32516
|
+
if (remainingMs < MIN_PROBE_BUDGET_MS) {
|
|
32517
|
+
logAuthTransition("refusal.google-unmeasured", {
|
|
32518
|
+
...record2,
|
|
32519
|
+
reason: `only ${remainingMs}ms of the call\u2019s deadline remained, so the Google layer was not measured rather than delay the caller\u2019s own error`
|
|
32520
|
+
});
|
|
32521
|
+
return;
|
|
32522
|
+
}
|
|
32523
|
+
if (now - lastProbeAt < PROBE_INTERVAL_MS) {
|
|
32524
|
+
logAuthTransition("refusal.google-unmeasured", {
|
|
32525
|
+
...record2,
|
|
32526
|
+
// "attempted", not "measured". `lastProbeAt` is stamped before the
|
|
32527
|
+
// fetch and is deliberately NOT reset when the probe comes back with no
|
|
32528
|
+
// verdict (a 404 from a runner too old to have the endpoint, a timeout,
|
|
32529
|
+
// a dead socket) — the backend cost this throttle exists to bound was
|
|
32530
|
+
// paid either way, and resetting it would let a retry loop storm a
|
|
32531
|
+
// runner that is already unwell. So the timestamp stays and the sentence
|
|
32532
|
+
// has to be the true one: on this branch a log line may not assert a
|
|
32533
|
+
// measurement that never happened, and the previous probe may well have
|
|
32534
|
+
// measured nothing at all.
|
|
32535
|
+
reason: "a Google probe was attempted recently, so another was not sent: this probe spawns gog on the backend and takes the keyring\u2019s exclusive lock"
|
|
32536
|
+
});
|
|
32537
|
+
return;
|
|
32538
|
+
}
|
|
32539
|
+
lastProbeAt = now;
|
|
32540
|
+
let event;
|
|
32541
|
+
let reason;
|
|
32542
|
+
try {
|
|
32543
|
+
const res = await fetch(`${endpoint}/health/google`, {
|
|
32544
|
+
headers: { Authorization: `Bearer ${key}` },
|
|
32545
|
+
// Never more than the probe's own budget, never more than the call has
|
|
32546
|
+
// left. `Math.min` rather than a plain constant because the second
|
|
32547
|
+
// bound is the caller's, and it outranks ours.
|
|
32548
|
+
signal: AbortSignal.timeout(Math.min(REFUSAL_PROBE_TIMEOUT_MS, remainingMs))
|
|
32549
|
+
});
|
|
32550
|
+
if (!res.ok) {
|
|
32551
|
+
event = "refusal.google-unmeasured";
|
|
32552
|
+
reason = `the runner did not answer the Google probe (HTTP ${res.status})`;
|
|
32553
|
+
} else {
|
|
32554
|
+
const verdict = readGoogleProbe(await res.json());
|
|
32555
|
+
if (verdict.kind === "ok") {
|
|
32556
|
+
event = "refusal.google-ok";
|
|
32557
|
+
reason = "Google refused this call, yet a live token check on the same volume succeeded \u2014 so a dead or expired refresh token does not explain this refusal";
|
|
32558
|
+
} else {
|
|
32559
|
+
event = verdict.kind === "unhealthy" ? "refusal.google-unhealthy" : "refusal.google-unmeasured";
|
|
32560
|
+
reason = verdict.reason;
|
|
32561
|
+
}
|
|
32562
|
+
}
|
|
32563
|
+
} catch (err) {
|
|
32564
|
+
event = "refusal.google-unmeasured";
|
|
32565
|
+
reason = err instanceof Error ? err.message : String(err);
|
|
32566
|
+
}
|
|
32567
|
+
logAuthTransition(event, { ...record2, reason });
|
|
32568
|
+
};
|
|
32459
32569
|
return async (args, opts) => {
|
|
32460
32570
|
const deadlineMs = (opts?.timeout ?? DEFAULT_TIMEOUT_MS) + DEADLINE_GRACE_MS;
|
|
32461
32571
|
const accessToken = await readAccessToken?.();
|
|
@@ -32468,7 +32578,8 @@ function makeFlyExecutor(endpoint, key, readAccessToken) {
|
|
|
32468
32578
|
accessToken,
|
|
32469
32579
|
args,
|
|
32470
32580
|
readAccessToken,
|
|
32471
|
-
deadlineAt
|
|
32581
|
+
deadlineAt,
|
|
32582
|
+
(where2) => probeGoogleAfterRefusal(where2, deadlineAt)
|
|
32472
32583
|
);
|
|
32473
32584
|
if (replay === void 0) throw err;
|
|
32474
32585
|
const where = { credential: replay.credential, service: replay.service, endpoint };
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-classroom",
|
|
5
5
|
"display_name": "gogcli (Classroom)",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.23.0",
|
|
7
7
|
"description": "Extended Google Classroom for Claude via gogcli — auth + full Classroom support (courses, rosters, coursework, submissions, announcements, topics, invitations)",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-classroom",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-classroom",
|
|
5
5
|
"description": "Extended Google Classroom MCP server via gogcli — auth + full Classroom support",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp-classroom"
|
|
9
9
|
},
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.23.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp-classroom",
|
|
15
|
-
"version": "2.
|
|
15
|
+
"version": "2.23.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|