@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.
@@ -0,0 +1,37 @@
1
+ //#region src/api/ai-agent-capabilities.d.ts
2
+ declare const AI_AGENT_TOOL_CATEGORIES: readonly ["system", "messaging", "action", "context", "analysis"];
3
+ type AiAgentToolCategory = (typeof AI_AGENT_TOOL_CATEGORIES)[number];
4
+ declare const AI_AGENT_TOOL_IDS: readonly ["searchKnowledgeBase", "identifyVisitor", "updateConversationTitle", "updateSentiment", "setPriority", "sendMessage", "sendPrivateMessage", "respond", "escalate", "resolve", "markSpam", "skip"];
5
+ type AiAgentToolId = (typeof AI_AGENT_TOOL_IDS)[number];
6
+ declare const AI_AGENT_BEHAVIOR_SETTING_KEYS: readonly ["canResolve", "canMarkSpam", "canSetPriority", "canEscalate", "autoGenerateTitle", "autoAnalyzeSentiment"];
7
+ type AiAgentBehaviorSettingKey = (typeof AI_AGENT_BEHAVIOR_SETTING_KEYS)[number];
8
+ type AiAgentToolCatalogEntry = {
9
+ id: AiAgentToolId;
10
+ label: string;
11
+ description: string;
12
+ category: AiAgentToolCategory;
13
+ isSystem: boolean;
14
+ isRequired: boolean;
15
+ isToggleable: boolean;
16
+ behaviorSettingKey: AiAgentBehaviorSettingKey | null;
17
+ defaultTemplateNames: string[];
18
+ };
19
+ declare const AI_AGENT_TOOL_CATALOG: readonly AiAgentToolCatalogEntry[];
20
+ type AiAgentDefaultSkillTemplateEntry = {
21
+ name: string;
22
+ label: string;
23
+ description: string;
24
+ content: string;
25
+ suggestedToolIds: readonly AiAgentToolId[];
26
+ };
27
+ declare const AI_AGENT_DEFAULT_SKILL_TEMPLATES: readonly AiAgentDefaultSkillTemplateEntry[];
28
+ type AiAgentDefaultSkillTemplate = (typeof AI_AGENT_DEFAULT_SKILL_TEMPLATES)[number];
29
+ type AiAgentSystemSkillMetadataEntry = {
30
+ name: "agent.md" | "security.md" | "behaviour.md" | "participation.md" | "grounding.md" | "capabilities.md";
31
+ label: string;
32
+ description: string;
33
+ };
34
+ declare const AI_AGENT_SYSTEM_SKILL_METADATA: readonly AiAgentSystemSkillMetadataEntry[];
35
+ //#endregion
36
+ export { AI_AGENT_BEHAVIOR_SETTING_KEYS, AI_AGENT_DEFAULT_SKILL_TEMPLATES, AI_AGENT_SYSTEM_SKILL_METADATA, AI_AGENT_TOOL_CATALOG, AI_AGENT_TOOL_CATEGORIES, AI_AGENT_TOOL_IDS, AiAgentBehaviorSettingKey, AiAgentDefaultSkillTemplate, AiAgentSystemSkillMetadataEntry, AiAgentToolCatalogEntry, AiAgentToolCategory, AiAgentToolId };
37
+ //# sourceMappingURL=ai-agent-capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent-capabilities.d.ts","names":[],"sources":["../../src/api/ai-agent-capabilities.ts"],"sourcesContent":[],"mappings":";cAKa;AAAA,KAQD,mBAAA,GAFF,CAAA,OAEgC,wBAFhC,CAAA,CAAA,MAAA,CAAA;AAEE,cAEC,iBAFkB,EAAW,SAAA,CAAA,qBAAwB,EAAA,iBAAA,EAAA,yBAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,aAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAErD,KAeD,aAAA,GAFF,CAAA,OAE0B,iBAF1B,CAAA,CAAA,MAAA,CAAA;AAEE,cAEC,8BAFwC,EAAA,SAAA,CAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,mBAAA,EAAA,sBAAA,CAAA;AAExC,KASD,yBAAA,GAFF,CAAA,OAGD,8BAHC,CAAA,CAAA,MAAA,CAAA;AAEE,KAGA,uBAAA,GAHyB;EAGzB,EAAA,EACP,aADO;EACP,KAAA,EAAA,MAAA;EAGM,WAAA,EAAA,MAAA;EAIU,QAAA,EAJV,mBAIU;EAAyB,QAAA,EAAA,OAAA;EAIjC,UAAA,EAAA,OAAA;EAgXR,YAAA,EAAA,OAAA;EAQQ,kBAAA,EA5XQ,yBAoYjB,GARoD,IAAA;EAU5C,oBAAA,EAAA,MAAA,EAA2B;AAGvC,CAAA;AAYa,cAjZA,qBAqbX,EAAA,SArb2C,uBAiZS,EAAA;KAjCjD,gCAAA;;;;;6BAKuB;;cAGf,2CAA2C;KAU5C,2BAAA,WACH;KAEG,+BAAA;;;;;cAYC,yCAAyC"}
@@ -0,0 +1,432 @@
1
+ import { serializeSkillFileContent, stripSkillMarkdownExtension } from "../skill-file-format.js";
2
+
3
+ //#region src/api/ai-agent-capabilities.ts
4
+ const AI_AGENT_TOOL_CATEGORIES = [
5
+ "system",
6
+ "messaging",
7
+ "action",
8
+ "context",
9
+ "analysis"
10
+ ];
11
+ const AI_AGENT_TOOL_IDS = [
12
+ "searchKnowledgeBase",
13
+ "identifyVisitor",
14
+ "updateConversationTitle",
15
+ "updateSentiment",
16
+ "setPriority",
17
+ "sendMessage",
18
+ "sendPrivateMessage",
19
+ "respond",
20
+ "escalate",
21
+ "resolve",
22
+ "markSpam",
23
+ "skip"
24
+ ];
25
+ const AI_AGENT_BEHAVIOR_SETTING_KEYS = [
26
+ "canResolve",
27
+ "canMarkSpam",
28
+ "canSetPriority",
29
+ "canEscalate",
30
+ "autoGenerateTitle",
31
+ "autoAnalyzeSentiment"
32
+ ];
33
+ const AI_AGENT_TOOL_CATALOG = [
34
+ {
35
+ id: "searchKnowledgeBase",
36
+ label: "Search Knowledge Base",
37
+ description: "Looks up product or policy facts in your trained knowledge before answering.",
38
+ category: "context",
39
+ isSystem: true,
40
+ isRequired: true,
41
+ isToggleable: false,
42
+ behaviorSettingKey: null,
43
+ defaultTemplateNames: ["deep-research.md", "grounded-answers.md"]
44
+ },
45
+ {
46
+ id: "identifyVisitor",
47
+ label: "Identify Visitor",
48
+ description: "Links visitor details to a contact record when name and email are collected.",
49
+ category: "context",
50
+ isSystem: true,
51
+ isRequired: true,
52
+ isToggleable: false,
53
+ behaviorSettingKey: null,
54
+ defaultTemplateNames: ["visitor-identification.md"]
55
+ },
56
+ {
57
+ id: "updateConversationTitle",
58
+ label: "Update Conversation Title",
59
+ description: "Sets or refreshes the conversation title once the topic is clear.",
60
+ category: "analysis",
61
+ isSystem: false,
62
+ isRequired: false,
63
+ isToggleable: true,
64
+ behaviorSettingKey: "autoGenerateTitle",
65
+ defaultTemplateNames: ["title-hygiene.md"]
66
+ },
67
+ {
68
+ id: "updateSentiment",
69
+ label: "Update Sentiment",
70
+ description: "Tracks tone shifts and keeps conversation sentiment metadata up to date.",
71
+ category: "analysis",
72
+ isSystem: false,
73
+ isRequired: false,
74
+ isToggleable: true,
75
+ behaviorSettingKey: "autoAnalyzeSentiment",
76
+ defaultTemplateNames: ["sentiment-tracking.md"]
77
+ },
78
+ {
79
+ id: "setPriority",
80
+ label: "Set Priority",
81
+ description: "Adjusts urgency level for critical issues so teams can triage quickly.",
82
+ category: "analysis",
83
+ isSystem: false,
84
+ isRequired: false,
85
+ isToggleable: true,
86
+ behaviorSettingKey: "canSetPriority",
87
+ defaultTemplateNames: ["priority-triage.md"]
88
+ },
89
+ {
90
+ id: "sendMessage",
91
+ label: "Send Public Message",
92
+ description: "Sends a visible reply to the visitor.",
93
+ category: "messaging",
94
+ isSystem: true,
95
+ isRequired: true,
96
+ isToggleable: false,
97
+ behaviorSettingKey: null,
98
+ defaultTemplateNames: ["tone-and-voice.md", "short-clear-replies.md"]
99
+ },
100
+ {
101
+ id: "sendPrivateMessage",
102
+ label: "Send Private Note",
103
+ description: "Adds internal-only notes for teammates that visitors cannot see.",
104
+ category: "messaging",
105
+ isSystem: true,
106
+ isRequired: true,
107
+ isToggleable: false,
108
+ behaviorSettingKey: null,
109
+ defaultTemplateNames: ["handoff-notes.md"]
110
+ },
111
+ {
112
+ id: "respond",
113
+ label: "Finish: Respond",
114
+ description: "Marks turn complete after responding to the visitor.",
115
+ category: "action",
116
+ isSystem: true,
117
+ isRequired: true,
118
+ isToggleable: false,
119
+ behaviorSettingKey: null,
120
+ defaultTemplateNames: ["reply-or-stay-silent.md"]
121
+ },
122
+ {
123
+ id: "escalate",
124
+ label: "Finish: Escalate",
125
+ description: "Hands off the conversation to a human agent when needed.",
126
+ category: "action",
127
+ isSystem: false,
128
+ isRequired: false,
129
+ isToggleable: true,
130
+ behaviorSettingKey: "canEscalate",
131
+ defaultTemplateNames: ["escalation-playbook.md"]
132
+ },
133
+ {
134
+ id: "resolve",
135
+ label: "Finish: Resolve",
136
+ description: "Marks the conversation as resolved when it is fully handled.",
137
+ category: "action",
138
+ isSystem: false,
139
+ isRequired: false,
140
+ isToggleable: true,
141
+ behaviorSettingKey: "canResolve",
142
+ defaultTemplateNames: ["resolution-checklist.md"]
143
+ },
144
+ {
145
+ id: "markSpam",
146
+ label: "Finish: Mark Spam",
147
+ description: "Flags obvious spam or abuse and closes the conversation.",
148
+ category: "action",
149
+ isSystem: false,
150
+ isRequired: false,
151
+ isToggleable: true,
152
+ behaviorSettingKey: "canMarkSpam",
153
+ defaultTemplateNames: ["spam-detection.md"]
154
+ },
155
+ {
156
+ id: "skip",
157
+ label: "Finish: Skip",
158
+ description: "Intentionally stays silent when no response is needed from AI.",
159
+ category: "action",
160
+ isSystem: true,
161
+ isRequired: true,
162
+ isToggleable: false,
163
+ behaviorSettingKey: null,
164
+ defaultTemplateNames: ["reply-or-stay-silent.md"]
165
+ }
166
+ ];
167
+ const AI_AGENT_DEFAULT_SKILL_TEMPLATE_DEFINITIONS = [
168
+ {
169
+ name: "reply-or-stay-silent.md",
170
+ label: "Reply Or Stay Silent",
171
+ description: "Defines when the AI should answer and when it should intentionally stay silent.",
172
+ content: `## Reply Decision
173
+
174
+ - Reply when the visitor still needs a clear, concrete answer.
175
+ - Stay silent when a human already answered well or when the message is only acknowledgement.
176
+ - If unsure whether to reply, prefer one short helpful message over multiple partial replies.
177
+
178
+ ## Tool Notes
179
+
180
+ - Use [@Send Public Message](mention:tool:sendMessage) only when a reply adds value.
181
+ - Finish with [@Finish: Respond](mention:tool:respond) after replying.
182
+ - Use [@Finish: Skip](mention:tool:skip) when no reply is required.`,
183
+ suggestedToolIds: [
184
+ "sendMessage",
185
+ "respond",
186
+ "skip"
187
+ ]
188
+ },
189
+ {
190
+ name: "tone-and-voice.md",
191
+ label: "Tone And Voice",
192
+ description: "Keeps replies concise, empathetic, and aligned with a support tone.",
193
+ content: `## Tone
194
+
195
+ - Be concise, direct, and calm.
196
+ - Prefer plain language over jargon.
197
+ - Keep messages to 1-2 short sentences when possible.
198
+
199
+ ## Empathy
200
+
201
+ - Acknowledge frustration without over-apologizing.
202
+ - Focus on the next useful action.
203
+
204
+ ## Tool Notes
205
+
206
+ - Send customer-visible text through [@Send Public Message](mention:tool:sendMessage).`,
207
+ suggestedToolIds: ["sendMessage"]
208
+ },
209
+ {
210
+ name: "short-clear-replies.md",
211
+ label: "Short Clear Replies",
212
+ description: "Enforces short, structured customer-facing responses.",
213
+ content: `## Message Shape
214
+
215
+ - First sentence: direct answer.
216
+ - Optional second sentence: next step or clarifying question.
217
+ - Avoid multi-paragraph replies unless the question is complex.
218
+
219
+ ## Tool Notes
220
+
221
+ - Send the final customer reply with [@Send Public Message](mention:tool:sendMessage).`,
222
+ suggestedToolIds: ["sendMessage"]
223
+ },
224
+ {
225
+ name: "deep-research.md",
226
+ label: "Deep Research",
227
+ description: "Guides multi-pass retrieval before giving factual or policy answers.",
228
+ content: `## Research Workflow
229
+
230
+ - For factual/product/policy questions, search before answering.
231
+ - Start with a short focused query, then broaden if needed.
232
+ - Use at least one follow-up search if confidence is low.
233
+
234
+ ## Tool Notes
235
+
236
+ - Use [@Search Knowledge Base](mention:tool:searchKnowledgeBase) for retrieval.
237
+ - Only send final claims after grounding them in retrieved context.`,
238
+ suggestedToolIds: ["searchKnowledgeBase"]
239
+ },
240
+ {
241
+ name: "grounded-answers.md",
242
+ label: "Grounded Answers",
243
+ description: "Prevents hallucinations and enforces transparent uncertainty.",
244
+ content: `## Grounding Rules
245
+
246
+ - Do not invent product, policy, or pricing details.
247
+ - If information is missing, say so clearly and offer escalation.
248
+ - Prefer partial certainty over confident guessing.
249
+
250
+ ## Tool Notes
251
+
252
+ - Validate facts with [@Search Knowledge Base](mention:tool:searchKnowledgeBase).
253
+ - If unsupported, use [@Finish: Escalate](mention:tool:escalate) when available.`,
254
+ suggestedToolIds: ["searchKnowledgeBase", "escalate"]
255
+ },
256
+ {
257
+ name: "visitor-identification.md",
258
+ label: "Visitor Identification",
259
+ description: "Controls when and how to request name/email and identify the visitor.",
260
+ content: `## Identification Policy
261
+
262
+ - Ask for name and email only when needed for account-specific help.
263
+ - Validate that the name field contains a name and email field contains an email.
264
+ - Update details if the visitor corrects their information.
265
+
266
+ ## Tool Notes
267
+
268
+ - Link identity with [@Identify Visitor](mention:tool:identifyVisitor).`,
269
+ suggestedToolIds: ["identifyVisitor"]
270
+ },
271
+ {
272
+ name: "escalation-playbook.md",
273
+ label: "Escalation Playbook",
274
+ description: "Defines when escalation is mandatory and what to include in handoff.",
275
+ content: `## Escalate When
276
+
277
+ - The visitor asks for a human.
278
+ - You cannot find reliable information.
279
+ - Legal, compliance, billing, or high-risk judgment is required.
280
+
281
+ ## Handoff Quality
282
+
283
+ - Tell the visitor what happens next.
284
+ - Leave concise internal context for teammates.
285
+
286
+ ## Tool Notes
287
+
288
+ - Notify visitor with [@Send Public Message](mention:tool:sendMessage).
289
+ - Add handoff context via [@Send Private Note](mention:tool:sendPrivateMessage).
290
+ - Finish with [@Finish: Escalate](mention:tool:escalate).`,
291
+ suggestedToolIds: [
292
+ "sendMessage",
293
+ "sendPrivateMessage",
294
+ "escalate"
295
+ ]
296
+ },
297
+ {
298
+ name: "resolution-checklist.md",
299
+ label: "Resolution Checklist",
300
+ description: "Ensures conversations are only resolved after clear completion criteria.",
301
+ content: `## Resolve Criteria
302
+
303
+ - The visitor's request is fully addressed.
304
+ - No unresolved dependency remains.
305
+ - The final response includes a clear closure.
306
+
307
+ ## Tool Notes
308
+
309
+ - Send closure text with [@Send Public Message](mention:tool:sendMessage).
310
+ - Finish with [@Finish: Resolve](mention:tool:resolve).`,
311
+ suggestedToolIds: ["sendMessage", "resolve"]
312
+ },
313
+ {
314
+ name: "spam-detection.md",
315
+ label: "Spam Detection",
316
+ description: "Sets strict criteria for spam classification.",
317
+ content: `## Spam Heuristics
318
+
319
+ - Mark as spam only for obvious bot, phishing, or abusive noise.
320
+ - Do not mark difficult but valid customer requests as spam.
321
+
322
+ ## Tool Notes
323
+
324
+ - Use [@Finish: Mark Spam](mention:tool:markSpam) only when highly confident.`,
325
+ suggestedToolIds: ["markSpam"]
326
+ },
327
+ {
328
+ name: "priority-triage.md",
329
+ label: "Priority Triage",
330
+ description: "Standardizes urgency assignment for incoming issues.",
331
+ content: `## Priority Rules
332
+
333
+ - Urgent: outages, security incidents, severe business impact.
334
+ - High: blocked workflow with no workaround.
335
+ - Normal: standard product support requests.
336
+ - Low: informational or minor questions.
337
+
338
+ ## Tool Notes
339
+
340
+ - Set urgency with [@Set Priority](mention:tool:setPriority).`,
341
+ suggestedToolIds: ["setPriority"]
342
+ },
343
+ {
344
+ name: "sentiment-tracking.md",
345
+ label: "Sentiment Tracking",
346
+ description: "Encourages sentiment updates when tone changes.",
347
+ content: `## Sentiment Updates
348
+
349
+ - Update sentiment when tone shifts meaningfully.
350
+ - Keep reason short and factual.
351
+ - Avoid over-updating on minor wording changes.
352
+
353
+ ## Tool Notes
354
+
355
+ - Record tone with [@Update Sentiment](mention:tool:updateSentiment).`,
356
+ suggestedToolIds: ["updateSentiment"]
357
+ },
358
+ {
359
+ name: "title-hygiene.md",
360
+ label: "Title Hygiene",
361
+ description: "Keeps conversation titles clear and actionable.",
362
+ content: `## Title Standards
363
+
364
+ - Keep titles short and specific.
365
+ - Reflect the primary issue, not generic phrases.
366
+ - Update title if topic changes significantly.
367
+
368
+ ## Tool Notes
369
+
370
+ - Use [@Update Conversation Title](mention:tool:updateConversationTitle).`,
371
+ suggestedToolIds: ["updateConversationTitle"]
372
+ },
373
+ {
374
+ name: "handoff-notes.md",
375
+ label: "Handoff Notes",
376
+ description: "Improves private notes shared with human teammates.",
377
+ content: `## Private Note Checklist
378
+
379
+ - Include issue summary, key facts, and what was already tried.
380
+ - Add urgency and expected next action.
381
+ - Keep notes scannable and concise.
382
+
383
+ ## Tool Notes
384
+
385
+ - Send internal details with [@Send Private Note](mention:tool:sendPrivateMessage).`,
386
+ suggestedToolIds: ["sendPrivateMessage"]
387
+ }
388
+ ];
389
+ const AI_AGENT_DEFAULT_SKILL_TEMPLATES = AI_AGENT_DEFAULT_SKILL_TEMPLATE_DEFINITIONS.map((template) => ({
390
+ ...template,
391
+ content: serializeSkillFileContent({
392
+ name: stripSkillMarkdownExtension(template.name),
393
+ description: template.description,
394
+ body: template.content
395
+ })
396
+ }));
397
+ const AI_AGENT_SYSTEM_SKILL_METADATA = [
398
+ {
399
+ name: "agent.md",
400
+ label: "Agent Identity",
401
+ description: "Core role, persona, and mission of the assistant."
402
+ },
403
+ {
404
+ name: "security.md",
405
+ label: "Security Guardrails",
406
+ description: "Critical safety and confidentiality rules that should stay strict."
407
+ },
408
+ {
409
+ name: "behaviour.md",
410
+ label: "Behavior Policy",
411
+ description: "Runtime behavior and mode-specific operating guidance."
412
+ },
413
+ {
414
+ name: "participation.md",
415
+ label: "Participation Policy",
416
+ description: "Rules for when AI should participate versus intentionally stay silent."
417
+ },
418
+ {
419
+ name: "grounding.md",
420
+ label: "Grounding Policy",
421
+ description: "Instructions for factual grounding and knowledge retrieval discipline."
422
+ },
423
+ {
424
+ name: "capabilities.md",
425
+ label: "Capabilities Contract",
426
+ description: "Capability boundaries and references to optional behavior skills."
427
+ }
428
+ ];
429
+
430
+ //#endregion
431
+ export { AI_AGENT_BEHAVIOR_SETTING_KEYS, AI_AGENT_DEFAULT_SKILL_TEMPLATES, AI_AGENT_SYSTEM_SKILL_METADATA, AI_AGENT_TOOL_CATALOG, AI_AGENT_TOOL_CATEGORIES, AI_AGENT_TOOL_IDS };
432
+ //# sourceMappingURL=ai-agent-capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent-capabilities.js","names":["AI_AGENT_TOOL_CATALOG: readonly AiAgentToolCatalogEntry[]","AI_AGENT_DEFAULT_SKILL_TEMPLATES: readonly AiAgentDefaultSkillTemplateEntry[]","AI_AGENT_SYSTEM_SKILL_METADATA: readonly AiAgentSystemSkillMetadataEntry[]"],"sources":["../../src/api/ai-agent-capabilities.ts"],"sourcesContent":["import {\n\tserializeSkillFileContent,\n\tstripSkillMarkdownExtension,\n} from \"../skill-file-format\";\n\nexport const AI_AGENT_TOOL_CATEGORIES = [\n\t\"system\",\n\t\"messaging\",\n\t\"action\",\n\t\"context\",\n\t\"analysis\",\n] as const;\n\nexport type AiAgentToolCategory = (typeof AI_AGENT_TOOL_CATEGORIES)[number];\n\nexport const AI_AGENT_TOOL_IDS = [\n\t\"searchKnowledgeBase\",\n\t\"identifyVisitor\",\n\t\"updateConversationTitle\",\n\t\"updateSentiment\",\n\t\"setPriority\",\n\t\"sendMessage\",\n\t\"sendPrivateMessage\",\n\t\"respond\",\n\t\"escalate\",\n\t\"resolve\",\n\t\"markSpam\",\n\t\"skip\",\n] as const;\n\nexport type AiAgentToolId = (typeof AI_AGENT_TOOL_IDS)[number];\n\nexport const AI_AGENT_BEHAVIOR_SETTING_KEYS = [\n\t\"canResolve\",\n\t\"canMarkSpam\",\n\t\"canSetPriority\",\n\t\"canEscalate\",\n\t\"autoGenerateTitle\",\n\t\"autoAnalyzeSentiment\",\n] as const;\n\nexport type AiAgentBehaviorSettingKey =\n\t(typeof AI_AGENT_BEHAVIOR_SETTING_KEYS)[number];\n\nexport type AiAgentToolCatalogEntry = {\n\tid: AiAgentToolId;\n\tlabel: string;\n\tdescription: string;\n\tcategory: AiAgentToolCategory;\n\tisSystem: boolean;\n\tisRequired: boolean;\n\tisToggleable: boolean;\n\tbehaviorSettingKey: AiAgentBehaviorSettingKey | null;\n\tdefaultTemplateNames: string[];\n};\n\nexport const AI_AGENT_TOOL_CATALOG: readonly AiAgentToolCatalogEntry[] = [\n\t{\n\t\tid: \"searchKnowledgeBase\",\n\t\tlabel: \"Search Knowledge Base\",\n\t\tdescription:\n\t\t\t\"Looks up product or policy facts in your trained knowledge before answering.\",\n\t\tcategory: \"context\",\n\t\tisSystem: true,\n\t\tisRequired: true,\n\t\tisToggleable: false,\n\t\tbehaviorSettingKey: null,\n\t\tdefaultTemplateNames: [\"deep-research.md\", \"grounded-answers.md\"],\n\t},\n\t{\n\t\tid: \"identifyVisitor\",\n\t\tlabel: \"Identify Visitor\",\n\t\tdescription:\n\t\t\t\"Links visitor details to a contact record when name and email are collected.\",\n\t\tcategory: \"context\",\n\t\tisSystem: true,\n\t\tisRequired: true,\n\t\tisToggleable: false,\n\t\tbehaviorSettingKey: null,\n\t\tdefaultTemplateNames: [\"visitor-identification.md\"],\n\t},\n\t{\n\t\tid: \"updateConversationTitle\",\n\t\tlabel: \"Update Conversation Title\",\n\t\tdescription:\n\t\t\t\"Sets or refreshes the conversation title once the topic is clear.\",\n\t\tcategory: \"analysis\",\n\t\tisSystem: false,\n\t\tisRequired: false,\n\t\tisToggleable: true,\n\t\tbehaviorSettingKey: \"autoGenerateTitle\",\n\t\tdefaultTemplateNames: [\"title-hygiene.md\"],\n\t},\n\t{\n\t\tid: \"updateSentiment\",\n\t\tlabel: \"Update Sentiment\",\n\t\tdescription:\n\t\t\t\"Tracks tone shifts and keeps conversation sentiment metadata up to date.\",\n\t\tcategory: \"analysis\",\n\t\tisSystem: false,\n\t\tisRequired: false,\n\t\tisToggleable: true,\n\t\tbehaviorSettingKey: \"autoAnalyzeSentiment\",\n\t\tdefaultTemplateNames: [\"sentiment-tracking.md\"],\n\t},\n\t{\n\t\tid: \"setPriority\",\n\t\tlabel: \"Set Priority\",\n\t\tdescription:\n\t\t\t\"Adjusts urgency level for critical issues so teams can triage quickly.\",\n\t\tcategory: \"analysis\",\n\t\tisSystem: false,\n\t\tisRequired: false,\n\t\tisToggleable: true,\n\t\tbehaviorSettingKey: \"canSetPriority\",\n\t\tdefaultTemplateNames: [\"priority-triage.md\"],\n\t},\n\t{\n\t\tid: \"sendMessage\",\n\t\tlabel: \"Send Public Message\",\n\t\tdescription: \"Sends a visible reply to the visitor.\",\n\t\tcategory: \"messaging\",\n\t\tisSystem: true,\n\t\tisRequired: true,\n\t\tisToggleable: false,\n\t\tbehaviorSettingKey: null,\n\t\tdefaultTemplateNames: [\"tone-and-voice.md\", \"short-clear-replies.md\"],\n\t},\n\t{\n\t\tid: \"sendPrivateMessage\",\n\t\tlabel: \"Send Private Note\",\n\t\tdescription:\n\t\t\t\"Adds internal-only notes for teammates that visitors cannot see.\",\n\t\tcategory: \"messaging\",\n\t\tisSystem: true,\n\t\tisRequired: true,\n\t\tisToggleable: false,\n\t\tbehaviorSettingKey: null,\n\t\tdefaultTemplateNames: [\"handoff-notes.md\"],\n\t},\n\t{\n\t\tid: \"respond\",\n\t\tlabel: \"Finish: Respond\",\n\t\tdescription: \"Marks turn complete after responding to the visitor.\",\n\t\tcategory: \"action\",\n\t\tisSystem: true,\n\t\tisRequired: true,\n\t\tisToggleable: false,\n\t\tbehaviorSettingKey: null,\n\t\tdefaultTemplateNames: [\"reply-or-stay-silent.md\"],\n\t},\n\t{\n\t\tid: \"escalate\",\n\t\tlabel: \"Finish: Escalate\",\n\t\tdescription: \"Hands off the conversation to a human agent when needed.\",\n\t\tcategory: \"action\",\n\t\tisSystem: false,\n\t\tisRequired: false,\n\t\tisToggleable: true,\n\t\tbehaviorSettingKey: \"canEscalate\",\n\t\tdefaultTemplateNames: [\"escalation-playbook.md\"],\n\t},\n\t{\n\t\tid: \"resolve\",\n\t\tlabel: \"Finish: Resolve\",\n\t\tdescription: \"Marks the conversation as resolved when it is fully handled.\",\n\t\tcategory: \"action\",\n\t\tisSystem: false,\n\t\tisRequired: false,\n\t\tisToggleable: true,\n\t\tbehaviorSettingKey: \"canResolve\",\n\t\tdefaultTemplateNames: [\"resolution-checklist.md\"],\n\t},\n\t{\n\t\tid: \"markSpam\",\n\t\tlabel: \"Finish: Mark Spam\",\n\t\tdescription: \"Flags obvious spam or abuse and closes the conversation.\",\n\t\tcategory: \"action\",\n\t\tisSystem: false,\n\t\tisRequired: false,\n\t\tisToggleable: true,\n\t\tbehaviorSettingKey: \"canMarkSpam\",\n\t\tdefaultTemplateNames: [\"spam-detection.md\"],\n\t},\n\t{\n\t\tid: \"skip\",\n\t\tlabel: \"Finish: Skip\",\n\t\tdescription:\n\t\t\t\"Intentionally stays silent when no response is needed from AI.\",\n\t\tcategory: \"action\",\n\t\tisSystem: true,\n\t\tisRequired: true,\n\t\tisToggleable: false,\n\t\tbehaviorSettingKey: null,\n\t\tdefaultTemplateNames: [\"reply-or-stay-silent.md\"],\n\t},\n] as const;\n\nconst AI_AGENT_DEFAULT_SKILL_TEMPLATE_DEFINITIONS = [\n\t{\n\t\tname: \"reply-or-stay-silent.md\",\n\t\tlabel: \"Reply Or Stay Silent\",\n\t\tdescription:\n\t\t\t\"Defines when the AI should answer and when it should intentionally stay silent.\",\n\t\tcontent: `## Reply Decision\n\n- Reply when the visitor still needs a clear, concrete answer.\n- Stay silent when a human already answered well or when the message is only acknowledgement.\n- If unsure whether to reply, prefer one short helpful message over multiple partial replies.\n\n## Tool Notes\n\n- Use [@Send Public Message](mention:tool:sendMessage) only when a reply adds value.\n- Finish with [@Finish: Respond](mention:tool:respond) after replying.\n- Use [@Finish: Skip](mention:tool:skip) when no reply is required.`,\n\t\tsuggestedToolIds: [\"sendMessage\", \"respond\", \"skip\"] as const,\n\t},\n\t{\n\t\tname: \"tone-and-voice.md\",\n\t\tlabel: \"Tone And Voice\",\n\t\tdescription:\n\t\t\t\"Keeps replies concise, empathetic, and aligned with a support tone.\",\n\t\tcontent: `## Tone\n\n- Be concise, direct, and calm.\n- Prefer plain language over jargon.\n- Keep messages to 1-2 short sentences when possible.\n\n## Empathy\n\n- Acknowledge frustration without over-apologizing.\n- Focus on the next useful action.\n\n## Tool Notes\n\n- Send customer-visible text through [@Send Public Message](mention:tool:sendMessage).`,\n\t\tsuggestedToolIds: [\"sendMessage\"] as const,\n\t},\n\t{\n\t\tname: \"short-clear-replies.md\",\n\t\tlabel: \"Short Clear Replies\",\n\t\tdescription: \"Enforces short, structured customer-facing responses.\",\n\t\tcontent: `## Message Shape\n\n- First sentence: direct answer.\n- Optional second sentence: next step or clarifying question.\n- Avoid multi-paragraph replies unless the question is complex.\n\n## Tool Notes\n\n- Send the final customer reply with [@Send Public Message](mention:tool:sendMessage).`,\n\t\tsuggestedToolIds: [\"sendMessage\"] as const,\n\t},\n\t{\n\t\tname: \"deep-research.md\",\n\t\tlabel: \"Deep Research\",\n\t\tdescription:\n\t\t\t\"Guides multi-pass retrieval before giving factual or policy answers.\",\n\t\tcontent: `## Research Workflow\n\n- For factual/product/policy questions, search before answering.\n- Start with a short focused query, then broaden if needed.\n- Use at least one follow-up search if confidence is low.\n\n## Tool Notes\n\n- Use [@Search Knowledge Base](mention:tool:searchKnowledgeBase) for retrieval.\n- Only send final claims after grounding them in retrieved context.`,\n\t\tsuggestedToolIds: [\"searchKnowledgeBase\"] as const,\n\t},\n\t{\n\t\tname: \"grounded-answers.md\",\n\t\tlabel: \"Grounded Answers\",\n\t\tdescription:\n\t\t\t\"Prevents hallucinations and enforces transparent uncertainty.\",\n\t\tcontent: `## Grounding Rules\n\n- Do not invent product, policy, or pricing details.\n- If information is missing, say so clearly and offer escalation.\n- Prefer partial certainty over confident guessing.\n\n## Tool Notes\n\n- Validate facts with [@Search Knowledge Base](mention:tool:searchKnowledgeBase).\n- If unsupported, use [@Finish: Escalate](mention:tool:escalate) when available.`,\n\t\tsuggestedToolIds: [\"searchKnowledgeBase\", \"escalate\"] as const,\n\t},\n\t{\n\t\tname: \"visitor-identification.md\",\n\t\tlabel: \"Visitor Identification\",\n\t\tdescription:\n\t\t\t\"Controls when and how to request name/email and identify the visitor.\",\n\t\tcontent: `## Identification Policy\n\n- Ask for name and email only when needed for account-specific help.\n- Validate that the name field contains a name and email field contains an email.\n- Update details if the visitor corrects their information.\n\n## Tool Notes\n\n- Link identity with [@Identify Visitor](mention:tool:identifyVisitor).`,\n\t\tsuggestedToolIds: [\"identifyVisitor\"] as const,\n\t},\n\t{\n\t\tname: \"escalation-playbook.md\",\n\t\tlabel: \"Escalation Playbook\",\n\t\tdescription:\n\t\t\t\"Defines when escalation is mandatory and what to include in handoff.\",\n\t\tcontent: `## Escalate When\n\n- The visitor asks for a human.\n- You cannot find reliable information.\n- Legal, compliance, billing, or high-risk judgment is required.\n\n## Handoff Quality\n\n- Tell the visitor what happens next.\n- Leave concise internal context for teammates.\n\n## Tool Notes\n\n- Notify visitor with [@Send Public Message](mention:tool:sendMessage).\n- Add handoff context via [@Send Private Note](mention:tool:sendPrivateMessage).\n- Finish with [@Finish: Escalate](mention:tool:escalate).`,\n\t\tsuggestedToolIds: [\n\t\t\t\"sendMessage\",\n\t\t\t\"sendPrivateMessage\",\n\t\t\t\"escalate\",\n\t\t] as const,\n\t},\n\t{\n\t\tname: \"resolution-checklist.md\",\n\t\tlabel: \"Resolution Checklist\",\n\t\tdescription:\n\t\t\t\"Ensures conversations are only resolved after clear completion criteria.\",\n\t\tcontent: `## Resolve Criteria\n\n- The visitor's request is fully addressed.\n- No unresolved dependency remains.\n- The final response includes a clear closure.\n\n## Tool Notes\n\n- Send closure text with [@Send Public Message](mention:tool:sendMessage).\n- Finish with [@Finish: Resolve](mention:tool:resolve).`,\n\t\tsuggestedToolIds: [\"sendMessage\", \"resolve\"] as const,\n\t},\n\t{\n\t\tname: \"spam-detection.md\",\n\t\tlabel: \"Spam Detection\",\n\t\tdescription: \"Sets strict criteria for spam classification.\",\n\t\tcontent: `## Spam Heuristics\n\n- Mark as spam only for obvious bot, phishing, or abusive noise.\n- Do not mark difficult but valid customer requests as spam.\n\n## Tool Notes\n\n- Use [@Finish: Mark Spam](mention:tool:markSpam) only when highly confident.`,\n\t\tsuggestedToolIds: [\"markSpam\"] as const,\n\t},\n\t{\n\t\tname: \"priority-triage.md\",\n\t\tlabel: \"Priority Triage\",\n\t\tdescription: \"Standardizes urgency assignment for incoming issues.\",\n\t\tcontent: `## Priority Rules\n\n- Urgent: outages, security incidents, severe business impact.\n- High: blocked workflow with no workaround.\n- Normal: standard product support requests.\n- Low: informational or minor questions.\n\n## Tool Notes\n\n- Set urgency with [@Set Priority](mention:tool:setPriority).`,\n\t\tsuggestedToolIds: [\"setPriority\"] as const,\n\t},\n\t{\n\t\tname: \"sentiment-tracking.md\",\n\t\tlabel: \"Sentiment Tracking\",\n\t\tdescription: \"Encourages sentiment updates when tone changes.\",\n\t\tcontent: `## Sentiment Updates\n\n- Update sentiment when tone shifts meaningfully.\n- Keep reason short and factual.\n- Avoid over-updating on minor wording changes.\n\n## Tool Notes\n\n- Record tone with [@Update Sentiment](mention:tool:updateSentiment).`,\n\t\tsuggestedToolIds: [\"updateSentiment\"] as const,\n\t},\n\t{\n\t\tname: \"title-hygiene.md\",\n\t\tlabel: \"Title Hygiene\",\n\t\tdescription: \"Keeps conversation titles clear and actionable.\",\n\t\tcontent: `## Title Standards\n\n- Keep titles short and specific.\n- Reflect the primary issue, not generic phrases.\n- Update title if topic changes significantly.\n\n## Tool Notes\n\n- Use [@Update Conversation Title](mention:tool:updateConversationTitle).`,\n\t\tsuggestedToolIds: [\"updateConversationTitle\"] as const,\n\t},\n\t{\n\t\tname: \"handoff-notes.md\",\n\t\tlabel: \"Handoff Notes\",\n\t\tdescription: \"Improves private notes shared with human teammates.\",\n\t\tcontent: `## Private Note Checklist\n\n- Include issue summary, key facts, and what was already tried.\n- Add urgency and expected next action.\n- Keep notes scannable and concise.\n\n## Tool Notes\n\n- Send internal details with [@Send Private Note](mention:tool:sendPrivateMessage).`,\n\t\tsuggestedToolIds: [\"sendPrivateMessage\"] as const,\n\t},\n] as const;\n\ntype AiAgentDefaultSkillTemplateEntry = {\n\tname: string;\n\tlabel: string;\n\tdescription: string;\n\tcontent: string;\n\tsuggestedToolIds: readonly AiAgentToolId[];\n};\n\nexport const AI_AGENT_DEFAULT_SKILL_TEMPLATES: readonly AiAgentDefaultSkillTemplateEntry[] =\n\tAI_AGENT_DEFAULT_SKILL_TEMPLATE_DEFINITIONS.map((template) => ({\n\t\t...template,\n\t\tcontent: serializeSkillFileContent({\n\t\t\tname: stripSkillMarkdownExtension(template.name),\n\t\t\tdescription: template.description,\n\t\t\tbody: template.content,\n\t\t}),\n\t}));\n\nexport type AiAgentDefaultSkillTemplate =\n\t(typeof AI_AGENT_DEFAULT_SKILL_TEMPLATES)[number];\n\nexport type AiAgentSystemSkillMetadataEntry = {\n\tname:\n\t\t| \"agent.md\"\n\t\t| \"security.md\"\n\t\t| \"behaviour.md\"\n\t\t| \"participation.md\"\n\t\t| \"grounding.md\"\n\t\t| \"capabilities.md\";\n\tlabel: string;\n\tdescription: string;\n};\n\nexport const AI_AGENT_SYSTEM_SKILL_METADATA: readonly AiAgentSystemSkillMetadataEntry[] =\n\t[\n\t\t{\n\t\t\tname: \"agent.md\",\n\t\t\tlabel: \"Agent Identity\",\n\t\t\tdescription: \"Core role, persona, and mission of the assistant.\",\n\t\t},\n\t\t{\n\t\t\tname: \"security.md\",\n\t\t\tlabel: \"Security Guardrails\",\n\t\t\tdescription:\n\t\t\t\t\"Critical safety and confidentiality rules that should stay strict.\",\n\t\t},\n\t\t{\n\t\t\tname: \"behaviour.md\",\n\t\t\tlabel: \"Behavior Policy\",\n\t\t\tdescription: \"Runtime behavior and mode-specific operating guidance.\",\n\t\t},\n\t\t{\n\t\t\tname: \"participation.md\",\n\t\t\tlabel: \"Participation Policy\",\n\t\t\tdescription:\n\t\t\t\t\"Rules for when AI should participate versus intentionally stay silent.\",\n\t\t},\n\t\t{\n\t\t\tname: \"grounding.md\",\n\t\t\tlabel: \"Grounding Policy\",\n\t\t\tdescription:\n\t\t\t\t\"Instructions for factual grounding and knowledge retrieval discipline.\",\n\t\t},\n\t\t{\n\t\t\tname: \"capabilities.md\",\n\t\t\tlabel: \"Capabilities Contract\",\n\t\t\tdescription:\n\t\t\t\t\"Capability boundaries and references to optional behavior skills.\",\n\t\t},\n\t];\n"],"mappings":"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"}