@deslop/auth 0.1.1304 → 0.1.1307
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/server.js +5 -11
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -108490,7 +108490,7 @@ var AiGateway = class AiGateway extends Service$1()("@deslop/runtime/server/ai/A
|
|
|
108490
108490
|
});
|
|
108491
108491
|
const gateway = yield* AiGateway;
|
|
108492
108492
|
const client = yield* make$7({
|
|
108493
|
-
apiUrl: yield* gateway.apiUrl
|
|
108493
|
+
apiUrl: `${yield* gateway.apiUrl}/connection`,
|
|
108494
108494
|
transformClient: yield* gateway.authorize(userId)
|
|
108495
108495
|
});
|
|
108496
108496
|
return yield* provideService$2(make$6({
|
|
@@ -108505,16 +108505,10 @@ var AiGateway = class AiGateway extends Service$1()("@deslop/runtime/server/ai/A
|
|
|
108505
108505
|
const gateway = yield* option(String$5("GATEWAY_URL"));
|
|
108506
108506
|
const local = yield* localAuth;
|
|
108507
108507
|
const sessions = yield* Sessions;
|
|
108508
|
-
const apiUrl =
|
|
108509
|
-
|
|
108510
|
-
|
|
108511
|
-
|
|
108512
|
-
onSome: (url) => succeed$5(`${url}/ai/${provider}${match(provider === "openrouter", {
|
|
108513
|
-
onFalse: () => "",
|
|
108514
|
-
onTrue: () => "/v1"
|
|
108515
|
-
})}`)
|
|
108516
|
-
});
|
|
108517
|
-
});
|
|
108508
|
+
const apiUrl = pipe(gateway, match$7({
|
|
108509
|
+
onNone: () => fail$7(AiUnavailableError.make({ message: "Start the app with --gateway" })),
|
|
108510
|
+
onSome: (url) => succeed$5(`${url}/ai`)
|
|
108511
|
+
}), withSpan$2("AiGateway.apiUrl"));
|
|
108518
108512
|
const authorize = fn("AiGateway.authorize")(function* (userId) {
|
|
108519
108513
|
yield* annotateCurrentSpan("userId", userId);
|
|
108520
108514
|
if (local) return identity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deslop/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1307",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/MP281X/deslop.git",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=26"
|
|
35
35
|
},
|
|
36
|
-
"fingerprint": "
|
|
36
|
+
"fingerprint": "00d5c600d9ec69979fc1e4796152eedf291b5144814b15c7012f7f9d9dc0a7a7"
|
|
37
37
|
}
|