@deslop/gateway 0.1.1231 → 0.1.1233
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/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/(home)-pbfIvNZe.js +1 -0
- package/dist/client/assets/effect-DJFrJOhz.js +17 -0
- package/dist/client/assets/icon-61pmFc-p.svg +1 -0
- package/dist/client/assets/index-GPYSTNwq.js +4 -0
- package/dist/client/assets/index-I1PNwXTF.css +2 -0
- package/dist/client/index.html +4 -5
- package/dist/server.js +11 -45
- package/package.json +2 -2
- package/dist/client/assets/(home)-CQVRM9XF.js +0 -1
- package/dist/client/assets/effect-Mq46Au9-.js +0 -17
- package/dist/client/assets/icon-CY0KDqY_.svg +0 -1
- package/dist/client/assets/icon-dark-B6bEETJE.svg +0 -1
- package/dist/client/assets/index-CiFa0j4x.js +0 -4
- package/dist/client/assets/index-JWBKvPy0.css +0 -2
package/dist/server.js
CHANGED
|
@@ -87989,10 +87989,11 @@ const layerAnnounce = effectDiscard(gen(function* () {
|
|
|
87989
87989
|
});
|
|
87990
87990
|
}));
|
|
87991
87991
|
function layerIcon(icon) {
|
|
87992
|
-
|
|
87992
|
+
const response = succeed$5(text(icon, {
|
|
87993
87993
|
contentType: "image/svg+xml",
|
|
87994
87994
|
headers: { "cache-control": "public, max-age=86400" }
|
|
87995
|
-
}))
|
|
87995
|
+
}));
|
|
87996
|
+
return mergeAll$1(add("GET", "/icon", response), add("GET", "/favicon.ico", response));
|
|
87996
87997
|
}
|
|
87997
87998
|
const layerWeb = unwrap$7(gen(function* () {
|
|
87998
87999
|
const client = fileURLToPath(new URL("./client", import.meta.url));
|
|
@@ -88002,10 +88003,6 @@ const layerWeb = unwrap$7(gen(function* () {
|
|
|
88002
88003
|
background_color: "#0a0a0a",
|
|
88003
88004
|
display: "standalone",
|
|
88004
88005
|
icons: [{
|
|
88005
|
-
sizes: "any",
|
|
88006
|
-
src: "/icon",
|
|
88007
|
-
type: "image/svg+xml"
|
|
88008
|
-
}, {
|
|
88009
88006
|
purpose: "any",
|
|
88010
88007
|
sizes: "512x512",
|
|
88011
88008
|
src: "/apple-touch-icon.png",
|
|
@@ -88311,7 +88308,6 @@ function connectionInfo(connection, now) {
|
|
|
88311
88308
|
onSome: (error) => ({ error })
|
|
88312
88309
|
}),
|
|
88313
88310
|
...pick$1(connection, [
|
|
88314
|
-
"hidden",
|
|
88315
88311
|
"id",
|
|
88316
88312
|
"name",
|
|
88317
88313
|
"tools",
|
|
@@ -88353,11 +88349,6 @@ const ServerUrl = NonEmptyString.check(isMaxLength(2048), makeFilter((value) =>
|
|
|
88353
88349
|
}, { expected: "a public HTTPS URL without credentials or a fragment" }));
|
|
88354
88350
|
const AddServer = Struct({ url: ServerUrl });
|
|
88355
88351
|
const ServerParams = Struct({ id: ServerId });
|
|
88356
|
-
const ToolVisibility = Struct({
|
|
88357
|
-
hidden: Boolean$5,
|
|
88358
|
-
id: ServerId,
|
|
88359
|
-
tool: NonEmptyString
|
|
88360
|
-
});
|
|
88361
88352
|
const Metadata = Struct({
|
|
88362
88353
|
authorization_endpoint: NonEmptyString,
|
|
88363
88354
|
authorization_response_iss_parameter_supported: optionalKey(Boolean$5),
|
|
@@ -88396,7 +88387,6 @@ const ServerIcon = Struct({
|
|
|
88396
88387
|
const ConnectionStore = Record$1(String$6, Struct({
|
|
88397
88388
|
error: optionalKey(String$6),
|
|
88398
88389
|
generation: NonEmptyString,
|
|
88399
|
-
hidden: ArraySchema(String$6),
|
|
88400
88390
|
icons: optionalKey(ArraySchema(ServerIcon)),
|
|
88401
88391
|
id: ServerId,
|
|
88402
88392
|
instructions: optionalKey(String$6),
|
|
@@ -88409,7 +88399,6 @@ const ConnectionStore = Record$1(String$6, Struct({
|
|
|
88409
88399
|
}));
|
|
88410
88400
|
const ConnectionInfo = Struct({
|
|
88411
88401
|
error: optionalKey(String$6),
|
|
88412
|
-
hidden: ArraySchema(String$6),
|
|
88413
88402
|
icons: ArraySchema(ServerIcon),
|
|
88414
88403
|
id: ServerId,
|
|
88415
88404
|
name: NonEmptyString,
|
|
@@ -115266,7 +115255,6 @@ var Connections = class Connections extends Service$1()("@deslop/gateway/service
|
|
|
115266
115255
|
});
|
|
115267
115256
|
const connection = yield* discover({
|
|
115268
115257
|
generation: yield* nonce,
|
|
115269
|
-
hidden: [],
|
|
115270
115258
|
id,
|
|
115271
115259
|
name: capitalize(base),
|
|
115272
115260
|
tools: [],
|
|
@@ -115356,16 +115344,7 @@ var Connections = class Connections extends Service$1()("@deslop/gateway/service
|
|
|
115356
115344
|
}), timeout("30 seconds"), catch_$2((cause) => fail(connection, cause)));
|
|
115357
115345
|
}, failed("Cannot finish the connection")),
|
|
115358
115346
|
definitions: map$5(get(state), values),
|
|
115359
|
-
disconnect: (id, user) => manage(id, user, (found) => some$1({
|
|
115360
|
-
...omit$1(found, ["error"]),
|
|
115361
|
-
link: { _tag: "Disconnected" },
|
|
115362
|
-
tools: []
|
|
115363
|
-
})),
|
|
115364
115347
|
get: get$11,
|
|
115365
|
-
hide: (visibility, user) => manage(visibility.id, user, (found) => some$1({
|
|
115366
|
-
...found,
|
|
115367
|
-
hidden: [...filter$5(found.hidden, (tool) => tool !== visibility.tool), ...filter$5([visibility.tool], () => visibility.hidden)]
|
|
115368
|
-
})),
|
|
115369
115348
|
list,
|
|
115370
115349
|
remove: (id, user) => manage(id, user, () => none()),
|
|
115371
115350
|
report: fnUntraced(function* (id, generation, outcome) {
|
|
@@ -115428,7 +115407,7 @@ const HttpHandlers = use((router) => gen(function* () {
|
|
|
115428
115407
|
yield* router.add("GET", "/oauth/callback/:id", flatMap$2(params, (params) => callback(fromUndefinedOr(params["id"]))));
|
|
115429
115408
|
}));
|
|
115430
115409
|
// src/routes/icon.svg
|
|
115431
|
-
var icon_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\" shape-rendering=\"crispEdges\"><
|
|
115410
|
+
var icon_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 64\" shape-rendering=\"crispEdges\"><path fill=\"#8b7ec8\" d=\"M13 20h2v1h-2zM15 21h2v1h-2zM17 22h2v1h-2zM19 23h2v1h-2zM19 24h1v17h-1zM21 24h2v1h-2zM22 25h3v1h-3zM15 26h1v3h-1zM22 26h2v16h-2zM25 26h2v1h-2zM16 27h2v3h-2zM27 27h2v1h-2zM18 28h1v3h-1zM29 28h2v1h-2zM30 29h3v1h-3zM30 30h2v3h-2zM33 30h2v1h-2zM24 31h2v3h-2zM35 31h2v1h-2zM26 32h2v3h-2zM37 32h2v1h-2zM28 33h2v3h-2zM31 33h1v4h-1zM37 33h1v17h-1zM39 33h2v1h-2zM30 34h1v3h-1zM40 34h3v1h-3zM32 35h2v3h-2zM40 35h2v16h-2zM43 35h2v1h-2zM34 36h2v3h-2zM45 36h2v1h-2zM36 37h1v3h-1zM42 40h2v3h-2zM44 41h2v3h-2z\"/><path fill=\"#0a0a0a\" d=\"M13 8h2v1h-2zM11 9h2v1h-2zM15 9h2v1h-2zM9 10h2v1h-2zM17 10h1v3h-1zM8 11h1v1h-1zM7 12h1v2h-1zM18 12h1v1h-1zM19 13h2v1h-2zM8 14h1v4h-1zM21 14h2v1h-2zM23 15h2v1h-2zM25 16h2v1h-2zM27 17h2v1h-2zM9 18h2v1h-2zM29 18h2v1h-2zM11 19h2v1h-2zM31 19h2v1h-2zM12 20h1v1h-1zM33 20h2v1h-2zM13 21h2v1h-2zM35 21h2v1h-2zM15 22h2v1h-2zM37 22h2v1h-2zM17 23h2v1h-2zM39 23h2v1h-2zM15 24h2v1h-2zM18 24h1v1h-1zM41 24h2v1h-2zM14 25h1v4h-1zM43 25h2v1h-2zM45 26h2v1h-2zM47 27h2v1h-2zM27 28h2v1h-2zM49 28h6v1h-6zM15 29h1v1h-1zM28 29h2v1h-2zM55 29h1v1h-1zM16 30h2v1h-2zM56 30h1v2h-1zM18 31h1v8h-1zM34 31h1v2h-1zM35 32h2v1h-2zM55 32h1v3h-1zM36 33h1v1h-1zM27 35h1v4h-1zM53 35h2v1h-2zM28 36h2v1h-2zM51 36h2v1h-2zM30 37h2v1h-2zM45 37h6v1h-6zM17 38h1v1h-1zM28 38h1v1h-1zM32 38h2v1h-2zM46 38h2v1h-2zM15 39h2v1h-2zM29 39h2v1h-2zM34 39h2v1h-2zM48 39h1v1h-1zM14 40h1v4h-1zM31 40h1v4h-1zM36 40h1v8h-1zM49 40h1v4h-1zM15 44h2v1h-2zM29 44h2v1h-2zM45 44h1v4h-1zM47 44h2v1h-2zM17 45h2v1h-2zM27 45h2v1h-2zM46 45h1v1h-1zM19 46h2v1h-2zM25 46h2v1h-2zM21 47h4v1h-4zM35 47h1v1h-1zM46 47h1v1h-1zM33 48h2v1h-2zM47 48h2v1h-2zM32 49h1v4h-1zM49 49h1v4h-1zM33 53h2v1h-2zM47 53h2v1h-2zM35 54h2v1h-2zM45 54h2v1h-2zM37 55h2v1h-2zM43 55h2v1h-2zM39 56h4v1h-4z\"/><path fill=\"#575653\" d=\"M13 9h2v2h-2zM11 10h2v2h-2zM9 11h2v1h-2zM15 13h4v4h-4zM13 14h2v2h-2zM19 14h2v5h-2zM21 15h2v5h-2zM23 16h2v5h-2zM17 17h2v1h-2zM25 17h2v5h-2zM27 18h2v5h-2zM29 19h2v5h-2zM31 20h2v5h-2zM33 21h2v5h-2zM35 22h2v5h-2zM37 23h2v5h-2zM39 24h2v5h-2zM41 25h2v5h-2zM43 26h2v5h-2zM45 27h2v5h-2zM47 28h2v3h-2zM49 29h6v1h-6zM49 30h4v1h-4zM49 31h2v1h-2z\"/><path fill=\"#403e3c\" d=\"M8 12h1v2h-1zM9 13h2v5h-2zM11 16h2v3h-2zM13 17h2v3h-2zM15 18h2v3h-2zM17 19h2v3h-2zM19 20h2v3h-2zM21 21h2v3h-2zM23 22h2v3h-2zM25 23h2v3h-2zM27 24h2v3h-2zM29 25h2v3h-2zM31 26h2v3h-2zM33 27h2v3h-2zM35 28h2v3h-2zM37 29h2v3h-2zM39 30h2v3h-2zM41 31h2v3h-2zM43 32h2v3h-2zM47 32h2v5h-2zM45 33h2v3h-2zM49 33h1v2h-1z\"/><path fill=\"#a699d0\" d=\"M17 24h1v2h-1zM20 24h1v18h-1zM16 25h1v1h-1zM18 25h1v2h-1zM21 25h1v17h-1zM26 29h2v2h-2zM28 30h2v2h-2zM33 33h3v1h-3zM38 33h1v18h-1zM34 34h3v1h-3zM39 34h1v17h-1zM36 35h1v1h-1zM44 38h2v2h-2zM46 39h2v1h-2zM46 40h1v1h-1z\"/><path fill=\"#5e409d\" d=\"M24 26h1v4h-1zM25 27h2v2h-2zM25 29h1v1h-1zM32 30h1v4h-1zM33 31h1v2h-1zM24 34h2v8h-2zM26 35h1v6h-1zM42 35h1v4h-1zM43 36h2v2h-2zM43 38h1v1h-1zM47 41h2v3h-2zM46 42h1v3h-1zM42 43h2v8h-2zM44 44h1v6h-1z\"/><path fill=\"#6f6e69\" d=\"M15 10h2v1h-2zM13 11h2v1h-2zM9 12h4v1h-4zM11 15h2v1h-2zM13 16h2v1h-2zM15 17h2v1h-2zM17 18h2v1h-2zM19 19h2v1h-2zM21 20h2v1h-2zM23 21h2v1h-2zM25 22h2v1h-2zM27 23h2v1h-2zM29 24h2v1h-2zM31 25h2v1h-2zM33 26h2v1h-2zM35 27h2v1h-2zM37 28h2v1h-2zM39 29h2v1h-2zM41 30h2v1h-2zM53 30h2v1h-2zM43 31h2v1h-2zM47 31h2v1h-2zM51 31h2v1h-2zM45 32h2v1h-2zM49 32h2v1h-2z\"/><path fill=\"#b7b5ac\" d=\"M15 41h2v3h-2zM17 42h2v3h-2zM19 43h2v3h-2zM21 44h2v3h-2zM33 50h2v3h-2zM35 51h2v3h-2zM37 52h2v3h-2zM39 53h2v3h-2z\"/><path fill=\"#878580\" d=\"M29 41h2v3h-2zM27 42h2v3h-2zM25 43h2v3h-2zM23 44h2v3h-2zM47 50h2v3h-2zM45 51h2v3h-2zM43 52h2v3h-2zM41 53h2v3h-2z\"/><path fill=\"#343331\" d=\"M15 11h2v2h-2zM13 12h2v2h-2zM11 13h2v2h-2zM55 30h1v2h-1zM53 31h2v4h-2zM51 32h2v4h-2zM50 33h1v4h-1zM49 35h1v2h-1z\"/><path fill=\"#e6e4d9\" d=\"M15 40h2v1h-2zM29 40h2v1h-2zM17 41h2v1h-2zM27 41h2v1h-2zM19 42h2v1h-2zM25 42h2v1h-2zM21 43h4v1h-4zM33 49h2v1h-2zM47 49h2v1h-2zM35 50h2v1h-2zM45 50h2v1h-2zM37 51h2v1h-2zM43 51h2v1h-2zM39 52h4v1h-4z\"/><path fill=\"#cecdc3\" d=\"M17 39h2v2h-2zM27 39h2v2h-2zM19 41h1v1h-1zM26 41h1v1h-1zM21 42h4v1h-4zM35 48h2v2h-2zM45 48h2v2h-2zM37 50h1v1h-1zM44 50h1v1h-1zM39 51h4v1h-4z\"/><path fill=\"#000000\" fill-opacity=\"0.353\" d=\"M17 46h2v1h-2zM27 46h2v1h-2zM19 47h2v1h-2zM25 47h2v1h-2zM21 48h4v1h-4zM35 55h2v1h-2zM45 55h2v1h-2zM37 56h2v1h-2zM43 56h2v1h-2zM39 57h4v1h-4z\"/><path fill=\"#c4b9e0\" d=\"M15 25h1v1h-1zM16 26h2v1h-2zM18 27h1v1h-1zM24 30h2v1h-2zM26 31h2v1h-2zM28 32h2v1h-2zM30 33h1v1h-1zM32 34h2v1h-2zM34 35h2v1h-2zM36 36h1v1h-1zM42 39h2v1h-2zM44 40h2v1h-2zM47 40h2v1h-2zM46 41h1v1h-1z\"/></svg>\n";
|
|
115432
115411
|
// src/rpcs/contracts.ts
|
|
115433
115412
|
var RpcContracts = class extends make$33(make$39("gateway.servers", {
|
|
115434
115413
|
error: AuthError,
|
|
@@ -115442,15 +115421,9 @@ var RpcContracts = class extends make$33(make$39("gateway.servers", {
|
|
|
115442
115421
|
error: AuthError,
|
|
115443
115422
|
payload: AddServer,
|
|
115444
115423
|
success: ConnectionInfo
|
|
115445
|
-
}), make$39("gateway.disconnect", {
|
|
115446
|
-
error: AuthError,
|
|
115447
|
-
payload: ServerParams
|
|
115448
115424
|
}), make$39("gateway.remove", {
|
|
115449
115425
|
error: AuthError,
|
|
115450
115426
|
payload: ServerParams
|
|
115451
|
-
}), make$39("gateway.hide", {
|
|
115452
|
-
error: AuthError,
|
|
115453
|
-
payload: ToolVisibility
|
|
115454
115427
|
})).middleware(RpcAuth) {};
|
|
115455
115428
|
// src/rpcs/handlers.ts
|
|
115456
115429
|
const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
@@ -115460,12 +115433,6 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
|
115460
115433
|
return yield* connections.add(input.url, yield* CurrentUser);
|
|
115461
115434
|
}),
|
|
115462
115435
|
"gateway.calls": () => unwrap$3(map$5(CurrentUser, connections.calls)),
|
|
115463
|
-
"gateway.disconnect": fnUntraced(function* (input) {
|
|
115464
|
-
return yield* connections.disconnect(input.id, yield* CurrentUser);
|
|
115465
|
-
}),
|
|
115466
|
-
"gateway.hide": fnUntraced(function* (input) {
|
|
115467
|
-
return yield* connections.hide(input, yield* CurrentUser);
|
|
115468
|
-
}),
|
|
115469
115436
|
"gateway.remove": fnUntraced(function* (input) {
|
|
115470
115437
|
return yield* connections.remove(input.id, yield* CurrentUser);
|
|
115471
115438
|
}),
|
|
@@ -115517,9 +115484,9 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115517
115484
|
});
|
|
115518
115485
|
const visible = yield* make$44(empty$8());
|
|
115519
115486
|
const installed = yield* make$44({});
|
|
115520
|
-
const usable = fnUntraced(function* (id, generation
|
|
115487
|
+
const usable = fnUntraced(function* (id, generation) {
|
|
115521
115488
|
const now = yield* currentTimeMillis;
|
|
115522
|
-
return exists(yield* option$1(connections.get(id)), (found) => found.generation === generation && connectionStatus(found, now) === "Connected"
|
|
115489
|
+
return exists(yield* option$1(connections.get(id)), (found) => found.generation === generation && connectionStatus(found, now) === "Connected");
|
|
115523
115490
|
});
|
|
115524
115491
|
const refreshes = yield* make$70(1);
|
|
115525
115492
|
const scope$2 = yield* scope;
|
|
@@ -115530,7 +115497,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115530
115497
|
});
|
|
115531
115498
|
const prune = fnUntraced(function* (registry) {
|
|
115532
115499
|
const definitions = yield* connections.definitions;
|
|
115533
|
-
for (const entry of toEntries(yield* get$1(installed))) if (!some(definitions, (server) => server.id === entry[1].id && server.generation === entry[1].generation && server.link._tag !== "Disconnected"
|
|
115500
|
+
for (const entry of toEntries(yield* get$1(installed))) if (!some(definitions, (server) => server.id === entry[1].id && server.generation === entry[1].generation && server.link._tag !== "Disconnected")) yield* remove(entry[0], registry);
|
|
115534
115501
|
});
|
|
115535
115502
|
const updateVisible = fnUntraced(function* (server, names, registry) {
|
|
115536
115503
|
if (yield* modify$1(visible, (current) => {
|
|
@@ -115543,7 +115510,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115543
115510
|
if (!has(yield* get$1(visible), options.target)) return false;
|
|
115544
115511
|
const entry = (yield* get$1(installed))[options.target];
|
|
115545
115512
|
if (entry === void 0) return false;
|
|
115546
|
-
return yield* usable(entry.id, entry.generation
|
|
115513
|
+
return yield* usable(entry.id, entry.generation);
|
|
115547
115514
|
})).layer);
|
|
115548
115515
|
const upstreamFor = fnUntraced(function* (server) {
|
|
115549
115516
|
const current = yield* connections.get(server.id);
|
|
@@ -115629,7 +115596,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115629
115596
|
"mode"
|
|
115630
115597
|
]);
|
|
115631
115598
|
const names = make$73();
|
|
115632
|
-
for (const tool of
|
|
115599
|
+
for (const tool of found.tools) {
|
|
115633
115600
|
const upstreamName = tool.name;
|
|
115634
115601
|
const name = yield* namespaced(`${server.id}__${tool.name}`);
|
|
115635
115602
|
const fingerprint = yield* encodeEffect(fromJsonString(Tool$5))(tool);
|
|
@@ -115651,8 +115618,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115651
115618
|
[name]: {
|
|
115652
115619
|
fingerprint: `${server.generation}:${fingerprint}`,
|
|
115653
115620
|
generation: server.generation,
|
|
115654
|
-
id: server.id
|
|
115655
|
-
tool: upstreamName
|
|
115621
|
+
id: server.id
|
|
115656
115622
|
}
|
|
115657
115623
|
}));
|
|
115658
115624
|
}
|
|
@@ -143775,7 +143741,7 @@ const ToolHandlers = Tools.toLayer(gen(function* () {
|
|
|
143775
143741
|
onSome: (instructions) => ({ instructions })
|
|
143776
143742
|
}),
|
|
143777
143743
|
status: connectionStatus(server, now),
|
|
143778
|
-
tools: length(
|
|
143744
|
+
tools: length(server.tools)
|
|
143779
143745
|
})) };
|
|
143780
143746
|
}) });
|
|
143781
143747
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deslop/gateway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1233",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/MP281X/deslop.git",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=26"
|
|
34
34
|
},
|
|
35
|
-
"fingerprint": "
|
|
35
|
+
"fingerprint": "e88c3bfa5c0dd63a1e02b41780a1decbdb09a3d57b6a62e3f3421d5baf9e913c"
|
|
36
36
|
}
|