@jclvsh/iris 0.4.0 → 0.5.1
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/README.md +201 -202
- package/dist/cli-utils.js +4 -1
- package/dist/cli.js +13 -1
- package/dist/commands/ai.js +4 -21
- package/dist/commands/campaigns.js +59 -1
- package/dist/commands/channels.js +4 -1
- package/dist/commands/keys.js +5 -10
- package/dist/commands/messages.js +6 -3
- package/dist/commands/webhooks.js +12 -0
- package/dist/index.js +4 -1
- package/dist/tools/ai.js +25 -22
- package/dist/tools/analytics.js +28 -12
- package/dist/tools/billing.js +6 -1
- package/dist/tools/campaigns.js +71 -12
- package/dist/tools/channels.js +18 -3
- package/dist/tools/contacts.js +48 -8
- package/dist/tools/conversations.js +30 -5
- package/dist/tools/discovery.js +25 -9
- package/dist/tools/keys.js +22 -5
- package/dist/tools/messages.js +37 -7
- package/dist/tools/notifications.js +24 -4
- package/dist/tools/webhooks.js +48 -8
- package/dist/types.d.ts +0 -5
- package/package.json +1 -1
package/dist/tools/contacts.js
CHANGED
|
@@ -18,7 +18,12 @@ export function registerContactTools(server, client) {
|
|
|
18
18
|
}
|
|
19
19
|
catch (error) {
|
|
20
20
|
return {
|
|
21
|
-
content: [
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
22
27
|
isError: true,
|
|
23
28
|
};
|
|
24
29
|
}
|
|
@@ -39,7 +44,12 @@ export function registerContactTools(server, client) {
|
|
|
39
44
|
}
|
|
40
45
|
catch (error) {
|
|
41
46
|
return {
|
|
42
|
-
content: [
|
|
47
|
+
content: [
|
|
48
|
+
{
|
|
49
|
+
type: "text",
|
|
50
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
43
53
|
isError: true,
|
|
44
54
|
};
|
|
45
55
|
}
|
|
@@ -53,7 +63,12 @@ export function registerContactTools(server, client) {
|
|
|
53
63
|
}
|
|
54
64
|
catch (error) {
|
|
55
65
|
return {
|
|
56
|
-
content: [
|
|
66
|
+
content: [
|
|
67
|
+
{
|
|
68
|
+
type: "text",
|
|
69
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
57
72
|
isError: true,
|
|
58
73
|
};
|
|
59
74
|
}
|
|
@@ -75,7 +90,12 @@ export function registerContactTools(server, client) {
|
|
|
75
90
|
}
|
|
76
91
|
catch (error) {
|
|
77
92
|
return {
|
|
78
|
-
content: [
|
|
93
|
+
content: [
|
|
94
|
+
{
|
|
95
|
+
type: "text",
|
|
96
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
97
|
+
},
|
|
98
|
+
],
|
|
79
99
|
isError: true,
|
|
80
100
|
};
|
|
81
101
|
}
|
|
@@ -89,7 +109,12 @@ export function registerContactTools(server, client) {
|
|
|
89
109
|
}
|
|
90
110
|
catch (error) {
|
|
91
111
|
return {
|
|
92
|
-
content: [
|
|
112
|
+
content: [
|
|
113
|
+
{
|
|
114
|
+
type: "text",
|
|
115
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
116
|
+
},
|
|
117
|
+
],
|
|
93
118
|
isError: true,
|
|
94
119
|
};
|
|
95
120
|
}
|
|
@@ -115,7 +140,12 @@ export function registerContactTools(server, client) {
|
|
|
115
140
|
}
|
|
116
141
|
catch (error) {
|
|
117
142
|
return {
|
|
118
|
-
content: [
|
|
143
|
+
content: [
|
|
144
|
+
{
|
|
145
|
+
type: "text",
|
|
146
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
119
149
|
isError: true,
|
|
120
150
|
};
|
|
121
151
|
}
|
|
@@ -127,7 +157,12 @@ export function registerContactTools(server, client) {
|
|
|
127
157
|
}
|
|
128
158
|
catch (error) {
|
|
129
159
|
return {
|
|
130
|
-
content: [
|
|
160
|
+
content: [
|
|
161
|
+
{
|
|
162
|
+
type: "text",
|
|
163
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
131
166
|
isError: true,
|
|
132
167
|
};
|
|
133
168
|
}
|
|
@@ -141,7 +176,12 @@ export function registerContactTools(server, client) {
|
|
|
141
176
|
}
|
|
142
177
|
catch (error) {
|
|
143
178
|
return {
|
|
144
|
-
content: [
|
|
179
|
+
content: [
|
|
180
|
+
{
|
|
181
|
+
type: "text",
|
|
182
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
145
185
|
isError: true,
|
|
146
186
|
};
|
|
147
187
|
}
|
|
@@ -22,7 +22,12 @@ export function registerConversationTools(server, client) {
|
|
|
22
22
|
}
|
|
23
23
|
catch (error) {
|
|
24
24
|
return {
|
|
25
|
-
content: [
|
|
25
|
+
content: [
|
|
26
|
+
{
|
|
27
|
+
type: "text",
|
|
28
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
26
31
|
isError: true,
|
|
27
32
|
};
|
|
28
33
|
}
|
|
@@ -36,7 +41,12 @@ export function registerConversationTools(server, client) {
|
|
|
36
41
|
}
|
|
37
42
|
catch (error) {
|
|
38
43
|
return {
|
|
39
|
-
content: [
|
|
44
|
+
content: [
|
|
45
|
+
{
|
|
46
|
+
type: "text",
|
|
47
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
40
50
|
isError: true,
|
|
41
51
|
};
|
|
42
52
|
}
|
|
@@ -50,7 +60,12 @@ export function registerConversationTools(server, client) {
|
|
|
50
60
|
}
|
|
51
61
|
catch (error) {
|
|
52
62
|
return {
|
|
53
|
-
content: [
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: "text",
|
|
66
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
54
69
|
isError: true,
|
|
55
70
|
};
|
|
56
71
|
}
|
|
@@ -64,7 +79,12 @@ export function registerConversationTools(server, client) {
|
|
|
64
79
|
}
|
|
65
80
|
catch (error) {
|
|
66
81
|
return {
|
|
67
|
-
content: [
|
|
82
|
+
content: [
|
|
83
|
+
{
|
|
84
|
+
type: "text",
|
|
85
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
68
88
|
isError: true,
|
|
69
89
|
};
|
|
70
90
|
}
|
|
@@ -76,7 +96,12 @@ export function registerConversationTools(server, client) {
|
|
|
76
96
|
}
|
|
77
97
|
catch (error) {
|
|
78
98
|
return {
|
|
79
|
-
content: [
|
|
99
|
+
content: [
|
|
100
|
+
{
|
|
101
|
+
type: "text",
|
|
102
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
80
105
|
isError: true,
|
|
81
106
|
};
|
|
82
107
|
}
|
package/dist/tools/discovery.js
CHANGED
|
@@ -37,11 +37,7 @@ export function registerDiscoveryTools(server, client) {
|
|
|
37
37
|
.enum(PROFILE_TYPES)
|
|
38
38
|
.optional()
|
|
39
39
|
.describe("ICP profile type — drives default source mix when sources is omitted"),
|
|
40
|
-
campaign_id: z
|
|
41
|
-
.string()
|
|
42
|
-
.uuid()
|
|
43
|
-
.optional()
|
|
44
|
-
.describe("campaign to attach discovered contacts to on finalize"),
|
|
40
|
+
campaign_id: z.string().uuid().optional().describe("campaign to attach discovered contacts to on finalize"),
|
|
45
41
|
enrich_emails: z
|
|
46
42
|
.boolean()
|
|
47
43
|
.optional()
|
|
@@ -54,7 +50,12 @@ export function registerDiscoveryTools(server, client) {
|
|
|
54
50
|
}
|
|
55
51
|
catch (error) {
|
|
56
52
|
return {
|
|
57
|
-
content: [
|
|
53
|
+
content: [
|
|
54
|
+
{
|
|
55
|
+
type: "text",
|
|
56
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
58
59
|
isError: true,
|
|
59
60
|
};
|
|
60
61
|
}
|
|
@@ -69,7 +70,12 @@ export function registerDiscoveryTools(server, client) {
|
|
|
69
70
|
}
|
|
70
71
|
catch (error) {
|
|
71
72
|
return {
|
|
72
|
-
content: [
|
|
73
|
+
content: [
|
|
74
|
+
{
|
|
75
|
+
type: "text",
|
|
76
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
73
79
|
isError: true,
|
|
74
80
|
};
|
|
75
81
|
}
|
|
@@ -83,7 +89,12 @@ export function registerDiscoveryTools(server, client) {
|
|
|
83
89
|
}
|
|
84
90
|
catch (error) {
|
|
85
91
|
return {
|
|
86
|
-
content: [
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: "text",
|
|
95
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
87
98
|
isError: true,
|
|
88
99
|
};
|
|
89
100
|
}
|
|
@@ -95,7 +106,12 @@ export function registerDiscoveryTools(server, client) {
|
|
|
95
106
|
}
|
|
96
107
|
catch (error) {
|
|
97
108
|
return {
|
|
98
|
-
content: [
|
|
109
|
+
content: [
|
|
110
|
+
{
|
|
111
|
+
type: "text",
|
|
112
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
99
115
|
isError: true,
|
|
100
116
|
};
|
|
101
117
|
}
|
package/dist/tools/keys.js
CHANGED
|
@@ -8,7 +8,9 @@ export function registerKeyTools(server, client) {
|
|
|
8
8
|
}
|
|
9
9
|
catch (error) {
|
|
10
10
|
return {
|
|
11
|
-
content: [
|
|
11
|
+
content: [
|
|
12
|
+
{ type: "text", text: `error: ${error instanceof Error ? error.message : String(error)}` },
|
|
13
|
+
],
|
|
12
14
|
isError: true,
|
|
13
15
|
};
|
|
14
16
|
}
|
|
@@ -28,7 +30,12 @@ export function registerKeyTools(server, client) {
|
|
|
28
30
|
}
|
|
29
31
|
catch (error) {
|
|
30
32
|
return {
|
|
31
|
-
content: [
|
|
33
|
+
content: [
|
|
34
|
+
{
|
|
35
|
+
type: "text",
|
|
36
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
32
39
|
isError: true,
|
|
33
40
|
};
|
|
34
41
|
}
|
|
@@ -38,7 +45,7 @@ export function registerKeyTools(server, client) {
|
|
|
38
45
|
scopes: z
|
|
39
46
|
.array(z.enum(SCOPES))
|
|
40
47
|
.optional()
|
|
41
|
-
.describe(
|
|
48
|
+
.describe("permission scopes (any of: read, write, delete, generate, send, admin). defaults to all scopes"),
|
|
42
49
|
expires_at: z.string().optional().describe("expiration date in ISO 8601 format"),
|
|
43
50
|
}, async (args) => {
|
|
44
51
|
try {
|
|
@@ -47,7 +54,12 @@ export function registerKeyTools(server, client) {
|
|
|
47
54
|
}
|
|
48
55
|
catch (error) {
|
|
49
56
|
return {
|
|
50
|
-
content: [
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
59
|
+
type: "text",
|
|
60
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
51
63
|
isError: true,
|
|
52
64
|
};
|
|
53
65
|
}
|
|
@@ -61,7 +73,12 @@ export function registerKeyTools(server, client) {
|
|
|
61
73
|
}
|
|
62
74
|
catch (error) {
|
|
63
75
|
return {
|
|
64
|
-
content: [
|
|
76
|
+
content: [
|
|
77
|
+
{
|
|
78
|
+
type: "text",
|
|
79
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
65
82
|
isError: true,
|
|
66
83
|
};
|
|
67
84
|
}
|
package/dist/tools/messages.js
CHANGED
|
@@ -18,7 +18,12 @@ export function registerMessageTools(server, client) {
|
|
|
18
18
|
}
|
|
19
19
|
catch (error) {
|
|
20
20
|
return {
|
|
21
|
-
content: [
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
22
27
|
isError: true,
|
|
23
28
|
};
|
|
24
29
|
}
|
|
@@ -32,7 +37,12 @@ export function registerMessageTools(server, client) {
|
|
|
32
37
|
}
|
|
33
38
|
catch (error) {
|
|
34
39
|
return {
|
|
35
|
-
content: [
|
|
40
|
+
content: [
|
|
41
|
+
{
|
|
42
|
+
type: "text",
|
|
43
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
36
46
|
isError: true,
|
|
37
47
|
};
|
|
38
48
|
}
|
|
@@ -47,7 +57,12 @@ export function registerMessageTools(server, client) {
|
|
|
47
57
|
}
|
|
48
58
|
catch (error) {
|
|
49
59
|
return {
|
|
50
|
-
content: [
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: "text",
|
|
63
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
51
66
|
isError: true,
|
|
52
67
|
};
|
|
53
68
|
}
|
|
@@ -61,7 +76,12 @@ export function registerMessageTools(server, client) {
|
|
|
61
76
|
}
|
|
62
77
|
catch (error) {
|
|
63
78
|
return {
|
|
64
|
-
content: [
|
|
79
|
+
content: [
|
|
80
|
+
{
|
|
81
|
+
type: "text",
|
|
82
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
65
85
|
isError: true,
|
|
66
86
|
};
|
|
67
87
|
}
|
|
@@ -76,14 +96,19 @@ export function registerMessageTools(server, client) {
|
|
|
76
96
|
}
|
|
77
97
|
catch (error) {
|
|
78
98
|
return {
|
|
79
|
-
content: [
|
|
99
|
+
content: [
|
|
100
|
+
{
|
|
101
|
+
type: "text",
|
|
102
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
80
105
|
isError: true,
|
|
81
106
|
};
|
|
82
107
|
}
|
|
83
108
|
});
|
|
84
109
|
server.tool("bulk_message_action", "approve or reject multiple messages at once. requires send scope.", {
|
|
85
110
|
action: z.enum(["approve", "reject"]).describe("action to perform"),
|
|
86
|
-
|
|
111
|
+
message_ids: z.array(z.string().uuid()).min(1).max(100).describe("message IDs to act on"),
|
|
87
112
|
}, async (args) => {
|
|
88
113
|
try {
|
|
89
114
|
const result = await client.post("/messages/bulk", args);
|
|
@@ -91,7 +116,12 @@ export function registerMessageTools(server, client) {
|
|
|
91
116
|
}
|
|
92
117
|
catch (error) {
|
|
93
118
|
return {
|
|
94
|
-
content: [
|
|
119
|
+
content: [
|
|
120
|
+
{
|
|
121
|
+
type: "text",
|
|
122
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
95
125
|
isError: true,
|
|
96
126
|
};
|
|
97
127
|
}
|
|
@@ -15,7 +15,12 @@ export function registerNotificationTools(server, client) {
|
|
|
15
15
|
}
|
|
16
16
|
catch (error) {
|
|
17
17
|
return {
|
|
18
|
-
content: [
|
|
18
|
+
content: [
|
|
19
|
+
{
|
|
20
|
+
type: "text",
|
|
21
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
19
24
|
isError: true,
|
|
20
25
|
};
|
|
21
26
|
}
|
|
@@ -30,7 +35,12 @@ export function registerNotificationTools(server, client) {
|
|
|
30
35
|
}
|
|
31
36
|
catch (error) {
|
|
32
37
|
return {
|
|
33
|
-
content: [
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
type: "text",
|
|
41
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
34
44
|
isError: true,
|
|
35
45
|
};
|
|
36
46
|
}
|
|
@@ -44,7 +54,12 @@ export function registerNotificationTools(server, client) {
|
|
|
44
54
|
}
|
|
45
55
|
catch (error) {
|
|
46
56
|
return {
|
|
47
|
-
content: [
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
59
|
+
type: "text",
|
|
60
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
48
63
|
isError: true,
|
|
49
64
|
};
|
|
50
65
|
}
|
|
@@ -56,7 +71,12 @@ export function registerNotificationTools(server, client) {
|
|
|
56
71
|
}
|
|
57
72
|
catch (error) {
|
|
58
73
|
return {
|
|
59
|
-
content: [
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: "text",
|
|
77
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
60
80
|
isError: true,
|
|
61
81
|
};
|
|
62
82
|
}
|
package/dist/tools/webhooks.js
CHANGED
|
@@ -35,7 +35,12 @@ export function registerWebhookTools(server, client) {
|
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
37
|
return {
|
|
38
|
-
content: [
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
type: "text",
|
|
41
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
39
44
|
isError: true,
|
|
40
45
|
};
|
|
41
46
|
}
|
|
@@ -55,7 +60,12 @@ export function registerWebhookTools(server, client) {
|
|
|
55
60
|
}
|
|
56
61
|
catch (error) {
|
|
57
62
|
return {
|
|
58
|
-
content: [
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: "text",
|
|
66
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
59
69
|
isError: true,
|
|
60
70
|
};
|
|
61
71
|
}
|
|
@@ -69,7 +79,12 @@ export function registerWebhookTools(server, client) {
|
|
|
69
79
|
}
|
|
70
80
|
catch (error) {
|
|
71
81
|
return {
|
|
72
|
-
content: [
|
|
82
|
+
content: [
|
|
83
|
+
{
|
|
84
|
+
type: "text",
|
|
85
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
73
88
|
isError: true,
|
|
74
89
|
};
|
|
75
90
|
}
|
|
@@ -91,7 +106,12 @@ export function registerWebhookTools(server, client) {
|
|
|
91
106
|
}
|
|
92
107
|
catch (error) {
|
|
93
108
|
return {
|
|
94
|
-
content: [
|
|
109
|
+
content: [
|
|
110
|
+
{
|
|
111
|
+
type: "text",
|
|
112
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
95
115
|
isError: true,
|
|
96
116
|
};
|
|
97
117
|
}
|
|
@@ -105,7 +125,12 @@ export function registerWebhookTools(server, client) {
|
|
|
105
125
|
}
|
|
106
126
|
catch (error) {
|
|
107
127
|
return {
|
|
108
|
-
content: [
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
130
|
+
type: "text",
|
|
131
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
132
|
+
},
|
|
133
|
+
],
|
|
109
134
|
isError: true,
|
|
110
135
|
};
|
|
111
136
|
}
|
|
@@ -119,7 +144,12 @@ export function registerWebhookTools(server, client) {
|
|
|
119
144
|
}
|
|
120
145
|
catch (error) {
|
|
121
146
|
return {
|
|
122
|
-
content: [
|
|
147
|
+
content: [
|
|
148
|
+
{
|
|
149
|
+
type: "text",
|
|
150
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
151
|
+
},
|
|
152
|
+
],
|
|
123
153
|
isError: true,
|
|
124
154
|
};
|
|
125
155
|
}
|
|
@@ -133,7 +163,12 @@ export function registerWebhookTools(server, client) {
|
|
|
133
163
|
}
|
|
134
164
|
catch (error) {
|
|
135
165
|
return {
|
|
136
|
-
content: [
|
|
166
|
+
content: [
|
|
167
|
+
{
|
|
168
|
+
type: "text",
|
|
169
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
170
|
+
},
|
|
171
|
+
],
|
|
137
172
|
isError: true,
|
|
138
173
|
};
|
|
139
174
|
}
|
|
@@ -154,7 +189,12 @@ export function registerWebhookTools(server, client) {
|
|
|
154
189
|
}
|
|
155
190
|
catch (error) {
|
|
156
191
|
return {
|
|
157
|
-
content: [
|
|
192
|
+
content: [
|
|
193
|
+
{
|
|
194
|
+
type: "text",
|
|
195
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
196
|
+
},
|
|
197
|
+
],
|
|
158
198
|
isError: true,
|
|
159
199
|
};
|
|
160
200
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -131,11 +131,6 @@ export interface AiUsage {
|
|
|
131
131
|
period_start: string;
|
|
132
132
|
period_end: string;
|
|
133
133
|
}
|
|
134
|
-
export interface AiSuggestion {
|
|
135
|
-
type: string;
|
|
136
|
-
content: string;
|
|
137
|
-
confidence: number;
|
|
138
|
-
}
|
|
139
134
|
export interface DiscoveryJob {
|
|
140
135
|
id: string;
|
|
141
136
|
campaign_id: string | null;
|