jefrichat-mcp 0.49.27 → 0.49.28
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/http.js +16 -2
- package/dist/index.js +11 -1
- package/package.json +1 -1
package/dist/http.js
CHANGED
|
@@ -68682,15 +68682,28 @@ async function lookupConnectorProfile(hub, token) {
|
|
|
68682
68682
|
}
|
|
68683
68683
|
if (!b || typeof b !== "object" || !("connectorProfile" in b)) return { kind: "locked", reason: "missing_field" };
|
|
68684
68684
|
const cp6 = b.connectorProfile;
|
|
68685
|
-
if (cp6 === null)
|
|
68685
|
+
if (cp6 === null) {
|
|
68686
|
+
const until = b.connectorLegacyAutonomyUntil;
|
|
68687
|
+
if (until == null) return { kind: "legacy" };
|
|
68688
|
+
if (typeof until !== "string" || !Number.isFinite(Date.parse(until)) || new Date(until).toISOString() !== until) return { kind: "locked", reason: "bad_value" };
|
|
68689
|
+
const autonomyUntil = Date.parse(until);
|
|
68690
|
+
return autonomyUntil > Date.now() ? { kind: "legacy", autonomyUntil } : { kind: "legacy" };
|
|
68691
|
+
}
|
|
68686
68692
|
if (typeof cp6 === "string" && isConnectorProfile(cp6)) return { kind: "profile", profile: cp6 };
|
|
68687
68693
|
return { kind: "locked", reason: "bad_value" };
|
|
68688
68694
|
}
|
|
68689
68695
|
function capsForLookup(lookup, urlRaw, local) {
|
|
68690
68696
|
if (lookup.kind === "profile") return capsFor(lookup.profile, local);
|
|
68691
|
-
if (lookup.kind === "legacy")
|
|
68697
|
+
if (lookup.kind === "legacy") {
|
|
68698
|
+
const caps = capsFor(sanitizeProfile(urlRaw), local);
|
|
68699
|
+
if (!local && legacyAutonomyOffered(lookup)) caps.add(CAP.AUTONOMY);
|
|
68700
|
+
return caps;
|
|
68701
|
+
}
|
|
68692
68702
|
return /* @__PURE__ */ new Set();
|
|
68693
68703
|
}
|
|
68704
|
+
function legacyAutonomyOffered(lookup) {
|
|
68705
|
+
return lookup.kind === "legacy" && typeof lookup.autonomyUntil === "number" && Number.isFinite(lookup.autonomyUntil) && lookup.autonomyUntil > Date.now();
|
|
68706
|
+
}
|
|
68694
68707
|
var CREDENTIAL_PROFILE_TTL_MS = 3e4;
|
|
68695
68708
|
var CREDENTIAL_PROFILE_GRACE_MS = 5 * 6e4;
|
|
68696
68709
|
var credentialProfiles = /* @__PURE__ */ new Map();
|
|
@@ -69172,6 +69185,7 @@ function registerAcpTools(server2, ctx) {
|
|
|
69172
69185
|
const lookup = ctx.credentialLookup;
|
|
69173
69186
|
if (lookup) {
|
|
69174
69187
|
if (lookup.kind === "locked") return false;
|
|
69188
|
+
if (!local && legacyAutonomyOffered(lookup)) return true;
|
|
69175
69189
|
return mechanismAllowed(lookup.kind === "profile" ? lookup.profile : null, local, "server_autonomy");
|
|
69176
69190
|
}
|
|
69177
69191
|
return mechanismAllowed(ctx.profile ?? null, local, "server_autonomy");
|
package/dist/index.js
CHANGED
|
@@ -48378,10 +48378,19 @@ async function lookupConnectorProfile(hub, token) {
|
|
|
48378
48378
|
}
|
|
48379
48379
|
if (!b || typeof b !== "object" || !("connectorProfile" in b)) return { kind: "locked", reason: "missing_field" };
|
|
48380
48380
|
const cp15 = b.connectorProfile;
|
|
48381
|
-
if (cp15 === null)
|
|
48381
|
+
if (cp15 === null) {
|
|
48382
|
+
const until = b.connectorLegacyAutonomyUntil;
|
|
48383
|
+
if (until == null) return { kind: "legacy" };
|
|
48384
|
+
if (typeof until !== "string" || !Number.isFinite(Date.parse(until)) || new Date(until).toISOString() !== until) return { kind: "locked", reason: "bad_value" };
|
|
48385
|
+
const autonomyUntil = Date.parse(until);
|
|
48386
|
+
return autonomyUntil > Date.now() ? { kind: "legacy", autonomyUntil } : { kind: "legacy" };
|
|
48387
|
+
}
|
|
48382
48388
|
if (typeof cp15 === "string" && isConnectorProfile(cp15)) return { kind: "profile", profile: cp15 };
|
|
48383
48389
|
return { kind: "locked", reason: "bad_value" };
|
|
48384
48390
|
}
|
|
48391
|
+
function legacyAutonomyOffered(lookup) {
|
|
48392
|
+
return lookup.kind === "legacy" && typeof lookup.autonomyUntil === "number" && Number.isFinite(lookup.autonomyUntil) && lookup.autonomyUntil > Date.now();
|
|
48393
|
+
}
|
|
48385
48394
|
function bumpEpoch(key) {
|
|
48386
48395
|
credentialEpochs.set(key, ++nextCredentialEpoch);
|
|
48387
48396
|
while (credentialEpochs.size > 256) credentialEpochs.delete(credentialEpochs.keys().next().value);
|
|
@@ -48777,6 +48786,7 @@ function registerAcpTools(server2, ctx) {
|
|
|
48777
48786
|
const lookup = ctx.credentialLookup;
|
|
48778
48787
|
if (lookup) {
|
|
48779
48788
|
if (lookup.kind === "locked") return false;
|
|
48789
|
+
if (!local && legacyAutonomyOffered(lookup)) return true;
|
|
48780
48790
|
return mechanismAllowed(lookup.kind === "profile" ? lookup.profile : null, local, "server_autonomy");
|
|
48781
48791
|
}
|
|
48782
48792
|
return mechanismAllowed(ctx.profile ?? null, local, "server_autonomy");
|