@chrischall/myatriumhealth-mcp 1.3.0 → 1.3.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +3 -1
- package/dist/bundle.js +308 -306
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for Angi — find home-service pros by trade and city, read ratings, reviews and pro profiles. Angi serves its pages only to a real browser, so requests route through the user's own angi.com tab via the fetchproxy browser extension, reusing their existing session. The trade/city taxonomy is read from Angi's public sitemaps directly.",
|
|
10
|
-
"version": "1.3.
|
|
10
|
+
"version": "1.3.1"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "MyAtriumHealth",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "Read MyAtriumHealth (Epic MyChart) records — test results, medications, allergies, immunizations, health issues, visits — by relaying requests through the user's signed-in browser tab via the fetchproxy bridge.",
|
|
18
|
-
"version": "1.3.
|
|
18
|
+
"version": "1.3.1",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myatriumhealth-mcp",
|
|
3
3
|
"displayName": "MyAtriumHealth",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"description": "MyAtriumHealth (Epic MyChart) access for Claude — test results, medications, allergies, immunizations, visits",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
package/README.md
CHANGED
|
@@ -167,7 +167,9 @@ Every other reader gets the URL strip only. That field list is applied where one
|
|
|
167
167
|
actually established and nowhere else — the list above is generated from
|
|
168
168
|
`PROJECTED_ENDPOINTS` and checked against the `project()` call sites by a test, so it
|
|
169
169
|
cannot quietly drift out of step with the code. If the portal's shape drifts, the
|
|
170
|
-
projection warns to stderr and returns
|
|
170
|
+
projection warns to stderr and returns `{ projectionFailed: true, endpoint, topLevelKeys,
|
|
171
|
+
note }` rather than an empty list — key names only, never the raw health record; ask for
|
|
172
|
+
`view: 'full'` to see the portal's payload.
|
|
171
173
|
|
|
172
174
|
## Sessions expire, and they do it quietly
|
|
173
175
|
|
package/dist/bundle.js
CHANGED
|
@@ -23312,399 +23312,388 @@ var require_v4 = __commonJS({
|
|
|
23312
23312
|
// node_modules/dotenv/dist/index.cjs
|
|
23313
23313
|
var require_dist2 = __commonJS({
|
|
23314
23314
|
"node_modules/dotenv/dist/index.cjs"(exports, module) {
|
|
23315
|
-
var
|
|
23315
|
+
var D = (e, n) => () => {
|
|
23316
23316
|
try {
|
|
23317
|
-
return
|
|
23317
|
+
return n || e((n = { exports: {} }).exports, n), n.exports;
|
|
23318
23318
|
} catch (t) {
|
|
23319
|
-
throw
|
|
23319
|
+
throw n = 0, t;
|
|
23320
23320
|
}
|
|
23321
23321
|
};
|
|
23322
|
-
var
|
|
23323
|
-
function
|
|
23322
|
+
var I = D((qe, G) => {
|
|
23323
|
+
function F(e) {
|
|
23324
23324
|
return typeof e == "string" ? !["false", "0", "no", "off", ""].includes(e.toLowerCase()) : !!e;
|
|
23325
23325
|
}
|
|
23326
|
-
function
|
|
23326
|
+
function J() {
|
|
23327
23327
|
let e = {};
|
|
23328
|
-
for (let
|
|
23329
|
-
let t = process.env[`DOTENV_${
|
|
23330
|
-
t != null && (e[
|
|
23328
|
+
for (let n of ["ENCODING", "PATH", "QUIET", "DEBUG", "OVERRIDE", "FAST"]) {
|
|
23329
|
+
let t = process.env[`DOTENV_${n}`] != null ? process.env[`DOTENV_${n}`] : process.env[`DOTENV_CONFIG_${n}`];
|
|
23330
|
+
t != null && (e[n.toLowerCase()] = n === "ENCODING" || n === "PATH" ? t : F(t));
|
|
23331
23331
|
}
|
|
23332
23332
|
return e;
|
|
23333
23333
|
}
|
|
23334
|
-
|
|
23334
|
+
G.exports = { parseBoolean: F, optionsFromEnv: J };
|
|
23335
23335
|
});
|
|
23336
|
-
var
|
|
23337
|
-
var
|
|
23338
|
-
for (let e = 48; e <= 57; e++)
|
|
23339
|
-
for (let e = 65; e <= 90; e++)
|
|
23340
|
-
for (let e = 97; e <= 122; e++)
|
|
23341
|
-
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
function
|
|
23345
|
-
let
|
|
23336
|
+
var k = D((xe, x) => {
|
|
23337
|
+
var K = __require("fs"), S = __require("path"), X = __require("os"), { URL: Y, fileURLToPath: z4 } = __require("url"), { parseBoolean: j, optionsFromEnv: Z } = I(), ee = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg, b = new Uint8Array(256);
|
|
23338
|
+
for (let e = 48; e <= 57; e++) b[e] = 1;
|
|
23339
|
+
for (let e = 65; e <= 90; e++) b[e] = 1;
|
|
23340
|
+
for (let e = 97; e <= 122; e++) b[e] = 1;
|
|
23341
|
+
b[45] = 1;
|
|
23342
|
+
b[46] = 1;
|
|
23343
|
+
b[95] = 1;
|
|
23344
|
+
function te(e) {
|
|
23345
|
+
let n = {}, t = e.toString();
|
|
23346
23346
|
t = t.replace(/\r\n?/mg, `
|
|
23347
23347
|
`);
|
|
23348
|
-
let
|
|
23349
|
-
for (; (
|
|
23350
|
-
let r =
|
|
23351
|
-
|
|
23352
|
-
let
|
|
23353
|
-
|
|
23354
|
-
`),
|
|
23355
|
-
}
|
|
23356
|
-
return
|
|
23357
|
-
}
|
|
23358
|
-
function
|
|
23359
|
-
|
|
23348
|
+
let o;
|
|
23349
|
+
for (; (o = ee.exec(t)) != null; ) {
|
|
23350
|
+
let r = o[1], i = o[2] || "";
|
|
23351
|
+
i = i.trim();
|
|
23352
|
+
let s = i[0];
|
|
23353
|
+
i = i.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"), s === '"' && (i = i.replace(/\\n/g, `
|
|
23354
|
+
`), i = i.replace(/\\r/g, "\r")), n[r] = i;
|
|
23355
|
+
}
|
|
23356
|
+
return n;
|
|
23357
|
+
}
|
|
23358
|
+
function w(e) {
|
|
23359
|
+
return e <= 32 ? e === 32 || e >= 9 && e <= 13 : e >= 160 && (e === 160 || e === 5760 || e >= 8192 && e <= 8202 || e === 8232 || e === 8233 || e === 8239 || e === 8287 || e === 12288 || e === 65279);
|
|
23360
|
+
}
|
|
23361
|
+
function O(e) {
|
|
23362
|
+
return e === 10 || e === 8232 || e === 8233;
|
|
23363
|
+
}
|
|
23364
|
+
function re(e) {
|
|
23365
|
+
let n = {}, t = typeof e == "string" ? e : e.toString();
|
|
23360
23366
|
t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, `
|
|
23361
23367
|
`));
|
|
23362
|
-
let
|
|
23363
|
-
for (; r <
|
|
23364
|
-
let
|
|
23365
|
-
for (; r <
|
|
23366
|
-
if (r >=
|
|
23367
|
-
if (
|
|
23368
|
-
for (; r <
|
|
23368
|
+
let o = t.length, r = 0;
|
|
23369
|
+
for (; r < o; ) {
|
|
23370
|
+
let i = t.charCodeAt(r);
|
|
23371
|
+
for (; r < o && w(i); ) r++, i = t.charCodeAt(r);
|
|
23372
|
+
if (r >= o) break;
|
|
23373
|
+
if (i === 35) {
|
|
23374
|
+
for (; r < o && !O(t.charCodeAt(r)); ) r++;
|
|
23369
23375
|
continue;
|
|
23370
23376
|
}
|
|
23371
|
-
if (
|
|
23372
|
-
let
|
|
23373
|
-
if (
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
|
|
23377
|
-
|
|
23378
|
-
|
|
23379
|
-
|
|
23377
|
+
if (i === 101 && r + 6 < o && t.charCodeAt(r + 1) === 120 && t.charCodeAt(r + 2) === 112 && t.charCodeAt(r + 3) === 111 && t.charCodeAt(r + 4) === 114 && t.charCodeAt(r + 5) === 116) {
|
|
23378
|
+
let g = t.charCodeAt(r + 6);
|
|
23379
|
+
if (w(g)) {
|
|
23380
|
+
let u = r + 7;
|
|
23381
|
+
for (; u < o && w(t.charCodeAt(u)); ) u++;
|
|
23382
|
+
b[t.charCodeAt(u)] && (r = u);
|
|
23383
|
+
} else i = t.charCodeAt(r);
|
|
23384
|
+
}
|
|
23385
|
+
let s = r, a = 0;
|
|
23386
|
+
for (; r < o && (a = t.charCodeAt(r), b[a]); ) r++;
|
|
23387
|
+
if (r === s) {
|
|
23388
|
+
for (; r < o && !O(t.charCodeAt(r)); ) r++;
|
|
23380
23389
|
continue;
|
|
23381
23390
|
}
|
|
23382
|
-
let
|
|
23383
|
-
if (r >=
|
|
23384
|
-
r++,
|
|
23385
|
-
while (
|
|
23386
|
-
if (
|
|
23387
|
-
else if (
|
|
23391
|
+
let d = t.slice(s, r), p = r;
|
|
23392
|
+
if (r >= o && (a = 0), w(a)) do
|
|
23393
|
+
r++, a = r < o ? t.charCodeAt(r) : 0;
|
|
23394
|
+
while (w(a));
|
|
23395
|
+
if (a === 61) r++;
|
|
23396
|
+
else if (a === 58 && r === p && r + 1 < o && w(t.charCodeAt(r + 1))) r += 2;
|
|
23388
23397
|
else {
|
|
23389
|
-
for (; r <
|
|
23398
|
+
for (r = p; r < o && !O(t.charCodeAt(r)); ) r++;
|
|
23390
23399
|
continue;
|
|
23391
23400
|
}
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
continue;
|
|
23403
|
-
}
|
|
23404
|
-
}
|
|
23405
|
-
if (d === f) break;
|
|
23406
|
-
a++;
|
|
23407
|
-
}
|
|
23408
|
-
if (a >= n) {
|
|
23409
|
-
let d = r, p = r;
|
|
23410
|
-
for (; p < n; ) {
|
|
23411
|
-
let w = t.charCodeAt(p);
|
|
23412
|
-
if (w === 35 || w === 10) break;
|
|
23413
|
-
p++;
|
|
23414
|
-
}
|
|
23415
|
-
let m = p;
|
|
23416
|
-
for (; m > d; ) {
|
|
23417
|
-
let w = t.charCodeAt(m - 1);
|
|
23418
|
-
if (w === 32 || w === 9) m--;
|
|
23419
|
-
else break;
|
|
23420
|
-
}
|
|
23421
|
-
if (u = t.slice(d, m), r = p, r < n && t.charCodeAt(r) === 35) for (; r < n && t.charCodeAt(r) !== 10; ) r++;
|
|
23422
|
-
} else {
|
|
23423
|
-
for (u = t.slice(c, a), r = a + 1, f === 34 && u.indexOf("\\") !== -1 && (u = u.replace(/\\n/g, `
|
|
23424
|
-
`).replace(/\\r/g, "\r")); r < n && ((s = t.charCodeAt(r)) === 32 || s === 9); ) r++;
|
|
23425
|
-
if (r < n && t.charCodeAt(r) === 35) for (; r < n && t.charCodeAt(r) !== 10; ) r++;
|
|
23401
|
+
let l = r, c = r;
|
|
23402
|
+
for (; c < o && w(t.charCodeAt(c)); ) c++;
|
|
23403
|
+
let f = t.charCodeAt(c), h, m = false;
|
|
23404
|
+
if (f === 39 || f === 34 || f === 96) {
|
|
23405
|
+
let g = t[c], u = t.indexOf(g, c + 1), v = -1, C = -1;
|
|
23406
|
+
for (; u !== -1; ) {
|
|
23407
|
+
let q = t.charCodeAt(u - 1) === 92, E = u + 1;
|
|
23408
|
+
for (; E < o && !O(t.charCodeAt(E)) && w(t.charCodeAt(E)); ) E++;
|
|
23409
|
+
if ((E === o || O(t.charCodeAt(E)) || t.charCodeAt(E) === 35) && (v = u, C = E), !q) break;
|
|
23410
|
+
u = t.indexOf(g, u + 1);
|
|
23426
23411
|
}
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
c === -1 && (c = n);
|
|
23431
|
-
let a = t.indexOf("#", r);
|
|
23432
|
-
(a === -1 || a > c) && (a = c);
|
|
23433
|
-
let d = a;
|
|
23434
|
-
for (; d > f; ) {
|
|
23435
|
-
let p = t.charCodeAt(d - 1);
|
|
23436
|
-
if (p === 32 || p === 9) d--;
|
|
23437
|
-
else break;
|
|
23412
|
+
if (v !== -1) {
|
|
23413
|
+
if (h = t.slice(c + 1, v), r = C, t.charCodeAt(r) === 35) for (; r < o && !O(t.charCodeAt(r)); ) r++;
|
|
23414
|
+
m = true;
|
|
23438
23415
|
}
|
|
23439
|
-
u = f === d ? "" : t.slice(f, d), r = a === c ? a : c;
|
|
23440
23416
|
}
|
|
23441
|
-
|
|
23417
|
+
if (!m) {
|
|
23418
|
+
let g = t.indexOf(`
|
|
23419
|
+
`, l);
|
|
23420
|
+
g === -1 && (g = o);
|
|
23421
|
+
let u = t.indexOf("#", l);
|
|
23422
|
+
(u === -1 || u > g) && (u = g);
|
|
23423
|
+
let v = l, C = u;
|
|
23424
|
+
for (; v < C && w(t.charCodeAt(v)); ) v++;
|
|
23425
|
+
for (; C > v && w(t.charCodeAt(C - 1)); ) C--;
|
|
23426
|
+
let q = t.charCodeAt(v);
|
|
23427
|
+
if (C - v >= 2 && (q === 39 || q === 34 || q === 96) && t.charCodeAt(C - 1) === q ? h = t.slice(v + 1, C - 1) : h = t.slice(v, C), r = u, u < g) for (; r < o && !O(t.charCodeAt(r)); ) r++;
|
|
23428
|
+
}
|
|
23429
|
+
f === 34 && (m || c < r) && h.indexOf("\\") !== -1 && (h = h.replace(/\\n/g, `
|
|
23430
|
+
`).replace(/\\r/g, "\r")), n[d] = h;
|
|
23442
23431
|
}
|
|
23443
|
-
return
|
|
23432
|
+
return n;
|
|
23444
23433
|
}
|
|
23445
|
-
function
|
|
23446
|
-
return
|
|
23434
|
+
function ne(e, n) {
|
|
23435
|
+
return n && j(n.fast) ? re(e) : te(e);
|
|
23447
23436
|
}
|
|
23448
|
-
function
|
|
23437
|
+
function y(e) {
|
|
23449
23438
|
console.log(`\u2506 ${e}`);
|
|
23450
23439
|
}
|
|
23451
|
-
function
|
|
23440
|
+
function oe(e) {
|
|
23452
23441
|
console.error(`\u25C7 ${e}`);
|
|
23453
23442
|
}
|
|
23454
|
-
function
|
|
23455
|
-
return e[0] === "~" ?
|
|
23456
|
-
}
|
|
23457
|
-
function
|
|
23458
|
-
return { ...
|
|
23459
|
-
}
|
|
23460
|
-
function
|
|
23461
|
-
e =
|
|
23462
|
-
let
|
|
23463
|
-
e && e.processEnv != null && (
|
|
23464
|
-
let r =
|
|
23465
|
-
e && e.encoding ? t = e.encoding : r &&
|
|
23466
|
-
let
|
|
23467
|
-
if (e && e.path) if (!Array.isArray(e.path))
|
|
23443
|
+
function U(e) {
|
|
23444
|
+
return e[0] === "~" ? S.join(X.homedir(), e.slice(1)) : e;
|
|
23445
|
+
}
|
|
23446
|
+
function se(e = {}) {
|
|
23447
|
+
return { ...Z(), ...e };
|
|
23448
|
+
}
|
|
23449
|
+
function ie(e) {
|
|
23450
|
+
e = se(e);
|
|
23451
|
+
let n = S.resolve(process.cwd(), ".env"), t = "utf8", o = process.env;
|
|
23452
|
+
e && e.processEnv != null && (o = e.processEnv);
|
|
23453
|
+
let r = j(e && e.debug), i = j(e && e.quiet);
|
|
23454
|
+
e && e.encoding ? t = e.encoding : r && y("no encoding is specified (UTF-8 is used by default)");
|
|
23455
|
+
let s = [n];
|
|
23456
|
+
if (e && e.path) if (!Array.isArray(e.path)) s = [U(e.path)];
|
|
23468
23457
|
else {
|
|
23469
|
-
|
|
23470
|
-
for (let c of e.path)
|
|
23471
|
-
}
|
|
23472
|
-
let
|
|
23473
|
-
for (let c of
|
|
23474
|
-
let
|
|
23475
|
-
|
|
23476
|
-
} catch (
|
|
23477
|
-
r &&
|
|
23478
|
-
}
|
|
23479
|
-
let
|
|
23480
|
-
if (r || !
|
|
23481
|
-
let c = Object.keys(
|
|
23482
|
-
for (let
|
|
23483
|
-
let
|
|
23484
|
-
|
|
23485
|
-
} catch (
|
|
23486
|
-
r &&
|
|
23487
|
-
}
|
|
23488
|
-
|
|
23489
|
-
}
|
|
23490
|
-
return
|
|
23491
|
-
}
|
|
23492
|
-
function
|
|
23493
|
-
return
|
|
23494
|
-
}
|
|
23495
|
-
function
|
|
23496
|
-
let
|
|
23497
|
-
if (e === null || typeof e != "object" ||
|
|
23498
|
-
let
|
|
23499
|
-
throw
|
|
23500
|
-
}
|
|
23501
|
-
for (let
|
|
23502
|
-
return
|
|
23503
|
-
}
|
|
23504
|
-
var
|
|
23505
|
-
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23458
|
+
s = [];
|
|
23459
|
+
for (let c of e.path) s.push(U(c));
|
|
23460
|
+
}
|
|
23461
|
+
let a, d = {}, p = { fast: e.fast };
|
|
23462
|
+
for (let c of s) try {
|
|
23463
|
+
let f = A.parse(K.readFileSync(c, { encoding: t }), p);
|
|
23464
|
+
A.populate(d, f, e);
|
|
23465
|
+
} catch (f) {
|
|
23466
|
+
r && y(`failed to load ${c} ${f.message}`), a = f;
|
|
23467
|
+
}
|
|
23468
|
+
let l = A.populate(o, d, e);
|
|
23469
|
+
if (r || !i) {
|
|
23470
|
+
let c = Object.keys(l).length, f = [];
|
|
23471
|
+
for (let h of s) try {
|
|
23472
|
+
let m = S.relative(process.cwd(), h instanceof Y ? z4(h) : h);
|
|
23473
|
+
f.push(m);
|
|
23474
|
+
} catch (m) {
|
|
23475
|
+
r && y(`failed to load ${h} ${m.message}`), a = m;
|
|
23476
|
+
}
|
|
23477
|
+
oe(`injected env (${c}) from ${f.join(",")}`);
|
|
23478
|
+
}
|
|
23479
|
+
return a ? { parsed: d, error: a } : { parsed: d };
|
|
23480
|
+
}
|
|
23481
|
+
function ce(e) {
|
|
23482
|
+
return A.configDotenv(e);
|
|
23483
|
+
}
|
|
23484
|
+
function ae(e, n, t = {}) {
|
|
23485
|
+
let o = !!(t && t.debug), r = !!(t && t.override), i = {};
|
|
23486
|
+
if (e === null || typeof e != "object" || n === null || typeof n != "object") {
|
|
23487
|
+
let s = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
23488
|
+
throw s.code = "OBJECT_REQUIRED", s;
|
|
23489
|
+
}
|
|
23490
|
+
for (let s of Object.keys(n)) Object.prototype.hasOwnProperty.call(e, s) ? (r === true && (e[s] = n[s], i[s] = n[s]), o && y(r === true ? `"${s}" is already defined and WAS overwritten` : `"${s}" is already defined and was NOT overwritten`)) : (e[s] = n[s], i[s] = n[s]);
|
|
23491
|
+
return i;
|
|
23492
|
+
}
|
|
23493
|
+
var A = { configDotenv: ie, config: ce, parse: ne, populate: ae };
|
|
23494
|
+
x.exports.configDotenv = A.configDotenv;
|
|
23495
|
+
x.exports.config = A.config;
|
|
23496
|
+
x.exports.parse = A.parse;
|
|
23497
|
+
x.exports.populate = A.populate;
|
|
23498
|
+
x.exports = A;
|
|
23510
23499
|
});
|
|
23511
|
-
var
|
|
23512
|
-
var
|
|
23513
|
-
function
|
|
23514
|
-
let
|
|
23515
|
-
for (let
|
|
23516
|
-
if (
|
|
23500
|
+
var L = D((ye, H) => {
|
|
23501
|
+
var N = __require("child_process"), le = __require("fs"), B = __require("path");
|
|
23502
|
+
function fe(e) {
|
|
23503
|
+
let n = ['"'], t = 0;
|
|
23504
|
+
for (let o of e) {
|
|
23505
|
+
if (o === "\\") {
|
|
23517
23506
|
t++;
|
|
23518
23507
|
continue;
|
|
23519
23508
|
}
|
|
23520
|
-
|
|
23509
|
+
o === '"' ? n.push("\\".repeat(t * 2 + 1), '"') : n.push("\\".repeat(t), o), t = 0;
|
|
23521
23510
|
}
|
|
23522
|
-
return
|
|
23511
|
+
return n.push("\\".repeat(t * 2), '"'), n.join("");
|
|
23523
23512
|
}
|
|
23524
|
-
function
|
|
23525
|
-
for (let t = 0; t <
|
|
23526
|
-
let
|
|
23513
|
+
function V(e, n = 1) {
|
|
23514
|
+
for (let t = 0; t < n; t++) {
|
|
23515
|
+
let o = [];
|
|
23527
23516
|
for (let r of e) {
|
|
23528
|
-
let
|
|
23529
|
-
!
|
|
23517
|
+
let i = r.charCodeAt(0), s = i >= 48 && i <= 57 || i >= 65 && i <= 90 || i >= 97 && i <= 122, a = "\\/:._-".includes(r);
|
|
23518
|
+
!s && !a && i < 128 && o.push("^"), o.push(r);
|
|
23530
23519
|
}
|
|
23531
|
-
e =
|
|
23520
|
+
e = o.join("");
|
|
23532
23521
|
}
|
|
23533
23522
|
return e;
|
|
23534
23523
|
}
|
|
23535
|
-
function
|
|
23536
|
-
let t = Object.keys(e).reverse().find((
|
|
23524
|
+
function _(e, n) {
|
|
23525
|
+
let t = Object.keys(e).reverse().find((o) => o.toUpperCase() === n);
|
|
23537
23526
|
return t === void 0 ? void 0 : e[t];
|
|
23538
23527
|
}
|
|
23539
|
-
function
|
|
23540
|
-
let
|
|
23541
|
-
for (let
|
|
23542
|
-
let
|
|
23528
|
+
function ue(e, n, t) {
|
|
23529
|
+
let o = (_(n, "PATHEXT") || ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean), i = o.some((a) => e.toLowerCase().endsWith(a.toLowerCase())) ? ["", ...o] : [...o, ""], s = /[\\/]/.test(e) ? [t] : [t, ...(_(n, "PATH") || "").split(";")];
|
|
23530
|
+
for (let a of s) for (let d of i) {
|
|
23531
|
+
let p = B.resolve(t, a.replace(/^"|"$/g, ""), e + d);
|
|
23543
23532
|
try {
|
|
23544
|
-
if (
|
|
23533
|
+
if (le.statSync(p).isFile()) return p;
|
|
23545
23534
|
} catch {
|
|
23546
23535
|
}
|
|
23547
23536
|
}
|
|
23548
23537
|
}
|
|
23549
|
-
function
|
|
23550
|
-
if (process.platform !== "win32") return
|
|
23551
|
-
let
|
|
23552
|
-
if (r && /\.(?:exe|com)$/i.test(r)) return
|
|
23553
|
-
let
|
|
23554
|
-
for (let
|
|
23555
|
-
let
|
|
23556
|
-
return
|
|
23538
|
+
function de(e, n, t) {
|
|
23539
|
+
if (process.platform !== "win32") return N.spawn(e, n, t);
|
|
23540
|
+
let o = t.env || process.env, r = ue(e, o, t.cwd || process.cwd());
|
|
23541
|
+
if (r && /\.(?:exe|com)$/i.test(r)) return N.spawn(r, n, t);
|
|
23542
|
+
let i = /\.(?:bat|cmd)$/i.test(r || e), s = [V(B.normalize(r || e))];
|
|
23543
|
+
for (let d of n) s.push(V(fe(d), i ? 2 : 1));
|
|
23544
|
+
let a = s.join(" ");
|
|
23545
|
+
return N.spawn(_(o, "COMSPEC") || "cmd.exe", ["/d", "/v:off", "/s", "/c", `"${a}"`], { ...t, windowsVerbatimArguments: true });
|
|
23557
23546
|
}
|
|
23558
|
-
|
|
23547
|
+
H.exports = de;
|
|
23559
23548
|
});
|
|
23560
|
-
var
|
|
23561
|
-
var
|
|
23562
|
-
function
|
|
23549
|
+
var Q = D((Te, R) => {
|
|
23550
|
+
var pe = __require("fs"), he = __require("os"), W = __require("path"), ge = __require("child_process"), ve = L(), P = k(), { optionsFromEnv: me } = I();
|
|
23551
|
+
function T() {
|
|
23563
23552
|
console.log(["Usage: dotenv run [--help] [-q|--quiet] [--debug] [--override] [--fast] [-f|--file <paths>] [--] <command> [args...]", "", "Run a command with environment variables from a .env file.", "Place dotenv options before the command; all following arguments go to the command.", "", "Options:", " -f, --file <paths> .env paths, comma-separated or repeated (default: .env)", " -q, --quiet suppress the injected env message", " --debug enable debug logging", " --override override existing environment variables", " --fast use the faster character-scanner parser", "", "Environment variables (DOTENV_CONFIG_* names remain as fallbacks):", " DOTENV_PATH, DOTENV_ENCODING, DOTENV_QUIET,", " DOTENV_DEBUG, DOTENV_OVERRIDE,", " DOTENV_FAST"].join(`
|
|
23564
23553
|
`));
|
|
23565
23554
|
}
|
|
23566
|
-
function
|
|
23567
|
-
let
|
|
23568
|
-
for (let
|
|
23569
|
-
let
|
|
23570
|
-
if (
|
|
23571
|
-
|
|
23555
|
+
function Ce(e) {
|
|
23556
|
+
let n = [], t = false, o, r, i, s, a = -1;
|
|
23557
|
+
for (let p = 0; p < e.length; p++) {
|
|
23558
|
+
let l = e[p];
|
|
23559
|
+
if (l === "--") {
|
|
23560
|
+
a = p + 1;
|
|
23572
23561
|
break;
|
|
23573
23562
|
}
|
|
23574
|
-
if (
|
|
23575
|
-
if (
|
|
23576
|
-
|
|
23563
|
+
if (l === "--help" || l === "-h") return { help: true };
|
|
23564
|
+
if (l === "--quiet" || l === "-q") {
|
|
23565
|
+
o = true;
|
|
23577
23566
|
continue;
|
|
23578
23567
|
}
|
|
23579
|
-
if (
|
|
23568
|
+
if (l === "--debug") {
|
|
23580
23569
|
r = true;
|
|
23581
23570
|
continue;
|
|
23582
23571
|
}
|
|
23583
|
-
if (
|
|
23584
|
-
|
|
23572
|
+
if (l === "--override") {
|
|
23573
|
+
i = true;
|
|
23585
23574
|
continue;
|
|
23586
23575
|
}
|
|
23587
|
-
if (
|
|
23588
|
-
|
|
23576
|
+
if (l === "--fast") {
|
|
23577
|
+
s = true;
|
|
23589
23578
|
continue;
|
|
23590
23579
|
}
|
|
23591
|
-
if (
|
|
23592
|
-
let c =
|
|
23593
|
-
if (!
|
|
23594
|
-
let
|
|
23595
|
-
if (
|
|
23596
|
-
|
|
23580
|
+
if (l === "-f" || l === "--file" || l.startsWith("-f=") || l.startsWith("--file=")) {
|
|
23581
|
+
let c = l.indexOf("="), f = c === -1 ? l : l.slice(0, c), h = c === -1 ? e[++p] : l.slice(c + 1);
|
|
23582
|
+
if (!h || h === "--") return { error: `${f} requires a path` };
|
|
23583
|
+
let m = h.split(",").map((g) => g.trim()).filter(Boolean);
|
|
23584
|
+
if (m.length === 0) return { error: `${f} requires a path` };
|
|
23585
|
+
n.push(...m), t = true;
|
|
23597
23586
|
continue;
|
|
23598
23587
|
}
|
|
23599
|
-
if (
|
|
23600
|
-
|
|
23588
|
+
if (l.startsWith("-")) return { error: `unknown option: ${l}` };
|
|
23589
|
+
a = p;
|
|
23601
23590
|
break;
|
|
23602
23591
|
}
|
|
23603
|
-
let
|
|
23604
|
-
return { paths:
|
|
23592
|
+
let d = a === -1 ? [] : e.slice(a);
|
|
23593
|
+
return { paths: n, pathSet: t, quiet: o, debug: r, override: i, fast: s, command: d };
|
|
23605
23594
|
}
|
|
23606
|
-
function
|
|
23607
|
-
return e[0] === "~" ?
|
|
23595
|
+
function we(e) {
|
|
23596
|
+
return e[0] === "~" ? W.join(he.homedir(), e.slice(1)) : e;
|
|
23608
23597
|
}
|
|
23609
|
-
function
|
|
23610
|
-
let
|
|
23611
|
-
return
|
|
23598
|
+
function Ae(e) {
|
|
23599
|
+
let n = me(), t = { encoding: n.encoding || "utf8", quiet: n.quiet === true, debug: n.debug === true, override: n.override === true, fast: n.fast === true, paths: [".env"], defaultPath: true };
|
|
23600
|
+
return n.path != null && (t.paths = [n.path], t.defaultPath = false), e.pathSet && (t.paths = e.paths, t.defaultPath = false), e.quiet != null && (t.quiet = e.quiet), e.debug != null && (t.debug = e.debug), e.override != null && (t.override = e.override), e.fast != null && (t.fast = e.fast), t;
|
|
23612
23601
|
}
|
|
23613
|
-
function
|
|
23614
|
-
let
|
|
23615
|
-
for (let
|
|
23616
|
-
let
|
|
23602
|
+
function Ee(e) {
|
|
23603
|
+
let n = {}, t = [], o = { override: e.override, debug: e.debug };
|
|
23604
|
+
for (let i of e.paths) {
|
|
23605
|
+
let s = W.resolve(process.cwd(), we(i));
|
|
23617
23606
|
try {
|
|
23618
|
-
let
|
|
23619
|
-
|
|
23620
|
-
} catch (
|
|
23621
|
-
if (e.debug && console.log(`\u2506 failed to load ${
|
|
23607
|
+
let a = P.parse(pe.readFileSync(s, { encoding: e.encoding }), { fast: e.fast });
|
|
23608
|
+
P.populate(n, a, o), t.push(i);
|
|
23609
|
+
} catch (a) {
|
|
23610
|
+
if (e.debug && console.log(`\u2506 failed to load ${i} ${a.message}`), !(e.defaultPath && a.code === "ENOENT")) throw a;
|
|
23622
23611
|
}
|
|
23623
23612
|
}
|
|
23624
|
-
return { injected:
|
|
23613
|
+
return { injected: P.populate(process.env, n, o), loadedPaths: t };
|
|
23625
23614
|
}
|
|
23626
|
-
function
|
|
23627
|
-
let
|
|
23628
|
-
if (
|
|
23629
|
-
|
|
23615
|
+
function M(e) {
|
|
23616
|
+
let n = e[0];
|
|
23617
|
+
if (n === "--help" || n === "-h") {
|
|
23618
|
+
T();
|
|
23630
23619
|
return;
|
|
23631
23620
|
}
|
|
23632
|
-
if (
|
|
23633
|
-
|
|
23621
|
+
if (n !== "run") {
|
|
23622
|
+
T(), process.exitCode = 1;
|
|
23634
23623
|
return;
|
|
23635
23624
|
}
|
|
23636
|
-
let t =
|
|
23625
|
+
let t = Ce(e.slice(1));
|
|
23637
23626
|
if (t.help) {
|
|
23638
|
-
|
|
23627
|
+
T();
|
|
23639
23628
|
return;
|
|
23640
23629
|
}
|
|
23641
23630
|
if (t.error) {
|
|
23642
|
-
console.error(`dotenv: ${t.error}`),
|
|
23631
|
+
console.error(`dotenv: ${t.error}`), T(), process.exitCode = 1;
|
|
23643
23632
|
return;
|
|
23644
23633
|
}
|
|
23645
23634
|
if (t.command.length === 0) {
|
|
23646
|
-
|
|
23635
|
+
T(), process.exitCode = 1;
|
|
23647
23636
|
return;
|
|
23648
23637
|
}
|
|
23649
|
-
let
|
|
23638
|
+
let o = Ae(t);
|
|
23650
23639
|
try {
|
|
23651
|
-
let c =
|
|
23652
|
-
if (!
|
|
23653
|
-
let
|
|
23654
|
-
c.loadedPaths.length > 0 && (
|
|
23640
|
+
let c = Ee(o);
|
|
23641
|
+
if (!o.quiet) {
|
|
23642
|
+
let f = `\u25C7 injected env (${Object.keys(c.injected).length})`;
|
|
23643
|
+
c.loadedPaths.length > 0 && (f += ` from ${c.loadedPaths.join(", ")}`), console.error(f);
|
|
23655
23644
|
}
|
|
23656
23645
|
} catch (c) {
|
|
23657
23646
|
console.error(`dotenv: ${c.message}`), process.exitCode = 1;
|
|
23658
23647
|
return;
|
|
23659
23648
|
}
|
|
23660
|
-
let r = !!process.stdin.isTTY,
|
|
23661
|
-
function
|
|
23662
|
-
if (!(!
|
|
23649
|
+
let r = !!process.stdin.isTTY, i = process.platform !== "win32" && !r, s = ve(t.command[0], t.command.slice(1), { stdio: "inherit", detached: i }), a = /* @__PURE__ */ new Map(), d = 0;
|
|
23650
|
+
function p(c) {
|
|
23651
|
+
if (!(!s.pid || s.exitCode !== null || s.signalCode !== null)) {
|
|
23663
23652
|
if (process.platform === "win32") {
|
|
23664
|
-
|
|
23653
|
+
ge.spawnSync("taskkill", ["/pid", String(s.pid), "/T", "/F"], { stdio: "ignore" });
|
|
23665
23654
|
return;
|
|
23666
23655
|
}
|
|
23667
23656
|
try {
|
|
23668
|
-
process.kill(
|
|
23669
|
-
} catch (
|
|
23670
|
-
if (
|
|
23657
|
+
process.kill(i ? -s.pid : s.pid, c);
|
|
23658
|
+
} catch (f) {
|
|
23659
|
+
if (f.code !== "ESRCH") throw f;
|
|
23671
23660
|
}
|
|
23672
23661
|
}
|
|
23673
23662
|
}
|
|
23674
|
-
function
|
|
23675
|
-
for (let [c,
|
|
23663
|
+
function l() {
|
|
23664
|
+
for (let [c, f] of a) process.removeListener(c, f);
|
|
23676
23665
|
}
|
|
23677
23666
|
for (let c of ["SIGINT", "SIGTERM", "SIGHUP", "SIGQUIT"]) {
|
|
23678
|
-
let
|
|
23667
|
+
let f = () => {
|
|
23679
23668
|
if (c === "SIGINT") {
|
|
23680
|
-
if (
|
|
23681
|
-
if (
|
|
23682
|
-
|
|
23669
|
+
if (d++, r && process.platform !== "win32" && d === 1) return;
|
|
23670
|
+
if (d > 1) {
|
|
23671
|
+
p(d === 2 ? "SIGTERM" : "SIGKILL");
|
|
23683
23672
|
return;
|
|
23684
23673
|
}
|
|
23685
23674
|
}
|
|
23686
|
-
|
|
23675
|
+
p(c);
|
|
23687
23676
|
};
|
|
23688
|
-
|
|
23677
|
+
a.set(c, f), process.on(c, f);
|
|
23689
23678
|
}
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
}),
|
|
23693
|
-
|
|
23694
|
-
}, 1e3), process.kill(process.pid,
|
|
23679
|
+
s.on("error", function(c) {
|
|
23680
|
+
l(), console.error(`dotenv: ${c.message}`), process.exitCode = 1;
|
|
23681
|
+
}), s.on("exit", function(c, f) {
|
|
23682
|
+
l(), typeof c == "number" ? process.exit(c) : (setInterval(() => {
|
|
23683
|
+
}, 1e3), process.kill(process.pid, f));
|
|
23695
23684
|
});
|
|
23696
23685
|
}
|
|
23697
|
-
|
|
23698
|
-
__require.main ===
|
|
23686
|
+
R.exports = M;
|
|
23687
|
+
__require.main === R && M(process.argv.slice(2));
|
|
23699
23688
|
});
|
|
23700
|
-
var
|
|
23701
|
-
var
|
|
23702
|
-
module.exports =
|
|
23703
|
-
module.exports.config =
|
|
23704
|
-
module.exports.configDotenv =
|
|
23705
|
-
module.exports.parse =
|
|
23706
|
-
module.exports.populate =
|
|
23707
|
-
__require.main === module &&
|
|
23689
|
+
var $ = k();
|
|
23690
|
+
var be = Q();
|
|
23691
|
+
module.exports = $;
|
|
23692
|
+
module.exports.config = $.config;
|
|
23693
|
+
module.exports.configDotenv = $.configDotenv;
|
|
23694
|
+
module.exports.parse = $.parse;
|
|
23695
|
+
module.exports.populate = $.populate;
|
|
23696
|
+
__require.main === module && be(process.argv.slice(2));
|
|
23708
23697
|
}
|
|
23709
23698
|
});
|
|
23710
23699
|
|
|
@@ -69604,7 +69593,45 @@ var FetchproxyTransport = class {
|
|
|
69604
69593
|
}
|
|
69605
69594
|
};
|
|
69606
69595
|
|
|
69596
|
+
// src/view.ts
|
|
69597
|
+
var MAH_VIEWS = ["compact", "full"];
|
|
69598
|
+
var PROJECTED_ENDPOINTS = {
|
|
69599
|
+
"allergies/LoadAllergies": "mah_list_allergies",
|
|
69600
|
+
"HealthIssues/LoadHealthIssuesData": "mah_list_health_issues",
|
|
69601
|
+
"immunizations/LoadImmunizations": "mah_list_immunizations",
|
|
69602
|
+
"medications/LoadMedicationsPage": "mah_list_medications",
|
|
69603
|
+
"Clinical/CareTeam/Load": "mah_list_care_team",
|
|
69604
|
+
"goals/LoadPatientGoals": "mah_list_goals",
|
|
69605
|
+
"test-results/GetList": "mah_list_test_results",
|
|
69606
|
+
"Visits/VisitsList/LoadPast": "mah_list_past_visits",
|
|
69607
|
+
"Insurance/Coverages/GetCoverages": "mah_list_insurance",
|
|
69608
|
+
"conversations/GetConversationList": "mah_list_messages"
|
|
69609
|
+
};
|
|
69610
|
+
var PROJECTED_TOOLS = Object.values(PROJECTED_ENDPOINTS).join(", ");
|
|
69611
|
+
var NOTE = `compact strips image/avatar URLs from every response, and on the readers with a projection derived from a captured payload (${PROJECTED_TOOLS}) also reduces each record to its clinically meaningful fields; "full" returns MyAtriumHealth's payload untouched. Every other reader gets the URL strip only, rather than a field list nobody verified.`;
|
|
69612
|
+
var viewArg = () => viewParam(MAH_VIEWS, { note: NOTE });
|
|
69613
|
+
function isCompact(view) {
|
|
69614
|
+
return resolveView(view, MAH_VIEWS) === "compact";
|
|
69615
|
+
}
|
|
69616
|
+
function viewResponse(view, data) {
|
|
69617
|
+
const rung = resolveView(view, MAH_VIEWS);
|
|
69618
|
+
return minifiedResult(rung === "compact" ? stripMediaUrls(data) : data);
|
|
69619
|
+
}
|
|
69620
|
+
|
|
69607
69621
|
// src/tools/_project.ts
|
|
69622
|
+
function projectionFailure(raw, endpoint) {
|
|
69623
|
+
const tool = PROJECTED_ENDPOINTS[endpoint];
|
|
69624
|
+
const again = tool ? `call ${tool} again with view: 'full'` : "call again with view: 'full'";
|
|
69625
|
+
const out = {
|
|
69626
|
+
projectionFailed: true,
|
|
69627
|
+
endpoint,
|
|
69628
|
+
note: `The portal response no longer matches the expected shape, so the compact projection could not be applied and the record was withheld. To see the portal's payload, ${again}.`
|
|
69629
|
+
};
|
|
69630
|
+
if (raw !== null && typeof raw === "object" && !Array.isArray(raw)) {
|
|
69631
|
+
out.topLevelKeys = Object.keys(raw);
|
|
69632
|
+
}
|
|
69633
|
+
return out;
|
|
69634
|
+
}
|
|
69608
69635
|
function project(raw, compact, endpoint, pick2, completeness) {
|
|
69609
69636
|
if (!compact) return raw;
|
|
69610
69637
|
let out;
|
|
@@ -69615,9 +69642,9 @@ function project(raw, compact, endpoint, pick2, completeness) {
|
|
|
69615
69642
|
}
|
|
69616
69643
|
if (out === void 0) {
|
|
69617
69644
|
console.error(
|
|
69618
|
-
`[myatriumhealth-mcp] ${endpoint}: expected shape missing \u2014
|
|
69645
|
+
`[myatriumhealth-mcp] ${endpoint}: expected shape missing \u2014 withholding the record; view: 'full' returns it raw. The portal may have changed; see docs/MYATRIUMHEALTH-API.md.`
|
|
69619
69646
|
);
|
|
69620
|
-
return raw;
|
|
69647
|
+
return projectionFailure(raw, endpoint);
|
|
69621
69648
|
}
|
|
69622
69649
|
if (completeness === void 0) return out;
|
|
69623
69650
|
let c = {};
|
|
@@ -69636,31 +69663,6 @@ function tidy(o) {
|
|
|
69636
69663
|
return out;
|
|
69637
69664
|
}
|
|
69638
69665
|
|
|
69639
|
-
// src/view.ts
|
|
69640
|
-
var MAH_VIEWS = ["compact", "full"];
|
|
69641
|
-
var PROJECTED_ENDPOINTS = {
|
|
69642
|
-
"allergies/LoadAllergies": "mah_list_allergies",
|
|
69643
|
-
"HealthIssues/LoadHealthIssuesData": "mah_list_health_issues",
|
|
69644
|
-
"immunizations/LoadImmunizations": "mah_list_immunizations",
|
|
69645
|
-
"medications/LoadMedicationsPage": "mah_list_medications",
|
|
69646
|
-
"Clinical/CareTeam/Load": "mah_list_care_team",
|
|
69647
|
-
"goals/LoadPatientGoals": "mah_list_goals",
|
|
69648
|
-
"test-results/GetList": "mah_list_test_results",
|
|
69649
|
-
"Visits/VisitsList/LoadPast": "mah_list_past_visits",
|
|
69650
|
-
"Insurance/Coverages/GetCoverages": "mah_list_insurance",
|
|
69651
|
-
"conversations/GetConversationList": "mah_list_messages"
|
|
69652
|
-
};
|
|
69653
|
-
var PROJECTED_TOOLS = Object.values(PROJECTED_ENDPOINTS).join(", ");
|
|
69654
|
-
var NOTE = `compact strips image/avatar URLs from every response, and on the readers with a projection derived from a captured payload (${PROJECTED_TOOLS}) also reduces each record to its clinically meaningful fields; "full" returns MyAtriumHealth's payload untouched. Every other reader gets the URL strip only, rather than a field list nobody verified.`;
|
|
69655
|
-
var viewArg = () => viewParam(MAH_VIEWS, { note: NOTE });
|
|
69656
|
-
function isCompact(view) {
|
|
69657
|
-
return resolveView(view, MAH_VIEWS) === "compact";
|
|
69658
|
-
}
|
|
69659
|
-
function viewResponse(view, data) {
|
|
69660
|
-
const rung = resolveView(view, MAH_VIEWS);
|
|
69661
|
-
return minifiedResult(rung === "compact" ? stripMediaUrls(data) : data);
|
|
69662
|
-
}
|
|
69663
|
-
|
|
69664
69666
|
// src/tools/account.ts
|
|
69665
69667
|
function registerAccountTools(server, client2, patients2) {
|
|
69666
69668
|
server.registerTool(
|
|
@@ -74833,7 +74835,7 @@ function registerVisitTools(server, client2, patients2) {
|
|
|
74833
74835
|
}
|
|
74834
74836
|
|
|
74835
74837
|
// src/version.ts
|
|
74836
|
-
var VERSION = "1.3.
|
|
74838
|
+
var VERSION = "1.3.1";
|
|
74837
74839
|
|
|
74838
74840
|
// src/index.ts
|
|
74839
74841
|
var dotenvCandidates = [
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/myatriumhealth-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.3.
|
|
9
|
+
"version": "1.3.1",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "@chrischall/myatriumhealth-mcp",
|
|
14
|
-
"version": "1.3.
|
|
14
|
+
"version": "1.3.1",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|