@contractspec/lib.support-bot 1.46.2 → 1.47.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.
@@ -5,11 +5,11 @@ import "./tech/lifecycle-stage-system.docblock.js";
5
5
  import "./tech/presentation-runtime.docblock.js";
6
6
  import "./tech/auth/better-auth-nextjs.docblock.js";
7
7
  import "./tech/schema/README.docblock.js";
8
- import "./tech/templates/runtime.docblock.js";
9
8
  import "../workflow/overview.docblock.js";
10
9
  import "./tech/mcp-endpoints.docblock.js";
11
10
  import "./tech/vscode-extension.docblock.js";
12
11
  import "./tech/telemetry-ingest.docblock.js";
12
+ import "./tech/contracts/README.docblock.js";
13
13
  import "./tech/contracts/openapi-export.docblock.js";
14
14
  import "./tech/contracts/openapi-import.docblock.js";
15
15
  import "../workspace-config/workspace-config.docblock.js";
@@ -1 +1 @@
1
- {"version":3,"file":"classifier.js","names":["CATEGORY_KEYWORDS: Record<TicketCategory, string[]>","PRIORITY_HINTS: Record<TicketPriority, string[]>","SENTIMENT_HINTS: Record<TicketSentiment, string[]>","intents: string[]"],"sources":["../../src/tickets/classifier.ts"],"sourcesContent":["import type { LLMProvider } from '@contractspec/lib.contracts/integrations/providers/llm';\nimport type {\n SupportTicket,\n TicketCategory,\n TicketPriority,\n TicketSentiment,\n TicketClassification,\n} from '../types';\n\nconst CATEGORY_KEYWORDS: Record<TicketCategory, string[]> = {\n billing: ['invoice', 'payout', 'refund', 'charge', 'billing', 'payment'],\n technical: ['bug', 'error', 'crash', 'issue', 'failed', 'timeout'],\n product: ['feature', 'roadmap', 'idea', 'request', 'feedback'],\n account: ['login', 'password', '2fa', 'account', 'profile', 'email change'],\n compliance: ['kyc', 'aml', 'compliance', 'regulation', 'gdpr'],\n other: [],\n};\n\nconst PRIORITY_HINTS: Record<TicketPriority, string[]> = {\n urgent: ['urgent', 'asap', 'immediately', 'today', 'right away'],\n high: ['high priority', 'blocking', 'major', 'critical'],\n medium: ['soon', 'next few days'],\n low: ['nice to have', 'when possible', 'later'],\n};\n\nconst SENTIMENT_HINTS: Record<TicketSentiment, string[]> = {\n positive: ['love', 'great', 'awesome', 'thank you'],\n neutral: ['question', 'wonder', 'curious'],\n negative: ['unhappy', 'bad', 'terrible', 'awful', 'angry'],\n frustrated: ['furious', 'frustrated', 'fed up', 'ridiculous'],\n};\n\nexport interface TicketClassifierOptions {\n keywords?: Partial<Record<TicketCategory, string[]>>;\n llm?: LLMProvider;\n llmModel?: string;\n}\n\nexport class TicketClassifier {\n private readonly keywords: Record<TicketCategory, string[]>;\n private readonly llm?: LLMProvider;\n private readonly llmModel?: string;\n\n constructor(options?: TicketClassifierOptions) {\n this.keywords = {\n ...CATEGORY_KEYWORDS,\n ...(options?.keywords ?? {}),\n } as Record<TicketCategory, string[]>;\n this.llm = options?.llm;\n this.llmModel = options?.llmModel;\n }\n\n async classify(ticket: SupportTicket): Promise<TicketClassification> {\n const heuristics = this.heuristicClassification(ticket);\n if (!this.llm) return heuristics;\n\n try {\n const llmResult = await this.llm.chat(\n [\n {\n role: 'system',\n content: [{ type: 'text', text: 'Classify the support ticket.' }],\n },\n {\n role: 'user',\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n subject: ticket.subject,\n body: ticket.body,\n channel: ticket.channel,\n }),\n },\n ],\n },\n ],\n {\n responseFormat: 'json',\n model: this.llmModel,\n }\n );\n const content = llmResult.message.content.find((part) => 'text' in part);\n if (content && 'text' in content) {\n const parsed = JSON.parse(\n content.text\n ) as Partial<TicketClassification>;\n return {\n ...heuristics,\n ...parsed,\n intents: parsed.intents ?? heuristics.intents,\n tags: parsed.tags ?? heuristics.tags,\n };\n }\n } catch {\n // fallback to heuristics\n }\n\n return heuristics;\n }\n\n private heuristicClassification(ticket: SupportTicket): TicketClassification {\n const text = `${ticket.subject}\\n${ticket.body}`.toLowerCase();\n const category = this.detectCategory(text);\n const priority = this.detectPriority(text);\n const sentiment = this.detectSentiment(text);\n const intents = this.extractIntents(text);\n const tags = intents.slice(0, 3);\n const confidence = this.estimateConfidence(category, priority, sentiment);\n\n return {\n ticketId: ticket.id,\n category,\n priority,\n sentiment,\n intents,\n tags,\n confidence,\n escalationRequired: priority === 'urgent' || category === 'compliance',\n };\n }\n\n private detectCategory(text: string): TicketCategory {\n for (const [category, keywords] of Object.entries(this.keywords) as [\n TicketCategory,\n string[],\n ][]) {\n if (keywords.some((keyword) => text.includes(keyword))) {\n return category;\n }\n }\n return 'other';\n }\n\n private detectPriority(text: string): TicketPriority {\n for (const priority of [\n 'urgent',\n 'high',\n 'medium',\n 'low',\n ] as TicketPriority[]) {\n if (PRIORITY_HINTS[priority].some((word) => text.includes(word))) {\n return priority;\n }\n }\n return 'medium';\n }\n\n private detectSentiment(text: string): TicketSentiment {\n for (const sentiment of [\n 'frustrated',\n 'negative',\n 'neutral',\n 'positive',\n ] as TicketSentiment[]) {\n if (SENTIMENT_HINTS[sentiment].some((word) => text.includes(word))) {\n return sentiment;\n }\n }\n return 'neutral';\n }\n\n private extractIntents(text: string): string[] {\n const intents: string[] = [];\n if (text.includes('refund') || text.includes('chargeback'))\n intents.push('refund');\n if (text.includes('payout')) intents.push('payout');\n if (text.includes('login')) intents.push('login-help');\n if (text.includes('feature')) intents.push('feature-request');\n if (text.includes('bug') || text.includes('error'))\n intents.push('bug-report');\n return intents.length ? intents : ['general'];\n }\n\n private estimateConfidence(\n category: TicketCategory,\n priority: TicketPriority,\n sentiment: TicketSentiment\n ): number {\n let base = 0.6;\n if (category !== 'other') base += 0.1;\n if (priority === 'urgent' || priority === 'low') base += 0.05;\n if (sentiment === 'frustrated') base -= 0.05;\n return Math.min(0.95, Math.max(0.4, Number(base.toFixed(2))));\n }\n}\n"],"mappings":";AASA,MAAMA,oBAAsD;CAC1D,SAAS;EAAC;EAAW;EAAU;EAAU;EAAU;EAAW;EAAU;CACxE,WAAW;EAAC;EAAO;EAAS;EAAS;EAAS;EAAU;EAAU;CAClE,SAAS;EAAC;EAAW;EAAW;EAAQ;EA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,SAAS;AACxB,MAAI,KAAK,SAAS,SAAS,CAAE,SAAQ,KAAK,SAAS;AACnD,MAAI,KAAK,SAAS,QAAQ,CAAE,SAAQ,KAAK,aAAa;AACtD,MAAI,KAAK,SAAS,UAAU,CAAE,SAAQ,KAAK,kBAAkB;AAC7D,MAAI,KAAK,SAAS,MAAM,IAAI,KAAK,SAAS,QAAQ,CAChD,SAAQ,KAAK,aAAa;AAC5B,SAAO,QAAQ,SAAS,UAAU,CAAC,UAAU;;CAG/C,AAAQ,mBACN,UACA,UACA,WACQ;EACR,IAAI,OAAO;AACX,MAAI,aAAa,QAAS,SAAQ;AAClC,MAAI,aAAa,YAAY,aAAa,MAAO,SAAQ;AACzD,MAAI,cAAc,aAAc,SAAQ;AACxC,SAAO,KAAK,IAAI,KAAM,KAAK,IAAI,IAAK,OAAO,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"classifier.js","names":[],"sources":["../../src/tickets/classifier.ts"],"sourcesContent":["import type { LLMProvider } from '@contractspec/lib.contracts/integrations/providers/llm';\nimport type {\n SupportTicket,\n TicketCategory,\n TicketPriority,\n TicketSentiment,\n TicketClassification,\n} from '../types';\n\nconst CATEGORY_KEYWORDS: Record<TicketCategory, string[]> = {\n billing: ['invoice', 'payout', 'refund', 'charge', 'billing', 'payment'],\n technical: ['bug', 'error', 'crash', 'issue', 'failed', 'timeout'],\n product: ['feature', 'roadmap', 'idea', 'request', 'feedback'],\n account: ['login', 'password', '2fa', 'account', 'profile', 'email change'],\n compliance: ['kyc', 'aml', 'compliance', 'regulation', 'gdpr'],\n other: [],\n};\n\nconst PRIORITY_HINTS: Record<TicketPriority, string[]> = {\n urgent: ['urgent', 'asap', 'immediately', 'today', 'right away'],\n high: ['high priority', 'blocking', 'major', 'critical'],\n medium: ['soon', 'next few days'],\n low: ['nice to have', 'when possible', 'later'],\n};\n\nconst SENTIMENT_HINTS: Record<TicketSentiment, string[]> = {\n positive: ['love', 'great', 'awesome', 'thank you'],\n neutral: ['question', 'wonder', 'curious'],\n negative: ['unhappy', 'bad', 'terrible', 'awful', 'angry'],\n frustrated: ['furious', 'frustrated', 'fed up', 'ridiculous'],\n};\n\nexport interface TicketClassifierOptions {\n keywords?: Partial<Record<TicketCategory, string[]>>;\n llm?: LLMProvider;\n llmModel?: string;\n}\n\nexport class TicketClassifier {\n private readonly keywords: Record<TicketCategory, string[]>;\n private readonly llm?: LLMProvider;\n private readonly llmModel?: string;\n\n constructor(options?: TicketClassifierOptions) {\n this.keywords = {\n ...CATEGORY_KEYWORDS,\n ...(options?.keywords ?? {}),\n } as Record<TicketCategory, string[]>;\n this.llm = options?.llm;\n this.llmModel = options?.llmModel;\n }\n\n async classify(ticket: SupportTicket): Promise<TicketClassification> {\n const heuristics = this.heuristicClassification(ticket);\n if (!this.llm) return heuristics;\n\n try {\n const llmResult = await this.llm.chat(\n [\n {\n role: 'system',\n content: [{ type: 'text', text: 'Classify the support ticket.' }],\n },\n {\n role: 'user',\n content: [\n {\n type: 'text',\n text: JSON.stringify({\n subject: ticket.subject,\n body: ticket.body,\n channel: ticket.channel,\n }),\n },\n ],\n },\n ],\n {\n responseFormat: 'json',\n model: this.llmModel,\n }\n );\n const content = llmResult.message.content.find((part) => 'text' in part);\n if (content && 'text' in content) {\n const parsed = JSON.parse(\n content.text\n ) as Partial<TicketClassification>;\n return {\n ...heuristics,\n ...parsed,\n intents: parsed.intents ?? heuristics.intents,\n tags: parsed.tags ?? heuristics.tags,\n };\n }\n } catch {\n // fallback to heuristics\n }\n\n return heuristics;\n }\n\n private heuristicClassification(ticket: SupportTicket): TicketClassification {\n const text = `${ticket.subject}\\n${ticket.body}`.toLowerCase();\n const category = this.detectCategory(text);\n const priority = this.detectPriority(text);\n const sentiment = this.detectSentiment(text);\n const intents = this.extractIntents(text);\n const tags = intents.slice(0, 3);\n const confidence = this.estimateConfidence(category, priority, sentiment);\n\n return {\n ticketId: ticket.id,\n category,\n priority,\n sentiment,\n intents,\n tags,\n confidence,\n escalationRequired: priority === 'urgent' || category === 'compliance',\n };\n }\n\n private detectCategory(text: string): TicketCategory {\n for (const [category, keywords] of Object.entries(this.keywords) as [\n TicketCategory,\n string[],\n ][]) {\n if (keywords.some((keyword) => text.includes(keyword))) {\n return category;\n }\n }\n return 'other';\n }\n\n private detectPriority(text: string): TicketPriority {\n for (const priority of [\n 'urgent',\n 'high',\n 'medium',\n 'low',\n ] as TicketPriority[]) {\n if (PRIORITY_HINTS[priority].some((word) => text.includes(word))) {\n return priority;\n }\n }\n return 'medium';\n }\n\n private detectSentiment(text: string): TicketSentiment {\n for (const sentiment of [\n 'frustrated',\n 'negative',\n 'neutral',\n 'positive',\n ] as TicketSentiment[]) {\n if (SENTIMENT_HINTS[sentiment].some((word) => text.includes(word))) {\n return sentiment;\n }\n }\n return 'neutral';\n }\n\n private extractIntents(text: string): string[] {\n const intents: string[] = [];\n if (text.includes('refund') || text.includes('chargeback'))\n intents.push('refund');\n if (text.includes('payout')) intents.push('payout');\n if (text.includes('login')) intents.push('login-help');\n if (text.includes('feature')) intents.push('feature-request');\n if (text.includes('bug') || text.includes('error'))\n intents.push('bug-report');\n return intents.length ? intents : ['general'];\n }\n\n private estimateConfidence(\n category: TicketCategory,\n priority: TicketPriority,\n sentiment: TicketSentiment\n ): number {\n let base = 0.6;\n if (category !== 'other') base += 0.1;\n if (priority === 'urgent' || priority === 'low') base += 0.05;\n if (sentiment === 'frustrated') base -= 0.05;\n return Math.min(0.95, Math.max(0.4, Number(base.toFixed(2))));\n }\n}\n"],"mappings":";AASA,MAAM,oBAAsD;CAC1D,SAAS;EAAC;EAAW;EAAU;EAAU;EAAU;EAAW;EAAU;CACxE,WAAW;EAAC;EAAO;EAAS;EAAS;EAAS;EAAU;EAAU;CAClE,SAAS;EAAC;EAAW;EAAW;EAAQ;EAAW;EAAW;CAC9D,SAAS;EAAC;EAAS;EAAY;EAAO;EAAW;EAAW;EAAe;CAC3E,YAAY;EAAC;EAAO;EAAO;EAAc;EAAc;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,aAAa;AACtD,MAAI,KAAK,SAAS,UAAU,CAAE,SAAQ,KAAK,kBAAkB;AAC7D,MAAI,KAAK,SAAS,MAAM,IAAI,KAAK,SAAS,QAAQ,CAChD,SAAQ,KAAK,aAAa;AAC5B,SAAO,QAAQ,SAAS,UAAU,CAAC,UAAU;;CAG/C,AAAQ,mBACN,UACA,UACA,WACQ;EACR,IAAI,OAAO;AACX,MAAI,aAAa,QAAS,SAAQ;AAClC,MAAI,aAAa,YAAY,aAAa,MAAO,SAAQ;AACzD,MAAI,cAAc,aAAc,SAAQ;AACxC,SAAO,KAAK,IAAI,KAAM,KAAK,IAAI,IAAK,OAAO,KAAK,QAAQ,EAAE,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.support-bot",
3
- "version": "1.46.2",
3
+ "version": "1.47.0",
4
4
  "description": "AI support bot framework with RAG and ticket management",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -11,8 +11,6 @@
11
11
  "typescript"
12
12
  ],
13
13
  "type": "module",
14
- "main": "./dist/index.js",
15
- "module": "./dist/index.js",
16
14
  "types": "./dist/index.d.ts",
17
15
  "files": [
18
16
  "dist",
@@ -29,18 +27,20 @@
29
27
  "lint": "bun lint:fix",
30
28
  "lint:fix": "eslint src --fix",
31
29
  "lint:check": "eslint src",
32
- "test": "bun run"
30
+ "test": "bun test"
33
31
  },
34
32
  "dependencies": {
35
- "@contractspec/lib.ai-agent": "1.46.2",
36
- "@contractspec/lib.contracts": "1.46.2",
37
- "@contractspec/lib.knowledge": "1.46.2",
38
- "@contractspec/lib.schema": "1.46.2"
33
+ "@ai-sdk/provider-utils": "^4.0.4",
34
+ "@contractspec/lib.ai-agent": "1.47.0",
35
+ "@contractspec/lib.contracts": "1.47.0",
36
+ "@contractspec/lib.knowledge": "1.47.0",
37
+ "@contractspec/lib.schema": "1.47.0",
38
+ "zod": "^4.3.5"
39
39
  },
40
40
  "devDependencies": {
41
- "@contractspec/tool.tsdown": "1.46.2",
42
- "@contractspec/tool.typescript": "1.46.2",
43
- "tsdown": "^0.18.3",
41
+ "@contractspec/tool.tsdown": "1.47.0",
42
+ "@contractspec/tool.typescript": "1.47.0",
43
+ "tsdown": "^0.19.0",
44
44
  "typescript": "^5.9.3"
45
45
  },
46
46
  "exports": {