@cossistant/types 0.0.29 → 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 +8 -40
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +10 -26
- package/api/ai-agent.js.map +1 -1
- package/api/common.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 +3 -3
- package/api/index.js +3 -3
- package/api/knowledge.d.ts +57 -25
- package/api/knowledge.d.ts.map +1 -1
- package/api/knowledge.js +61 -11
- package/api/knowledge.js.map +1 -1
- package/api/link-source.d.ts +2 -0
- package/api/link-source.d.ts.map +1 -1
- package/api/link-source.js +8 -0
- package/api/link-source.js.map +1 -1
- 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/index.d.ts +4 -4
- package/index.js +4 -4
- package/package.json +1 -1
- package/realtime-events.d.ts +446 -48
- package/realtime-events.d.ts.map +1 -1
- package/realtime-events.js +116 -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 +369 -65
- package/trpc/conversation.d.ts.map +1 -1
- package/trpc/visitor.d.ts +1 -1
package/api/ai-agent.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ declare const AI_MODELS: readonly [{
|
|
|
11
11
|
readonly provider: "Moonshot AI";
|
|
12
12
|
readonly icon: "agent";
|
|
13
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;
|
|
14
20
|
}, {
|
|
15
21
|
readonly value: "openai/gpt-5.2-chat";
|
|
16
22
|
readonly label: "GPT-5.2";
|
|
@@ -164,17 +170,10 @@ type GenerateBasePromptResponse = z.infer<typeof generateBasePromptResponseSchem
|
|
|
164
170
|
* AI Agent Behavior Settings Schema
|
|
165
171
|
*
|
|
166
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.
|
|
167
175
|
*/
|
|
168
176
|
declare const aiAgentBehaviorSettingsSchema: z.ZodObject<{
|
|
169
|
-
responseMode: z.ZodEnum<{
|
|
170
|
-
manual: "manual";
|
|
171
|
-
always: "always";
|
|
172
|
-
when_no_human: "when_no_human";
|
|
173
|
-
on_mention: "on_mention";
|
|
174
|
-
}>;
|
|
175
|
-
responseDelayMs: z.ZodNumber;
|
|
176
|
-
pauseOnHumanReply: z.ZodBoolean;
|
|
177
|
-
pauseDurationMinutes: z.ZodNullable<z.ZodNumber>;
|
|
178
177
|
canResolve: z.ZodBoolean;
|
|
179
178
|
canMarkSpam: z.ZodBoolean;
|
|
180
179
|
canAssign: z.ZodBoolean;
|
|
@@ -182,7 +181,6 @@ declare const aiAgentBehaviorSettingsSchema: z.ZodObject<{
|
|
|
182
181
|
canCategorize: z.ZodBoolean;
|
|
183
182
|
canEscalate: z.ZodBoolean;
|
|
184
183
|
defaultEscalationUserId: z.ZodNullable<z.ZodString>;
|
|
185
|
-
autoAssignOnEscalation: z.ZodBoolean;
|
|
186
184
|
autoAnalyzeSentiment: z.ZodBoolean;
|
|
187
185
|
autoGenerateTitle: z.ZodBoolean;
|
|
188
186
|
autoCategorize: z.ZodBoolean;
|
|
@@ -198,15 +196,6 @@ declare const getBehaviorSettingsRequestSchema: z.ZodObject<{
|
|
|
198
196
|
* Get Behavior Settings response schema
|
|
199
197
|
*/
|
|
200
198
|
declare const getBehaviorSettingsResponseSchema: z.ZodObject<{
|
|
201
|
-
responseMode: z.ZodEnum<{
|
|
202
|
-
manual: "manual";
|
|
203
|
-
always: "always";
|
|
204
|
-
when_no_human: "when_no_human";
|
|
205
|
-
on_mention: "on_mention";
|
|
206
|
-
}>;
|
|
207
|
-
responseDelayMs: z.ZodNumber;
|
|
208
|
-
pauseOnHumanReply: z.ZodBoolean;
|
|
209
|
-
pauseDurationMinutes: z.ZodNullable<z.ZodNumber>;
|
|
210
199
|
canResolve: z.ZodBoolean;
|
|
211
200
|
canMarkSpam: z.ZodBoolean;
|
|
212
201
|
canAssign: z.ZodBoolean;
|
|
@@ -214,7 +203,6 @@ declare const getBehaviorSettingsResponseSchema: z.ZodObject<{
|
|
|
214
203
|
canCategorize: z.ZodBoolean;
|
|
215
204
|
canEscalate: z.ZodBoolean;
|
|
216
205
|
defaultEscalationUserId: z.ZodNullable<z.ZodString>;
|
|
217
|
-
autoAssignOnEscalation: z.ZodBoolean;
|
|
218
206
|
autoAnalyzeSentiment: z.ZodBoolean;
|
|
219
207
|
autoGenerateTitle: z.ZodBoolean;
|
|
220
208
|
autoCategorize: z.ZodBoolean;
|
|
@@ -227,15 +215,6 @@ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
|
|
|
227
215
|
websiteSlug: z.ZodString;
|
|
228
216
|
aiAgentId: z.ZodULID;
|
|
229
217
|
settings: z.ZodObject<{
|
|
230
|
-
responseMode: z.ZodOptional<z.ZodEnum<{
|
|
231
|
-
manual: "manual";
|
|
232
|
-
always: "always";
|
|
233
|
-
when_no_human: "when_no_human";
|
|
234
|
-
on_mention: "on_mention";
|
|
235
|
-
}>>;
|
|
236
|
-
responseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
237
|
-
pauseOnHumanReply: z.ZodOptional<z.ZodBoolean>;
|
|
238
|
-
pauseDurationMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
239
218
|
canResolve: z.ZodOptional<z.ZodBoolean>;
|
|
240
219
|
canMarkSpam: z.ZodOptional<z.ZodBoolean>;
|
|
241
220
|
canAssign: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -243,7 +222,6 @@ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
|
|
|
243
222
|
canCategorize: z.ZodOptional<z.ZodBoolean>;
|
|
244
223
|
canEscalate: z.ZodOptional<z.ZodBoolean>;
|
|
245
224
|
defaultEscalationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
246
|
-
autoAssignOnEscalation: z.ZodOptional<z.ZodBoolean>;
|
|
247
225
|
autoAnalyzeSentiment: z.ZodOptional<z.ZodBoolean>;
|
|
248
226
|
autoGenerateTitle: z.ZodOptional<z.ZodBoolean>;
|
|
249
227
|
autoCategorize: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -253,15 +231,6 @@ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
|
|
|
253
231
|
* Update Behavior Settings response schema
|
|
254
232
|
*/
|
|
255
233
|
declare const updateBehaviorSettingsResponseSchema: z.ZodObject<{
|
|
256
|
-
responseMode: z.ZodEnum<{
|
|
257
|
-
manual: "manual";
|
|
258
|
-
always: "always";
|
|
259
|
-
when_no_human: "when_no_human";
|
|
260
|
-
on_mention: "on_mention";
|
|
261
|
-
}>;
|
|
262
|
-
responseDelayMs: z.ZodNumber;
|
|
263
|
-
pauseOnHumanReply: z.ZodBoolean;
|
|
264
|
-
pauseDurationMinutes: z.ZodNullable<z.ZodNumber>;
|
|
265
234
|
canResolve: z.ZodBoolean;
|
|
266
235
|
canMarkSpam: z.ZodBoolean;
|
|
267
236
|
canAssign: z.ZodBoolean;
|
|
@@ -269,7 +238,6 @@ declare const updateBehaviorSettingsResponseSchema: z.ZodObject<{
|
|
|
269
238
|
canCategorize: z.ZodBoolean;
|
|
270
239
|
canEscalate: z.ZodBoolean;
|
|
271
240
|
defaultEscalationUserId: z.ZodNullable<z.ZodString>;
|
|
272
|
-
autoAssignOnEscalation: z.ZodBoolean;
|
|
273
241
|
autoAnalyzeSentiment: z.ZodBoolean;
|
|
274
242
|
autoGenerateTitle: z.ZodBoolean;
|
|
275
243
|
autoCategorize: z.ZodBoolean;
|
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,SAAA,QAAW,EAAA,aAAW;EAKrB,SAAA,IAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;EAAqB,SAAA,QAAA,EAAA,QAAA;EAAA,SAAA,IAAA,EAAA,MAAA;EAkErB,SAAA,YAAA,EAAA,IAAA;;;;;;;;KAtFD,OAAA,WAAkB;KAClB,aAAA,WAAwB;;;;cAKvB;;EAgF0B,SAAA,KAAA,EAAA,4BAAA;CAAA,EAAA;EAqE1B,SAAA,KAAA,EAAA,SAAA;;;;;;;;;;;;;;;KA5ID,WAAA,WAAsB;;;;cAKrB,uBAAqB,CAAA,CAAA;;;;EAuIK,UAAA,aAAA;EAAA,KAAA,aAAA;EAkF1B,WAAA,eAAA,YAiBV,CAAA;;;;;EAjB0C,KAAA,eAAA,WAAA,YAAA,CAAA,CAAA;EAAA,SAAA,aAAA;EAsBhC,SAAA,aAAA;;;;;;AAkBA,cA/LA,0BAwMV,EAxMoC,CAAA,CAAA,SAwMpC,CAAA;;;EATiC,WAAA,eAAA,YAAA,CAAA;EAAA,UAAA,aAAA;EAevB,KAAA,aAAA;;;;;;;;cAzIA,4BAA0B,CAAA,CAAA;;EAyIK,SAAA,WAAA;EAAA,IAAA,aAAA;EA+C/B,WAAA,eAAA,cAoCV,YAAA,CAAA,CAAA;;;;;;;;;;;cA1IU,kCAAgC,CAAA,CAAA;;EAsGA,SAAA,WAAA;EA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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
|
@@ -12,6 +12,13 @@ const AI_MODELS = [
|
|
|
12
12
|
icon: "agent",
|
|
13
13
|
freeOnly: true
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
value: "moonshotai/kimi-k2.5",
|
|
17
|
+
label: "Kimi K2.5",
|
|
18
|
+
provider: "Moonshot AI",
|
|
19
|
+
icon: "agent",
|
|
20
|
+
freeOnly: true
|
|
21
|
+
},
|
|
15
22
|
{
|
|
16
23
|
value: "openai/gpt-5.2-chat",
|
|
17
24
|
label: "GPT-5.2",
|
|
@@ -313,36 +320,17 @@ const generateBasePromptResponseSchema = z.object({
|
|
|
313
320
|
* AI Agent Behavior Settings Schema
|
|
314
321
|
*
|
|
315
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.
|
|
316
325
|
*/
|
|
317
326
|
const aiAgentBehaviorSettingsSchema = z.object({
|
|
318
|
-
responseMode: z.enum([
|
|
319
|
-
"always",
|
|
320
|
-
"when_no_human",
|
|
321
|
-
"on_mention",
|
|
322
|
-
"manual"
|
|
323
|
-
]).openapi({
|
|
324
|
-
description: "When the AI agent should respond to messages.",
|
|
325
|
-
example: "always"
|
|
326
|
-
}),
|
|
327
|
-
responseDelayMs: z.number().min(0).max(3e4).openapi({
|
|
328
|
-
description: "Delay in milliseconds before responding (0-30000). Makes responses feel more natural.",
|
|
329
|
-
example: 3e3
|
|
330
|
-
}),
|
|
331
|
-
pauseOnHumanReply: z.boolean().openapi({
|
|
332
|
-
description: "Whether to pause AI responses when a human agent replies.",
|
|
333
|
-
example: true
|
|
334
|
-
}),
|
|
335
|
-
pauseDurationMinutes: z.number().min(1).max(1440).nullable().openapi({
|
|
336
|
-
description: "How long to pause after a human reply (1-1440 minutes). Null for indefinite.",
|
|
337
|
-
example: 60
|
|
338
|
-
}),
|
|
339
327
|
canResolve: z.boolean().openapi({
|
|
340
328
|
description: "Whether the AI can mark conversations as resolved.",
|
|
341
329
|
example: true
|
|
342
330
|
}),
|
|
343
331
|
canMarkSpam: z.boolean().openapi({
|
|
344
332
|
description: "Whether the AI can mark conversations as spam.",
|
|
345
|
-
example:
|
|
333
|
+
example: true
|
|
346
334
|
}),
|
|
347
335
|
canAssign: z.boolean().openapi({
|
|
348
336
|
description: "Whether the AI can assign conversations to team members.",
|
|
@@ -364,10 +352,6 @@ const aiAgentBehaviorSettingsSchema = z.object({
|
|
|
364
352
|
description: "Default user ID to assign escalated conversations to.",
|
|
365
353
|
example: null
|
|
366
354
|
}),
|
|
367
|
-
autoAssignOnEscalation: z.boolean().openapi({
|
|
368
|
-
description: "Whether to automatically assign conversations when escalating.",
|
|
369
|
-
example: true
|
|
370
|
-
}),
|
|
371
355
|
autoAnalyzeSentiment: z.boolean().openapi({
|
|
372
356
|
description: "Whether to automatically analyze conversation sentiment.",
|
|
373
357
|
example: true
|
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: \"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: \"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 */\nexport const aiAgentBehaviorSettingsSchema = z\n\t.object({\n\t\t// Response triggers\n\t\tresponseMode: z\n\t\t\t.enum([\"always\", \"when_no_human\", \"on_mention\", \"manual\"])\n\t\t\t.openapi({\n\t\t\t\tdescription: \"When the AI agent should respond to messages.\",\n\t\t\t\texample: \"always\",\n\t\t\t}),\n\t\tresponseDelayMs: z.number().min(0).max(30_000).openapi({\n\t\t\tdescription:\n\t\t\t\t\"Delay in milliseconds before responding (0-30000). Makes responses feel more natural.\",\n\t\t\texample: 3000,\n\t\t}),\n\n\t\t// Human interaction\n\t\tpauseOnHumanReply: z.boolean().openapi({\n\t\t\tdescription: \"Whether to pause AI responses when a human agent replies.\",\n\t\t\texample: true,\n\t\t}),\n\t\tpauseDurationMinutes: z.number().min(1).max(1440).nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"How long to pause after a human reply (1-1440 minutes). Null for indefinite.\",\n\t\t\texample: 60,\n\t\t}),\n\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: false,\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\t\tautoAssignOnEscalation: z.boolean().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Whether to automatically assign conversations when escalating.\",\n\t\t\texample: true,\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,cAAc;EACd;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;;;;AAQD,MAAa,iBAAiB;CAC7B;EAAE,OAAO;EAAS,OAAO;EAA8B;CACvD;EAAE,OAAO;EAAW,OAAO;EAA4B;CACvD;EAAE,OAAO;EAAc,OAAO;EAA4B;CAC1D;EAAE,OAAO;EAAsB,OAAO;EAAiB;CACvD;EAAE,OAAO;EAAc,OAAO;EAAyB;CACvD;EAAE,OAAO;EAAY,OAAO;EAA6B;CACzD;;;;AAOD,MAAa,wBAAwB,EAAE,OAAO;CAC7C,IAAI,EAAE,MAAM,CAAC,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A8B,SAAS,CAAC,QAAQ,EACzD,aAAa,wCACb,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,2DACb,CAAC;AAGH,MAAa,uCACZ,8BAA8B,QAAQ,EACrC,aAAa,kCACb,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,UAAU;EACV;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,cAAc;EACd;CACD;;;;AAQD,MAAa,iBAAiB;CAC7B;EAAE,OAAO;EAAS,OAAO;EAA8B;CACvD;EAAE,OAAO;EAAW,OAAO;EAA4B;C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"],"sourcesContent":[],"mappings":";;;;;;AASA;AAQA;AAQA;AAQA;cAxBa,aAAW,CAAA,CAAA;;;;cAQX,cAAY,CAAA,CAAA;;;AA2BzB;AAKa,cAxBA,oBAyCX,EAzC+B,CAAA,CAAA,WAyC/B,CAzC+B,CAAA,CAAA,OAyC/B,CAAA;;;;cAjCW,kBAAgB,CAAA,CAAA;;EAgBQ,KAAA,cAAA,mBAAA,CAAA,OAAA,CAAA,CAAA;CAAA,eAAA,CAAA;AAmBzB,KAxBA,eAAA,GAAkB,CAAA,CAAE,
|
|
1
|
+
{"version":3,"file":"common.d.ts","names":[],"sources":["../../src/api/common.ts"],"sourcesContent":[],"mappings":";;;;;;AASA;AAQA;AAQA;AAQA;cAxBa,aAAW,CAAA,CAAA;;;;cAQX,cAAY,CAAA,CAAA;;;AA2BzB;AAKa,cAxBA,oBAyCX,EAzC+B,CAAA,CAAA,WAyC/B,CAzC+B,CAAA,CAAA,OAyC/B,CAAA;;;;cAjCW,kBAAgB,CAAA,CAAA;;EAgBQ,KAAA,cAAA,mBAAA,CAAA,OAAA,CAAA,CAAA;CAAA,eAAA,CAAA;AAmBzB,KAxBA,eAAA,GAAkB,CAAA,CAAE,KAwBF,CAAkB,OAxBH,gBAwBG,CAAA;;;;cAnBnC,0BAAwB,CAAA,CAAA;;;;;;KAmBzB,kBAAA,GAAqB,CAAA,CAAE,aAAa"}
|