@cossistant/types 0.0.28 → 0.0.30
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/api/ai-agent.d.ts +170 -4
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +233 -7
- package/api/ai-agent.js.map +1 -1
- package/api/contact.d.ts.map +1 -1
- package/api/conversation.d.ts +458 -78
- package/api/conversation.d.ts.map +1 -1
- package/api/index.d.ts +5 -4
- package/api/index.js +5 -4
- package/api/knowledge.d.ts +63 -25
- package/api/knowledge.d.ts.map +1 -1
- package/api/knowledge.js +73 -11
- package/api/knowledge.js.map +1 -1
- package/api/link-source.d.ts +264 -0
- package/api/link-source.d.ts.map +1 -0
- package/api/link-source.js +461 -0
- package/api/link-source.js.map +1 -0
- package/api/timeline-item.d.ts +580 -91
- package/api/timeline-item.d.ts.map +1 -1
- package/api/timeline-item.js +68 -20
- package/api/timeline-item.js.map +1 -1
- package/enums.d.ts +3 -0
- package/enums.d.ts.map +1 -1
- package/enums.js +4 -1
- package/enums.js.map +1 -1
- package/index.d.ts +6 -5
- package/index.d.ts.map +1 -1
- package/index.js +6 -5
- package/package.json +1 -1
- package/realtime-events.d.ts +570 -48
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +202 -1
- package/realtime-events.js.map +1 -1
- package/schemas.d.ts +92 -16
- package/schemas.d.ts.map +1 -1
- package/trpc/conversation.d.ts +393 -65
- package/trpc/conversation.d.ts.map +1 -1
- package/trpc/conversation.js +12 -0
- package/trpc/conversation.js.map +1 -1
- package/trpc/visitor.d.ts +7 -1
- package/trpc/visitor.d.ts.map +1 -1
package/api/ai-agent.d.ts
CHANGED
|
@@ -6,19 +6,67 @@ import { z } from "@hono/zod-openapi";
|
|
|
6
6
|
* Available AI models from OpenRouter
|
|
7
7
|
*/
|
|
8
8
|
declare const AI_MODELS: readonly [{
|
|
9
|
+
readonly value: "moonshotai/kimi-k2-0905";
|
|
10
|
+
readonly label: "Kimi K2";
|
|
11
|
+
readonly provider: "Moonshot AI";
|
|
12
|
+
readonly icon: "agent";
|
|
13
|
+
readonly freeOnly: true;
|
|
14
|
+
}, {
|
|
15
|
+
readonly value: "moonshotai/kimi-k2.5";
|
|
16
|
+
readonly label: "Kimi K2.5";
|
|
17
|
+
readonly provider: "Moonshot AI";
|
|
18
|
+
readonly icon: "agent";
|
|
19
|
+
readonly freeOnly: true;
|
|
20
|
+
}, {
|
|
21
|
+
readonly value: "openai/gpt-5.2-chat";
|
|
22
|
+
readonly label: "GPT-5.2";
|
|
23
|
+
readonly provider: "OpenAI";
|
|
24
|
+
readonly icon: "star";
|
|
25
|
+
readonly requiresPaid: true;
|
|
26
|
+
}, {
|
|
9
27
|
readonly value: "openai/gpt-5.1-chat";
|
|
10
28
|
readonly label: "GPT-5.1";
|
|
11
29
|
readonly provider: "OpenAI";
|
|
30
|
+
readonly icon: "star";
|
|
31
|
+
readonly requiresPaid: true;
|
|
12
32
|
}, {
|
|
13
33
|
readonly value: "openai/gpt-5-mini";
|
|
14
34
|
readonly label: "GPT-5 Mini";
|
|
15
35
|
readonly provider: "OpenAI";
|
|
36
|
+
readonly icon: "star";
|
|
37
|
+
readonly requiresPaid: true;
|
|
16
38
|
}, {
|
|
17
39
|
readonly value: "google/gemini-3-flash-preview";
|
|
18
40
|
readonly label: "Gemini 3 Flash";
|
|
19
41
|
readonly provider: "Google";
|
|
42
|
+
readonly icon: "dashboard";
|
|
43
|
+
readonly requiresPaid: true;
|
|
20
44
|
}];
|
|
21
45
|
type AIModel = (typeof AI_MODELS)[number]["value"];
|
|
46
|
+
type AIModelConfig = (typeof AI_MODELS)[number];
|
|
47
|
+
/**
|
|
48
|
+
* Available AI agent goals/intents
|
|
49
|
+
*/
|
|
50
|
+
declare const AI_AGENT_GOALS: readonly [{
|
|
51
|
+
readonly value: "sales";
|
|
52
|
+
readonly label: "Increase sales conversions";
|
|
53
|
+
}, {
|
|
54
|
+
readonly value: "support";
|
|
55
|
+
readonly label: "Provide customer support";
|
|
56
|
+
}, {
|
|
57
|
+
readonly value: "product_qa";
|
|
58
|
+
readonly label: "Answer product questions";
|
|
59
|
+
}, {
|
|
60
|
+
readonly value: "lead_qualification";
|
|
61
|
+
readonly label: "Qualify leads";
|
|
62
|
+
}, {
|
|
63
|
+
readonly value: "scheduling";
|
|
64
|
+
readonly label: "Schedule appointments";
|
|
65
|
+
}, {
|
|
66
|
+
readonly value: "feedback";
|
|
67
|
+
readonly label: "Collect customer feedback";
|
|
68
|
+
}];
|
|
69
|
+
type AIAgentGoal = (typeof AI_AGENT_GOALS)[number]["value"];
|
|
22
70
|
/**
|
|
23
71
|
* AI Agent response schema
|
|
24
72
|
*/
|
|
@@ -29,12 +77,14 @@ declare const aiAgentResponseSchema: z.ZodObject<{
|
|
|
29
77
|
basePrompt: z.ZodString;
|
|
30
78
|
model: z.ZodString;
|
|
31
79
|
temperature: z.ZodNullable<z.ZodNumber>;
|
|
32
|
-
|
|
80
|
+
maxOutputTokens: z.ZodNullable<z.ZodNumber>;
|
|
33
81
|
isActive: z.ZodBoolean;
|
|
34
82
|
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
35
83
|
usageCount: z.ZodNumber;
|
|
84
|
+
goals: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
36
85
|
createdAt: z.ZodString;
|
|
37
86
|
updatedAt: z.ZodString;
|
|
87
|
+
onboardingCompletedAt: z.ZodNullable<z.ZodString>;
|
|
38
88
|
}, z.core.$strip>;
|
|
39
89
|
/**
|
|
40
90
|
* Create AI Agent request schema
|
|
@@ -46,7 +96,8 @@ declare const createAiAgentRequestSchema: z.ZodObject<{
|
|
|
46
96
|
basePrompt: z.ZodString;
|
|
47
97
|
model: z.ZodString;
|
|
48
98
|
temperature: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
|
|
99
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
goals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
101
|
}, z.core.$strip>;
|
|
51
102
|
/**
|
|
52
103
|
* Update AI Agent request schema
|
|
@@ -59,7 +110,9 @@ declare const updateAiAgentRequestSchema: z.ZodObject<{
|
|
|
59
110
|
basePrompt: z.ZodString;
|
|
60
111
|
model: z.ZodString;
|
|
61
112
|
temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
62
|
-
|
|
113
|
+
maxOutputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
114
|
+
goals: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
115
|
+
onboardingCompletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
116
|
}, z.core.$strip>;
|
|
64
117
|
/**
|
|
65
118
|
* Toggle AI Agent active status request schema
|
|
@@ -69,17 +122,130 @@ declare const toggleAiAgentActiveRequestSchema: z.ZodObject<{
|
|
|
69
122
|
aiAgentId: z.ZodULID;
|
|
70
123
|
isActive: z.ZodBoolean;
|
|
71
124
|
}, z.core.$strip>;
|
|
125
|
+
/**
|
|
126
|
+
* Delete AI Agent request schema
|
|
127
|
+
*/
|
|
128
|
+
declare const deleteAiAgentRequestSchema: z.ZodObject<{
|
|
129
|
+
websiteSlug: z.ZodString;
|
|
130
|
+
aiAgentId: z.ZodULID;
|
|
131
|
+
}, z.core.$strip>;
|
|
72
132
|
/**
|
|
73
133
|
* Get AI Agent request schema
|
|
74
134
|
*/
|
|
75
135
|
declare const getAiAgentRequestSchema: z.ZodObject<{
|
|
76
136
|
websiteSlug: z.ZodString;
|
|
77
137
|
}, z.core.$strip>;
|
|
138
|
+
/**
|
|
139
|
+
* Generate Base Prompt request schema
|
|
140
|
+
* Used to scrape a website and generate a tailored base prompt for the AI agent
|
|
141
|
+
*/
|
|
142
|
+
declare const generateBasePromptRequestSchema: z.ZodObject<{
|
|
143
|
+
websiteSlug: z.ZodString;
|
|
144
|
+
sourceUrl: z.ZodOptional<z.ZodString>;
|
|
145
|
+
agentName: z.ZodString;
|
|
146
|
+
goals: z.ZodArray<z.ZodString>;
|
|
147
|
+
manualDescription: z.ZodOptional<z.ZodString>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
/**
|
|
150
|
+
* Generate Base Prompt response schema
|
|
151
|
+
*/
|
|
152
|
+
declare const generateBasePromptResponseSchema: z.ZodObject<{
|
|
153
|
+
basePrompt: z.ZodString;
|
|
154
|
+
isGenerated: z.ZodBoolean;
|
|
155
|
+
companyName: z.ZodNullable<z.ZodString>;
|
|
156
|
+
websiteDescription: z.ZodNullable<z.ZodString>;
|
|
157
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
158
|
+
favicon: z.ZodNullable<z.ZodString>;
|
|
159
|
+
discoveredLinksCount: z.ZodNumber;
|
|
160
|
+
}, z.core.$strip>;
|
|
78
161
|
type AiAgentResponse = z.infer<typeof aiAgentResponseSchema>;
|
|
79
162
|
type CreateAiAgentRequest = z.infer<typeof createAiAgentRequestSchema>;
|
|
80
163
|
type UpdateAiAgentRequest = z.infer<typeof updateAiAgentRequestSchema>;
|
|
81
164
|
type ToggleAiAgentActiveRequest = z.infer<typeof toggleAiAgentActiveRequestSchema>;
|
|
165
|
+
type DeleteAiAgentRequest = z.infer<typeof deleteAiAgentRequestSchema>;
|
|
82
166
|
type GetAiAgentRequest = z.infer<typeof getAiAgentRequestSchema>;
|
|
167
|
+
type GenerateBasePromptRequest = z.infer<typeof generateBasePromptRequestSchema>;
|
|
168
|
+
type GenerateBasePromptResponse = z.infer<typeof generateBasePromptResponseSchema>;
|
|
169
|
+
/**
|
|
170
|
+
* AI Agent Behavior Settings Schema
|
|
171
|
+
*
|
|
172
|
+
* Controls how the AI agent behaves in conversations.
|
|
173
|
+
* Simplified for MVP - AI responds immediately and decides when to respond
|
|
174
|
+
* based on context, not configuration.
|
|
175
|
+
*/
|
|
176
|
+
declare const aiAgentBehaviorSettingsSchema: z.ZodObject<{
|
|
177
|
+
canResolve: z.ZodBoolean;
|
|
178
|
+
canMarkSpam: z.ZodBoolean;
|
|
179
|
+
canAssign: z.ZodBoolean;
|
|
180
|
+
canSetPriority: z.ZodBoolean;
|
|
181
|
+
canCategorize: z.ZodBoolean;
|
|
182
|
+
canEscalate: z.ZodBoolean;
|
|
183
|
+
defaultEscalationUserId: z.ZodNullable<z.ZodString>;
|
|
184
|
+
autoAnalyzeSentiment: z.ZodBoolean;
|
|
185
|
+
autoGenerateTitle: z.ZodBoolean;
|
|
186
|
+
autoCategorize: z.ZodBoolean;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
type AiAgentBehaviorSettings = z.infer<typeof aiAgentBehaviorSettingsSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* Get Behavior Settings request schema
|
|
191
|
+
*/
|
|
192
|
+
declare const getBehaviorSettingsRequestSchema: z.ZodObject<{
|
|
193
|
+
websiteSlug: z.ZodString;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
/**
|
|
196
|
+
* Get Behavior Settings response schema
|
|
197
|
+
*/
|
|
198
|
+
declare const getBehaviorSettingsResponseSchema: z.ZodObject<{
|
|
199
|
+
canResolve: z.ZodBoolean;
|
|
200
|
+
canMarkSpam: z.ZodBoolean;
|
|
201
|
+
canAssign: z.ZodBoolean;
|
|
202
|
+
canSetPriority: z.ZodBoolean;
|
|
203
|
+
canCategorize: z.ZodBoolean;
|
|
204
|
+
canEscalate: z.ZodBoolean;
|
|
205
|
+
defaultEscalationUserId: z.ZodNullable<z.ZodString>;
|
|
206
|
+
autoAnalyzeSentiment: z.ZodBoolean;
|
|
207
|
+
autoGenerateTitle: z.ZodBoolean;
|
|
208
|
+
autoCategorize: z.ZodBoolean;
|
|
209
|
+
aiAgentId: z.ZodULID;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
/**
|
|
212
|
+
* Update Behavior Settings request schema
|
|
213
|
+
*/
|
|
214
|
+
declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
|
|
215
|
+
websiteSlug: z.ZodString;
|
|
216
|
+
aiAgentId: z.ZodULID;
|
|
217
|
+
settings: z.ZodObject<{
|
|
218
|
+
canResolve: z.ZodOptional<z.ZodBoolean>;
|
|
219
|
+
canMarkSpam: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
canAssign: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
+
canSetPriority: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
canCategorize: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
canEscalate: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
+
defaultEscalationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
+
autoAnalyzeSentiment: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
autoGenerateTitle: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
+
autoCategorize: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
/**
|
|
231
|
+
* Update Behavior Settings response schema
|
|
232
|
+
*/
|
|
233
|
+
declare const updateBehaviorSettingsResponseSchema: z.ZodObject<{
|
|
234
|
+
canResolve: z.ZodBoolean;
|
|
235
|
+
canMarkSpam: z.ZodBoolean;
|
|
236
|
+
canAssign: z.ZodBoolean;
|
|
237
|
+
canSetPriority: z.ZodBoolean;
|
|
238
|
+
canCategorize: z.ZodBoolean;
|
|
239
|
+
canEscalate: z.ZodBoolean;
|
|
240
|
+
defaultEscalationUserId: z.ZodNullable<z.ZodString>;
|
|
241
|
+
autoAnalyzeSentiment: z.ZodBoolean;
|
|
242
|
+
autoGenerateTitle: z.ZodBoolean;
|
|
243
|
+
autoCategorize: z.ZodBoolean;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
type GetBehaviorSettingsRequest = z.infer<typeof getBehaviorSettingsRequestSchema>;
|
|
246
|
+
type GetBehaviorSettingsResponse = z.infer<typeof getBehaviorSettingsResponseSchema>;
|
|
247
|
+
type UpdateBehaviorSettingsRequest = z.infer<typeof updateBehaviorSettingsRequestSchema>;
|
|
248
|
+
type UpdateBehaviorSettingsResponse = z.infer<typeof updateBehaviorSettingsResponseSchema>;
|
|
83
249
|
//#endregion
|
|
84
|
-
export { AIModel, AI_MODELS, AiAgentResponse, CreateAiAgentRequest, GetAiAgentRequest, ToggleAiAgentActiveRequest, UpdateAiAgentRequest, aiAgentResponseSchema, createAiAgentRequestSchema, getAiAgentRequestSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema };
|
|
250
|
+
export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentResponse, CreateAiAgentRequest, DeleteAiAgentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ToggleAiAgentActiveRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema };
|
|
85
251
|
//# sourceMappingURL=ai-agent.d.ts.map
|
package/api/ai-agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.d.ts","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;
|
|
1
|
+
{"version":3,"file":"ai-agent.d.ts","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AA6CY,cA7CC,SA6CiB,EAAA,SAAS,CAAA;EAC3B,SAAA,KAAA,EAAa,yBAAoB;EAKhC,SAAA,KAAA,EAAA,SAOH;EAEE,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xHhC,gCAwHgC,EAxHA,CAAA,CAAA,SAwHA,CAAA;EAchC,UAAA,aAAA;;;;;;;;KAhGD,eAAA,GAAkB,CAAA,CAAE,aAAa;KACjC,oBAAA,GAAuB,CAAA,CAAE,aAAa;KACtC,oBAAA,GAAuB,CAAA,CAAE,aAAa;KACtC,0BAAA,GAA6B,CAAA,CAAE,aACnC;KAEI,oBAAA,GAAuB,CAAA,CAAE,aAAa;KACtC,iBAAA,GAAoB,CAAA,CAAE,aAAa;AAyFD,KAxFlC,yBAAA,GAA4B,CAAA,CAAE,KAwFI,CAAA,OAvFtC,+BAuFsC,CAAA;AAAA,KArFlC,0BAAA,GAA6B,CAAA,CAAE,KAqFG,CAAA,OApFtC,gCAoFsC,CAAA;AAc9C;;;;;;;cAxFa,+BAA6B,CAAA,CAAA;;;;;;;;;;;;KAqD9B,uBAAA,GAA0B,CAAA,CAAE,aAChC;;;;cAMK,kCAAgC,CAAA,CAAA;;;;;;AA+ChC,cAjCA,iCAoCV,EApC2C,CAAA,CAAA,SAoC3C,CAAA;;;;;;;;;;;;;;;AAEH;AAGY,cA3BC,mCA4BL,EA5BwC,CAAA,CAAA,SA4BxC,CAAA;EAEI,WAAA,aAAA;EAGA,SAAA,WAAA;;;;;;;;;;;;;;;;;cAdC,sCAAoC,CAAA,CAAA;;;;;;;;;;;;KAKrC,0BAAA,GAA6B,CAAA,CAAE,aACnC;KAEI,2BAAA,GAA8B,CAAA,CAAE,aACpC;KAEI,6BAAA,GAAgC,CAAA,CAAE,aACtC;KAEI,8BAAA,GAAiC,CAAA,CAAE,aACvC"}
|
package/api/ai-agent.js
CHANGED
|
@@ -5,20 +5,76 @@ import { z } from "@hono/zod-openapi";
|
|
|
5
5
|
* Available AI models from OpenRouter
|
|
6
6
|
*/
|
|
7
7
|
const AI_MODELS = [
|
|
8
|
+
{
|
|
9
|
+
value: "moonshotai/kimi-k2-0905",
|
|
10
|
+
label: "Kimi K2",
|
|
11
|
+
provider: "Moonshot AI",
|
|
12
|
+
icon: "agent",
|
|
13
|
+
freeOnly: true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: "moonshotai/kimi-k2.5",
|
|
17
|
+
label: "Kimi K2.5",
|
|
18
|
+
provider: "Moonshot AI",
|
|
19
|
+
icon: "agent",
|
|
20
|
+
freeOnly: true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "openai/gpt-5.2-chat",
|
|
24
|
+
label: "GPT-5.2",
|
|
25
|
+
provider: "OpenAI",
|
|
26
|
+
icon: "star",
|
|
27
|
+
requiresPaid: true
|
|
28
|
+
},
|
|
8
29
|
{
|
|
9
30
|
value: "openai/gpt-5.1-chat",
|
|
10
31
|
label: "GPT-5.1",
|
|
11
|
-
provider: "OpenAI"
|
|
32
|
+
provider: "OpenAI",
|
|
33
|
+
icon: "star",
|
|
34
|
+
requiresPaid: true
|
|
12
35
|
},
|
|
13
36
|
{
|
|
14
37
|
value: "openai/gpt-5-mini",
|
|
15
38
|
label: "GPT-5 Mini",
|
|
16
|
-
provider: "OpenAI"
|
|
39
|
+
provider: "OpenAI",
|
|
40
|
+
icon: "star",
|
|
41
|
+
requiresPaid: true
|
|
17
42
|
},
|
|
18
43
|
{
|
|
19
44
|
value: "google/gemini-3-flash-preview",
|
|
20
45
|
label: "Gemini 3 Flash",
|
|
21
|
-
provider: "Google"
|
|
46
|
+
provider: "Google",
|
|
47
|
+
icon: "dashboard",
|
|
48
|
+
requiresPaid: true
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* Available AI agent goals/intents
|
|
53
|
+
*/
|
|
54
|
+
const AI_AGENT_GOALS = [
|
|
55
|
+
{
|
|
56
|
+
value: "sales",
|
|
57
|
+
label: "Increase sales conversions"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: "support",
|
|
61
|
+
label: "Provide customer support"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: "product_qa",
|
|
65
|
+
label: "Answer product questions"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: "lead_qualification",
|
|
69
|
+
label: "Qualify leads"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
value: "scheduling",
|
|
73
|
+
label: "Schedule appointments"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
value: "feedback",
|
|
77
|
+
label: "Collect customer feedback"
|
|
22
78
|
}
|
|
23
79
|
];
|
|
24
80
|
/**
|
|
@@ -49,7 +105,7 @@ const aiAgentResponseSchema = z.object({
|
|
|
49
105
|
description: "The temperature setting for response generation (0-2).",
|
|
50
106
|
example: .7
|
|
51
107
|
}),
|
|
52
|
-
|
|
108
|
+
maxOutputTokens: z.number().nullable().openapi({
|
|
53
109
|
description: "Maximum tokens for response generation.",
|
|
54
110
|
example: 1024
|
|
55
111
|
}),
|
|
@@ -65,6 +121,10 @@ const aiAgentResponseSchema = z.object({
|
|
|
65
121
|
description: "Total number of times the AI agent has been used.",
|
|
66
122
|
example: 42
|
|
67
123
|
}),
|
|
124
|
+
goals: z.array(z.string()).nullable().openapi({
|
|
125
|
+
description: "The goals/intents for this AI agent.",
|
|
126
|
+
example: ["support", "product_qa"]
|
|
127
|
+
}),
|
|
68
128
|
createdAt: z.string().openapi({
|
|
69
129
|
description: "When the AI agent was created.",
|
|
70
130
|
example: "2024-01-01T00:00:00.000Z"
|
|
@@ -72,6 +132,10 @@ const aiAgentResponseSchema = z.object({
|
|
|
72
132
|
updatedAt: z.string().openapi({
|
|
73
133
|
description: "When the AI agent was last updated.",
|
|
74
134
|
example: "2024-01-01T00:00:00.000Z"
|
|
135
|
+
}),
|
|
136
|
+
onboardingCompletedAt: z.string().nullable().openapi({
|
|
137
|
+
description: "When onboarding was completed. Null if still in onboarding flow.",
|
|
138
|
+
example: "2024-01-01T00:00:00.000Z"
|
|
75
139
|
})
|
|
76
140
|
});
|
|
77
141
|
/**
|
|
@@ -102,9 +166,13 @@ const createAiAgentRequestSchema = z.object({
|
|
|
102
166
|
description: "The temperature setting for response generation (0-2).",
|
|
103
167
|
example: .7
|
|
104
168
|
}),
|
|
105
|
-
|
|
169
|
+
maxOutputTokens: z.number().min(100, { message: "Max tokens must be at least 100." }).max(16e3, { message: "Max tokens must be at most 16,000." }).optional().openapi({
|
|
106
170
|
description: "Maximum tokens for response generation.",
|
|
107
171
|
example: 1024
|
|
172
|
+
}),
|
|
173
|
+
goals: z.array(z.string()).optional().openapi({
|
|
174
|
+
description: "The goals/intents for this AI agent.",
|
|
175
|
+
example: ["support", "product_qa"]
|
|
108
176
|
})
|
|
109
177
|
}).openapi({ description: "Payload used to create a new AI agent." });
|
|
110
178
|
/**
|
|
@@ -139,9 +207,17 @@ const updateAiAgentRequestSchema = z.object({
|
|
|
139
207
|
description: "The temperature setting for response generation (0-2).",
|
|
140
208
|
example: .7
|
|
141
209
|
}),
|
|
142
|
-
|
|
210
|
+
maxOutputTokens: z.number().min(100, { message: "Max tokens must be at least 100." }).max(16e3, { message: "Max tokens must be at most 16,000." }).nullable().optional().openapi({
|
|
143
211
|
description: "Maximum tokens for response generation.",
|
|
144
212
|
example: 1024
|
|
213
|
+
}),
|
|
214
|
+
goals: z.array(z.string()).nullable().optional().openapi({
|
|
215
|
+
description: "The goals/intents for this AI agent.",
|
|
216
|
+
example: ["support", "product_qa"]
|
|
217
|
+
}),
|
|
218
|
+
onboardingCompletedAt: z.string().nullable().optional().openapi({
|
|
219
|
+
description: "Mark onboarding as complete by setting this timestamp. Set to current ISO timestamp to complete onboarding.",
|
|
220
|
+
example: "2024-01-01T00:00:00.000Z"
|
|
145
221
|
})
|
|
146
222
|
}).openapi({ description: "Payload used to update an existing AI agent." });
|
|
147
223
|
/**
|
|
@@ -162,13 +238,163 @@ const toggleAiAgentActiveRequestSchema = z.object({
|
|
|
162
238
|
})
|
|
163
239
|
}).openapi({ description: "Payload used to toggle an AI agent's active status." });
|
|
164
240
|
/**
|
|
241
|
+
* Delete AI Agent request schema
|
|
242
|
+
*/
|
|
243
|
+
const deleteAiAgentRequestSchema = z.object({
|
|
244
|
+
websiteSlug: z.string().openapi({
|
|
245
|
+
description: "The website slug.",
|
|
246
|
+
example: "my-website"
|
|
247
|
+
}),
|
|
248
|
+
aiAgentId: z.ulid().openapi({
|
|
249
|
+
description: "The AI agent's unique identifier.",
|
|
250
|
+
example: "01JG000000000000000000000"
|
|
251
|
+
})
|
|
252
|
+
}).openapi({ description: "Payload used to permanently delete an AI agent." });
|
|
253
|
+
/**
|
|
165
254
|
* Get AI Agent request schema
|
|
166
255
|
*/
|
|
167
256
|
const getAiAgentRequestSchema = z.object({ websiteSlug: z.string().openapi({
|
|
168
257
|
description: "The website slug.",
|
|
169
258
|
example: "my-website"
|
|
170
259
|
}) }).openapi({ description: "Request to get the AI agent for a website." });
|
|
260
|
+
/**
|
|
261
|
+
* Generate Base Prompt request schema
|
|
262
|
+
* Used to scrape a website and generate a tailored base prompt for the AI agent
|
|
263
|
+
*/
|
|
264
|
+
const generateBasePromptRequestSchema = z.object({
|
|
265
|
+
websiteSlug: z.string().openapi({
|
|
266
|
+
description: "The website slug.",
|
|
267
|
+
example: "my-website"
|
|
268
|
+
}),
|
|
269
|
+
sourceUrl: z.string().url({ message: "Please enter a valid URL." }).optional().openapi({
|
|
270
|
+
description: "The URL to scrape for content and brand information. Optional - if not provided, manualDescription should be used.",
|
|
271
|
+
example: "https://example.com"
|
|
272
|
+
}),
|
|
273
|
+
agentName: z.string().min(1, { message: "Agent name is required." }).max(100, { message: "Agent name must be 100 characters or fewer." }).openapi({
|
|
274
|
+
description: "The name for the AI agent.",
|
|
275
|
+
example: "Support Assistant"
|
|
276
|
+
}),
|
|
277
|
+
goals: z.array(z.string()).openapi({
|
|
278
|
+
description: "The goals/intents for this AI agent.",
|
|
279
|
+
example: ["support", "product_qa"]
|
|
280
|
+
}),
|
|
281
|
+
manualDescription: z.string().max(1e3, { message: "Description must be 1000 characters or fewer." }).optional().openapi({
|
|
282
|
+
description: "Manual description of the business, used when scraping returns no description or no URL is provided.",
|
|
283
|
+
example: "We help small businesses manage their inventory efficiently."
|
|
284
|
+
})
|
|
285
|
+
}).openapi({ description: "Request to generate a base prompt by scraping a website and using AI." });
|
|
286
|
+
/**
|
|
287
|
+
* Generate Base Prompt response schema
|
|
288
|
+
*/
|
|
289
|
+
const generateBasePromptResponseSchema = z.object({
|
|
290
|
+
basePrompt: z.string().openapi({
|
|
291
|
+
description: "The generated base prompt for the AI agent.",
|
|
292
|
+
example: "You are a helpful support assistant for Acme Corp..."
|
|
293
|
+
}),
|
|
294
|
+
isGenerated: z.boolean().openapi({
|
|
295
|
+
description: "Whether the prompt was AI-generated (true) or fell back to default (false).",
|
|
296
|
+
example: true
|
|
297
|
+
}),
|
|
298
|
+
companyName: z.string().nullable().openapi({
|
|
299
|
+
description: "The company name extracted from the website.",
|
|
300
|
+
example: "Acme Corp"
|
|
301
|
+
}),
|
|
302
|
+
websiteDescription: z.string().nullable().openapi({
|
|
303
|
+
description: "The description extracted from the website.",
|
|
304
|
+
example: "Acme Corp helps businesses grow with innovative solutions."
|
|
305
|
+
}),
|
|
306
|
+
logo: z.string().nullable().openapi({
|
|
307
|
+
description: "The logo URL extracted from the website (og:image).",
|
|
308
|
+
example: "https://example.com/logo.png"
|
|
309
|
+
}),
|
|
310
|
+
favicon: z.string().nullable().openapi({
|
|
311
|
+
description: "The favicon URL extracted from the website.",
|
|
312
|
+
example: "https://example.com/favicon.ico"
|
|
313
|
+
}),
|
|
314
|
+
discoveredLinksCount: z.number().openapi({
|
|
315
|
+
description: "Number of pages discovered on the website for future knowledge base training.",
|
|
316
|
+
example: 47
|
|
317
|
+
})
|
|
318
|
+
}).openapi({ description: "Response containing the generated base prompt and brand info." });
|
|
319
|
+
/**
|
|
320
|
+
* AI Agent Behavior Settings Schema
|
|
321
|
+
*
|
|
322
|
+
* Controls how the AI agent behaves in conversations.
|
|
323
|
+
* Simplified for MVP - AI responds immediately and decides when to respond
|
|
324
|
+
* based on context, not configuration.
|
|
325
|
+
*/
|
|
326
|
+
const aiAgentBehaviorSettingsSchema = z.object({
|
|
327
|
+
canResolve: z.boolean().openapi({
|
|
328
|
+
description: "Whether the AI can mark conversations as resolved.",
|
|
329
|
+
example: true
|
|
330
|
+
}),
|
|
331
|
+
canMarkSpam: z.boolean().openapi({
|
|
332
|
+
description: "Whether the AI can mark conversations as spam.",
|
|
333
|
+
example: true
|
|
334
|
+
}),
|
|
335
|
+
canAssign: z.boolean().openapi({
|
|
336
|
+
description: "Whether the AI can assign conversations to team members.",
|
|
337
|
+
example: true
|
|
338
|
+
}),
|
|
339
|
+
canSetPriority: z.boolean().openapi({
|
|
340
|
+
description: "Whether the AI can change conversation priority.",
|
|
341
|
+
example: true
|
|
342
|
+
}),
|
|
343
|
+
canCategorize: z.boolean().openapi({
|
|
344
|
+
description: "Whether the AI can add conversations to views.",
|
|
345
|
+
example: true
|
|
346
|
+
}),
|
|
347
|
+
canEscalate: z.boolean().openapi({
|
|
348
|
+
description: "Whether the AI can escalate conversations to human agents.",
|
|
349
|
+
example: true
|
|
350
|
+
}),
|
|
351
|
+
defaultEscalationUserId: z.string().nullable().openapi({
|
|
352
|
+
description: "Default user ID to assign escalated conversations to.",
|
|
353
|
+
example: null
|
|
354
|
+
}),
|
|
355
|
+
autoAnalyzeSentiment: z.boolean().openapi({
|
|
356
|
+
description: "Whether to automatically analyze conversation sentiment.",
|
|
357
|
+
example: true
|
|
358
|
+
}),
|
|
359
|
+
autoGenerateTitle: z.boolean().openapi({
|
|
360
|
+
description: "Whether to automatically generate conversation titles.",
|
|
361
|
+
example: true
|
|
362
|
+
}),
|
|
363
|
+
autoCategorize: z.boolean().openapi({
|
|
364
|
+
description: "Whether to automatically add conversations to matching views.",
|
|
365
|
+
example: false
|
|
366
|
+
})
|
|
367
|
+
}).openapi({ description: "AI agent behavior settings." });
|
|
368
|
+
/**
|
|
369
|
+
* Get Behavior Settings request schema
|
|
370
|
+
*/
|
|
371
|
+
const getBehaviorSettingsRequestSchema = z.object({ websiteSlug: z.string().openapi({
|
|
372
|
+
description: "The website slug.",
|
|
373
|
+
example: "my-website"
|
|
374
|
+
}) }).openapi({ description: "Request to get behavior settings for an AI agent." });
|
|
375
|
+
/**
|
|
376
|
+
* Get Behavior Settings response schema
|
|
377
|
+
*/
|
|
378
|
+
const getBehaviorSettingsResponseSchema = aiAgentBehaviorSettingsSchema.extend({ aiAgentId: z.ulid().openapi({
|
|
379
|
+
description: "The AI agent's unique identifier.",
|
|
380
|
+
example: "01JG000000000000000000000"
|
|
381
|
+
}) }).openapi({ description: "Response containing the AI agent's behavior settings." });
|
|
382
|
+
/**
|
|
383
|
+
* Update Behavior Settings request schema
|
|
384
|
+
*/
|
|
385
|
+
const updateBehaviorSettingsRequestSchema = z.object({
|
|
386
|
+
websiteSlug: z.string().openapi({
|
|
387
|
+
description: "The website slug.",
|
|
388
|
+
example: "my-website"
|
|
389
|
+
}),
|
|
390
|
+
aiAgentId: z.ulid().openapi({
|
|
391
|
+
description: "The AI agent's unique identifier.",
|
|
392
|
+
example: "01JG000000000000000000000"
|
|
393
|
+
}),
|
|
394
|
+
settings: aiAgentBehaviorSettingsSchema.partial().openapi({ description: "Partial behavior settings to update." })
|
|
395
|
+
}).openapi({ description: "Payload used to update an AI agent's behavior settings." });
|
|
396
|
+
const updateBehaviorSettingsResponseSchema = aiAgentBehaviorSettingsSchema.openapi({ description: "The updated behavior settings." });
|
|
171
397
|
|
|
172
398
|
//#endregion
|
|
173
|
-
export { AI_MODELS, aiAgentResponseSchema, createAiAgentRequestSchema, getAiAgentRequestSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema };
|
|
399
|
+
export { AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingsSchema, aiAgentResponseSchema, createAiAgentRequestSchema, deleteAiAgentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, toggleAiAgentActiveRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema };
|
|
174
400
|
//# sourceMappingURL=ai-agent.js.map
|
package/api/ai-agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.js","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\n/**\n * Available AI models from OpenRouter\n */\nexport const AI_MODELS = [\n\t{\n\t\tvalue: \"openai/gpt-5.1-chat\",\n\t\tlabel: \"GPT-5.1\",\n\t\tprovider: \"OpenAI\",\n\t},\n\t{\n\t\tvalue: \"openai/gpt-5-mini\",\n\t\tlabel: \"GPT-5 Mini\",\n\t\tprovider: \"OpenAI\",\n\t},\n\t{\n\t\tvalue: \"google/gemini-3-flash-preview\",\n\t\tlabel: \"Gemini 3 Flash\",\n\t\tprovider: \"Google\",\n\t},\n] as const;\n\nexport type AIModel = (typeof AI_MODELS)[number][\"value\"];\n\n/**\n * AI Agent response schema\n */\nexport const aiAgentResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The AI agent's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The AI agent's display name.\",\n\t\texample: \"Support Assistant\",\n\t}),\n\tdescription: z.string().nullable().openapi({\n\t\tdescription: \"A brief description of the AI agent's purpose.\",\n\t\texample: \"Helps users with common support questions.\",\n\t}),\n\tbasePrompt: z.string().openapi({\n\t\tdescription: \"The system prompt that defines the AI agent's behavior.\",\n\t\texample: \"You are a helpful support assistant...\",\n\t}),\n\tmodel: z.string().openapi({\n\t\tdescription: \"The OpenRouter model identifier.\",\n\t\texample: \"anthropic/claude-sonnet-4-20250514\",\n\t}),\n\ttemperature: z.number().nullable().openapi({\n\t\tdescription: \"The temperature setting for response generation (0-2).\",\n\t\texample: 0.7,\n\t}),\n\tmaxTokens: z.number().nullable().openapi({\n\t\tdescription: \"Maximum tokens for response generation.\",\n\t\texample: 1024,\n\t}),\n\tisActive: z.boolean().openapi({\n\t\tdescription: \"Whether the AI agent is currently active.\",\n\t\texample: true,\n\t}),\n\tlastUsedAt: z.string().nullable().openapi({\n\t\tdescription: \"When the AI agent was last used.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n\tusageCount: z.number().openapi({\n\t\tdescription: \"Total number of times the AI agent has been used.\",\n\t\texample: 42,\n\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"When the AI agent was created.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n\tupdatedAt: z.string().openapi({\n\t\tdescription: \"When the AI agent was last updated.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n});\n\n/**\n * Create AI Agent request schema\n */\nexport const createAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to create the AI agent for.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\tname: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Name is required.\" })\n\t\t\t.max(100, { message: \"Name must be 100 characters or fewer.\" })\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The AI agent's display name.\",\n\t\t\t\texample: \"Support Assistant\",\n\t\t\t}),\n\t\tdescription: z\n\t\t\t.string()\n\t\t\t.max(500, { message: \"Description must be 500 characters or fewer.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"A brief description of the AI agent's purpose.\",\n\t\t\t\texample: \"Helps users with common support questions.\",\n\t\t\t}),\n\t\tbasePrompt: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Base prompt is required.\" })\n\t\t\t.max(10_000, {\n\t\t\t\tmessage: \"Base prompt must be 10,000 characters or fewer.\",\n\t\t\t})\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The system prompt that defines the AI agent's behavior.\",\n\t\t\t\texample: \"You are a helpful support assistant...\",\n\t\t\t}),\n\t\tmodel: z.string().min(1, { message: \"Model is required.\" }).openapi({\n\t\t\tdescription: \"The OpenRouter model identifier.\",\n\t\t\texample: \"anthropic/claude-sonnet-4-20250514\",\n\t\t}),\n\t\ttemperature: z\n\t\t\t.number()\n\t\t\t.min(0, { message: \"Temperature must be at least 0.\" })\n\t\t\t.max(2, { message: \"Temperature must be at most 2.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The temperature setting for response generation (0-2).\",\n\t\t\t\texample: 0.7,\n\t\t\t}),\n\t\tmaxTokens: z\n\t\t\t.number()\n\t\t\t.min(100, { message: \"Max tokens must be at least 100.\" })\n\t\t\t.max(16_000, { message: \"Max tokens must be at most 16,000.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Maximum tokens for response generation.\",\n\t\t\t\texample: 1024,\n\t\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to create a new AI agent.\",\n\t});\n\n/**\n * Update AI Agent request schema\n */\nexport const updateAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Name is required.\" })\n\t\t\t.max(100, { message: \"Name must be 100 characters or fewer.\" })\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The AI agent's display name.\",\n\t\t\t\texample: \"Support Assistant\",\n\t\t\t}),\n\t\tdescription: z\n\t\t\t.string()\n\t\t\t.max(500, { message: \"Description must be 500 characters or fewer.\" })\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"A brief description of the AI agent's purpose.\",\n\t\t\t\texample: \"Helps users with common support questions.\",\n\t\t\t}),\n\t\tbasePrompt: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Base prompt is required.\" })\n\t\t\t.max(10_000, {\n\t\t\t\tmessage: \"Base prompt must be 10,000 characters or fewer.\",\n\t\t\t})\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The system prompt that defines the AI agent's behavior.\",\n\t\t\t\texample: \"You are a helpful support assistant...\",\n\t\t\t}),\n\t\tmodel: z.string().min(1, { message: \"Model is required.\" }).openapi({\n\t\t\tdescription: \"The OpenRouter model identifier.\",\n\t\t\texample: \"anthropic/claude-sonnet-4-20250514\",\n\t\t}),\n\t\ttemperature: z\n\t\t\t.number()\n\t\t\t.min(0, { message: \"Temperature must be at least 0.\" })\n\t\t\t.max(2, { message: \"Temperature must be at most 2.\" })\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The temperature setting for response generation (0-2).\",\n\t\t\t\texample: 0.7,\n\t\t\t}),\n\t\tmaxTokens: z\n\t\t\t.number()\n\t\t\t.min(100, { message: \"Max tokens must be at least 100.\" })\n\t\t\t.max(16_000, { message: \"Max tokens must be at most 16,000.\" })\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Maximum tokens for response generation.\",\n\t\t\t\texample: 1024,\n\t\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to update an existing AI agent.\",\n\t});\n\n/**\n * Toggle AI Agent active status request schema\n */\nexport const toggleAiAgentActiveRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tisActive: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI agent should be active.\",\n\t\t\texample: true,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to toggle an AI agent's active status.\",\n\t});\n\n/**\n * Get AI Agent request schema\n */\nexport const getAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get the AI agent for a website.\",\n\t});\n\nexport type AiAgentResponse = z.infer<typeof aiAgentResponseSchema>;\nexport type CreateAiAgentRequest = z.infer<typeof createAiAgentRequestSchema>;\nexport type UpdateAiAgentRequest = z.infer<typeof updateAiAgentRequestSchema>;\nexport type ToggleAiAgentActiveRequest = z.infer<\n\ttypeof toggleAiAgentActiveRequestSchema\n>;\nexport type GetAiAgentRequest = z.infer<typeof getAiAgentRequestSchema>;\n"],"mappings":";;;;;;AAKA,MAAa,YAAY;CACxB;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV;CACD;;;;AAOD,MAAa,wBAAwB,EAAE,OAAO;CAC7C,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EAC1C,aAAa;EACb,SAAS;EACT,CAAC;CACF,YAAY,EAAE,QAAQ,CAAC,QAAQ;EAC9B,aAAa;EACb,SAAS;EACT,CAAC;CACF,OAAO,EAAE,QAAQ,CAAC,QAAQ;EACzB,aAAa;EACb,SAAS;EACT,CAAC;CACF,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EAC1C,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACxC,aAAa;EACb,SAAS;EACT,CAAC;CACF,UAAU,EAAE,SAAS,CAAC,QAAQ;E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a;EACb,SAAS;EACT,CAAC;CACH,CAAC,CACD,QAAQ,EACR,aAAa,gDACb,CAAC;;;;AAKH,MAAa,mCAAmC,EAC9C,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,QAAQ;EAC3B,aAAa;EACb,SAAS;EACT,CAAC;CACF,UAAU,EAAE,SAAS,CAAC,QAAQ;EAC7B,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,uDACb,CAAC;;;;AAKH,MAAa,0BAA0B,EACrC,OAAO,EACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;CAC/B,aAAa;CACb,SAAS;CACT,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,8CACb,CAAC"}
|
|
1
|
+
{"version":3,"file":"ai-agent.js","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\n/**\n * Available AI models from OpenRouter\n */\nexport const AI_MODELS = [\n\t{\n\t\tvalue: \"moonshotai/kimi-k2-0905\",\n\t\tlabel: \"Kimi K2\",\n\t\tprovider: \"Moonshot AI\",\n\t\ticon: \"agent\",\n\t\tfreeOnly: true,\n\t},\n\t{\n\t\tvalue: \"moonshotai/kimi-k2.5\",\n\t\tlabel: \"Kimi K2.5\",\n\t\tprovider: \"Moonshot AI\",\n\t\ticon: \"agent\",\n\t\tfreeOnly: true,\n\t},\n\t{\n\t\tvalue: \"openai/gpt-5.2-chat\",\n\t\tlabel: \"GPT-5.2\",\n\t\tprovider: \"OpenAI\",\n\t\ticon: \"star\",\n\t\trequiresPaid: true,\n\t},\n\t{\n\t\tvalue: \"openai/gpt-5.1-chat\",\n\t\tlabel: \"GPT-5.1\",\n\t\tprovider: \"OpenAI\",\n\t\ticon: \"star\",\n\t\trequiresPaid: true,\n\t},\n\t{\n\t\tvalue: \"openai/gpt-5-mini\",\n\t\tlabel: \"GPT-5 Mini\",\n\t\tprovider: \"OpenAI\",\n\t\ticon: \"star\",\n\t\trequiresPaid: true,\n\t},\n\t{\n\t\tvalue: \"google/gemini-3-flash-preview\",\n\t\tlabel: \"Gemini 3 Flash\",\n\t\tprovider: \"Google\",\n\t\ticon: \"dashboard\",\n\t\trequiresPaid: true,\n\t},\n] as const;\n\nexport type AIModel = (typeof AI_MODELS)[number][\"value\"];\nexport type AIModelConfig = (typeof AI_MODELS)[number];\n\n/**\n * Available AI agent goals/intents\n */\nexport const AI_AGENT_GOALS = [\n\t{ value: \"sales\", label: \"Increase sales conversions\" },\n\t{ value: \"support\", label: \"Provide customer support\" },\n\t{ value: \"product_qa\", label: \"Answer product questions\" },\n\t{ value: \"lead_qualification\", label: \"Qualify leads\" },\n\t{ value: \"scheduling\", label: \"Schedule appointments\" },\n\t{ value: \"feedback\", label: \"Collect customer feedback\" },\n] as const;\n\nexport type AIAgentGoal = (typeof AI_AGENT_GOALS)[number][\"value\"];\n\n/**\n * AI Agent response schema\n */\nexport const aiAgentResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The AI agent's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The AI agent's display name.\",\n\t\texample: \"Support Assistant\",\n\t}),\n\tdescription: z.string().nullable().openapi({\n\t\tdescription: \"A brief description of the AI agent's purpose.\",\n\t\texample: \"Helps users with common support questions.\",\n\t}),\n\tbasePrompt: z.string().openapi({\n\t\tdescription: \"The system prompt that defines the AI agent's behavior.\",\n\t\texample: \"You are a helpful support assistant...\",\n\t}),\n\tmodel: z.string().openapi({\n\t\tdescription: \"The OpenRouter model identifier.\",\n\t\texample: \"anthropic/claude-sonnet-4-20250514\",\n\t}),\n\ttemperature: z.number().nullable().openapi({\n\t\tdescription: \"The temperature setting for response generation (0-2).\",\n\t\texample: 0.7,\n\t}),\n\tmaxOutputTokens: z.number().nullable().openapi({\n\t\tdescription: \"Maximum tokens for response generation.\",\n\t\texample: 1024,\n\t}),\n\tisActive: z.boolean().openapi({\n\t\tdescription: \"Whether the AI agent is currently active.\",\n\t\texample: true,\n\t}),\n\tlastUsedAt: z.string().nullable().openapi({\n\t\tdescription: \"When the AI agent was last used.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n\tusageCount: z.number().openapi({\n\t\tdescription: \"Total number of times the AI agent has been used.\",\n\t\texample: 42,\n\t}),\n\tgoals: z\n\t\t.array(z.string())\n\t\t.nullable()\n\t\t.openapi({\n\t\t\tdescription: \"The goals/intents for this AI agent.\",\n\t\t\texample: [\"support\", \"product_qa\"],\n\t\t}),\n\tcreatedAt: z.string().openapi({\n\t\tdescription: \"When the AI agent was created.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n\tupdatedAt: z.string().openapi({\n\t\tdescription: \"When the AI agent was last updated.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n\tonboardingCompletedAt: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"When onboarding was completed. Null if still in onboarding flow.\",\n\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t}),\n});\n\n/**\n * Create AI Agent request schema\n */\nexport const createAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug to create the AI agent for.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\tname: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Name is required.\" })\n\t\t\t.max(100, { message: \"Name must be 100 characters or fewer.\" })\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The AI agent's display name.\",\n\t\t\t\texample: \"Support Assistant\",\n\t\t\t}),\n\t\tdescription: z\n\t\t\t.string()\n\t\t\t.max(500, { message: \"Description must be 500 characters or fewer.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"A brief description of the AI agent's purpose.\",\n\t\t\t\texample: \"Helps users with common support questions.\",\n\t\t\t}),\n\t\tbasePrompt: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Base prompt is required.\" })\n\t\t\t.max(10_000, {\n\t\t\t\tmessage: \"Base prompt must be 10,000 characters or fewer.\",\n\t\t\t})\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The system prompt that defines the AI agent's behavior.\",\n\t\t\t\texample: \"You are a helpful support assistant...\",\n\t\t\t}),\n\t\tmodel: z.string().min(1, { message: \"Model is required.\" }).openapi({\n\t\t\tdescription: \"The OpenRouter model identifier.\",\n\t\t\texample: \"anthropic/claude-sonnet-4-20250514\",\n\t\t}),\n\t\ttemperature: z\n\t\t\t.number()\n\t\t\t.min(0, { message: \"Temperature must be at least 0.\" })\n\t\t\t.max(2, { message: \"Temperature must be at most 2.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The temperature setting for response generation (0-2).\",\n\t\t\t\texample: 0.7,\n\t\t\t}),\n\t\tmaxOutputTokens: z\n\t\t\t.number()\n\t\t\t.min(100, { message: \"Max tokens must be at least 100.\" })\n\t\t\t.max(16_000, { message: \"Max tokens must be at most 16,000.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Maximum tokens for response generation.\",\n\t\t\t\texample: 1024,\n\t\t\t}),\n\t\tgoals: z\n\t\t\t.array(z.string())\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The goals/intents for this AI agent.\",\n\t\t\t\texample: [\"support\", \"product_qa\"],\n\t\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to create a new AI agent.\",\n\t});\n\n/**\n * Update AI Agent request schema\n */\nexport const updateAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Name is required.\" })\n\t\t\t.max(100, { message: \"Name must be 100 characters or fewer.\" })\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The AI agent's display name.\",\n\t\t\t\texample: \"Support Assistant\",\n\t\t\t}),\n\t\tdescription: z\n\t\t\t.string()\n\t\t\t.max(500, { message: \"Description must be 500 characters or fewer.\" })\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"A brief description of the AI agent's purpose.\",\n\t\t\t\texample: \"Helps users with common support questions.\",\n\t\t\t}),\n\t\tbasePrompt: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Base prompt is required.\" })\n\t\t\t.max(10_000, {\n\t\t\t\tmessage: \"Base prompt must be 10,000 characters or fewer.\",\n\t\t\t})\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The system prompt that defines the AI agent's behavior.\",\n\t\t\t\texample: \"You are a helpful support assistant...\",\n\t\t\t}),\n\t\tmodel: z.string().min(1, { message: \"Model is required.\" }).openapi({\n\t\t\tdescription: \"The OpenRouter model identifier.\",\n\t\t\texample: \"anthropic/claude-sonnet-4-20250514\",\n\t\t}),\n\t\ttemperature: z\n\t\t\t.number()\n\t\t\t.min(0, { message: \"Temperature must be at least 0.\" })\n\t\t\t.max(2, { message: \"Temperature must be at most 2.\" })\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The temperature setting for response generation (0-2).\",\n\t\t\t\texample: 0.7,\n\t\t\t}),\n\t\tmaxOutputTokens: z\n\t\t\t.number()\n\t\t\t.min(100, { message: \"Max tokens must be at least 100.\" })\n\t\t\t.max(16_000, { message: \"Max tokens must be at most 16,000.\" })\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"Maximum tokens for response generation.\",\n\t\t\t\texample: 1024,\n\t\t\t}),\n\t\tgoals: z\n\t\t\t.array(z.string())\n\t\t\t.nullable()\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The goals/intents for this AI agent.\",\n\t\t\t\texample: [\"support\", \"product_qa\"],\n\t\t\t}),\n\t\tonboardingCompletedAt: z.string().nullable().optional().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Mark onboarding as complete by setting this timestamp. Set to current ISO timestamp to complete onboarding.\",\n\t\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to update an existing AI agent.\",\n\t});\n\n/**\n * Toggle AI Agent active status request schema\n */\nexport const toggleAiAgentActiveRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tisActive: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI agent should be active.\",\n\t\t\texample: true,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to toggle an AI agent's active status.\",\n\t});\n\n/**\n * Delete AI Agent request schema\n */\nexport const deleteAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to permanently delete an AI agent.\",\n\t});\n\n/**\n * Get AI Agent request schema\n */\nexport const getAiAgentRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get the AI agent for a website.\",\n\t});\n\n/**\n * Generate Base Prompt request schema\n * Used to scrape a website and generate a tailored base prompt for the AI agent\n */\nexport const generateBasePromptRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\tsourceUrl: z\n\t\t\t.string()\n\t\t\t.url({ message: \"Please enter a valid URL.\" })\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"The URL to scrape for content and brand information. Optional - if not provided, manualDescription should be used.\",\n\t\t\t\texample: \"https://example.com\",\n\t\t\t}),\n\t\tagentName: z\n\t\t\t.string()\n\t\t\t.min(1, { message: \"Agent name is required.\" })\n\t\t\t.max(100, { message: \"Agent name must be 100 characters or fewer.\" })\n\t\t\t.openapi({\n\t\t\t\tdescription: \"The name for the AI agent.\",\n\t\t\t\texample: \"Support Assistant\",\n\t\t\t}),\n\t\tgoals: z.array(z.string()).openapi({\n\t\t\tdescription: \"The goals/intents for this AI agent.\",\n\t\t\texample: [\"support\", \"product_qa\"],\n\t\t}),\n\t\tmanualDescription: z\n\t\t\t.string()\n\t\t\t.max(1000, {\n\t\t\t\tmessage: \"Description must be 1000 characters or fewer.\",\n\t\t\t})\n\t\t\t.optional()\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"Manual description of the business, used when scraping returns no description or no URL is provided.\",\n\t\t\t\texample: \"We help small businesses manage their inventory efficiently.\",\n\t\t\t}),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Request to generate a base prompt by scraping a website and using AI.\",\n\t});\n\n/**\n * Generate Base Prompt response schema\n */\nexport const generateBasePromptResponseSchema = z\n\t.object({\n\t\tbasePrompt: z.string().openapi({\n\t\t\tdescription: \"The generated base prompt for the AI agent.\",\n\t\t\texample: \"You are a helpful support assistant for Acme Corp...\",\n\t\t}),\n\t\tisGenerated: z.boolean().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Whether the prompt was AI-generated (true) or fell back to default (false).\",\n\t\t\texample: true,\n\t\t}),\n\t\tcompanyName: z.string().nullable().openapi({\n\t\t\tdescription: \"The company name extracted from the website.\",\n\t\t\texample: \"Acme Corp\",\n\t\t}),\n\t\twebsiteDescription: z.string().nullable().openapi({\n\t\t\tdescription: \"The description extracted from the website.\",\n\t\t\texample: \"Acme Corp helps businesses grow with innovative solutions.\",\n\t\t}),\n\t\tlogo: z.string().nullable().openapi({\n\t\t\tdescription: \"The logo URL extracted from the website (og:image).\",\n\t\t\texample: \"https://example.com/logo.png\",\n\t\t}),\n\t\tfavicon: z.string().nullable().openapi({\n\t\t\tdescription: \"The favicon URL extracted from the website.\",\n\t\t\texample: \"https://example.com/favicon.ico\",\n\t\t}),\n\t\tdiscoveredLinksCount: z.number().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Number of pages discovered on the website for future knowledge base training.\",\n\t\t\texample: 47,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Response containing the generated base prompt and brand info.\",\n\t});\n\nexport type AiAgentResponse = z.infer<typeof aiAgentResponseSchema>;\nexport type CreateAiAgentRequest = z.infer<typeof createAiAgentRequestSchema>;\nexport type UpdateAiAgentRequest = z.infer<typeof updateAiAgentRequestSchema>;\nexport type ToggleAiAgentActiveRequest = z.infer<\n\ttypeof toggleAiAgentActiveRequestSchema\n>;\nexport type DeleteAiAgentRequest = z.infer<typeof deleteAiAgentRequestSchema>;\nexport type GetAiAgentRequest = z.infer<typeof getAiAgentRequestSchema>;\nexport type GenerateBasePromptRequest = z.infer<\n\ttypeof generateBasePromptRequestSchema\n>;\nexport type GenerateBasePromptResponse = z.infer<\n\ttypeof generateBasePromptResponseSchema\n>;\n\n/**\n * AI Agent Behavior Settings Schema\n *\n * Controls how the AI agent behaves in conversations.\n * Simplified for MVP - AI responds immediately and decides when to respond\n * based on context, not configuration.\n */\nexport const aiAgentBehaviorSettingsSchema = z\n\t.object({\n\t\t// Capability toggles\n\t\tcanResolve: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI can mark conversations as resolved.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcanMarkSpam: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI can mark conversations as spam.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcanAssign: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI can assign conversations to team members.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcanSetPriority: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI can change conversation priority.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcanCategorize: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI can add conversations to views.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcanEscalate: z.boolean().openapi({\n\t\t\tdescription: \"Whether the AI can escalate conversations to human agents.\",\n\t\t\texample: true,\n\t\t}),\n\n\t\t// Escalation config\n\t\tdefaultEscalationUserId: z.string().nullable().openapi({\n\t\t\tdescription: \"Default user ID to assign escalated conversations to.\",\n\t\t\texample: null,\n\t\t}),\n\n\t\t// Background analysis\n\t\tautoAnalyzeSentiment: z.boolean().openapi({\n\t\t\tdescription: \"Whether to automatically analyze conversation sentiment.\",\n\t\t\texample: true,\n\t\t}),\n\t\tautoGenerateTitle: z.boolean().openapi({\n\t\t\tdescription: \"Whether to automatically generate conversation titles.\",\n\t\t\texample: true,\n\t\t}),\n\t\tautoCategorize: z.boolean().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Whether to automatically add conversations to matching views.\",\n\t\t\texample: false,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"AI agent behavior settings.\",\n\t});\n\nexport type AiAgentBehaviorSettings = z.infer<\n\ttypeof aiAgentBehaviorSettingsSchema\n>;\n\n/**\n * Get Behavior Settings request schema\n */\nexport const getBehaviorSettingsRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Request to get behavior settings for an AI agent.\",\n\t});\n\n/**\n * Get Behavior Settings response schema\n */\nexport const getBehaviorSettingsResponseSchema = aiAgentBehaviorSettingsSchema\n\t.extend({\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Response containing the AI agent's behavior settings.\",\n\t});\n\n/**\n * Update Behavior Settings request schema\n */\nexport const updateBehaviorSettingsRequestSchema = z\n\t.object({\n\t\twebsiteSlug: z.string().openapi({\n\t\t\tdescription: \"The website slug.\",\n\t\t\texample: \"my-website\",\n\t\t}),\n\t\taiAgentId: z.ulid().openapi({\n\t\t\tdescription: \"The AI agent's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tsettings: aiAgentBehaviorSettingsSchema.partial().openapi({\n\t\t\tdescription: \"Partial behavior settings to update.\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload used to update an AI agent's behavior settings.\",\n\t}); /**\n * Update Behavior Settings response schema\n */\nexport const updateBehaviorSettingsResponseSchema =\n\taiAgentBehaviorSettingsSchema.openapi({\n\t\tdescription: \"The updated behavior settings.\",\n\t});\n\nexport type GetBehaviorSettingsRequest = z.infer<\n\ttypeof getBehaviorSettingsRequestSchema\n>;\nexport type GetBehaviorSettingsResponse = z.infer<\n\ttypeof getBehaviorSettingsResponseSchema\n>;\nexport type UpdateBehaviorSettingsRequest = z.infer<\n\ttypeof updateBehaviorSettingsRequestSchema\n>;\nexport type UpdateBehaviorSettingsResponse = z.infer<\n\ttypeof updateBehaviorSettingsResponseSchema\n>;\n"],"mappings":";;;;;;AAKA,MAAa,YAAY;CACxB;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,UAAU;EACV;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,UAA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