@suveren/gateway 0.3.12 → 0.3.13
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.
|
@@ -27,7 +27,11 @@
|
|
|
27
27
|
"scopes": ["w_member_social"],
|
|
28
28
|
"credentialKeys": { "clientId": "clientId", "clientSecret": "clientSecret" },
|
|
29
29
|
"tokenStorage": "accessToken",
|
|
30
|
-
"extraParams": {}
|
|
30
|
+
"extraParams": {},
|
|
31
|
+
"healthCheck": {
|
|
32
|
+
"url": "https://api.linkedin.com/v2/me",
|
|
33
|
+
"accountFields": ["localizedFirstName", "localizedLastName"]
|
|
34
|
+
}
|
|
31
35
|
},
|
|
32
36
|
"toolGating": {
|
|
33
37
|
"default": {
|
|
@@ -1724,6 +1724,12 @@ function resolveOrigin(req) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
var oauthRedirectUris = /* @__PURE__ */ new Map();
|
|
1726
1726
|
var manifestCache = null;
|
|
1727
|
+
function resolvePath(obj, path) {
|
|
1728
|
+
const v = path.split(".").reduce((acc, key) => {
|
|
1729
|
+
return acc && typeof acc === "object" ? acc[key] : void 0;
|
|
1730
|
+
}, obj);
|
|
1731
|
+
return v == null ? void 0 : String(v);
|
|
1732
|
+
}
|
|
1727
1733
|
function decodeJwtEmail(idToken) {
|
|
1728
1734
|
if (!idToken) return void 0;
|
|
1729
1735
|
try {
|
|
@@ -1864,7 +1870,27 @@ app.get("/auth/oauth/:integrationId/health", authGuard, async (req, res) => {
|
|
|
1864
1870
|
return;
|
|
1865
1871
|
}
|
|
1866
1872
|
if (!/refresh/i.test(oauth.tokenStorage)) {
|
|
1867
|
-
|
|
1873
|
+
const hc = oauth.healthCheck;
|
|
1874
|
+
if (!hc?.url) {
|
|
1875
|
+
res.json({ status: "unverified", account });
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
try {
|
|
1879
|
+
const r = await fetch(hc.url, { headers: { Authorization: `Bearer ${token}` } });
|
|
1880
|
+
if (r.ok) {
|
|
1881
|
+
const data = await r.json().catch(() => ({}));
|
|
1882
|
+
const probed = (hc.accountFields ?? []).map((f) => resolvePath(data, f)).filter((v) => !!v).join(" ").trim();
|
|
1883
|
+
res.json({ status: "ok", account: probed || account });
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
if (r.status === 401 || r.status === 403) {
|
|
1887
|
+
res.json({ status: "failed", account, error: `token rejected (HTTP ${r.status})` });
|
|
1888
|
+
return;
|
|
1889
|
+
}
|
|
1890
|
+
res.json({ status: "unverified", account });
|
|
1891
|
+
} catch (err) {
|
|
1892
|
+
res.json({ status: "unverified", account, error: err instanceof Error ? err.message : "probe failed" });
|
|
1893
|
+
}
|
|
1868
1894
|
return;
|
|
1869
1895
|
}
|
|
1870
1896
|
try {
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
11
|
+
* Last updated: Wed, 08 Jul 2026 06:47:45 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -153,7 +153,11 @@ declare module "node:fs/promises" {
|
|
|
153
153
|
* @return Fulfills with `undefined` upon success.
|
|
154
154
|
*/
|
|
155
155
|
appendFile(
|
|
156
|
-
data:
|
|
156
|
+
data:
|
|
157
|
+
| string
|
|
158
|
+
| NodeJS.ArrayBufferView
|
|
159
|
+
| Iterable<string | NodeJS.ArrayBufferView>
|
|
160
|
+
| AsyncIterable<string | NodeJS.ArrayBufferView>,
|
|
157
161
|
options?:
|
|
158
162
|
| (ObjectEncodingOptions & Abortable)
|
|
159
163
|
| BufferEncoding
|
|
@@ -470,7 +474,11 @@ declare module "node:fs/promises" {
|
|
|
470
474
|
* @since v10.0.0
|
|
471
475
|
*/
|
|
472
476
|
writeFile(
|
|
473
|
-
data:
|
|
477
|
+
data:
|
|
478
|
+
| string
|
|
479
|
+
| NodeJS.ArrayBufferView
|
|
480
|
+
| Iterable<string | NodeJS.ArrayBufferView>
|
|
481
|
+
| AsyncIterable<string | NodeJS.ArrayBufferView>,
|
|
474
482
|
options?:
|
|
475
483
|
| (ObjectEncodingOptions & Abortable)
|
|
476
484
|
| BufferEncoding
|
|
@@ -1208,8 +1216,7 @@ declare module "node:fs/promises" {
|
|
|
1208
1216
|
| string
|
|
1209
1217
|
| NodeJS.ArrayBufferView
|
|
1210
1218
|
| Iterable<string | NodeJS.ArrayBufferView>
|
|
1211
|
-
| AsyncIterable<string | NodeJS.ArrayBufferView
|
|
1212
|
-
| Stream,
|
|
1219
|
+
| AsyncIterable<string | NodeJS.ArrayBufferView>,
|
|
1213
1220
|
options?:
|
|
1214
1221
|
| (ObjectEncodingOptions & {
|
|
1215
1222
|
mode?: Mode | undefined;
|
|
@@ -1240,7 +1247,11 @@ declare module "node:fs/promises" {
|
|
|
1240
1247
|
*/
|
|
1241
1248
|
function appendFile(
|
|
1242
1249
|
path: PathLike | FileHandle,
|
|
1243
|
-
data:
|
|
1250
|
+
data:
|
|
1251
|
+
| string
|
|
1252
|
+
| NodeJS.ArrayBufferView
|
|
1253
|
+
| Iterable<string | NodeJS.ArrayBufferView>
|
|
1254
|
+
| AsyncIterable<string | NodeJS.ArrayBufferView>,
|
|
1244
1255
|
options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null,
|
|
1245
1256
|
): Promise<void>;
|
|
1246
1257
|
/**
|
|
@@ -1432,7 +1443,6 @@ declare module "node:fs/promises" {
|
|
|
1432
1443
|
* When copying a directory to another directory, globs are not supported and
|
|
1433
1444
|
* behavior is similar to `cp dir1/ dir2/`.
|
|
1434
1445
|
* @since v16.7.0
|
|
1435
|
-
* @experimental
|
|
1436
1446
|
* @param src source path to copy.
|
|
1437
1447
|
* @param dest destination path to copy to.
|
|
1438
1448
|
* @return Fulfills with `undefined` upon success.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~8.3.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "a59119b073061829bc67a5bf6bc2b8ecb0a5a6196058e3c73172a00440f4e16d",
|
|
154
154
|
"typeScriptVersion": "5.6"
|
|
155
155
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suveren/gateway",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "Suveren gateway — local agent gateway built in compliance with the Human Agency Protocol (HAP). Runs the UI, control plane, and MCP server in one Node process.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.js",
|