@deslop/gateway 0.1.1232 → 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 +8 -43
- 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
|
@@ -88003,10 +88003,6 @@ const layerWeb = unwrap$7(gen(function* () {
|
|
|
88003
88003
|
background_color: "#0a0a0a",
|
|
88004
88004
|
display: "standalone",
|
|
88005
88005
|
icons: [{
|
|
88006
|
-
sizes: "any",
|
|
88007
|
-
src: "/icon",
|
|
88008
|
-
type: "image/svg+xml"
|
|
88009
|
-
}, {
|
|
88010
88006
|
purpose: "any",
|
|
88011
88007
|
sizes: "512x512",
|
|
88012
88008
|
src: "/apple-touch-icon.png",
|
|
@@ -88312,7 +88308,6 @@ function connectionInfo(connection, now) {
|
|
|
88312
88308
|
onSome: (error) => ({ error })
|
|
88313
88309
|
}),
|
|
88314
88310
|
...pick$1(connection, [
|
|
88315
|
-
"hidden",
|
|
88316
88311
|
"id",
|
|
88317
88312
|
"name",
|
|
88318
88313
|
"tools",
|
|
@@ -88354,11 +88349,6 @@ const ServerUrl = NonEmptyString.check(isMaxLength(2048), makeFilter((value) =>
|
|
|
88354
88349
|
}, { expected: "a public HTTPS URL without credentials or a fragment" }));
|
|
88355
88350
|
const AddServer = Struct({ url: ServerUrl });
|
|
88356
88351
|
const ServerParams = Struct({ id: ServerId });
|
|
88357
|
-
const ToolVisibility = Struct({
|
|
88358
|
-
hidden: Boolean$5,
|
|
88359
|
-
id: ServerId,
|
|
88360
|
-
tool: NonEmptyString
|
|
88361
|
-
});
|
|
88362
88352
|
const Metadata = Struct({
|
|
88363
88353
|
authorization_endpoint: NonEmptyString,
|
|
88364
88354
|
authorization_response_iss_parameter_supported: optionalKey(Boolean$5),
|
|
@@ -88397,7 +88387,6 @@ const ServerIcon = Struct({
|
|
|
88397
88387
|
const ConnectionStore = Record$1(String$6, Struct({
|
|
88398
88388
|
error: optionalKey(String$6),
|
|
88399
88389
|
generation: NonEmptyString,
|
|
88400
|
-
hidden: ArraySchema(String$6),
|
|
88401
88390
|
icons: optionalKey(ArraySchema(ServerIcon)),
|
|
88402
88391
|
id: ServerId,
|
|
88403
88392
|
instructions: optionalKey(String$6),
|
|
@@ -88410,7 +88399,6 @@ const ConnectionStore = Record$1(String$6, Struct({
|
|
|
88410
88399
|
}));
|
|
88411
88400
|
const ConnectionInfo = Struct({
|
|
88412
88401
|
error: optionalKey(String$6),
|
|
88413
|
-
hidden: ArraySchema(String$6),
|
|
88414
88402
|
icons: ArraySchema(ServerIcon),
|
|
88415
88403
|
id: ServerId,
|
|
88416
88404
|
name: NonEmptyString,
|
|
@@ -115267,7 +115255,6 @@ var Connections = class Connections extends Service$1()("@deslop/gateway/service
|
|
|
115267
115255
|
});
|
|
115268
115256
|
const connection = yield* discover({
|
|
115269
115257
|
generation: yield* nonce,
|
|
115270
|
-
hidden: [],
|
|
115271
115258
|
id,
|
|
115272
115259
|
name: capitalize(base),
|
|
115273
115260
|
tools: [],
|
|
@@ -115357,16 +115344,7 @@ var Connections = class Connections extends Service$1()("@deslop/gateway/service
|
|
|
115357
115344
|
}), timeout("30 seconds"), catch_$2((cause) => fail(connection, cause)));
|
|
115358
115345
|
}, failed("Cannot finish the connection")),
|
|
115359
115346
|
definitions: map$5(get(state), values),
|
|
115360
|
-
disconnect: (id, user) => manage(id, user, (found) => some$1({
|
|
115361
|
-
...omit$1(found, ["error"]),
|
|
115362
|
-
link: { _tag: "Disconnected" },
|
|
115363
|
-
tools: []
|
|
115364
|
-
})),
|
|
115365
115347
|
get: get$11,
|
|
115366
|
-
hide: (visibility, user) => manage(visibility.id, user, (found) => some$1({
|
|
115367
|
-
...found,
|
|
115368
|
-
hidden: [...filter$5(found.hidden, (tool) => tool !== visibility.tool), ...filter$5([visibility.tool], () => visibility.hidden)]
|
|
115369
|
-
})),
|
|
115370
115348
|
list,
|
|
115371
115349
|
remove: (id, user) => manage(id, user, () => none()),
|
|
115372
115350
|
report: fnUntraced(function* (id, generation, outcome) {
|
|
@@ -115429,7 +115407,7 @@ const HttpHandlers = use((router) => gen(function* () {
|
|
|
115429
115407
|
yield* router.add("GET", "/oauth/callback/:id", flatMap$2(params, (params) => callback(fromUndefinedOr(params["id"]))));
|
|
115430
115408
|
}));
|
|
115431
115409
|
// src/routes/icon.svg
|
|
115432
|
-
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";
|
|
115433
115411
|
// src/rpcs/contracts.ts
|
|
115434
115412
|
var RpcContracts = class extends make$33(make$39("gateway.servers", {
|
|
115435
115413
|
error: AuthError,
|
|
@@ -115443,15 +115421,9 @@ var RpcContracts = class extends make$33(make$39("gateway.servers", {
|
|
|
115443
115421
|
error: AuthError,
|
|
115444
115422
|
payload: AddServer,
|
|
115445
115423
|
success: ConnectionInfo
|
|
115446
|
-
}), make$39("gateway.disconnect", {
|
|
115447
|
-
error: AuthError,
|
|
115448
|
-
payload: ServerParams
|
|
115449
115424
|
}), make$39("gateway.remove", {
|
|
115450
115425
|
error: AuthError,
|
|
115451
115426
|
payload: ServerParams
|
|
115452
|
-
}), make$39("gateway.hide", {
|
|
115453
|
-
error: AuthError,
|
|
115454
|
-
payload: ToolVisibility
|
|
115455
115427
|
})).middleware(RpcAuth) {};
|
|
115456
115428
|
// src/rpcs/handlers.ts
|
|
115457
115429
|
const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
@@ -115461,12 +115433,6 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
|
|
|
115461
115433
|
return yield* connections.add(input.url, yield* CurrentUser);
|
|
115462
115434
|
}),
|
|
115463
115435
|
"gateway.calls": () => unwrap$3(map$5(CurrentUser, connections.calls)),
|
|
115464
|
-
"gateway.disconnect": fnUntraced(function* (input) {
|
|
115465
|
-
return yield* connections.disconnect(input.id, yield* CurrentUser);
|
|
115466
|
-
}),
|
|
115467
|
-
"gateway.hide": fnUntraced(function* (input) {
|
|
115468
|
-
return yield* connections.hide(input, yield* CurrentUser);
|
|
115469
|
-
}),
|
|
115470
115436
|
"gateway.remove": fnUntraced(function* (input) {
|
|
115471
115437
|
return yield* connections.remove(input.id, yield* CurrentUser);
|
|
115472
115438
|
}),
|
|
@@ -115518,9 +115484,9 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115518
115484
|
});
|
|
115519
115485
|
const visible = yield* make$44(empty$8());
|
|
115520
115486
|
const installed = yield* make$44({});
|
|
115521
|
-
const usable = fnUntraced(function* (id, generation
|
|
115487
|
+
const usable = fnUntraced(function* (id, generation) {
|
|
115522
115488
|
const now = yield* currentTimeMillis;
|
|
115523
|
-
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");
|
|
115524
115490
|
});
|
|
115525
115491
|
const refreshes = yield* make$70(1);
|
|
115526
115492
|
const scope$2 = yield* scope;
|
|
@@ -115531,7 +115497,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115531
115497
|
});
|
|
115532
115498
|
const prune = fnUntraced(function* (registry) {
|
|
115533
115499
|
const definitions = yield* connections.definitions;
|
|
115534
|
-
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);
|
|
115535
115501
|
});
|
|
115536
115502
|
const updateVisible = fnUntraced(function* (server, names, registry) {
|
|
115537
115503
|
if (yield* modify$1(visible, (current) => {
|
|
@@ -115544,7 +115510,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115544
115510
|
if (!has(yield* get$1(visible), options.target)) return false;
|
|
115545
115511
|
const entry = (yield* get$1(installed))[options.target];
|
|
115546
115512
|
if (entry === void 0) return false;
|
|
115547
|
-
return yield* usable(entry.id, entry.generation
|
|
115513
|
+
return yield* usable(entry.id, entry.generation);
|
|
115548
115514
|
})).layer);
|
|
115549
115515
|
const upstreamFor = fnUntraced(function* (server) {
|
|
115550
115516
|
const current = yield* connections.get(server.id);
|
|
@@ -115630,7 +115596,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115630
115596
|
"mode"
|
|
115631
115597
|
]);
|
|
115632
115598
|
const names = make$73();
|
|
115633
|
-
for (const tool of
|
|
115599
|
+
for (const tool of found.tools) {
|
|
115634
115600
|
const upstreamName = tool.name;
|
|
115635
115601
|
const name = yield* namespaced(`${server.id}__${tool.name}`);
|
|
115636
115602
|
const fingerprint = yield* encodeEffect(fromJsonString(Tool$5))(tool);
|
|
@@ -115652,8 +115618,7 @@ var Gateway = class Gateway extends Service$1()("@deslop/gateway/services/gatewa
|
|
|
115652
115618
|
[name]: {
|
|
115653
115619
|
fingerprint: `${server.generation}:${fingerprint}`,
|
|
115654
115620
|
generation: server.generation,
|
|
115655
|
-
id: server.id
|
|
115656
|
-
tool: upstreamName
|
|
115621
|
+
id: server.id
|
|
115657
115622
|
}
|
|
115658
115623
|
}));
|
|
115659
115624
|
}
|
|
@@ -143776,7 +143741,7 @@ const ToolHandlers = Tools.toLayer(gen(function* () {
|
|
|
143776
143741
|
onSome: (instructions) => ({ instructions })
|
|
143777
143742
|
}),
|
|
143778
143743
|
status: connectionStatus(server, now),
|
|
143779
|
-
tools: length(
|
|
143744
|
+
tools: length(server.tools)
|
|
143780
143745
|
})) };
|
|
143781
143746
|
}) });
|
|
143782
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
|
}
|