@superatomai/sdk-node 0.0.77-dsp → 0.0.78-dsp
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/index.js +13 -4
- package/dist/index.mjs +13 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -713,16 +713,22 @@ var DBUIBlockSchema = import_zod3.z.object({
|
|
|
713
713
|
component: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any()).nullable(),
|
|
714
714
|
analysis: import_zod3.z.string().nullable(),
|
|
715
715
|
user_prompt: import_zod3.z.string()
|
|
716
|
-
});
|
|
716
|
+
}).passthrough();
|
|
717
717
|
var BookmarkDataSchema = import_zod3.z.object({
|
|
718
718
|
id: import_zod3.z.number().optional(),
|
|
719
719
|
uiblock: DBUIBlockSchema,
|
|
720
720
|
// Typed JSON object
|
|
721
|
+
// Null on bookmarks saved before agents were recorded.
|
|
722
|
+
agentId: import_zod3.z.string().nullable().optional(),
|
|
721
723
|
created_at: import_zod3.z.string().optional(),
|
|
722
724
|
updated_at: import_zod3.z.string().optional()
|
|
723
725
|
});
|
|
724
726
|
var BookmarkQueryFiltersSchema = import_zod3.z.object({
|
|
725
727
|
userId: import_zod3.z.string().optional(),
|
|
728
|
+
// The chat agent a bookmark was saved under. Optional for now: bookmarks
|
|
729
|
+
// saved before agents were recorded have no agent, so a filter on it has to
|
|
730
|
+
// let those through too. It becomes required once they are backfilled.
|
|
731
|
+
agentId: import_zod3.z.string().optional(),
|
|
726
732
|
threadId: import_zod3.z.string().optional(),
|
|
727
733
|
name: import_zod3.z.string().optional()
|
|
728
734
|
});
|
|
@@ -731,6 +737,7 @@ var BookmarksRequestPayloadSchema = import_zod3.z.object({
|
|
|
731
737
|
data: import_zod3.z.object({
|
|
732
738
|
id: import_zod3.z.number().optional(),
|
|
733
739
|
userId: import_zod3.z.string().optional(),
|
|
740
|
+
agentId: import_zod3.z.string().optional(),
|
|
734
741
|
threadId: import_zod3.z.string().optional(),
|
|
735
742
|
name: import_zod3.z.string().optional(),
|
|
736
743
|
description: import_zod3.z.string().optional(),
|
|
@@ -738,6 +745,7 @@ var BookmarksRequestPayloadSchema = import_zod3.z.object({
|
|
|
738
745
|
// Query operation fields
|
|
739
746
|
filters: BookmarkQueryFiltersSchema.optional(),
|
|
740
747
|
limit: import_zod3.z.number().optional(),
|
|
748
|
+
offset: import_zod3.z.number().optional(),
|
|
741
749
|
sort: import_zod3.z.enum(["ASC", "DESC"]).optional()
|
|
742
750
|
}).optional()
|
|
743
751
|
});
|
|
@@ -21909,6 +21917,7 @@ async function handleBookmarksRequest(data, collections, sendMessage) {
|
|
|
21909
21917
|
const { operation, data: requestData } = payload;
|
|
21910
21918
|
const bookmarkId = requestData?.id;
|
|
21911
21919
|
const userId = requestData?.userId;
|
|
21920
|
+
const agentId = requestData?.agentId;
|
|
21912
21921
|
const threadId = requestData?.threadId;
|
|
21913
21922
|
const name = requestData?.name;
|
|
21914
21923
|
const description = requestData?.description;
|
|
@@ -21918,7 +21927,7 @@ async function handleBookmarksRequest(data, collections, sendMessage) {
|
|
|
21918
21927
|
const sort = requestData?.sort;
|
|
21919
21928
|
switch (operation) {
|
|
21920
21929
|
case "create":
|
|
21921
|
-
await handleCreate5(id, userId, threadId, name, description, uiblock, executeCollection, sendMessage, from.id);
|
|
21930
|
+
await handleCreate5(id, userId, agentId, threadId, name, description, uiblock, executeCollection, sendMessage, from.id);
|
|
21922
21931
|
break;
|
|
21923
21932
|
case "update":
|
|
21924
21933
|
await handleUpdate5(id, bookmarkId, threadId, name, description, uiblock, executeCollection, sendMessage, from.id);
|
|
@@ -21949,7 +21958,7 @@ async function handleBookmarksRequest(data, collections, sendMessage) {
|
|
|
21949
21958
|
}, sendMessage);
|
|
21950
21959
|
}
|
|
21951
21960
|
}
|
|
21952
|
-
async function handleCreate5(id, userId, threadId, name, description, uiblock, executeCollection, sendMessage, clientId) {
|
|
21961
|
+
async function handleCreate5(id, userId, agentId, threadId, name, description, uiblock, executeCollection, sendMessage, clientId) {
|
|
21953
21962
|
if (!userId) {
|
|
21954
21963
|
sendResponse6(id, {
|
|
21955
21964
|
success: false,
|
|
@@ -21965,7 +21974,7 @@ async function handleCreate5(id, userId, threadId, name, description, uiblock, e
|
|
|
21965
21974
|
return;
|
|
21966
21975
|
}
|
|
21967
21976
|
try {
|
|
21968
|
-
const result = await executeCollection("bookmarks", "create", { userId, threadId, name, description, uiblock });
|
|
21977
|
+
const result = await executeCollection("bookmarks", "create", { userId, agentId, threadId, name, description, uiblock });
|
|
21969
21978
|
sendResponse6(id, {
|
|
21970
21979
|
success: true,
|
|
21971
21980
|
data: result.data,
|
package/dist/index.mjs
CHANGED
|
@@ -600,16 +600,22 @@ var DBUIBlockSchema = z3.object({
|
|
|
600
600
|
component: z3.record(z3.string(), z3.any()).nullable(),
|
|
601
601
|
analysis: z3.string().nullable(),
|
|
602
602
|
user_prompt: z3.string()
|
|
603
|
-
});
|
|
603
|
+
}).passthrough();
|
|
604
604
|
var BookmarkDataSchema = z3.object({
|
|
605
605
|
id: z3.number().optional(),
|
|
606
606
|
uiblock: DBUIBlockSchema,
|
|
607
607
|
// Typed JSON object
|
|
608
|
+
// Null on bookmarks saved before agents were recorded.
|
|
609
|
+
agentId: z3.string().nullable().optional(),
|
|
608
610
|
created_at: z3.string().optional(),
|
|
609
611
|
updated_at: z3.string().optional()
|
|
610
612
|
});
|
|
611
613
|
var BookmarkQueryFiltersSchema = z3.object({
|
|
612
614
|
userId: z3.string().optional(),
|
|
615
|
+
// The chat agent a bookmark was saved under. Optional for now: bookmarks
|
|
616
|
+
// saved before agents were recorded have no agent, so a filter on it has to
|
|
617
|
+
// let those through too. It becomes required once they are backfilled.
|
|
618
|
+
agentId: z3.string().optional(),
|
|
613
619
|
threadId: z3.string().optional(),
|
|
614
620
|
name: z3.string().optional()
|
|
615
621
|
});
|
|
@@ -618,6 +624,7 @@ var BookmarksRequestPayloadSchema = z3.object({
|
|
|
618
624
|
data: z3.object({
|
|
619
625
|
id: z3.number().optional(),
|
|
620
626
|
userId: z3.string().optional(),
|
|
627
|
+
agentId: z3.string().optional(),
|
|
621
628
|
threadId: z3.string().optional(),
|
|
622
629
|
name: z3.string().optional(),
|
|
623
630
|
description: z3.string().optional(),
|
|
@@ -625,6 +632,7 @@ var BookmarksRequestPayloadSchema = z3.object({
|
|
|
625
632
|
// Query operation fields
|
|
626
633
|
filters: BookmarkQueryFiltersSchema.optional(),
|
|
627
634
|
limit: z3.number().optional(),
|
|
635
|
+
offset: z3.number().optional(),
|
|
628
636
|
sort: z3.enum(["ASC", "DESC"]).optional()
|
|
629
637
|
}).optional()
|
|
630
638
|
});
|
|
@@ -21796,6 +21804,7 @@ async function handleBookmarksRequest(data, collections, sendMessage) {
|
|
|
21796
21804
|
const { operation, data: requestData } = payload;
|
|
21797
21805
|
const bookmarkId = requestData?.id;
|
|
21798
21806
|
const userId = requestData?.userId;
|
|
21807
|
+
const agentId = requestData?.agentId;
|
|
21799
21808
|
const threadId = requestData?.threadId;
|
|
21800
21809
|
const name = requestData?.name;
|
|
21801
21810
|
const description = requestData?.description;
|
|
@@ -21805,7 +21814,7 @@ async function handleBookmarksRequest(data, collections, sendMessage) {
|
|
|
21805
21814
|
const sort = requestData?.sort;
|
|
21806
21815
|
switch (operation) {
|
|
21807
21816
|
case "create":
|
|
21808
|
-
await handleCreate5(id, userId, threadId, name, description, uiblock, executeCollection, sendMessage, from.id);
|
|
21817
|
+
await handleCreate5(id, userId, agentId, threadId, name, description, uiblock, executeCollection, sendMessage, from.id);
|
|
21809
21818
|
break;
|
|
21810
21819
|
case "update":
|
|
21811
21820
|
await handleUpdate5(id, bookmarkId, threadId, name, description, uiblock, executeCollection, sendMessage, from.id);
|
|
@@ -21836,7 +21845,7 @@ async function handleBookmarksRequest(data, collections, sendMessage) {
|
|
|
21836
21845
|
}, sendMessage);
|
|
21837
21846
|
}
|
|
21838
21847
|
}
|
|
21839
|
-
async function handleCreate5(id, userId, threadId, name, description, uiblock, executeCollection, sendMessage, clientId) {
|
|
21848
|
+
async function handleCreate5(id, userId, agentId, threadId, name, description, uiblock, executeCollection, sendMessage, clientId) {
|
|
21840
21849
|
if (!userId) {
|
|
21841
21850
|
sendResponse6(id, {
|
|
21842
21851
|
success: false,
|
|
@@ -21852,7 +21861,7 @@ async function handleCreate5(id, userId, threadId, name, description, uiblock, e
|
|
|
21852
21861
|
return;
|
|
21853
21862
|
}
|
|
21854
21863
|
try {
|
|
21855
|
-
const result = await executeCollection("bookmarks", "create", { userId, threadId, name, description, uiblock });
|
|
21864
|
+
const result = await executeCollection("bookmarks", "create", { userId, agentId, threadId, name, description, uiblock });
|
|
21856
21865
|
sendResponse6(id, {
|
|
21857
21866
|
success: true,
|
|
21858
21867
|
data: result.data,
|