@cossistant/types 0.0.33 → 0.1.0
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-capabilities.d.ts +37 -0
- package/api/ai-agent-capabilities.d.ts.map +1 -0
- package/api/ai-agent-capabilities.js +432 -0
- package/api/ai-agent-capabilities.js.map +1 -0
- package/api/ai-agent.d.ts +224 -1
- package/api/ai-agent.d.ts.map +1 -1
- package/api/ai-agent.js +55 -1
- package/api/ai-agent.js.map +1 -1
- package/api/common.d.ts.map +1 -1
- package/api/conversation.d.ts +55 -55
- package/api/index.d.ts +3 -2
- package/api/index.js +3 -2
- package/api/link-source.d.ts +4 -4
- package/api/link-source.d.ts.map +1 -1
- package/api/timeline-item.d.ts +67 -67
- package/api/timeline-item.d.ts.map +1 -1
- package/api/website.d.ts +4 -4
- package/index.d.ts +4 -2
- package/index.d.ts.map +1 -1
- package/index.js +4 -2
- package/package.json +1 -1
- package/realtime-events.d.ts +36 -36
- package/schemas.d.ts +11 -11
- package/skill-file-format.d.ts +24 -0
- package/skill-file-format.d.ts.map +1 -0
- package/skill-file-format.js +119 -0
- package/skill-file-format.js.map +1 -0
- package/trpc/conversation.d.ts +44 -44
package/api/ai-agent.d.ts
CHANGED
|
@@ -276,6 +276,224 @@ declare const toggleSkillDocumentRequestSchema: z.ZodObject<{
|
|
|
276
276
|
skillDocumentId: z.ZodULID;
|
|
277
277
|
enabled: z.ZodBoolean;
|
|
278
278
|
}, z.core.$strip>;
|
|
279
|
+
declare const aiAgentToolCategorySchema: z.ZodEnum<{
|
|
280
|
+
system: "system";
|
|
281
|
+
messaging: "messaging";
|
|
282
|
+
action: "action";
|
|
283
|
+
context: "context";
|
|
284
|
+
analysis: "analysis";
|
|
285
|
+
}>;
|
|
286
|
+
declare const aiAgentToolIdSchema: z.ZodEnum<{
|
|
287
|
+
searchKnowledgeBase: "searchKnowledgeBase";
|
|
288
|
+
updateConversationTitle: "updateConversationTitle";
|
|
289
|
+
updateSentiment: "updateSentiment";
|
|
290
|
+
identifyVisitor: "identifyVisitor";
|
|
291
|
+
setPriority: "setPriority";
|
|
292
|
+
sendMessage: "sendMessage";
|
|
293
|
+
sendPrivateMessage: "sendPrivateMessage";
|
|
294
|
+
respond: "respond";
|
|
295
|
+
escalate: "escalate";
|
|
296
|
+
resolve: "resolve";
|
|
297
|
+
markSpam: "markSpam";
|
|
298
|
+
skip: "skip";
|
|
299
|
+
}>;
|
|
300
|
+
declare const aiAgentBehaviorSettingKeySchema: z.ZodEnum<{
|
|
301
|
+
canResolve: "canResolve";
|
|
302
|
+
canMarkSpam: "canMarkSpam";
|
|
303
|
+
canSetPriority: "canSetPriority";
|
|
304
|
+
canEscalate: "canEscalate";
|
|
305
|
+
autoGenerateTitle: "autoGenerateTitle";
|
|
306
|
+
autoAnalyzeSentiment: "autoAnalyzeSentiment";
|
|
307
|
+
}>;
|
|
308
|
+
declare const aiAgentCapabilitiesToolStateSchema: z.ZodObject<{
|
|
309
|
+
id: z.ZodEnum<{
|
|
310
|
+
searchKnowledgeBase: "searchKnowledgeBase";
|
|
311
|
+
updateConversationTitle: "updateConversationTitle";
|
|
312
|
+
updateSentiment: "updateSentiment";
|
|
313
|
+
identifyVisitor: "identifyVisitor";
|
|
314
|
+
setPriority: "setPriority";
|
|
315
|
+
sendMessage: "sendMessage";
|
|
316
|
+
sendPrivateMessage: "sendPrivateMessage";
|
|
317
|
+
respond: "respond";
|
|
318
|
+
escalate: "escalate";
|
|
319
|
+
resolve: "resolve";
|
|
320
|
+
markSpam: "markSpam";
|
|
321
|
+
skip: "skip";
|
|
322
|
+
}>;
|
|
323
|
+
label: z.ZodString;
|
|
324
|
+
description: z.ZodString;
|
|
325
|
+
category: z.ZodEnum<{
|
|
326
|
+
system: "system";
|
|
327
|
+
messaging: "messaging";
|
|
328
|
+
action: "action";
|
|
329
|
+
context: "context";
|
|
330
|
+
analysis: "analysis";
|
|
331
|
+
}>;
|
|
332
|
+
isSystem: z.ZodBoolean;
|
|
333
|
+
isRequired: z.ZodBoolean;
|
|
334
|
+
isToggleable: z.ZodBoolean;
|
|
335
|
+
behaviorSettingKey: z.ZodNullable<z.ZodEnum<{
|
|
336
|
+
canResolve: "canResolve";
|
|
337
|
+
canMarkSpam: "canMarkSpam";
|
|
338
|
+
canSetPriority: "canSetPriority";
|
|
339
|
+
canEscalate: "canEscalate";
|
|
340
|
+
autoGenerateTitle: "autoGenerateTitle";
|
|
341
|
+
autoAnalyzeSentiment: "autoAnalyzeSentiment";
|
|
342
|
+
}>>;
|
|
343
|
+
defaultTemplateNames: z.ZodArray<z.ZodString>;
|
|
344
|
+
enabled: z.ZodBoolean;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
declare const aiAgentDefaultSkillTemplateStateSchema: z.ZodObject<{
|
|
347
|
+
name: z.ZodString;
|
|
348
|
+
label: z.ZodString;
|
|
349
|
+
description: z.ZodString;
|
|
350
|
+
content: z.ZodString;
|
|
351
|
+
suggestedToolIds: z.ZodArray<z.ZodEnum<{
|
|
352
|
+
searchKnowledgeBase: "searchKnowledgeBase";
|
|
353
|
+
updateConversationTitle: "updateConversationTitle";
|
|
354
|
+
updateSentiment: "updateSentiment";
|
|
355
|
+
identifyVisitor: "identifyVisitor";
|
|
356
|
+
setPriority: "setPriority";
|
|
357
|
+
sendMessage: "sendMessage";
|
|
358
|
+
sendPrivateMessage: "sendPrivateMessage";
|
|
359
|
+
respond: "respond";
|
|
360
|
+
escalate: "escalate";
|
|
361
|
+
resolve: "resolve";
|
|
362
|
+
markSpam: "markSpam";
|
|
363
|
+
skip: "skip";
|
|
364
|
+
}>>;
|
|
365
|
+
isEnabled: z.ZodBoolean;
|
|
366
|
+
hasOverride: z.ZodBoolean;
|
|
367
|
+
isCustomized: z.ZodBoolean;
|
|
368
|
+
skillDocumentId: z.ZodNullable<z.ZodULID>;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
declare const aiAgentSystemSkillDocumentSchema: z.ZodObject<{
|
|
371
|
+
name: z.ZodEnum<{
|
|
372
|
+
"agent.md": "agent.md";
|
|
373
|
+
"security.md": "security.md";
|
|
374
|
+
"behaviour.md": "behaviour.md";
|
|
375
|
+
"participation.md": "participation.md";
|
|
376
|
+
"grounding.md": "grounding.md";
|
|
377
|
+
"capabilities.md": "capabilities.md";
|
|
378
|
+
}>;
|
|
379
|
+
label: z.ZodString;
|
|
380
|
+
description: z.ZodString;
|
|
381
|
+
content: z.ZodString;
|
|
382
|
+
source: z.ZodEnum<{
|
|
383
|
+
db: "db";
|
|
384
|
+
fallback: "fallback";
|
|
385
|
+
}>;
|
|
386
|
+
enabled: z.ZodBoolean;
|
|
387
|
+
priority: z.ZodNumber;
|
|
388
|
+
documentId: z.ZodNullable<z.ZodULID>;
|
|
389
|
+
}, z.core.$strip>;
|
|
390
|
+
declare const getCapabilitiesStudioRequestSchema: z.ZodObject<{
|
|
391
|
+
websiteSlug: z.ZodString;
|
|
392
|
+
aiAgentId: z.ZodULID;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
declare const getCapabilitiesStudioResponseSchema: z.ZodObject<{
|
|
395
|
+
aiAgentId: z.ZodULID;
|
|
396
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
397
|
+
id: z.ZodEnum<{
|
|
398
|
+
searchKnowledgeBase: "searchKnowledgeBase";
|
|
399
|
+
updateConversationTitle: "updateConversationTitle";
|
|
400
|
+
updateSentiment: "updateSentiment";
|
|
401
|
+
identifyVisitor: "identifyVisitor";
|
|
402
|
+
setPriority: "setPriority";
|
|
403
|
+
sendMessage: "sendMessage";
|
|
404
|
+
sendPrivateMessage: "sendPrivateMessage";
|
|
405
|
+
respond: "respond";
|
|
406
|
+
escalate: "escalate";
|
|
407
|
+
resolve: "resolve";
|
|
408
|
+
markSpam: "markSpam";
|
|
409
|
+
skip: "skip";
|
|
410
|
+
}>;
|
|
411
|
+
label: z.ZodString;
|
|
412
|
+
description: z.ZodString;
|
|
413
|
+
category: z.ZodEnum<{
|
|
414
|
+
system: "system";
|
|
415
|
+
messaging: "messaging";
|
|
416
|
+
action: "action";
|
|
417
|
+
context: "context";
|
|
418
|
+
analysis: "analysis";
|
|
419
|
+
}>;
|
|
420
|
+
isSystem: z.ZodBoolean;
|
|
421
|
+
isRequired: z.ZodBoolean;
|
|
422
|
+
isToggleable: z.ZodBoolean;
|
|
423
|
+
behaviorSettingKey: z.ZodNullable<z.ZodEnum<{
|
|
424
|
+
canResolve: "canResolve";
|
|
425
|
+
canMarkSpam: "canMarkSpam";
|
|
426
|
+
canSetPriority: "canSetPriority";
|
|
427
|
+
canEscalate: "canEscalate";
|
|
428
|
+
autoGenerateTitle: "autoGenerateTitle";
|
|
429
|
+
autoAnalyzeSentiment: "autoAnalyzeSentiment";
|
|
430
|
+
}>>;
|
|
431
|
+
defaultTemplateNames: z.ZodArray<z.ZodString>;
|
|
432
|
+
enabled: z.ZodBoolean;
|
|
433
|
+
}, z.core.$strip>>;
|
|
434
|
+
defaultSkillTemplates: z.ZodArray<z.ZodObject<{
|
|
435
|
+
name: z.ZodString;
|
|
436
|
+
label: z.ZodString;
|
|
437
|
+
description: z.ZodString;
|
|
438
|
+
content: z.ZodString;
|
|
439
|
+
suggestedToolIds: z.ZodArray<z.ZodEnum<{
|
|
440
|
+
searchKnowledgeBase: "searchKnowledgeBase";
|
|
441
|
+
updateConversationTitle: "updateConversationTitle";
|
|
442
|
+
updateSentiment: "updateSentiment";
|
|
443
|
+
identifyVisitor: "identifyVisitor";
|
|
444
|
+
setPriority: "setPriority";
|
|
445
|
+
sendMessage: "sendMessage";
|
|
446
|
+
sendPrivateMessage: "sendPrivateMessage";
|
|
447
|
+
respond: "respond";
|
|
448
|
+
escalate: "escalate";
|
|
449
|
+
resolve: "resolve";
|
|
450
|
+
markSpam: "markSpam";
|
|
451
|
+
skip: "skip";
|
|
452
|
+
}>>;
|
|
453
|
+
isEnabled: z.ZodBoolean;
|
|
454
|
+
hasOverride: z.ZodBoolean;
|
|
455
|
+
isCustomized: z.ZodBoolean;
|
|
456
|
+
skillDocumentId: z.ZodNullable<z.ZodULID>;
|
|
457
|
+
}, z.core.$strip>>;
|
|
458
|
+
systemSkillDocuments: z.ZodArray<z.ZodObject<{
|
|
459
|
+
name: z.ZodEnum<{
|
|
460
|
+
"agent.md": "agent.md";
|
|
461
|
+
"security.md": "security.md";
|
|
462
|
+
"behaviour.md": "behaviour.md";
|
|
463
|
+
"participation.md": "participation.md";
|
|
464
|
+
"grounding.md": "grounding.md";
|
|
465
|
+
"capabilities.md": "capabilities.md";
|
|
466
|
+
}>;
|
|
467
|
+
label: z.ZodString;
|
|
468
|
+
description: z.ZodString;
|
|
469
|
+
content: z.ZodString;
|
|
470
|
+
source: z.ZodEnum<{
|
|
471
|
+
db: "db";
|
|
472
|
+
fallback: "fallback";
|
|
473
|
+
}>;
|
|
474
|
+
enabled: z.ZodBoolean;
|
|
475
|
+
priority: z.ZodNumber;
|
|
476
|
+
documentId: z.ZodNullable<z.ZodULID>;
|
|
477
|
+
}, z.core.$strip>>;
|
|
478
|
+
skillDocuments: z.ZodArray<z.ZodObject<{
|
|
479
|
+
id: z.ZodULID;
|
|
480
|
+
organizationId: z.ZodULID;
|
|
481
|
+
websiteId: z.ZodULID;
|
|
482
|
+
aiAgentId: z.ZodULID;
|
|
483
|
+
kind: z.ZodEnum<{
|
|
484
|
+
core: "core";
|
|
485
|
+
skill: "skill";
|
|
486
|
+
}>;
|
|
487
|
+
name: z.ZodString;
|
|
488
|
+
content: z.ZodString;
|
|
489
|
+
enabled: z.ZodBoolean;
|
|
490
|
+
priority: z.ZodNumber;
|
|
491
|
+
createdByUserId: z.ZodNullable<z.ZodULID>;
|
|
492
|
+
updatedByUserId: z.ZodNullable<z.ZodULID>;
|
|
493
|
+
createdAt: z.ZodString;
|
|
494
|
+
updatedAt: z.ZodString;
|
|
495
|
+
}, z.core.$strip>>;
|
|
496
|
+
}, z.core.$strip>;
|
|
279
497
|
type AiAgentResponse = z.infer<typeof aiAgentResponseSchema>;
|
|
280
498
|
type CreateAiAgentRequest = z.infer<typeof createAiAgentRequestSchema>;
|
|
281
499
|
type UpdateAiAgentRequest = z.infer<typeof updateAiAgentRequestSchema>;
|
|
@@ -292,6 +510,11 @@ type CreateSkillDocumentRequest = z.infer<typeof createSkillDocumentRequestSchem
|
|
|
292
510
|
type UpdateSkillDocumentRequest = z.infer<typeof updateSkillDocumentRequestSchema>;
|
|
293
511
|
type DeleteSkillDocumentRequest = z.infer<typeof deleteSkillDocumentRequestSchema>;
|
|
294
512
|
type ToggleSkillDocumentRequest = z.infer<typeof toggleSkillDocumentRequestSchema>;
|
|
513
|
+
type GetCapabilitiesStudioRequest = z.infer<typeof getCapabilitiesStudioRequestSchema>;
|
|
514
|
+
type GetCapabilitiesStudioResponse = z.infer<typeof getCapabilitiesStudioResponseSchema>;
|
|
515
|
+
type AiAgentCapabilitiesToolState = z.infer<typeof aiAgentCapabilitiesToolStateSchema>;
|
|
516
|
+
type AiAgentDefaultSkillTemplateState = z.infer<typeof aiAgentDefaultSkillTemplateStateSchema>;
|
|
517
|
+
type AiAgentSystemSkillDocument = z.infer<typeof aiAgentSystemSkillDocumentSchema>;
|
|
295
518
|
/**
|
|
296
519
|
* AI Agent Behavior Settings Schema
|
|
297
520
|
*
|
|
@@ -393,5 +616,5 @@ type GetBehaviorSettingsResponse = z.infer<typeof getBehaviorSettingsResponseSch
|
|
|
393
616
|
type UpdateBehaviorSettingsRequest = z.infer<typeof updateBehaviorSettingsRequestSchema>;
|
|
394
617
|
type UpdateBehaviorSettingsResponse = z.infer<typeof updateBehaviorSettingsResponseSchema>;
|
|
395
618
|
//#endregion
|
|
396
|
-
export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentCorePromptDocumentName, AiAgentPromptDocumentResponse, AiAgentResponse, CreateAiAgentRequest, CreateSkillDocumentRequest, DeleteAiAgentRequest, DeleteSkillDocumentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, ListPromptDocumentsRequest, ListPromptDocumentsResponse, ToggleAiAgentActiveRequest, ToggleSkillDocumentRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateSkillDocumentRequest, UpsertCoreDocumentRequest, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema };
|
|
619
|
+
export { AIAgentGoal, AIModel, AIModelConfig, AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, AiAgentBehaviorSettings, AiAgentCapabilitiesToolState, AiAgentCorePromptDocumentName, AiAgentDefaultSkillTemplateState, AiAgentPromptDocumentResponse, AiAgentResponse, AiAgentSystemSkillDocument, CreateAiAgentRequest, CreateSkillDocumentRequest, DeleteAiAgentRequest, DeleteSkillDocumentRequest, GenerateBasePromptRequest, GenerateBasePromptResponse, GetAiAgentRequest, GetBehaviorSettingsRequest, GetBehaviorSettingsResponse, GetCapabilitiesStudioRequest, GetCapabilitiesStudioResponse, ListPromptDocumentsRequest, ListPromptDocumentsResponse, ToggleAiAgentActiveRequest, ToggleSkillDocumentRequest, UpdateAiAgentRequest, UpdateBehaviorSettingsRequest, UpdateBehaviorSettingsResponse, UpdateSkillDocumentRequest, UpsertCoreDocumentRequest, aiAgentBehaviorSettingKeySchema, aiAgentBehaviorSettingsSchema, aiAgentCapabilitiesToolStateSchema, aiAgentCorePromptDocumentNameSchema, aiAgentDefaultSkillTemplateStateSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, aiAgentSystemSkillDocumentSchema, aiAgentToolCategorySchema, aiAgentToolIdSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getCapabilitiesStudioRequestSchema, getCapabilitiesStudioResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema };
|
|
397
620
|
//# sourceMappingURL=ai-agent.d.ts.map
|
package/api/ai-agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.d.ts","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"ai-agent.d.ts","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;AA6CY,cA7CC,SA6CiB,EAAA,SAAS,CAAA;EAC3B,SAAA,KAAA,EAAa,yBAAoB;EAKhC,SAAA,KAAA,EAAA,SAOH;EAEE,SAAA,QAAW,EAAA,aAAW;EAErB,SAAA,IAAA,EAAA,OAAA;EAQD,SAAA,QAAA,EAAA,IAAA;AAGZ,CAAA,EAAA;EACa,S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AAiC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAcjC,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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AI_AGENT_BEHAVIOR_SETTING_KEYS, AI_AGENT_TOOL_CATEGORIES, AI_AGENT_TOOL_IDS } from "./ai-agent-capabilities.js";
|
|
1
2
|
import { z } from "@hono/zod-openapi";
|
|
2
3
|
|
|
3
4
|
//#region src/api/ai-agent.ts
|
|
@@ -440,6 +441,59 @@ const toggleSkillDocumentRequestSchema = z.object({
|
|
|
440
441
|
example: true
|
|
441
442
|
})
|
|
442
443
|
});
|
|
444
|
+
const aiAgentToolCategorySchema = z.enum(AI_AGENT_TOOL_CATEGORIES);
|
|
445
|
+
const aiAgentToolIdSchema = z.enum(AI_AGENT_TOOL_IDS);
|
|
446
|
+
const aiAgentBehaviorSettingKeySchema = z.enum(AI_AGENT_BEHAVIOR_SETTING_KEYS);
|
|
447
|
+
const aiAgentCapabilitiesToolStateSchema = z.object({
|
|
448
|
+
id: aiAgentToolIdSchema,
|
|
449
|
+
label: z.string(),
|
|
450
|
+
description: z.string(),
|
|
451
|
+
category: aiAgentToolCategorySchema,
|
|
452
|
+
isSystem: z.boolean(),
|
|
453
|
+
isRequired: z.boolean(),
|
|
454
|
+
isToggleable: z.boolean(),
|
|
455
|
+
behaviorSettingKey: aiAgentBehaviorSettingKeySchema.nullable(),
|
|
456
|
+
defaultTemplateNames: z.array(aiAgentSkillPromptDocumentNameSchema),
|
|
457
|
+
enabled: z.boolean()
|
|
458
|
+
});
|
|
459
|
+
const aiAgentDefaultSkillTemplateStateSchema = z.object({
|
|
460
|
+
name: aiAgentSkillPromptDocumentNameSchema,
|
|
461
|
+
label: z.string(),
|
|
462
|
+
description: z.string(),
|
|
463
|
+
content: z.string(),
|
|
464
|
+
suggestedToolIds: z.array(aiAgentToolIdSchema),
|
|
465
|
+
isEnabled: z.boolean(),
|
|
466
|
+
hasOverride: z.boolean(),
|
|
467
|
+
isCustomized: z.boolean(),
|
|
468
|
+
skillDocumentId: z.ulid().nullable()
|
|
469
|
+
});
|
|
470
|
+
const aiAgentSystemSkillDocumentSchema = z.object({
|
|
471
|
+
name: aiAgentCorePromptDocumentNameSchema,
|
|
472
|
+
label: z.string(),
|
|
473
|
+
description: z.string(),
|
|
474
|
+
content: z.string(),
|
|
475
|
+
source: z.enum(["db", "fallback"]),
|
|
476
|
+
enabled: z.boolean(),
|
|
477
|
+
priority: z.number().int(),
|
|
478
|
+
documentId: z.ulid().nullable()
|
|
479
|
+
});
|
|
480
|
+
const getCapabilitiesStudioRequestSchema = z.object({
|
|
481
|
+
websiteSlug: z.string().openapi({
|
|
482
|
+
description: "The website slug.",
|
|
483
|
+
example: "my-website"
|
|
484
|
+
}),
|
|
485
|
+
aiAgentId: z.ulid().openapi({
|
|
486
|
+
description: "The AI agent ID.",
|
|
487
|
+
example: "01JG000000000000000000000"
|
|
488
|
+
})
|
|
489
|
+
});
|
|
490
|
+
const getCapabilitiesStudioResponseSchema = z.object({
|
|
491
|
+
aiAgentId: z.ulid(),
|
|
492
|
+
tools: z.array(aiAgentCapabilitiesToolStateSchema),
|
|
493
|
+
defaultSkillTemplates: z.array(aiAgentDefaultSkillTemplateStateSchema),
|
|
494
|
+
systemSkillDocuments: z.array(aiAgentSystemSkillDocumentSchema),
|
|
495
|
+
skillDocuments: z.array(aiAgentPromptDocumentResponseSchema)
|
|
496
|
+
});
|
|
443
497
|
/**
|
|
444
498
|
* AI Agent Behavior Settings Schema
|
|
445
499
|
*
|
|
@@ -528,5 +582,5 @@ const updateBehaviorSettingsRequestSchema = z.object({
|
|
|
528
582
|
const updateBehaviorSettingsResponseSchema = aiAgentBehaviorSettingsSchema.openapi({ description: "The updated behavior settings." });
|
|
529
583
|
|
|
530
584
|
//#endregion
|
|
531
|
-
export { AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingsSchema, aiAgentCorePromptDocumentNameSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema };
|
|
585
|
+
export { AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES, AI_AGENT_GOALS, AI_MODELS, aiAgentBehaviorSettingKeySchema, aiAgentBehaviorSettingsSchema, aiAgentCapabilitiesToolStateSchema, aiAgentCorePromptDocumentNameSchema, aiAgentDefaultSkillTemplateStateSchema, aiAgentPromptDocumentKindSchema, aiAgentPromptDocumentResponseSchema, aiAgentResponseSchema, aiAgentSkillPromptDocumentNameSchema, aiAgentSystemSkillDocumentSchema, aiAgentToolCategorySchema, aiAgentToolIdSchema, createAiAgentRequestSchema, createSkillDocumentRequestSchema, deleteAiAgentRequestSchema, deleteSkillDocumentRequestSchema, generateBasePromptRequestSchema, generateBasePromptResponseSchema, getAiAgentRequestSchema, getBehaviorSettingsRequestSchema, getBehaviorSettingsResponseSchema, getCapabilitiesStudioRequestSchema, getCapabilitiesStudioResponseSchema, listPromptDocumentsRequestSchema, listPromptDocumentsResponseSchema, toggleAiAgentActiveRequestSchema, toggleSkillDocumentRequestSchema, updateAiAgentRequestSchema, updateBehaviorSettingsRequestSchema, updateBehaviorSettingsResponseSchema, updateSkillDocumentRequestSchema, upsertCoreDocumentRequestSchema };
|
|
532
586
|
//# sourceMappingURL=ai-agent.js.map
|
package/api/ai-agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.js","names":[],"sources":["../../src/api/ai-agent.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\n\n/**\n * Available AI models from OpenRouter\n */\nexport const AI_MODELS = [\n\t{\n\t\tvalue: \"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\nexport const AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES = [\n\t\"agent.md\",\n\t\"security.md\",\n\t\"behaviour.md\",\n\t\"participation.md\",\n\t\"grounding.md\",\n\t\"capabilities.md\",\n] as const;\nexport type AiAgentCorePromptDocumentName =\n\t(typeof AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES)[number];\n\nexport const aiAgentPromptDocumentKindSchema = z.enum([\"core\", \"skill\"]);\nexport const aiAgentCorePromptDocumentNameSchema = z.enum(\n\tAI_AGENT_CORE_PROMPT_DOCUMENT_NAMES\n);\n\nexport const aiAgentSkillPromptDocumentNameSchema = z\n\t.string()\n\t.regex(/^[a-z0-9][a-z0-9-]{1,62}\\.md$/, {\n\t\tmessage: \"Skill name must match ^[a-z0-9][a-z0-9-]{1,62}\\\\.md$\",\n\t})\n\t.refine(\n\t\t(value) => !AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES.includes(value as never),\n\t\t{\n\t\t\tmessage: \"Skill name cannot use reserved core document names.\",\n\t\t}\n\t);\n\nexport const aiAgentPromptDocumentResponseSchema = z.object({\n\tid: z.ulid(),\n\torganizationId: z.ulid(),\n\twebsiteId: z.ulid(),\n\taiAgentId: z.ulid(),\n\tkind: aiAgentPromptDocumentKindSchema,\n\tname: z.string(),\n\tcontent: z.string(),\n\tenabled: z.boolean(),\n\tpriority: z.number().int(),\n\tcreatedByUserId: z.ulid().nullable(),\n\tupdatedByUserId: z.ulid().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n});\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 const listPromptDocumentsRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport const listPromptDocumentsResponseSchema = z.object({\n\tcoreDocuments: z.array(aiAgentPromptDocumentResponseSchema),\n\tskillDocuments: z.array(aiAgentPromptDocumentResponseSchema),\n});\n\nexport const upsertCoreDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: aiAgentCorePromptDocumentNameSchema,\n\tcontent: z.string().max(50_000).openapi({\n\t\tdescription: \"Markdown content for the core document.\",\n\t\texample: \"## Instructions\\\\nFollow these rules.\",\n\t}),\n\tenabled: z.boolean().optional(),\n\tpriority: z.number().int().min(-100).max(100).optional(),\n});\n\nexport const createSkillDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: aiAgentSkillPromptDocumentNameSchema,\n\tcontent: z.string().max(50_000).openapi({\n\t\tdescription: \"Markdown content for the skill document.\",\n\t\texample: \"## Workflow\\\\nWhen refund appears, collect order ID first.\",\n\t}),\n\tenabled: z.boolean().optional(),\n\tpriority: z.number().int().min(-100).max(100).optional(),\n});\n\nexport const updateSkillDocumentRequestSchema = 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 ID.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tskillDocumentId: z.ulid().openapi({\n\t\t\tdescription: \"The skill prompt document ID.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: aiAgentSkillPromptDocumentNameSchema.optional(),\n\t\tcontent: z.string().max(50_000).optional(),\n\t\tenabled: z.boolean().optional(),\n\t\tpriority: z.number().int().min(-100).max(100).optional(),\n\t})\n\t.refine(\n\t\t(data) =>\n\t\t\tdata.name !== undefined ||\n\t\t\tdata.content !== undefined ||\n\t\t\tdata.enabled !== undefined ||\n\t\t\tdata.priority !== undefined,\n\t\t{\n\t\t\tmessage: \"At least one field must be provided.\",\n\t\t}\n\t);\n\nexport const deleteSkillDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tskillDocumentId: z.ulid().openapi({\n\t\tdescription: \"The skill prompt document ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport const toggleSkillDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tskillDocumentId: z.ulid().openapi({\n\t\tdescription: \"The skill prompt document ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tenabled: z.boolean().openapi({\n\t\tdescription: \"Whether the skill is enabled for runtime selection.\",\n\t\texample: true,\n\t}),\n});\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>;\nexport type AiAgentPromptDocumentResponse = z.infer<\n\ttypeof aiAgentPromptDocumentResponseSchema\n>;\nexport type ListPromptDocumentsRequest = z.infer<\n\ttypeof listPromptDocumentsRequestSchema\n>;\nexport type ListPromptDocumentsResponse = z.infer<\n\ttypeof listPromptDocumentsResponseSchema\n>;\nexport type UpsertCoreDocumentRequest = z.infer<\n\ttypeof upsertCoreDocumentRequestSchema\n>;\nexport type CreateSkillDocumentRequest = z.infer<\n\ttypeof createSkillDocumentRequestSchema\n>;\nexport type UpdateSkillDocumentRequest = z.infer<\n\ttypeof updateSkillDocumentRequestSchema\n>;\nexport type DeleteSkillDocumentRequest = z.infer<\n\ttypeof deleteSkillDocumentRequestSchema\n>;\nexport type ToggleSkillDocumentRequest = z.infer<\n\ttypeof toggleSkillDocumentRequestSchema\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;E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sBAAsB,EAAE,SAAS,CAAC,QAAQ;EACzC,aAAa;EACb,SAAS;EACT,CAAC;CACF,mBAAmB,EAAE,SAAS,CAAC,QAAQ;EACtC,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,SAAS,CAAC,QAAQ;EACnC,aACC;EACD,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,+BACb,CAAC;;;;AASH,MAAa,mCAAmC,EAC9C,OAAO,EACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;CAC/B,aAAa;CACb,SAAS;CACT,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,qDACb,CAAC;;;;AAKH,MAAa,oCAAoC,8BAC/C,OAAO,EACP,WAAW,EAAE,MAAM,CAAC,QAAQ;CAC3B,aAAa;CACb,SAAS;CACT,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,yDACb,CAAC;;;;AAKH,MAAa,sCAAsC,EACjD,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,QAAQ;EAC3B,aAAa;EACb,SAAS;EACT,CAAC;CACF,UAAU,8BAA8B,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\";\nimport {\n\tAI_AGENT_BEHAVIOR_SETTING_KEYS,\n\tAI_AGENT_TOOL_CATEGORIES,\n\tAI_AGENT_TOOL_IDS,\n} from \"./ai-agent-capabilities\";\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\nexport const AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES = [\n\t\"agent.md\",\n\t\"security.md\",\n\t\"behaviour.md\",\n\t\"participation.md\",\n\t\"grounding.md\",\n\t\"capabilities.md\",\n] as const;\nexport type AiAgentCorePromptDocumentName =\n\t(typeof AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES)[number];\n\nexport const aiAgentPromptDocumentKindSchema = z.enum([\"core\", \"skill\"]);\nexport const aiAgentCorePromptDocumentNameSchema = z.enum(\n\tAI_AGENT_CORE_PROMPT_DOCUMENT_NAMES\n);\n\nexport const aiAgentSkillPromptDocumentNameSchema = z\n\t.string()\n\t.regex(/^[a-z0-9][a-z0-9-]{1,62}\\.md$/, {\n\t\tmessage: \"Skill name must match ^[a-z0-9][a-z0-9-]{1,62}\\\\.md$\",\n\t})\n\t.refine(\n\t\t(value) => !AI_AGENT_CORE_PROMPT_DOCUMENT_NAMES.includes(value as never),\n\t\t{\n\t\t\tmessage: \"Skill name cannot use reserved core document names.\",\n\t\t}\n\t);\n\nexport const aiAgentPromptDocumentResponseSchema = z.object({\n\tid: z.ulid(),\n\torganizationId: z.ulid(),\n\twebsiteId: z.ulid(),\n\taiAgentId: z.ulid(),\n\tkind: aiAgentPromptDocumentKindSchema,\n\tname: z.string(),\n\tcontent: z.string(),\n\tenabled: z.boolean(),\n\tpriority: z.number().int(),\n\tcreatedByUserId: z.ulid().nullable(),\n\tupdatedByUserId: z.ulid().nullable(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n});\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 const listPromptDocumentsRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport const listPromptDocumentsResponseSchema = z.object({\n\tcoreDocuments: z.array(aiAgentPromptDocumentResponseSchema),\n\tskillDocuments: z.array(aiAgentPromptDocumentResponseSchema),\n});\n\nexport const upsertCoreDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: aiAgentCorePromptDocumentNameSchema,\n\tcontent: z.string().max(50_000).openapi({\n\t\tdescription: \"Markdown content for the core document.\",\n\t\texample: \"## Instructions\\\\nFollow these rules.\",\n\t}),\n\tenabled: z.boolean().optional(),\n\tpriority: z.number().int().min(-100).max(100).optional(),\n});\n\nexport const createSkillDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: aiAgentSkillPromptDocumentNameSchema,\n\tcontent: z.string().max(50_000).openapi({\n\t\tdescription: \"Markdown content for the skill document.\",\n\t\texample: \"## Workflow\\\\nWhen refund appears, collect order ID first.\",\n\t}),\n\tenabled: z.boolean().optional(),\n\tpriority: z.number().int().min(-100).max(100).optional(),\n});\n\nexport const updateSkillDocumentRequestSchema = 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 ID.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tskillDocumentId: z.ulid().openapi({\n\t\t\tdescription: \"The skill prompt document ID.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: aiAgentSkillPromptDocumentNameSchema.optional(),\n\t\tcontent: z.string().max(50_000).optional(),\n\t\tenabled: z.boolean().optional(),\n\t\tpriority: z.number().int().min(-100).max(100).optional(),\n\t})\n\t.refine(\n\t\t(data) =>\n\t\t\tdata.name !== undefined ||\n\t\t\tdata.content !== undefined ||\n\t\t\tdata.enabled !== undefined ||\n\t\t\tdata.priority !== undefined,\n\t\t{\n\t\t\tmessage: \"At least one field must be provided.\",\n\t\t}\n\t);\n\nexport const deleteSkillDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tskillDocumentId: z.ulid().openapi({\n\t\tdescription: \"The skill prompt document ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport const toggleSkillDocumentRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tskillDocumentId: z.ulid().openapi({\n\t\tdescription: \"The skill prompt document ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tenabled: z.boolean().openapi({\n\t\tdescription: \"Whether the skill is enabled for runtime selection.\",\n\t\texample: true,\n\t}),\n});\n\nexport const aiAgentToolCategorySchema = z.enum(AI_AGENT_TOOL_CATEGORIES);\nexport const aiAgentToolIdSchema = z.enum(AI_AGENT_TOOL_IDS);\nexport const aiAgentBehaviorSettingKeySchema = z.enum(\n\tAI_AGENT_BEHAVIOR_SETTING_KEYS\n);\n\nexport const aiAgentCapabilitiesToolStateSchema = z.object({\n\tid: aiAgentToolIdSchema,\n\tlabel: z.string(),\n\tdescription: z.string(),\n\tcategory: aiAgentToolCategorySchema,\n\tisSystem: z.boolean(),\n\tisRequired: z.boolean(),\n\tisToggleable: z.boolean(),\n\tbehaviorSettingKey: aiAgentBehaviorSettingKeySchema.nullable(),\n\tdefaultTemplateNames: z.array(aiAgentSkillPromptDocumentNameSchema),\n\tenabled: z.boolean(),\n});\n\nexport const aiAgentDefaultSkillTemplateStateSchema = z.object({\n\tname: aiAgentSkillPromptDocumentNameSchema,\n\tlabel: z.string(),\n\tdescription: z.string(),\n\tcontent: z.string(),\n\tsuggestedToolIds: z.array(aiAgentToolIdSchema),\n\tisEnabled: z.boolean(),\n\thasOverride: z.boolean(),\n\tisCustomized: z.boolean(),\n\tskillDocumentId: z.ulid().nullable(),\n});\n\nexport const aiAgentSystemSkillDocumentSchema = z.object({\n\tname: aiAgentCorePromptDocumentNameSchema,\n\tlabel: z.string(),\n\tdescription: z.string(),\n\tcontent: z.string(),\n\tsource: z.enum([\"db\", \"fallback\"]),\n\tenabled: z.boolean(),\n\tpriority: z.number().int(),\n\tdocumentId: z.ulid().nullable(),\n});\n\nexport const getCapabilitiesStudioRequestSchema = z.object({\n\twebsiteSlug: z.string().openapi({\n\t\tdescription: \"The website slug.\",\n\t\texample: \"my-website\",\n\t}),\n\taiAgentId: z.ulid().openapi({\n\t\tdescription: \"The AI agent ID.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport const getCapabilitiesStudioResponseSchema = z.object({\n\taiAgentId: z.ulid(),\n\ttools: z.array(aiAgentCapabilitiesToolStateSchema),\n\tdefaultSkillTemplates: z.array(aiAgentDefaultSkillTemplateStateSchema),\n\tsystemSkillDocuments: z.array(aiAgentSystemSkillDocumentSchema),\n\tskillDocuments: z.array(aiAgentPromptDocumentResponseSchema),\n});\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>;\nexport type AiAgentPromptDocumentResponse = z.infer<\n\ttypeof aiAgentPromptDocumentResponseSchema\n>;\nexport type ListPromptDocumentsRequest = z.infer<\n\ttypeof listPromptDocumentsRequestSchema\n>;\nexport type ListPromptDocumentsResponse = z.infer<\n\ttypeof listPromptDocumentsResponseSchema\n>;\nexport type UpsertCoreDocumentRequest = z.infer<\n\ttypeof upsertCoreDocumentRequestSchema\n>;\nexport type CreateSkillDocumentRequest = z.infer<\n\ttypeof createSkillDocumentRequestSchema\n>;\nexport type UpdateSkillDocumentRequest = z.infer<\n\ttypeof updateSkillDocumentRequestSchema\n>;\nexport type DeleteSkillDocumentRequest = z.infer<\n\ttypeof deleteSkillDocumentRequestSchema\n>;\nexport type ToggleSkillDocumentRequest = z.infer<\n\ttypeof toggleSkillDocumentRequestSchema\n>;\nexport type GetCapabilitiesStudioRequest = z.infer<\n\ttypeof getCapabilitiesStudioRequestSchema\n>;\nexport type GetCapabilitiesStudioResponse = z.infer<\n\ttypeof getCapabilitiesStudioResponseSchema\n>;\nexport type AiAgentCapabilitiesToolState = z.infer<\n\ttypeof aiAgentCapabilitiesToolStateSchema\n>;\nexport type AiAgentDefaultSkillTemplateState = z.infer<\n\ttypeof aiAgentDefaultSkillTemplateStateSchema\n>;\nexport type AiAgentSystemSkillDocument = z.infer<\n\ttypeof aiAgentSystemSkillDocumentSchema\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":";;;;;;;AAUA,MAAa,YAAY;CACxB;EACC,OAAO;EACP,OAAO;EACP,UAAU;EACV,MAAM;EACN,UAAU;EACV;CACD;EACC,OAAO;EAC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AAa;EACb,SAAS;EACT,CAAC;CAGF,sBAAsB,EACpB,KAAK;EAAC;EAAkB;EAAa;EAAiB,CAAC,CACvD,QAAQ;EACR,aACC;EACD,SAAS;EACT,CAAC;CAGH,sBAAsB,EAAE,SAAS,CAAC,QAAQ;EACzC,aAAa;EACb,SAAS;EACT,CAAC;CACF,mBAAmB,EAAE,SAAS,CAAC,QAAQ;EACtC,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,SAAS,CAAC,QAAQ;EACnC,aACC;EACD,SAAS;EACT,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,+BACb,CAAC;;;;AASH,MAAa,mCAAmC,EAC9C,OAAO,EACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;CAC/B,aAAa;CACb,SAAS;CACT,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,qDACb,CAAC;;;;AAKH,MAAa,oCAAoC,8BAC/C,OAAO,EACP,WAAW,EAAE,MAAM,CAAC,QAAQ;CAC3B,aAAa;CACb,SAAS;CACT,CAAC,EACF,CAAC,CACD,QAAQ,EACR,aAAa,yDACb,CAAC;;;;AAKH,MAAa,sCAAsC,EACjD,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,QAAQ;EAC/B,aAAa;EACb,SAAS;EACT,CAAC;CACF,WAAW,EAAE,MAAM,CAAC,QAAQ;EAC3B,aAAa;EACb,SAAS;EACT,CAAC;CACF,UAAU,8BAA8B,SAAS,CAAC,QAAQ,EACzD,aAAa,wCACb,CAAC;CACF,CAAC,CACD,QAAQ,EACR,aAAa,2DACb,CAAC;AAGH,MAAa,uCACZ,8BAA8B,QAAQ,EACrC,aAAa,kCACb,CAAC"}
|
package/api/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"}
|