@contractspec/example.ai-support-bot 3.7.19 → 3.7.21
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/.turbo/turbo-build.log +35 -34
- package/CHANGELOG.md +28 -0
- package/dist/ai-support-bot.feature.js +1 -1
- package/dist/browser/ai-support-bot.feature.js +1 -1
- package/dist/browser/example.js +1 -1
- package/dist/browser/index.js +2 -2
- package/dist/example.d.ts +3 -2
- package/dist/example.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/node/ai-support-bot.feature.js +1 -1
- package/dist/node/example.js +1 -1
- package/dist/node/index.js +2 -2
- package/package.json +6 -6
- package/src/ai-support-bot.feature.ts +1 -1
- package/src/example.ts +16 -20
- package/src/index.ts +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
./
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
./
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
./
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
./
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build prebuild[0m
|
|
3
|
+
[0m[2m[35m$[0m [2m[1mbun run build:bundle && bun run build:types[0m
|
|
4
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build transpile[0m
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=6 noBundle=false
|
|
6
|
+
[32mBundled 6 modules in 22ms[0m
|
|
7
|
+
|
|
8
|
+
[34m./ai-support-bot.feature.js[0m 0.53 KB [2m(entry point)[0m
|
|
9
|
+
[34m./index.js[0m 3.29 KB [2m(entry point)[0m
|
|
10
|
+
[34mdocs/index.js[0m 1.17 KB [2m(entry point)[0m
|
|
11
|
+
[34mdocs/ai-support-bot.docblock.js[0m 1.17 KB [2m(entry point)[0m
|
|
12
|
+
[34m./example.js[0m 0.67 KB [2m(entry point)[0m
|
|
13
|
+
[34m./setup.js[0m 0.95 KB [2m(entry point)[0m
|
|
14
|
+
|
|
15
|
+
[contractspec-bun-build] transpile target=node root=src entries=6 noBundle=false
|
|
16
|
+
[32mBundled 6 modules in 29ms[0m
|
|
17
|
+
|
|
18
|
+
[34m./ai-support-bot.feature.js[0m 0.53 KB [2m(entry point)[0m
|
|
19
|
+
[34m./index.js[0m 3.27 KB [2m(entry point)[0m
|
|
20
|
+
[34mdocs/index.js[0m 1.16 KB [2m(entry point)[0m
|
|
21
|
+
[34mdocs/ai-support-bot.docblock.js[0m 1.16 KB [2m(entry point)[0m
|
|
22
|
+
[34m./example.js[0m 0.67 KB [2m(entry point)[0m
|
|
23
|
+
[34m./setup.js[0m 0.94 KB [2m(entry point)[0m
|
|
24
|
+
|
|
25
|
+
[contractspec-bun-build] transpile target=browser root=src entries=6 noBundle=false
|
|
26
|
+
[32mBundled 6 modules in 25ms[0m
|
|
27
|
+
|
|
28
|
+
[34m./ai-support-bot.feature.js[0m 0.53 KB [2m(entry point)[0m
|
|
29
|
+
[34m./index.js[0m 3.27 KB [2m(entry point)[0m
|
|
30
|
+
[34mdocs/index.js[0m 1.16 KB [2m(entry point)[0m
|
|
31
|
+
[34mdocs/ai-support-bot.docblock.js[0m 1.16 KB [2m(entry point)[0m
|
|
32
|
+
[34m./example.js[0m 0.67 KB [2m(entry point)[0m
|
|
33
|
+
[34m./setup.js[0m 0.94 KB [2m(entry point)[0m
|
|
34
|
+
|
|
35
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build types[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @contractspec/example.ai-support-bot
|
|
2
2
|
|
|
3
|
+
## 3.7.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: auto-bump internal dependents
|
|
8
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
9
|
+
- Updated dependencies because of Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
|
|
10
|
+
- Updated dependencies because of Add ThemeSpec light/dark modes and a design-system Tailwind bridge for CSS variables, presets, CSS text, and OKLCH color pass-through.
|
|
11
|
+
- Updated dependencies because of Add a canonical typed result system for ContractSpec success and failure propagation across operations, workflows, jobs, server adapters, MCP, GraphQL, and React clients.
|
|
12
|
+
- @contractspec/lib.knowledge@3.7.21
|
|
13
|
+
- @contractspec/lib.logger@3.7.14
|
|
14
|
+
- @contractspec/lib.support-bot@4.0.1
|
|
15
|
+
- @contractspec/lib.contracts-spec@5.5.0
|
|
16
|
+
|
|
17
|
+
## 3.7.20
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- chore: auto-bump internal dependents
|
|
22
|
+
- Updated dependencies because of Add a family-aware ContractSpec Adoption Engine, expand contract authoring targets across CLI and VS Code tooling, and refresh release-facing schema and policy artifacts for downstream workspaces.
|
|
23
|
+
- Updated dependencies because of Improve app-config, theme, and feature authoring with explicit validation APIs, first-class theme discovery and scaffolding, and key-based app-config generation across contracts, workspace tooling, and the CLI.
|
|
24
|
+
- Updated dependencies because of Refresh root, package, website, and LLM-facing docs so Connect, Builder, release capsules, and the current contracts-spec export surface stay aligned.
|
|
25
|
+
- Updated dependencies because of Persist canonical knowledge payload text during indexing and align the retrieval/query docs with the corrected behavior.
|
|
26
|
+
- Updated dependencies because of Harden support-bot runtime validation, align responder prompts with i18n, and replace the overloaded support-bot threshold config with explicit semantics.
|
|
27
|
+
- @contractspec/lib.contracts-spec@5.4.0
|
|
28
|
+
- @contractspec/lib.knowledge@3.7.20
|
|
29
|
+
- @contractspec/lib.support-bot@4.0.0
|
|
30
|
+
|
|
3
31
|
## 3.7.19
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});export{j as AiSupportBotFeature};
|
|
2
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});export{j as AiSupportBotFeature};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});export{j as AiSupportBotFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});export{j as AiSupportBotFeature};
|
package/dist/browser/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"
|
|
1
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"examples.ai-support-bot",version:"1.0.0",title:"Ai Support Bot",description:"AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","ai-support-bot"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.ai-support-bot"}}),q=h;export{q as default,h as ExamplesAiSupportBotExample};
|
package/dist/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineFeature as
|
|
1
|
+
import{defineFeature as I}from"@contractspec/lib.contracts-spec/features";var _=I({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});import{registerDocBlocks as J}from"@contractspec/lib.contracts-spec/docs";var K=[{id:"docs.examples.ai-support-bot",title:"AI Support Bot (example)",summary:"Ticket classification + knowledge-grounded resolution + response drafting.",kind:"reference",visibility:"public",route:"/docs/examples/ai-support-bot",tags:["support","ai","example"],body:`## What this example shows
|
|
2
2
|
- Classify a ticket into a support category.
|
|
3
3
|
- Use a knowledge port to generate a grounded resolution.
|
|
4
4
|
- Draft a response (email body) from the resolution.
|
|
@@ -11,4 +11,4 @@ import{defineFeature as H}from"@contractspec/lib.contracts-spec";var Y=H({meta:{
|
|
|
11
11
|
|
|
12
12
|
## Notes
|
|
13
13
|
- Keep outputs structured.
|
|
14
|
-
- Use policy gates before exposing drafted replies to end-users.`}];
|
|
14
|
+
- Use policy gates before exposing drafted replies to end-users.`}];J(K);import{defineExample as M}from"@contractspec/lib.contracts-spec/examples";var N=M({meta:{key:"examples.ai-support-bot",version:"1.0.0",title:"Ai Support Bot",description:"AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","ai-support-bot"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.ai-support-bot"}}),O=N;import{Logger as P,LogLevel as Q}from"@contractspec/lib.logger";import{AutoResponder as U}from"@contractspec/lib.support-bot/bot";import{TicketResolver as V}from"@contractspec/lib.support-bot/rag";import{TicketClassifier as W}from"@contractspec/lib.support-bot/tickets";var X=new P({level:Q.INFO,environment:"production",enableColors:!1});async function v(){let y=new V({knowledge:{async query(H){return{answer:`The payout will retrigger automatically. (${H.slice(0,40)}…)`,references:[]}}}}),z=new W,G=new U,m={id:"TIC-42",subject:"Payout failed",body:"Hello, our supplier payout failed twice yesterday. Can you confirm status? It is urgent.",channel:"email",customerName:"Ivy",metadata:{accountId:"acct_789"}},h=await z.classify(m),j=await y.resolve(m),w=await G.draft(m,j,h);X.info("Support bot run completed",{ticketId:m.id,classification:h,resolution:j,emailDraft:{subject:w.subject,body:w.body}})}export{v as runAiSupportBotExample,O as example,N as ExamplesAiSupportBotExample,_ as AiSupportBotFeature};
|
package/dist/example.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const ExamplesAiSupportBotExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
|
|
2
|
+
export default ExamplesAiSupportBotExample;
|
|
3
|
+
export { ExamplesAiSupportBotExample };
|
package/dist/example.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"
|
|
2
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"examples.ai-support-bot",version:"1.0.0",title:"Ai Support Bot",description:"AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","ai-support-bot"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.ai-support-bot"}}),q=h;export{q as default,h as ExamplesAiSupportBotExample};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineFeature as
|
|
2
|
+
import{defineFeature as I}from"@contractspec/lib.contracts-spec/features";var _=I({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});import{registerDocBlocks as J}from"@contractspec/lib.contracts-spec/docs";var K=[{id:"docs.examples.ai-support-bot",title:"AI Support Bot (example)",summary:"Ticket classification + knowledge-grounded resolution + response drafting.",kind:"reference",visibility:"public",route:"/docs/examples/ai-support-bot",tags:["support","ai","example"],body:`## What this example shows
|
|
3
3
|
- Classify a ticket into a support category.
|
|
4
4
|
- Use a knowledge port to generate a grounded resolution.
|
|
5
5
|
- Draft a response (email body) from the resolution.
|
|
@@ -12,4 +12,4 @@ import{defineFeature as H}from"@contractspec/lib.contracts-spec";var Y=H({meta:{
|
|
|
12
12
|
|
|
13
13
|
## Notes
|
|
14
14
|
- Keep outputs structured.
|
|
15
|
-
- Use policy gates before exposing drafted replies to end-users.`}];
|
|
15
|
+
- Use policy gates before exposing drafted replies to end-users.`}];J(K);import{defineExample as M}from"@contractspec/lib.contracts-spec/examples";var N=M({meta:{key:"examples.ai-support-bot",version:"1.0.0",title:"Ai Support Bot",description:"AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","ai-support-bot"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.ai-support-bot"}}),O=N;import{Logger as P,LogLevel as Q}from"@contractspec/lib.logger";import{AutoResponder as U}from"@contractspec/lib.support-bot/bot";import{TicketResolver as V}from"@contractspec/lib.support-bot/rag";import{TicketClassifier as W}from"@contractspec/lib.support-bot/tickets";var X=new P({level:Q.INFO,environment:"production",enableColors:!1});async function v(){let y=new V({knowledge:{async query(H){return{answer:`The payout will retrigger automatically. (${H.slice(0,40)}\u2026)`,references:[]}}}}),z=new W,G=new U,m={id:"TIC-42",subject:"Payout failed",body:"Hello, our supplier payout failed twice yesterday. Can you confirm status? It is urgent.",channel:"email",customerName:"Ivy",metadata:{accountId:"acct_789"}},h=await z.classify(m),j=await y.resolve(m),w=await G.draft(m,j,h);X.info("Support bot run completed",{ticketId:m.id,classification:h,resolution:j,emailDraft:{subject:w.subject,body:w.body}})}export{v as runAiSupportBotExample,O as example,N as ExamplesAiSupportBotExample,_ as AiSupportBotFeature};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});export{j as AiSupportBotFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});export{j as AiSupportBotFeature};
|
package/dist/node/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"ai-support-bot",version:"1.0.0",title:"
|
|
1
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec/examples";var h=g({meta:{key:"examples.ai-support-bot",version:"1.0.0",title:"Ai Support Bot",description:"AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","ai-support-bot"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.ai-support-bot"}}),q=h;export{q as default,h as ExamplesAiSupportBotExample};
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineFeature as
|
|
1
|
+
import{defineFeature as I}from"@contractspec/lib.contracts-spec/features";var _=I({meta:{key:"ai-support-bot",version:"1.0.0",title:"AI Support Bot",description:"AI support ticket classification and resolution using grounded knowledge",domain:"support",owners:["@examples"],tags:["ai","support","knowledge","tickets"],stability:"experimental"},knowledge:[{key:"ai-support-bot.knowledge.articles",version:"1.0.0"}],docs:["docs.examples.ai-support-bot","docs.examples.ai-support-bot.usage"]});import{registerDocBlocks as J}from"@contractspec/lib.contracts-spec/docs";var K=[{id:"docs.examples.ai-support-bot",title:"AI Support Bot (example)",summary:"Ticket classification + knowledge-grounded resolution + response drafting.",kind:"reference",visibility:"public",route:"/docs/examples/ai-support-bot",tags:["support","ai","example"],body:`## What this example shows
|
|
2
2
|
- Classify a ticket into a support category.
|
|
3
3
|
- Use a knowledge port to generate a grounded resolution.
|
|
4
4
|
- Draft a response (email body) from the resolution.
|
|
@@ -11,4 +11,4 @@ import{defineFeature as H}from"@contractspec/lib.contracts-spec";var Y=H({meta:{
|
|
|
11
11
|
|
|
12
12
|
## Notes
|
|
13
13
|
- Keep outputs structured.
|
|
14
|
-
- Use policy gates before exposing drafted replies to end-users.`}];
|
|
14
|
+
- Use policy gates before exposing drafted replies to end-users.`}];J(K);import{defineExample as M}from"@contractspec/lib.contracts-spec/examples";var N=M({meta:{key:"examples.ai-support-bot",version:"1.0.0",title:"Ai Support Bot",description:"AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","ai-support-bot"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.ai-support-bot"}}),O=N;import{Logger as P,LogLevel as Q}from"@contractspec/lib.logger";import{AutoResponder as U}from"@contractspec/lib.support-bot/bot";import{TicketResolver as V}from"@contractspec/lib.support-bot/rag";import{TicketClassifier as W}from"@contractspec/lib.support-bot/tickets";var X=new P({level:Q.INFO,environment:"production",enableColors:!1});async function v(){let y=new V({knowledge:{async query(H){return{answer:`The payout will retrigger automatically. (${H.slice(0,40)}…)`,references:[]}}}}),z=new W,G=new U,m={id:"TIC-42",subject:"Payout failed",body:"Hello, our supplier payout failed twice yesterday. Can you confirm status? It is urgent.",channel:"email",customerName:"Ivy",metadata:{accountId:"acct_789"}},h=await z.classify(m),j=await y.resolve(m),w=await G.draft(m,j,h);X.info("Support bot run completed",{ticketId:m.id,classification:h,resolution:j,emailDraft:{subject:w.subject,body:w.body}})}export{v as runAiSupportBotExample,O as example,N as ExamplesAiSupportBotExample,_ as AiSupportBotFeature};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.ai-support-bot",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.21",
|
|
4
4
|
"description": "AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"typecheck": "tsc --noEmit"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@contractspec/lib.support-bot": "
|
|
68
|
-
"@contractspec/lib.knowledge": "3.7.
|
|
69
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
70
|
-
"@contractspec/lib.logger": "3.7.
|
|
67
|
+
"@contractspec/lib.support-bot": "4.0.1",
|
|
68
|
+
"@contractspec/lib.knowledge": "3.7.21",
|
|
69
|
+
"@contractspec/lib.contracts-spec": "5.5.0",
|
|
70
|
+
"@contractspec/lib.logger": "3.7.14"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@contractspec/tool.typescript": "3.7.13",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
|
-
"@contractspec/tool.bun": "3.7.
|
|
75
|
+
"@contractspec/tool.bun": "3.7.15"
|
|
76
76
|
},
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public",
|
package/src/example.ts
CHANGED
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
import { defineExample } from '@contractspec/lib.contracts-spec';
|
|
1
|
+
import { defineExample } from '@contractspec/lib.contracts-spec/examples';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const ExamplesAiSupportBotExample = defineExample({
|
|
4
4
|
meta: {
|
|
5
|
-
key: 'ai-support-bot',
|
|
5
|
+
key: 'examples.ai-support-bot',
|
|
6
6
|
version: '1.0.0',
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Ai Support Bot',
|
|
8
8
|
description:
|
|
9
|
-
'
|
|
10
|
-
kind: '
|
|
11
|
-
visibility: '
|
|
9
|
+
'AI support bot example: classify and resolve a support ticket using @contractspec/lib.support-bot.',
|
|
10
|
+
kind: 'template',
|
|
11
|
+
visibility: 'experimental',
|
|
12
12
|
stability: 'experimental',
|
|
13
|
-
owners: ['@
|
|
14
|
-
tags: ['
|
|
13
|
+
owners: ['@contractspec-core'],
|
|
14
|
+
tags: ['package', 'examples', 'ai-support-bot'],
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
surfaces: {
|
|
17
|
+
templates: true,
|
|
18
|
+
sandbox: { enabled: true, modes: ['playground', 'specs'] },
|
|
19
|
+
studio: { enabled: false, installable: false },
|
|
20
|
+
mcp: { enabled: false },
|
|
19
21
|
},
|
|
20
22
|
entrypoints: {
|
|
21
23
|
packageName: '@contractspec/example.ai-support-bot',
|
|
22
|
-
docs: './docs',
|
|
23
|
-
},
|
|
24
|
-
surfaces: {
|
|
25
|
-
templates: true,
|
|
26
|
-
sandbox: { enabled: true, modes: ['markdown'] },
|
|
27
|
-
studio: { enabled: true, installable: true },
|
|
28
|
-
mcp: { enabled: true },
|
|
29
24
|
},
|
|
30
25
|
});
|
|
31
26
|
|
|
32
|
-
export default
|
|
27
|
+
export default ExamplesAiSupportBotExample;
|
|
28
|
+
export { ExamplesAiSupportBotExample };
|