@cossistant/types 0.0.29 → 0.0.31

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 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,11 @@ 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;
184
+ visitorContactPolicy: z.ZodEnum<{
185
+ only_if_needed: "only_if_needed";
186
+ ask_early: "ask_early";
187
+ ask_after_time: "ask_after_time";
188
+ }>;
186
189
  autoAnalyzeSentiment: z.ZodBoolean;
187
190
  autoGenerateTitle: z.ZodBoolean;
188
191
  autoCategorize: z.ZodBoolean;
@@ -198,15 +201,6 @@ declare const getBehaviorSettingsRequestSchema: z.ZodObject<{
198
201
  * Get Behavior Settings response schema
199
202
  */
200
203
  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
204
  canResolve: z.ZodBoolean;
211
205
  canMarkSpam: z.ZodBoolean;
212
206
  canAssign: z.ZodBoolean;
@@ -214,7 +208,11 @@ declare const getBehaviorSettingsResponseSchema: z.ZodObject<{
214
208
  canCategorize: z.ZodBoolean;
215
209
  canEscalate: z.ZodBoolean;
216
210
  defaultEscalationUserId: z.ZodNullable<z.ZodString>;
217
- autoAssignOnEscalation: z.ZodBoolean;
211
+ visitorContactPolicy: z.ZodEnum<{
212
+ only_if_needed: "only_if_needed";
213
+ ask_early: "ask_early";
214
+ ask_after_time: "ask_after_time";
215
+ }>;
218
216
  autoAnalyzeSentiment: z.ZodBoolean;
219
217
  autoGenerateTitle: z.ZodBoolean;
220
218
  autoCategorize: z.ZodBoolean;
@@ -227,15 +225,6 @@ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
227
225
  websiteSlug: z.ZodString;
228
226
  aiAgentId: z.ZodULID;
229
227
  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
228
  canResolve: z.ZodOptional<z.ZodBoolean>;
240
229
  canMarkSpam: z.ZodOptional<z.ZodBoolean>;
241
230
  canAssign: z.ZodOptional<z.ZodBoolean>;
@@ -243,7 +232,11 @@ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
243
232
  canCategorize: z.ZodOptional<z.ZodBoolean>;
244
233
  canEscalate: z.ZodOptional<z.ZodBoolean>;
245
234
  defaultEscalationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
- autoAssignOnEscalation: z.ZodOptional<z.ZodBoolean>;
235
+ visitorContactPolicy: z.ZodOptional<z.ZodEnum<{
236
+ only_if_needed: "only_if_needed";
237
+ ask_early: "ask_early";
238
+ ask_after_time: "ask_after_time";
239
+ }>>;
247
240
  autoAnalyzeSentiment: z.ZodOptional<z.ZodBoolean>;
248
241
  autoGenerateTitle: z.ZodOptional<z.ZodBoolean>;
249
242
  autoCategorize: z.ZodOptional<z.ZodBoolean>;
@@ -253,15 +246,6 @@ declare const updateBehaviorSettingsRequestSchema: z.ZodObject<{
253
246
  * Update Behavior Settings response schema
254
247
  */
255
248
  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
249
  canResolve: z.ZodBoolean;
266
250
  canMarkSpam: z.ZodBoolean;
267
251
  canAssign: z.ZodBoolean;
@@ -269,7 +253,11 @@ declare const updateBehaviorSettingsResponseSchema: z.ZodObject<{
269
253
  canCategorize: z.ZodBoolean;
270
254
  canEscalate: z.ZodBoolean;
271
255
  defaultEscalationUserId: z.ZodNullable<z.ZodString>;
272
- autoAssignOnEscalation: z.ZodBoolean;
256
+ visitorContactPolicy: z.ZodEnum<{
257
+ only_if_needed: "only_if_needed";
258
+ ask_early: "ask_early";
259
+ ask_after_time: "ask_after_time";
260
+ }>;
273
261
  autoAnalyzeSentiment: z.ZodBoolean;
274
262
  autoGenerateTitle: z.ZodBoolean;
275
263
  autoCategorize: z.ZodBoolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ai-agent.d.ts","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AAsCY,cAtCC,SAsCiB,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,WAAA;EAkErB,SAAA,YAAA,EAAA,IAAA;;KAtFD,OAAA,WAAkB;KAClB,aAAA,WAAwB;;;;cAKvB;;;;;;;;EAgF0B,SAAA,KAAA,EAAA,0BAAA;CAAA,EAAA;EAqE1B,SAAA,KAAA,EAAA,oBA6EV;;;;;;;;;KAzNS,WAAA,WAAsB;;;;cAKrB,uBAAqB,CAAA,CAAA;;;;;;;;;;EAuIK,UAAA,aAAA;EAAA,KAAA,eAAA,WAAA,YAAA,CAAA,CAAA;EAkF1B,SAAA,aAAA;;;;;;;AAsBA,cA7KA,0BA0LV,EA1LoC,CAAA,CAAA,SA0LpC,CAAA;;;;EAboC,UAAA,aAAA;EAAA,KAAA,aAAA;EAkB1B,WAAA,eASV,YAAA,CAAA;;;CATiC,eAAA,CAAA;;AAepC;;cAzIa,4BAA0B,CAAA,CAAA;;;;;;;;EAyIK,eAAA,eAAA,cAAA,YAAA,CAAA,CAAA;EAAA,KAAA,eAAA,cAAA,WAAA,YAAA,CAAA,CAAA,CAAA;EA+C/B,qBAAA,eAoCV,cAAA,YAAA,CAAA,CAAA;;;;;cA1IU,kCAAgC,CAAA,CAAA;;;;;;;;AAsGA,cAhFhC,0BA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AA,eAAY,CAAA;AAGZ;;;cAjCa,qCAAmC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;cAmBnC,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
@@ -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: false
333
+ example: true
346
334
  }),
347
335
  canAssign: z.boolean().openapi({
348
336
  description: "Whether the AI can assign conversations to team members.",
@@ -364,9 +352,13 @@ 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
355
+ visitorContactPolicy: z.enum([
356
+ "only_if_needed",
357
+ "ask_early",
358
+ "ask_after_time"
359
+ ]).openapi({
360
+ description: "How aggressively the AI should ask for visitor contact information.",
361
+ example: "only_if_needed"
370
362
  }),
371
363
  autoAnalyzeSentiment: z.boolean().openapi({
372
364
  description: "Whether to automatically analyze conversation sentiment.",
@@ -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,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,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":["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// Visitor identification\n\t\tvisitorContactPolicy: z\n\t\t\t.enum([\"only_if_needed\", \"ask_early\", \"ask_after_time\"])\n\t\t\t.openapi({\n\t\t\t\tdescription:\n\t\t\t\t\t\"How aggressively the AI should ask for visitor contact information.\",\n\t\t\t\texample: \"only_if_needed\",\n\t\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;CACvD;EAAE,OAAO;EAAc,OA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":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,KAwBgB,CAAA,OAxBH,gBAwBG,CAAA;;;;cAnBnC,0BAAwB,CAAA,CAAA;;;;;;KAmBzB,kBAAA,GAAqB,CAAA,CAAE,aAAa"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"contact.d.ts","names":[],"sources":["../../src/api/contact.ts"],"sourcesContent":[],"mappings":";;;;;;AAMA;;AAAkC,cAArB,qBAAqB,EAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,QAAA,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