@contractspec/lib.support-bot 1.62.0 → 2.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.
@@ -1,4 +1,4 @@
1
- import type { LLMProvider } from '@contractspec/lib.contracts/integrations/providers/llm';
1
+ import type { LLMProvider } from '@contractspec/lib.contracts-integrations';
2
2
  import type { SupportResponseDraft, SupportResolution, SupportTicket, TicketClassification } from '../types';
3
3
  export interface AutoResponderOptions {
4
4
  llm?: LLMProvider;
@@ -19,4 +19,3 @@ export declare class AutoResponder {
19
19
  private renderCategoryIntro;
20
20
  private renderCitations;
21
21
  }
22
- //# sourceMappingURL=auto-responder.d.ts.map
@@ -13,4 +13,3 @@ export declare class SupportFeedbackLoop {
13
13
  metrics(): FeedbackMetrics;
14
14
  feedbackSummary(limit?: number): string;
15
15
  }
16
- //# sourceMappingURL=feedback-loop.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export * from './auto-responder';
2
2
  export * from './feedback-loop';
3
3
  export * from './tools';
4
- //# sourceMappingURL=index.d.ts.map
@@ -8,4 +8,3 @@ export interface SupportToolsetOptions {
8
8
  responder: AutoResponder;
9
9
  }
10
10
  export declare function createSupportTools(options: SupportToolsetOptions): Tool[];
11
- //# sourceMappingURL=tools.d.ts.map
@@ -262,7 +262,7 @@ function createSupportTools(options) {
262
262
  return [classifyTool, resolveTool, responderTool];
263
263
  }
264
264
  // src/spec.ts
265
- import { defineAgent } from "@contractspec/lib.ai-agent";
265
+ import { defineAgent } from "@contractspec/lib.ai-agent/spec";
266
266
  function defineSupportBot(definition) {
267
267
  const base = defineAgent({
268
268
  ...definition.base,
@@ -1,5 +1,5 @@
1
1
  // src/spec.ts
2
- import { defineAgent } from "@contractspec/lib.ai-agent";
2
+ import { defineAgent } from "@contractspec/lib.ai-agent/spec";
3
3
  function defineSupportBot(definition) {
4
4
  const base = defineAgent({
5
5
  ...definition.base,
package/dist/index.d.ts CHANGED
@@ -3,4 +3,3 @@ export * from './spec';
3
3
  export * from './rag';
4
4
  export * from './tickets';
5
5
  export * from './bot';
6
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -263,7 +263,7 @@ function createSupportTools(options) {
263
263
  return [classifyTool, resolveTool, responderTool];
264
264
  }
265
265
  // src/spec.ts
266
- import { defineAgent } from "@contractspec/lib.ai-agent";
266
+ import { defineAgent } from "@contractspec/lib.ai-agent/spec";
267
267
  function defineSupportBot(definition) {
268
268
  const base = defineAgent({
269
269
  ...definition.base,
@@ -262,7 +262,7 @@ function createSupportTools(options) {
262
262
  return [classifyTool, resolveTool, responderTool];
263
263
  }
264
264
  // src/spec.ts
265
- import { defineAgent } from "@contractspec/lib.ai-agent";
265
+ import { defineAgent } from "@contractspec/lib.ai-agent/spec";
266
266
  function defineSupportBot(definition) {
267
267
  const base = defineAgent({
268
268
  ...definition.base,
package/dist/node/spec.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/spec.ts
2
- import { defineAgent } from "@contractspec/lib.ai-agent";
2
+ import { defineAgent } from "@contractspec/lib.ai-agent/spec";
3
3
  function defineSupportBot(definition) {
4
4
  const base = defineAgent({
5
5
  ...definition.base,
@@ -1,2 +1 @@
1
1
  export * from './ticket-resolver';
2
- //# sourceMappingURL=index.d.ts.map
@@ -18,4 +18,3 @@ export declare class TicketResolver {
18
18
  private toResolution;
19
19
  private deriveConfidence;
20
20
  }
21
- //# sourceMappingURL=ticket-resolver.d.ts.map
package/dist/spec.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AgentSpec, AgentToolConfig } from '@contractspec/lib.ai-agent';
1
+ import type { AgentSpec, AgentToolConfig } from '@contractspec/lib.ai-agent/spec';
2
2
  import type { SupportBotSpec } from './types';
3
3
  export interface SupportBotDefinition {
4
4
  base: AgentSpec;
@@ -6,4 +6,3 @@ export interface SupportBotDefinition {
6
6
  autoEscalateThreshold?: number;
7
7
  }
8
8
  export declare function defineSupportBot(definition: SupportBotDefinition): SupportBotSpec;
9
- //# sourceMappingURL=spec.d.ts.map
package/dist/spec.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
2
  // src/spec.ts
3
- import { defineAgent } from "@contractspec/lib.ai-agent";
3
+ import { defineAgent } from "@contractspec/lib.ai-agent/spec";
4
4
  function defineSupportBot(definition) {
5
5
  const base = defineAgent({
6
6
  ...definition.base,
@@ -1,4 +1,4 @@
1
- import type { LLMProvider } from '@contractspec/lib.contracts/integrations/providers/llm';
1
+ import type { LLMProvider } from '@contractspec/lib.contracts-integrations';
2
2
  import type { SupportTicket, TicketCategory, TicketClassification } from '../types';
3
3
  export interface TicketClassifierOptions {
4
4
  keywords?: Partial<Record<TicketCategory, string[]>>;
@@ -18,4 +18,3 @@ export declare class TicketClassifier {
18
18
  private extractIntents;
19
19
  private estimateConfidence;
20
20
  }
21
- //# sourceMappingURL=classifier.d.ts.map
@@ -1,2 +1 @@
1
1
  export * from './classifier';
2
- //# sourceMappingURL=index.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AgentSpec } from '@contractspec/lib.ai-agent';
1
+ import type { AgentSpec } from '@contractspec/lib.ai-agent/spec';
2
2
  export type TicketPriority = 'low' | 'medium' | 'high' | 'urgent';
3
3
  export type TicketCategory = 'billing' | 'technical' | 'product' | 'account' | 'compliance' | 'other';
4
4
  export type TicketChannel = 'email' | 'chat' | 'phone' | 'portal';
@@ -69,4 +69,3 @@ export interface ResolutionResultPayload extends ClassificationResultPayload {
69
69
  resolution: SupportResolution;
70
70
  draft: SupportResponseDraft;
71
71
  }
72
- //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.support-bot",
3
- "version": "1.62.0",
3
+ "version": "2.1.0",
4
4
  "description": "AI support bot framework with RAG and ticket management",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -27,22 +27,23 @@
27
27
  "lint": "bun lint:fix",
28
28
  "lint:fix": "eslint src --fix",
29
29
  "lint:check": "eslint src",
30
- "test": "bun test",
30
+ "test": "bun test --pass-with-no-tests",
31
31
  "prebuild": "contractspec-bun-build prebuild",
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@ai-sdk/provider-utils": "^4.0.14",
36
- "@contractspec/lib.ai-agent": "1.62.0",
37
- "@contractspec/lib.contracts": "1.62.0",
38
- "@contractspec/lib.knowledge": "1.62.0",
39
- "@contractspec/lib.schema": "1.62.0",
35
+ "@ai-sdk/provider-utils": "^4.0.15",
36
+ "@contractspec/lib.ai-agent": "2.1.0",
37
+ "@contractspec/lib.contracts-spec": "2.1.0",
38
+ "@contractspec/lib.contracts-integrations": "2.1.0",
39
+ "@contractspec/lib.knowledge": "2.1.0",
40
+ "@contractspec/lib.schema": "2.1.0",
40
41
  "zod": "^4.3.5"
41
42
  },
42
43
  "devDependencies": {
43
- "@contractspec/tool.typescript": "1.62.0",
44
+ "@contractspec/tool.typescript": "2.1.0",
44
45
  "typescript": "^5.9.3",
45
- "@contractspec/tool.bun": "1.61.0"
46
+ "@contractspec/tool.bun": "2.1.0"
46
47
  },
47
48
  "exports": {
48
49
  ".": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-responder.d.ts","sourceRoot":"","sources":["../../src/bot/auto-responder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAwB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,CAAC,EAAE,oBAAoB;IAWpC,KAAK,CACT,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,iBAAiB,EAC7B,cAAc,EAAE,oBAAoB,GACnC,OAAO,CAAC,oBAAoB,CAAC;YAOlB,eAAe;IA0C7B,OAAO,CAAC,gBAAgB;IAwBxB,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,eAAe;CASxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"feedback-loop.d.ts","sourceRoot":"","sources":["../../src/bot/feedback-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA6B;IAE3D,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,EAAE,cAAc,CAAC,EAAE,MAAM;IAO1E,OAAO,IAAI,eAAe;IA6B1B,eAAe,CAAC,KAAK,SAAI,GAAG,MAAM;CAcnC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bot/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/bot/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAWtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAmFnD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,cAAc,CAAC;IACzB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,EAAE,CA0DzE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rag/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ticket-resolver.d.ts","sourceRoot":"","sources":["../../src/rag/ticket-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEjE,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAE5B,OAAO,EAAE,qBAAqB;IAMpC,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMhE,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,YAAY;IA0CpB,OAAO,CAAC,gBAAgB;CASzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,oBAAoB,GAC/B,cAAc,CA8BhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../src/tickets/classifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EAGd,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAyBlB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACrD,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmC;IAC5D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;gBAEvB,OAAO,CAAC,EAAE,uBAAuB;IASvC,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiDpE,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,kBAAkB;CAW3B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tickets/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,YAAY,GACZ,OAAO,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,SAAS,GACT,UAAU,GACV,YAAY,CAAC;AAEjB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CA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