@axiom-lattice/gateway 2.1.106 → 2.1.107
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.js +28 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/controllers/assistant.ts +16 -0
- package/src/controllers/auth.ts +14 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/gateway@2.1.
|
|
2
|
+
> @axiom-lattice/gateway@2.1.107 build /home/runner/work/agentic/agentic/packages/gateway
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --clean --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
You need to set the output format to "esm" for "import.meta" to work correctly.
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
[
|
|
22
|
-
[
|
|
21
|
+
[32mCJS[39m [1mdist/index.js [22m[32m324.07 KB[39m
|
|
22
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m664.13 KB[39m
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 477ms
|
|
24
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m272.20 KB[39m
|
|
23
25
|
[32mESM[39m [1mdist/WechatChannelAdapter-WSDKR4OA.mjs [22m[32m8.27 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/sender-PX32VSHB.mjs [22m[32m873.00 B[39m
|
|
24
27
|
[32mESM[39m [1mdist/chunk-6CUQGDJI.mjs [22m[32m6.42 KB[39m
|
|
25
28
|
[32mESM[39m [1mdist/a2a-ERG5RMUW.mjs [22m[32m15.95 KB[39m
|
|
26
29
|
[32mESM[39m [1mdist/resources-HEVGN3JM.mjs [22m[32m10.92 KB[39m
|
|
27
30
|
[32mESM[39m [1mdist/chunk-LHQY46YB.mjs [22m[32m1.46 KB[39m
|
|
28
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m575.75 KB[39m
|
|
29
|
-
[32mESM[39m [1mdist/sender-PX32VSHB.mjs.map [22m[32m2.07 KB[39m
|
|
30
31
|
[32mESM[39m [1mdist/WechatChannelAdapter-WSDKR4OA.mjs.map [22m[32m16.28 KB[39m
|
|
32
|
+
[32mESM[39m [1mdist/sender-PX32VSHB.mjs.map [22m[32m2.07 KB[39m
|
|
31
33
|
[32mESM[39m [1mdist/chunk-6CUQGDJI.mjs.map [22m[32m14.04 KB[39m
|
|
32
34
|
[32mESM[39m [1mdist/a2a-ERG5RMUW.mjs.map [22m[32m32.14 KB[39m
|
|
33
35
|
[32mESM[39m [1mdist/resources-HEVGN3JM.mjs.map [22m[32m19.82 KB[39m
|
|
34
36
|
[32mESM[39m [1mdist/chunk-LHQY46YB.mjs.map [22m[32m2.39 KB[39m
|
|
35
|
-
[32mESM[39m
|
|
36
|
-
[
|
|
37
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m662.71 KB[39m
|
|
38
|
-
[32mCJS[39m ⚡️ Build success in 520ms
|
|
37
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m577.17 KB[39m
|
|
38
|
+
[32mESM[39m ⚡️ Build success in 515ms
|
|
39
39
|
[34mDTS[39m Build start
|
|
40
|
-
[32mDTS[39m ⚡️ Build success in
|
|
40
|
+
[32mDTS[39m ⚡️ Build success in 19498ms
|
|
41
41
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m7.57 KB[39m
|
|
42
42
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m7.57 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1627,6 +1627,21 @@ async function deleteAssistant(request, reply) {
|
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
1629
|
import_core2.eventBus.publish("assistant:deleted", { id, tenantId });
|
|
1630
|
+
const userId = getUserId(request);
|
|
1631
|
+
if (userId) {
|
|
1632
|
+
try {
|
|
1633
|
+
const linkStore = (0, import_core.getStoreLattice)("default", "userTenantLink").store;
|
|
1634
|
+
const link = await linkStore.getLink(userId, tenantId);
|
|
1635
|
+
const meta = link?.metadata || {};
|
|
1636
|
+
if (meta.personalAssistantId === id) {
|
|
1637
|
+
delete meta.personalAssistantId;
|
|
1638
|
+
delete meta.personalProjectId;
|
|
1639
|
+
delete meta.personalWorkspaceId;
|
|
1640
|
+
await linkStore.updateLink(userId, tenantId, { metadata: meta });
|
|
1641
|
+
}
|
|
1642
|
+
} catch {
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1630
1645
|
return {
|
|
1631
1646
|
success: true,
|
|
1632
1647
|
message: "Successfully deleted assistant"
|
|
@@ -7288,6 +7303,18 @@ var AuthController = class {
|
|
|
7288
7303
|
const token = await this.generateToken(userId, tenantId);
|
|
7289
7304
|
const link = await this.userTenantLinkStore.getLink(userId, tenantId);
|
|
7290
7305
|
const linkMeta = link?.metadata || {};
|
|
7306
|
+
let personalAssistant = null;
|
|
7307
|
+
if (linkMeta.personalAssistantId) {
|
|
7308
|
+
const assistantStore = (0, import_core29.getStoreLattice)("default", "assistant").store;
|
|
7309
|
+
const exists = await assistantStore.hasAssistant(tenantId, linkMeta.personalAssistantId);
|
|
7310
|
+
if (exists) {
|
|
7311
|
+
personalAssistant = {
|
|
7312
|
+
assistantId: linkMeta.personalAssistantId,
|
|
7313
|
+
projectId: linkMeta.personalProjectId || "default",
|
|
7314
|
+
workspaceId: linkMeta.personalWorkspaceId || "default"
|
|
7315
|
+
};
|
|
7316
|
+
}
|
|
7317
|
+
}
|
|
7291
7318
|
return {
|
|
7292
7319
|
success: true,
|
|
7293
7320
|
data: {
|
|
@@ -7297,11 +7324,7 @@ var AuthController = class {
|
|
|
7297
7324
|
status: tenant.status
|
|
7298
7325
|
},
|
|
7299
7326
|
token,
|
|
7300
|
-
personalAssistant
|
|
7301
|
-
assistantId: linkMeta.personalAssistantId,
|
|
7302
|
-
projectId: linkMeta.personalProjectId || "default",
|
|
7303
|
-
workspaceId: linkMeta.personalWorkspaceId || "default"
|
|
7304
|
-
} : null
|
|
7327
|
+
personalAssistant
|
|
7305
7328
|
}
|
|
7306
7329
|
};
|
|
7307
7330
|
} catch (error) {
|