@ddse/acm-examples 0.5.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.
Files changed (182) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/bin/acm-demo.ts +495 -0
  4. package/data/coaching/agents.json +16 -0
  5. package/data/coaching/transcripts.json +37 -0
  6. package/data/documents.json +72 -0
  7. package/data/entitlement/customers.json +38 -0
  8. package/data/entitlement/policies.json +38 -0
  9. package/data/incidents/incidents.json +30 -0
  10. package/data/incidents/routing_rules.json +36 -0
  11. package/data/invoices/invoices.json +38 -0
  12. package/data/invoices/purchase-orders.json +38 -0
  13. package/data/issues.json +99 -0
  14. package/data/knowledge/docs/kb-001.md +7 -0
  15. package/data/knowledge/docs/kb-002.md +7 -0
  16. package/data/knowledge/docs/kb-003.md +9 -0
  17. package/data/knowledge/index.json +25 -0
  18. package/data/orders.json +106 -0
  19. package/dist/bin/acm-demo.d.ts +3 -0
  20. package/dist/bin/acm-demo.d.ts.map +1 -0
  21. package/dist/bin/acm-demo.js +392 -0
  22. package/dist/bin/acm-demo.js.map +1 -0
  23. package/dist/src/context/directives.d.ts +3 -0
  24. package/dist/src/context/directives.d.ts.map +1 -0
  25. package/dist/src/context/directives.js +325 -0
  26. package/dist/src/context/directives.js.map +1 -0
  27. package/dist/src/context/index.d.ts +2 -0
  28. package/dist/src/context/index.d.ts.map +1 -0
  29. package/dist/src/context/index.js +2 -0
  30. package/dist/src/context/index.js.map +1 -0
  31. package/dist/src/data/coaching.d.ts +19 -0
  32. package/dist/src/data/coaching.d.ts.map +1 -0
  33. package/dist/src/data/coaching.js +22 -0
  34. package/dist/src/data/coaching.js.map +1 -0
  35. package/dist/src/data/entitlement.d.ts +25 -0
  36. package/dist/src/data/entitlement.d.ts.map +1 -0
  37. package/dist/src/data/entitlement.js +26 -0
  38. package/dist/src/data/entitlement.js.map +1 -0
  39. package/dist/src/data/incidents.d.ts +23 -0
  40. package/dist/src/data/incidents.d.ts.map +1 -0
  41. package/dist/src/data/incidents.js +37 -0
  42. package/dist/src/data/incidents.js.map +1 -0
  43. package/dist/src/data/invoices.d.ts +34 -0
  44. package/dist/src/data/invoices.d.ts.map +1 -0
  45. package/dist/src/data/invoices.js +49 -0
  46. package/dist/src/data/invoices.js.map +1 -0
  47. package/dist/src/data/knowledge.d.ts +11 -0
  48. package/dist/src/data/knowledge.d.ts.map +1 -0
  49. package/dist/src/data/knowledge.js +57 -0
  50. package/dist/src/data/knowledge.js.map +1 -0
  51. package/dist/src/data/loader.d.ts +4 -0
  52. package/dist/src/data/loader.d.ts.map +1 -0
  53. package/dist/src/data/loader.js +69 -0
  54. package/dist/src/data/loader.js.map +1 -0
  55. package/dist/src/examples/scenarios.d.ts +23 -0
  56. package/dist/src/examples/scenarios.d.ts.map +1 -0
  57. package/dist/src/examples/scenarios.js +609 -0
  58. package/dist/src/examples/scenarios.js.map +1 -0
  59. package/dist/src/goals/index.d.ts +8 -0
  60. package/dist/src/goals/index.d.ts.map +1 -0
  61. package/dist/src/goals/index.js +12 -0
  62. package/dist/src/goals/index.js.map +1 -0
  63. package/dist/src/policy.d.ts +5 -0
  64. package/dist/src/policy.d.ts.map +1 -0
  65. package/dist/src/policy.js +24 -0
  66. package/dist/src/policy.js.map +1 -0
  67. package/dist/src/registries.d.ts +18 -0
  68. package/dist/src/registries.d.ts.map +1 -0
  69. package/dist/src/registries.js +38 -0
  70. package/dist/src/registries.js.map +1 -0
  71. package/dist/src/renderer.d.ts +9 -0
  72. package/dist/src/renderer.d.ts.map +1 -0
  73. package/dist/src/renderer.js +76 -0
  74. package/dist/src/renderer.js.map +1 -0
  75. package/dist/src/search/bm25.d.ts +68 -0
  76. package/dist/src/search/bm25.d.ts.map +1 -0
  77. package/dist/src/search/bm25.js +131 -0
  78. package/dist/src/search/bm25.js.map +1 -0
  79. package/dist/src/search/index.d.ts +2 -0
  80. package/dist/src/search/index.d.ts.map +1 -0
  81. package/dist/src/search/index.js +3 -0
  82. package/dist/src/search/index.js.map +1 -0
  83. package/dist/src/tasks/coaching.d.ts +30 -0
  84. package/dist/src/tasks/coaching.d.ts.map +1 -0
  85. package/dist/src/tasks/coaching.js +143 -0
  86. package/dist/src/tasks/coaching.js.map +1 -0
  87. package/dist/src/tasks/entitlement.d.ts +29 -0
  88. package/dist/src/tasks/entitlement.d.ts.map +1 -0
  89. package/dist/src/tasks/entitlement.js +135 -0
  90. package/dist/src/tasks/entitlement.js.map +1 -0
  91. package/dist/src/tasks/incidents.d.ts +42 -0
  92. package/dist/src/tasks/incidents.d.ts.map +1 -0
  93. package/dist/src/tasks/incidents.js +189 -0
  94. package/dist/src/tasks/incidents.js.map +1 -0
  95. package/dist/src/tasks/index.d.ts +7 -0
  96. package/dist/src/tasks/index.d.ts.map +1 -0
  97. package/dist/src/tasks/index.js +7 -0
  98. package/dist/src/tasks/index.js.map +1 -0
  99. package/dist/src/tasks/invoices.d.ts +40 -0
  100. package/dist/src/tasks/invoices.d.ts.map +1 -0
  101. package/dist/src/tasks/invoices.js +180 -0
  102. package/dist/src/tasks/invoices.js.map +1 -0
  103. package/dist/src/tasks/knowledge.d.ts +23 -0
  104. package/dist/src/tasks/knowledge.d.ts.map +1 -0
  105. package/dist/src/tasks/knowledge.js +115 -0
  106. package/dist/src/tasks/knowledge.js.map +1 -0
  107. package/dist/src/tasks/legacy.d.ts +50 -0
  108. package/dist/src/tasks/legacy.d.ts.map +1 -0
  109. package/dist/src/tasks/legacy.js +85 -0
  110. package/dist/src/tasks/legacy.js.map +1 -0
  111. package/dist/src/tools/coaching/index.d.ts +49 -0
  112. package/dist/src/tools/coaching/index.d.ts.map +1 -0
  113. package/dist/src/tools/coaching/index.js +119 -0
  114. package/dist/src/tools/coaching/index.js.map +1 -0
  115. package/dist/src/tools/entitlement/index.d.ts +52 -0
  116. package/dist/src/tools/entitlement/index.d.ts.map +1 -0
  117. package/dist/src/tools/entitlement/index.js +120 -0
  118. package/dist/src/tools/entitlement/index.js.map +1 -0
  119. package/dist/src/tools/incidents/index.d.ts +55 -0
  120. package/dist/src/tools/incidents/index.d.ts.map +1 -0
  121. package/dist/src/tools/incidents/index.js +109 -0
  122. package/dist/src/tools/incidents/index.js.map +1 -0
  123. package/dist/src/tools/index.d.ts +90 -0
  124. package/dist/src/tools/index.d.ts.map +1 -0
  125. package/dist/src/tools/index.js +109 -0
  126. package/dist/src/tools/index.js.map +1 -0
  127. package/dist/src/tools/invoices/index.d.ts +56 -0
  128. package/dist/src/tools/invoices/index.d.ts.map +1 -0
  129. package/dist/src/tools/invoices/index.js +85 -0
  130. package/dist/src/tools/invoices/index.js.map +1 -0
  131. package/dist/src/tools/knowledge/index.d.ts +52 -0
  132. package/dist/src/tools/knowledge/index.d.ts.map +1 -0
  133. package/dist/src/tools/knowledge/index.js +120 -0
  134. package/dist/src/tools/knowledge/index.js.map +1 -0
  135. package/dist/tests/bm25.test.d.ts +2 -0
  136. package/dist/tests/bm25.test.d.ts.map +1 -0
  137. package/dist/tests/bm25.test.js +98 -0
  138. package/dist/tests/bm25.test.js.map +1 -0
  139. package/dist/tests/integration.test.d.ts +2 -0
  140. package/dist/tests/integration.test.d.ts.map +1 -0
  141. package/dist/tests/integration.test.js +126 -0
  142. package/dist/tests/integration.test.js.map +1 -0
  143. package/dist/tests/plan-hydration.test.d.ts +2 -0
  144. package/dist/tests/plan-hydration.test.d.ts.map +1 -0
  145. package/dist/tests/plan-hydration.test.js +28 -0
  146. package/dist/tests/plan-hydration.test.js.map +1 -0
  147. package/dist/tsconfig.tsbuildinfo +1 -0
  148. package/docs/examples-architecture.md +144 -0
  149. package/docs/successrun.md +1022 -0
  150. package/package.json +33 -0
  151. package/src/context/directives.ts +366 -0
  152. package/src/context/index.ts +1 -0
  153. package/src/data/coaching.ts +50 -0
  154. package/src/data/entitlement.ts +60 -0
  155. package/src/data/incidents.ts +78 -0
  156. package/src/data/invoices.ts +103 -0
  157. package/src/data/knowledge.ts +77 -0
  158. package/src/data/loader.ts +80 -0
  159. package/src/examples/scenarios.ts +724 -0
  160. package/src/goals/index.ts +18 -0
  161. package/src/policy.ts +30 -0
  162. package/src/registries.ts +48 -0
  163. package/src/renderer.ts +82 -0
  164. package/src/search/bm25.ts +173 -0
  165. package/src/search/index.ts +2 -0
  166. package/src/tasks/coaching.ts +217 -0
  167. package/src/tasks/entitlement.ts +197 -0
  168. package/src/tasks/incidents.ts +277 -0
  169. package/src/tasks/index.ts +6 -0
  170. package/src/tasks/invoices.ts +269 -0
  171. package/src/tasks/knowledge.ts +169 -0
  172. package/src/tasks/legacy.ts +112 -0
  173. package/src/tools/coaching/index.ts +197 -0
  174. package/src/tools/entitlement/index.ts +199 -0
  175. package/src/tools/incidents/index.ts +185 -0
  176. package/src/tools/index.ts +192 -0
  177. package/src/tools/invoices/index.ts +165 -0
  178. package/src/tools/knowledge/index.ts +203 -0
  179. package/tests/bm25.test.ts +129 -0
  180. package/tests/integration.test.ts +163 -0
  181. package/tests/plan-hydration.test.ts +33 -0
  182. package/tsconfig.json +18 -0
@@ -0,0 +1,1022 @@
1
+ # Successful Runs of 5 Example Scenarios
2
+
3
+ ## Scenario: Agent Coaching
4
+
5
+ ```bash
6
+
7
+ node$ pnpm --filter @ddse/acm-examples demo --scenario coaching --provider vllm --model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --base-url http://localhost:8001/v1
8
+
9
+ > @ddse/acm-examples@0.1.0 demo /mnt/backup1/home/manna/workspace/ml/ddse/ddse-composer/framework/node/packages/acm-examples
10
+ > node ./dist/bin/acm-demo.js "--scenario" "coaching" "--provider" "vllm" "--model" "Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8" "--base-url" "http://localhost:8001/v1"
11
+
12
+
13
+ 🎯 Scenario: Agent Coaching
14
+ Key: coaching
15
+ Description: Analyze a transcript for sentiment, generate coaching feedback, and log the coaching note.
16
+
17
+ 📋 Planning...
18
+
19
+
20
+
21
+ Generated 1 plan.
22
+
23
+ 📝 Planner plan summary (first plan):
24
+ {
25
+ "id": "plan-a",
26
+ "contextRef": "a7a6fc938af87d777cc724f4d919faae1db09ade6973a52b29eb563d2498101f",
27
+ "tasks": [
28
+ {
29
+ "id": "task-coaching-analyze-transcript",
30
+ "capability": "coaching.analyze_transcript",
31
+ "hasInput": true,
32
+ "inputPreview": {
33
+ "transcriptId": "TRANS-5540"
34
+ }
35
+ },
36
+ {
37
+ "id": "task-coaching-generate-feedback",
38
+ "capability": "coaching.generate_feedback",
39
+ "hasInput": true,
40
+ "inputPreview": {
41
+ "transcriptId": "TRANS-5540"
42
+ }
43
+ },
44
+ {
45
+ "id": "task-coaching-log-note",
46
+ "capability": "coaching.log_note",
47
+ "hasInput": true,
48
+ "inputPreview": {
49
+ "transcriptId": "TRANS-5540"
50
+ }
51
+ }
52
+ ]
53
+ }
54
+
55
+
56
+ ✅ Plans generated: 1
57
+ Executing plan plan-a
58
+ Context Ref: a7a6fc938af87d777cc724f4d919faae1db09ade6973a52b29eb563d2498101f
59
+ Tasks:
60
+ 1. task-coaching-analyze-transcript -> coaching.analyze_transcript
61
+ 2. task-coaching-generate-feedback -> coaching.generate_feedback
62
+ 3. task-coaching-log-note -> coaching.log_note
63
+
64
+
65
+ [task-coaching-analyze-transcript] Task started
66
+ [task-coaching-analyze-transcript] ✓ Task completed
67
+ Output: {
68
+ "transcript": {
69
+ "id": "TRANS-5540",
70
+ "agentId": "AG-883",
71
+ "customerSentiment": "NEGATIVE",
72
+ "complianceFlags": [
73
+ "DISCLOSURE_MISSED",
74
+ "CALL_TAG_MISSING"
75
+ ],
76
+ "transcript": [
77
+ "Agent: Thank you for calling Northwind Support, this is Priya.",
78
+ "Customer: I've been waiting three days for someone to unblock my fulfillment feed.",
79
+ "Agent: I can see the backlog and I'm escalating to our ops team right now.",
80
+ "Customer: This is costing me money every hour.",
81
+ "Agent: I completely understand how frustrating that is and I'm logging an urgent ticket.",
82
+ "Agent: You'll get an update within the next two hours and I'll follow up personally.",
83
+ "Customer: Please make sure someone actually reaches out this time.",
84
+ "Agent: Absolutely, I'll send you confirmation as soon as I have it."
85
+ ],
86
+ "callDurationSeconds": 780,
87
+ "followUpRequired": true
88
+ },
89
+ "sentimentScore": 0.25,
90
+ "complianceScore": 0.6499999999999999,
91
+ "complianceBreaches": [
92
+ "DISCLOSURE_MISSED",
93
+ "CALL_TAG_MISSING"
94
+ ],
95
+ "highlights": [
96
+ "Customer requested follow-up action",
97
+ "Empathy signal captured: \"Agent: I completely understand how frustrating that is and I'm logging an urgent ticket.\""
98
+ ],
99
+ "summary": "Agent: Thank you for calling Northwind Support, this is Priya. Customer: I've been waiting three days for someone to unblock my fulfillment feed. Agent: I can see the backlog and I'm escalating to our ops team right now. Customer: This is costing me money every hour. Agent: I completely understand how frustrating that is and I'm logging an urgent ticket. Agent: You'll get an update within the next two hours and I'll follow up personally."
100
+ }
101
+ 💾 Checkpoint created: checkpoint-1759727769936-nxbw1r0 (1 tasks completed)
102
+
103
+ [task-coaching-generate-feedback] Task started
104
+ [task-coaching-generate-feedback] ✓ Task completed
105
+ Output: {
106
+ "transcriptId": "TRANS-5540",
107
+ "feedbackSummary": "Overall sentiment scored at 25%. Compliance adherence at 65%.",
108
+ "actionItems": [
109
+ "Address compliance items: DISCLOSURE_MISSED, CALL_TAG_MISSING",
110
+ "Practice empathy statements to de-escalate frustrated customers",
111
+ "Acknowledge customer feelings before delivering resolution details"
112
+ ],
113
+ "escalationRequired": true
114
+ }
115
+ 💾 Checkpoint created: checkpoint-1759727769939-gvqr0cz (2 tasks completed)
116
+
117
+ [task-coaching-log-note] Task started
118
+ [task-coaching-log-note] ✓ Task completed
119
+ Output: {
120
+ "logId": "coach-1759727769941",
121
+ "agent": {
122
+ "id": "AG-883",
123
+ "name": "Priya Singh",
124
+ "region": "AMER",
125
+ "tenureMonths": 28,
126
+ "managerEmail": "luis.mendez@northwind.example"
127
+ },
128
+ "stored": true,
129
+ "escalationNotified": true,
130
+ "timestamp": "2025-10-06T05:16:09.941Z"
131
+ }
132
+ 💾 Checkpoint created: checkpoint-1759727769941-f5z4gjs (3 tasks completed)
133
+
134
+ ============================================================
135
+ EXECUTION SUMMARY
136
+ ============================================================
137
+ Total tasks: 3
138
+ Ledger entries: 25
139
+
140
+ Outputs:
141
+ task-coaching-analyze-transcript: {
142
+ "transcript": {
143
+ "id": "TRANS-5540",
144
+ "agentId": "AG-883",
145
+ "customerSentiment": "NEGATIVE",
146
+ "complianceFlags": [
147
+ "DISCLOSURE_MISSED",
148
+ "CALL_TAG_MISSING"
149
+ ],
150
+ "transcript": [
151
+ "Agent: Thank you for calling Northwind Support, this is Priya.",
152
+ "Customer: I've been waiting three days for someone to unblock my fulfillment feed.",
153
+ "Agent: I can see the backlog and I'm escalating to our ops team right now.",
154
+ "Customer: This is costing me money every hour.",
155
+ "Agent: I completely understand how frustrating that is and I'm logging an urgent ticket.",
156
+ "Agent: You'll get an update within the next two hours and I'll follow up personally.",
157
+ "Customer: Please make sure someone actually reaches out this time.",
158
+ "Agent: Absolutely, I'll send you confirmation as soon as I have it."
159
+ ],
160
+ "callDurationSeconds": 780,
161
+ "followUpRequired": true
162
+ },
163
+ "sentimentScore": 0.25,
164
+ "complianceScore": 0.6499999999999999,
165
+ "complianceBreaches": [
166
+ "DISCLOSURE_MISSED",
167
+ "CALL_TAG_MISSING"
168
+ ],
169
+ "highlights": [
170
+ "Customer requested follow-up action",
171
+ "Empathy signal captured: \"Agent: I completely understand how frustrating that is and I'm logging an urgent ticket.\""
172
+ ],
173
+ "summary": "Agent: Thank you for calling Northwind Support, this is Priya. Customer: I've been waiting three days for someone to unblock my fulfillment feed. Agent: I can see the backlog and I'm escalating to our ops team right now. Customer: This is costing me money every hour. Agent: I completely understand how frustrating that is and I'm logging an urgent ticket. Agent: You'll get an update within the next two hours and I'll follow up personally."
174
+ }
175
+ task-coaching-generate-feedback: {
176
+ "transcriptId": "TRANS-5540",
177
+ "feedbackSummary": "Overall sentiment scored at 25%. Compliance adherence at 65%.",
178
+ "actionItems": [
179
+ "Address compliance items: DISCLOSURE_MISSED, CALL_TAG_MISSING",
180
+ "Practice empathy statements to de-escalate frustrated customers",
181
+ "Acknowledge customer feelings before delivering resolution details"
182
+ ],
183
+ "escalationRequired": true
184
+ }
185
+ task-coaching-log-note: {
186
+ "logId": "coach-1759727769941",
187
+ "agent": {
188
+ "id": "AG-883",
189
+ "name": "Priya Singh",
190
+ "region": "AMER",
191
+ "tenureMonths": 28,
192
+ "managerEmail": "luis.mendez@northwind.example"
193
+ },
194
+ "stored": true,
195
+ "escalationNotified": true,
196
+ "timestamp": "2025-10-06T05:16:09.941Z"
197
+ }
198
+
199
+ ✅ Demo completed successfully!
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Scenario: Invoice Reconciliation
205
+
206
+ ```bash
207
+
208
+ node$ pnpm --filter @ddse/acm-examples demo --scenario invoices --provider vllm --model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --base-url http://localhost:8001/v1
209
+
210
+ > @ddse/acm-examples@0.1.0 demo /mnt/backup1/home/manna/workspace/ml/ddse/ddse-composer/framework/node/packages/acm-examples
211
+ > node ./dist/bin/acm-demo.js "--scenario" "invoices" "--provider" "vllm" "--model" "Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8" "--base-url" "http://localhost:8001/v1"
212
+
213
+
214
+ 🎯 Scenario: Invoice Reconciliation
215
+ Key: invoices
216
+ Description: Compare invoice line-items against a purchase order and archive the findings report.
217
+
218
+ 📋 Planning...
219
+
220
+
221
+
222
+ Generated 1 plan.
223
+
224
+ 📝 Planner plan summary (first plan):
225
+ {
226
+ "id": "plan-a",
227
+ "contextRef": "aa8cf17d82b301702e74eeea2ab76046d8dc642a9e3b2e5c039f73518fdb49ef",
228
+ "tasks": [
229
+ {
230
+ "id": "task-invoice-fetch",
231
+ "capability": "invoice.fetch",
232
+ "hasInput": true,
233
+ "inputPreview": {
234
+ "invoiceId": "INV-84721"
235
+ }
236
+ },
237
+ {
238
+ "id": "task-invoice-fetch-po",
239
+ "capability": "invoice.fetch_purchase_order",
240
+ "hasInput": true,
241
+ "inputPreview": {
242
+ "purchaseOrderId": "PO-99231"
243
+ }
244
+ },
245
+ {
246
+ "id": "task-invoice-compare-lines",
247
+ "capability": "invoice.compare_line_items",
248
+ "hasInput": false,
249
+ "inputPreview": {}
250
+ },
251
+ {
252
+ "id": "task-invoice-record-findings",
253
+ "capability": "invoice.record_findings",
254
+ "hasInput": false,
255
+ "inputPreview": {}
256
+ }
257
+ ]
258
+ }
259
+
260
+
261
+ ✅ Plans generated: 1
262
+ Executing plan plan-a
263
+ Context Ref: aa8cf17d82b301702e74eeea2ab76046d8dc642a9e3b2e5c039f73518fdb49ef
264
+ Tasks:
265
+ 1. task-invoice-fetch -> invoice.fetch
266
+ 2. task-invoice-fetch-po -> invoice.fetch_purchase_order
267
+ 3. task-invoice-compare-lines -> invoice.compare_line_items
268
+ 4. task-invoice-record-findings -> invoice.record_findings
269
+
270
+
271
+ [task-invoice-fetch] Task started
272
+ [task-invoice-fetch] ✓ Task completed
273
+ Output: {
274
+ "invoice": {
275
+ "id": "INV-84721",
276
+ "supplier": "Skyline Components",
277
+ "total": 18450,
278
+ "currency": "USD",
279
+ "purchaseOrderId": "PO-99231",
280
+ "receivedAt": "2025-09-29T14:12:00Z",
281
+ "lines": [
282
+ {
283
+ "sku": "SRV-FW-EDGE",
284
+ "description": "Edge firewall appliance",
285
+ "quantity": 5,
286
+ "unitPrice": 2500
287
+ },
288
+ {
289
+ "sku": "SRV-SUP-24M",
290
+ "description": "24 month premium support",
291
+ "quantity": 5,
292
+ "unitPrice": 190
293
+ }
294
+ ]
295
+ }
296
+ }
297
+ 💾 Checkpoint created: checkpoint-1759727264660-cz42aob (1 tasks completed)
298
+
299
+ [task-invoice-fetch-po] Task started
300
+ [task-invoice-fetch-po] ✓ Task completed
301
+ Output: {
302
+ "purchaseOrder": {
303
+ "id": "PO-99231",
304
+ "initiator": "Darius Patel",
305
+ "department": "Network Engineering",
306
+ "total": 18500,
307
+ "currency": "USD",
308
+ "status": "approved",
309
+ "lines": [
310
+ {
311
+ "sku": "SRV-FW-EDGE",
312
+ "description": "Edge firewall appliance",
313
+ "quantity": 5,
314
+ "unitPrice": 2500
315
+ },
316
+ {
317
+ "sku": "SRV-SUP-24M",
318
+ "description": "24 month premium support",
319
+ "quantity": 5,
320
+ "unitPrice": 200
321
+ }
322
+ ]
323
+ }
324
+ }
325
+ 💾 Checkpoint created: checkpoint-1759727264662-su7kz8g (2 tasks completed)
326
+
327
+ [task-invoice-compare-lines] Task started
328
+ [task-invoice-compare-lines] ✓ Task completed
329
+ Output: {
330
+ "discrepancies": [
331
+ {
332
+ "sku": "SRV-SUP-24M",
333
+ "expectedQuantity": 5,
334
+ "actualQuantity": 5,
335
+ "expectedPrice": 200,
336
+ "actualPrice": 190,
337
+ "varianceAmount": -50
338
+ }
339
+ ],
340
+ "variance": -50,
341
+ "matchedLines": 1
342
+ }
343
+ 💾 Checkpoint created: checkpoint-1759727264664-bbo5ziu (3 tasks completed)
344
+
345
+ [task-invoice-record-findings] Task started
346
+ [task-invoice-record-findings] ✓ Task completed
347
+ Output: {
348
+ "reportId": "recon-1759727264666",
349
+ "status": "needs_remediation",
350
+ "summary": "Invoice INV-84721 has 1 discrepancy(s)",
351
+ "nextSteps": [
352
+ "Open remediation ticket with procurement",
353
+ "Notify accounts payable supervisor",
354
+ "Schedule supplier follow-up call"
355
+ ],
356
+ "generatedAt": "2025-10-06T05:07:44.666Z"
357
+ }
358
+ 💾 Checkpoint created: checkpoint-1759727264666-yhmp0fb (4 tasks completed)
359
+
360
+ ============================================================
361
+ EXECUTION SUMMARY
362
+ ============================================================
363
+ Total tasks: 4
364
+ Ledger entries: 32
365
+
366
+ Outputs:
367
+ task-invoice-fetch: {
368
+ "invoice": {
369
+ "id": "INV-84721",
370
+ "supplier": "Skyline Components",
371
+ "total": 18450,
372
+ "currency": "USD",
373
+ "purchaseOrderId": "PO-99231",
374
+ "receivedAt": "2025-09-29T14:12:00Z",
375
+ "lines": [
376
+ {
377
+ "sku": "SRV-FW-EDGE",
378
+ "description": "Edge firewall appliance",
379
+ "quantity": 5,
380
+ "unitPrice": 2500
381
+ },
382
+ {
383
+ "sku": "SRV-SUP-24M",
384
+ "description": "24 month premium support",
385
+ "quantity": 5,
386
+ "unitPrice": 190
387
+ }
388
+ ]
389
+ }
390
+ }
391
+ task-invoice-fetch-po: {
392
+ "purchaseOrder": {
393
+ "id": "PO-99231",
394
+ "initiator": "Darius Patel",
395
+ "department": "Network Engineering",
396
+ "total": 18500,
397
+ "currency": "USD",
398
+ "status": "approved",
399
+ "lines": [
400
+ {
401
+ "sku": "SRV-FW-EDGE",
402
+ "description": "Edge firewall appliance",
403
+ "quantity": 5,
404
+ "unitPrice": 2500
405
+ },
406
+ {
407
+ "sku": "SRV-SUP-24M",
408
+ "description": "24 month premium support",
409
+ "quantity": 5,
410
+ "unitPrice": 200
411
+ }
412
+ ]
413
+ }
414
+ }
415
+ task-invoice-compare-lines: {
416
+ "discrepancies": [
417
+ {
418
+ "sku": "SRV-SUP-24M",
419
+ "expectedQuantity": 5,
420
+ "actualQuantity": 5,
421
+ "expectedPrice": 200,
422
+ "actualPrice": 190,
423
+ "varianceAmount": -50
424
+ }
425
+ ],
426
+ "variance": -50,
427
+ "matchedLines": 1
428
+ }
429
+ task-invoice-record-findings: {
430
+ "reportId": "recon-1759727264666",
431
+ "status": "needs_remediation",
432
+ "summary": "Invoice INV-84721 has 1 discrepancy(s)",
433
+ "nextSteps": [
434
+ "Open remediation ticket with procurement",
435
+ "Notify accounts payable supervisor",
436
+ "Schedule supplier follow-up call"
437
+ ],
438
+ "generatedAt": "2025-10-06T05:07:44.666Z"
439
+ }
440
+
441
+ ✅ Demo completed successfully!
442
+
443
+ ```
444
+
445
+ ---
446
+
447
+ ## Scenario: Incident Triage
448
+
449
+ ```bash
450
+
451
+ node$ pnpm --filter @ddse/acm-examples demo --scenario incidents --provider vllm --model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --base-url http://localhost:8001/v1
452
+
453
+ > @ddse/acm-examples@0.1.0 demo /mnt/backup1/home/manna/workspace/ml/ddse/ddse-composer/framework/node/packages/acm-examples
454
+ > node ./dist/bin/acm-demo.js "--scenario" "incidents" "--provider" "vllm" "--model" "Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8" "--base-url" "http://localhost:8001/v1"
455
+
456
+
457
+ 🎯 Scenario: Incident Triage
458
+ Key: incidents
459
+ Description: Classify a critical incident, route it to the correct queue, and escalate if required.
460
+
461
+ 📋 Planning...
462
+
463
+
464
+
465
+ Generated 1 plan.
466
+
467
+ 📝 Planner plan summary (first plan):
468
+ {
469
+ "id": "plan-a",
470
+ "contextRef": "142c26f1c50e5f00f2829cd10732a52e44345ec1b5e4804a338fca9d026ebf1e",
471
+ "tasks": [
472
+ {
473
+ "id": "task-incident-fetch",
474
+ "capability": "incident.fetch",
475
+ "hasInput": true,
476
+ "inputPreview": {
477
+ "incidentId": "INC-2045"
478
+ }
479
+ },
480
+ {
481
+ "id": "task-incident-classify",
482
+ "capability": "incident.classify_severity",
483
+ "hasInput": true,
484
+ "inputPreview": {
485
+ "incidentId": "INC-2045"
486
+ }
487
+ },
488
+ {
489
+ "id": "task-incident-route",
490
+ "capability": "incident.select_queue",
491
+ "hasInput": true,
492
+ "inputPreview": {
493
+ "incidentId": "INC-2045"
494
+ }
495
+ },
496
+ {
497
+ "id": "task-incident-escalate",
498
+ "capability": "incident.escalate",
499
+ "hasInput": true,
500
+ "inputPreview": {
501
+ "incidentId": "INC-2045"
502
+ }
503
+ }
504
+ ]
505
+ }
506
+
507
+
508
+ ✅ Plans generated: 1
509
+ Executing plan plan-a
510
+ Context Ref: 142c26f1c50e5f00f2829cd10732a52e44345ec1b5e4804a338fca9d026ebf1e
511
+ Tasks:
512
+ 1. task-incident-fetch -> incident.fetch
513
+ 2. task-incident-classify -> incident.classify_severity
514
+ 3. task-incident-route -> incident.select_queue
515
+ 4. task-incident-escalate -> incident.escalate
516
+
517
+
518
+ [task-incident-fetch] Task started
519
+ [task-incident-fetch] ✓ Task completed
520
+ Output: {
521
+ "incident": {
522
+ "id": "INC-2045",
523
+ "service": "checkout-api",
524
+ "reportedAt": "2025-10-05T03:22:00Z",
525
+ "customerImpact": "MAJOR",
526
+ "category": "OUTAGE",
527
+ "signalScore": 0.91,
528
+ "declaredSeverity": "CRITICAL",
529
+ "vipCustomer": true
530
+ }
531
+ }
532
+ 💾 Checkpoint created: checkpoint-1759726839432-kehm6hw (1 tasks completed)
533
+
534
+ [task-incident-classify] Task started
535
+ [task-incident-classify] ✓ Task completed
536
+ Output: {
537
+ "severity": "CRITICAL",
538
+ "score": 120.91,
539
+ "rationale": [
540
+ "Declared severity CRITICAL provides base score 80",
541
+ "Major customer impact adds 30 points",
542
+ "Signal score contribution: 0.91",
543
+ "VIP customer flag adds 10 points",
544
+ "Composite score 120.91 maps to severity CRITICAL"
545
+ ]
546
+ }
547
+ 💾 Checkpoint created: checkpoint-1759726839434-3vwkk9m (2 tasks completed)
548
+
549
+ [task-incident-route] Task started
550
+ [task-incident-route] ✓ Task completed
551
+ Output: {
552
+ "queue": "incident-bridge",
553
+ "rule": {
554
+ "id": "ROUTE-CHECKOUT-CRITICAL",
555
+ "service": "checkout-api",
556
+ "category": "OUTAGE",
557
+ "minSeverity": "HIGH",
558
+ "queue": "incident-bridge",
559
+ "escalatesTo": "director-oncall@northwind.example",
560
+ "notes": "Critical checkout outages route directly to the incident bridge."
561
+ },
562
+ "escalationRequired": true,
563
+ "rationale": [
564
+ "Matched routing rule ROUTE-CHECKOUT-CRITICAL for service checkout-api category OUTAGE",
565
+ "Escalation target defined: director-oncall@northwind.example",
566
+ "Routing notes: Critical checkout outages route directly to the incident bridge."
567
+ ]
568
+ }
569
+ 💾 Checkpoint created: checkpoint-1759726839436-m4fjyyo (3 tasks completed)
570
+
571
+ [task-incident-escalate] Task started
572
+ [task-incident-escalate] ✓ Task completed
573
+ Output: {
574
+ "escalated": true,
575
+ "ticketId": "esc-1759726839438",
576
+ "target": "director-oncall@northwind.example",
577
+ "reason": "Matched routing rule ROUTE-CHECKOUT-CRITICAL for service checkout-api category OUTAGE Escalation target defined: director-oncall@northwind.example Routing notes: Critical checkout outages route directly to the incident bridge.",
578
+ "timestamp": "2025-10-06T05:00:39.438Z"
579
+ }
580
+ 💾 Checkpoint created: checkpoint-1759726839438-o9jkgnf (4 tasks completed)
581
+
582
+ ============================================================
583
+ EXECUTION SUMMARY
584
+ ============================================================
585
+ Total tasks: 4
586
+ Ledger entries: 32
587
+
588
+ Outputs:
589
+ task-incident-fetch: {
590
+ "incident": {
591
+ "id": "INC-2045",
592
+ "service": "checkout-api",
593
+ "reportedAt": "2025-10-05T03:22:00Z",
594
+ "customerImpact": "MAJOR",
595
+ "category": "OUTAGE",
596
+ "signalScore": 0.91,
597
+ "declaredSeverity": "CRITICAL",
598
+ "vipCustomer": true
599
+ }
600
+ }
601
+ task-incident-classify: {
602
+ "severity": "CRITICAL",
603
+ "score": 120.91,
604
+ "rationale": [
605
+ "Declared severity CRITICAL provides base score 80",
606
+ "Major customer impact adds 30 points",
607
+ "Signal score contribution: 0.91",
608
+ "VIP customer flag adds 10 points",
609
+ "Composite score 120.91 maps to severity CRITICAL"
610
+ ]
611
+ }
612
+ task-incident-route: {
613
+ "queue": "incident-bridge",
614
+ "rule": {
615
+ "id": "ROUTE-CHECKOUT-CRITICAL",
616
+ "service": "checkout-api",
617
+ "category": "OUTAGE",
618
+ "minSeverity": "HIGH",
619
+ "queue": "incident-bridge",
620
+ "escalatesTo": "director-oncall@northwind.example",
621
+ "notes": "Critical checkout outages route directly to the incident bridge."
622
+ },
623
+ "escalationRequired": true,
624
+ "rationale": [
625
+ "Matched routing rule ROUTE-CHECKOUT-CRITICAL for service checkout-api category OUTAGE",
626
+ "Escalation target defined: director-oncall@northwind.example",
627
+ "Routing notes: Critical checkout outages route directly to the incident bridge."
628
+ ]
629
+ }
630
+ task-incident-escalate: {
631
+ "escalated": true,
632
+ "ticketId": "esc-1759726839438",
633
+ "target": "director-oncall@northwind.example",
634
+ "reason": "Matched routing rule ROUTE-CHECKOUT-CRITICAL for service checkout-api category OUTAGE Escalation target defined: director-oncall@northwind.example Routing notes: Critical checkout outages route directly to the incident bridge.",
635
+ "timestamp": "2025-10-06T05:00:39.438Z"
636
+ }
637
+
638
+ ✅ Demo completed successfully!
639
+
640
+ ```
641
+
642
+ ---
643
+
644
+ ## Scenario: Knowledge Acceleration
645
+
646
+ ```bash
647
+
648
+ node$ pnpm --filter @ddse/acm-examples demo --scenario knowledge --provider vllm --model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --base-url http://localhost:8001/v1
649
+
650
+ > @ddse/acm-examples@0.1.0 demo /mnt/backup1/home/manna/workspace/ml/ddse/ddse-composer/framework/node/packages/acm-examples
651
+ > node ./dist/bin/acm-demo.js "--scenario" "knowledge" "--provider" "vllm" "--model" "Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8" "--base-url" "http://localhost:8001/v1"
652
+
653
+
654
+ 🎯 Scenario: Knowledge Acceleration
655
+ Key: knowledge
656
+ Description: Retrieve and summarize knowledge for an urgent latency regression and produce follow-up actions.
657
+
658
+ 📋 Planning...
659
+
660
+
661
+ Generated 1 plan.
662
+
663
+ 📝 Planner plan summary (first plan):
664
+ {
665
+ "id": "plan-a",
666
+ "contextRef": "e977e7799eb2c2ff5ee2d4f6e437f352b1858a60632ceeb465d79585dd9733b6",
667
+ "tasks": [
668
+ {
669
+ "id": "task-knowledge-search",
670
+ "capability": "knowledge.search",
671
+ "hasInput": true,
672
+ "inputPreview": {
673
+ "query": "latency regression mitigation guidance"
674
+ }
675
+ },
676
+ {
677
+ "id": "task-knowledge-summarize",
678
+ "capability": "knowledge.summarize",
679
+ "hasInput": true,
680
+ "inputPreview": {
681
+ "docId": "KB-003"
682
+ }
683
+ },
684
+ {
685
+ "id": "task-knowledge-followups",
686
+ "capability": "knowledge.followups",
687
+ "hasInput": true,
688
+ "inputPreview": {
689
+ "query": "latency regression mitigation guidance"
690
+ }
691
+ }
692
+ ]
693
+ }
694
+
695
+
696
+ ✅ Plans generated: 1
697
+ Executing plan plan-a
698
+ Context Ref: e977e7799eb2c2ff5ee2d4f6e437f352b1858a60632ceeb465d79585dd9733b6
699
+ Tasks:
700
+ 1. task-knowledge-search -> knowledge.search
701
+ 2. task-knowledge-summarize -> knowledge.summarize
702
+ 3. task-knowledge-followups -> knowledge.followups
703
+
704
+
705
+ [task-knowledge-search] Task started
706
+ [task-knowledge-search] ✓ Task completed
707
+ Output: {
708
+ "hits": [
709
+ {
710
+ "id": "KB-003",
711
+ "title": "Stabilizing API latency regressions",
712
+ "tags": [
713
+ "incident",
714
+ "performance",
715
+ "api"
716
+ ],
717
+ "path": "docs/kb-003.md",
718
+ "summary": "Checklist for diagnosing elevated API latency including caching, rollout, and alerting steps.",
719
+ "score": 1
720
+ }
721
+ ]
722
+ }
723
+ 💾 Checkpoint created: checkpoint-1759728757613-60qot6y (1 tasks completed)
724
+
725
+ [task-knowledge-summarize] Task started
726
+ [task-knowledge-summarize] ✓ Task completed
727
+ Output: {
728
+ "docId": "KB-003",
729
+ "title": "Stabilizing API latency regressions",
730
+ "summary": "# Stabilizing API latency regressions Monitoring detected elevated p95 latency across the public REST API. Follow this checklist: 1. Inspect deployment history for the impacted service and roll back if a canary exceeded SLOs.",
731
+ "highlights": [
732
+ "# Stabilizing API latency regressions",
733
+ "Monitoring detected elevated p95 latency across the public REST API. Follow this checklist:",
734
+ "1. Inspect deployment history for the impacted service and roll back if a canary exceeded SLOs."
735
+ ],
736
+ "followups": [
737
+ "Log follow-up tasks in support queue"
738
+ ]
739
+ }
740
+ 💾 Checkpoint created: checkpoint-1759728757616-vh7pbha (2 tasks completed)
741
+
742
+ [task-knowledge-followups] Task started
743
+ [task-knowledge-followups] ✓ Task completed
744
+ Output: {
745
+ "docId": "KB-003",
746
+ "suggestions": [
747
+ {
748
+ "action": "Log follow-up tasks in support queue",
749
+ "owner": "support.enablement",
750
+ "dueInHours": 8
751
+ }
752
+ ]
753
+ }
754
+ 💾 Checkpoint created: checkpoint-1759728757618-90r11a8 (3 tasks completed)
755
+
756
+ ============================================================
757
+ EXECUTION SUMMARY
758
+ ============================================================
759
+ Total tasks: 3
760
+ Ledger entries: 25
761
+
762
+ Outputs:
763
+ task-knowledge-search: {
764
+ "hits": [
765
+ {
766
+ "id": "KB-003",
767
+ "title": "Stabilizing API latency regressions",
768
+ "tags": [
769
+ "incident",
770
+ "performance",
771
+ "api"
772
+ ],
773
+ "path": "docs/kb-003.md",
774
+ "summary": "Checklist for diagnosing elevated API latency including caching, rollout, and alerting steps.",
775
+ "score": 1
776
+ }
777
+ ]
778
+ }
779
+ task-knowledge-summarize: {
780
+ "docId": "KB-003",
781
+ "title": "Stabilizing API latency regressions",
782
+ "summary": "# Stabilizing API latency regressions Monitoring detected elevated p95 latency across the public REST API. Follow this checklist: 1. Inspect deployment history for the impacted service and roll back if a canary exceeded SLOs.",
783
+ "highlights": [
784
+ "# Stabilizing API latency regressions",
785
+ "Monitoring detected elevated p95 latency across the public REST API. Follow this checklist:",
786
+ "1. Inspect deployment history for the impacted service and roll back if a canary exceeded SLOs."
787
+ ],
788
+ "followups": [
789
+ "Log follow-up tasks in support queue"
790
+ ]
791
+ }
792
+ task-knowledge-followups: {
793
+ "docId": "KB-003",
794
+ "suggestions": [
795
+ {
796
+ "action": "Log follow-up tasks in support queue",
797
+ "owner": "support.enablement",
798
+ "dueInHours": 8
799
+ }
800
+ ]
801
+ }
802
+
803
+ ✅ Demo completed successfully!
804
+
805
+ ```
806
+
807
+ ---
808
+
809
+ ## Scenario: Entitlement Decisioning
810
+
811
+ ```bash
812
+ node$ pnpm --filter @ddse/acm-examples demo --scenario entitlement --provider vllm --model Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 --base-url http://localhost:8001/v1
813
+
814
+ > @ddse/acm-examples@0.1.0 demo /mnt/backup1/home/manna/workspace/ml/ddse/ddse-composer/framework/node/packages/acm-examples
815
+ > node ./dist/bin/acm-demo.js "--scenario" "entitlement" "--provider" "vllm" "--model" "Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8" "--base-url" "http://localhost:8001/v1"
816
+
817
+
818
+ 🎯 Scenario: Entitlement Decisioning
819
+ Key: entitlement
820
+ Description: Evaluate a premium benefit entitlement and notify the supervisor with the decision.
821
+
822
+ 📋 Planning...
823
+
824
+
825
+
826
+ Generated 1 plan.
827
+
828
+ 📝 Planner plan summary (first plan):
829
+ {
830
+ "id": "plan-a",
831
+ "contextRef": "94dcf9ec83c5b71661802beeb62380df7f7821395d0b24099649b71294540cf2",
832
+ "tasks": [
833
+ {
834
+ "id": "task-entitlement-fetch-customer",
835
+ "capability": "entitlement.fetch_customer_profile",
836
+ "hasInput": true,
837
+ "inputPreview": {
838
+ "customerId": "CUST-104233"
839
+ }
840
+ },
841
+ {
842
+ "id": "task-entitlement-evaluate",
843
+ "capability": "entitlement.evaluate",
844
+ "hasInput": true,
845
+ "inputPreview": {
846
+ "customerId": "CUST-104233",
847
+ "benefitCode": "BEN-ANALYTICS-LABS"
848
+ }
849
+ },
850
+ {
851
+ "id": "task-entitlement-notify-supervisor",
852
+ "capability": "entitlement.notify_supervisor",
853
+ "hasInput": true,
854
+ "inputPreview": {
855
+ "customerId": "CUST-104233",
856
+ "benefitCode": "BEN-ANALYTICS-LABS"
857
+ }
858
+ }
859
+ ]
860
+ }
861
+
862
+
863
+ ✅ Plans generated: 1
864
+ Executing plan plan-a
865
+ Context Ref: 94dcf9ec83c5b71661802beeb62380df7f7821395d0b24099649b71294540cf2
866
+ Tasks:
867
+ 1. task-entitlement-fetch-customer -> entitlement.fetch_customer_profile
868
+ 2. task-entitlement-evaluate -> entitlement.evaluate
869
+ 3. task-entitlement-notify-supervisor -> entitlement.notify_supervisor
870
+
871
+
872
+ [task-entitlement-fetch-customer] Task started
873
+ [task-entitlement-fetch-customer] ✓ Task completed
874
+ Output: {
875
+ "customer": {
876
+ "id": "CUST-104233",
877
+ "name": "Sofia Anders",
878
+ "tier": "PLATINUM",
879
+ "accountAgeDays": 2190,
880
+ "complianceFlags": [],
881
+ "benefits": [
882
+ "BEN-TRAVEL-PLUS",
883
+ "BEN-PRIORITY-SUPPORT",
884
+ "BEN-ANALYTICS-LABS"
885
+ ],
886
+ "supervisor": {
887
+ "name": "Dylan Mistry",
888
+ "email": "dylan.mistry@northwind.example"
889
+ }
890
+ }
891
+ }
892
+ 💾 Checkpoint created: checkpoint-1759728938198-c0qb5u6 (1 tasks completed)
893
+
894
+ [task-entitlement-evaluate] Task started
895
+ [task-entitlement-evaluate] ✓ Task completed
896
+ Output: {
897
+ "decision": "allow",
898
+ "policy": {
899
+ "id": "POL-ANALYTICS-LABS",
900
+ "benefitCode": "BEN-ANALYTICS-LABS",
901
+ "description": "Early access to analytics beta features.",
902
+ "requiredTier": "PLATINUM",
903
+ "minAccountAgeDays": 1460,
904
+ "requiresComplianceClearance": true,
905
+ "slaMinutes": 120
906
+ },
907
+ "customer": {
908
+ "id": "CUST-104233",
909
+ "name": "Sofia Anders",
910
+ "tier": "PLATINUM",
911
+ "accountAgeDays": 2190,
912
+ "complianceFlags": [],
913
+ "benefits": [
914
+ "BEN-TRAVEL-PLUS",
915
+ "BEN-PRIORITY-SUPPORT",
916
+ "BEN-ANALYTICS-LABS"
917
+ ],
918
+ "supervisor": {
919
+ "name": "Dylan Mistry",
920
+ "email": "dylan.mistry@northwind.example"
921
+ }
922
+ },
923
+ "slaMinutes": 120,
924
+ "rationale": [
925
+ "Customer tier PLATINUM satisfies required tier PLATINUM",
926
+ "Account age 2190 days exceeds minimum 1460 days",
927
+ "No compliance holds found for customer",
928
+ "Entitlement approved according to policy requirements"
929
+ ],
930
+ "violations": []
931
+ }
932
+ 💾 Checkpoint created: checkpoint-1759728938201-6vlg38z (2 tasks completed)
933
+
934
+ [task-entitlement-notify-supervisor] Task started
935
+ [task-entitlement-notify-supervisor] ✓ Task completed
936
+ Output: {
937
+ "notified": true,
938
+ "channel": "email",
939
+ "supervisor": {
940
+ "name": "Dylan Mistry",
941
+ "email": "dylan.mistry@northwind.example"
942
+ },
943
+ "messageId": "notif-1759728938202",
944
+ "timestamp": "2025-10-06T05:35:38.202Z"
945
+ }
946
+ 💾 Checkpoint created: checkpoint-1759728938203-ybx0h0f (3 tasks completed)
947
+
948
+ ============================================================
949
+ EXECUTION SUMMARY
950
+ ============================================================
951
+ Total tasks: 3
952
+ Ledger entries: 25
953
+
954
+ Outputs:
955
+ task-entitlement-fetch-customer: {
956
+ "customer": {
957
+ "id": "CUST-104233",
958
+ "name": "Sofia Anders",
959
+ "tier": "PLATINUM",
960
+ "accountAgeDays": 2190,
961
+ "complianceFlags": [],
962
+ "benefits": [
963
+ "BEN-TRAVEL-PLUS",
964
+ "BEN-PRIORITY-SUPPORT",
965
+ "BEN-ANALYTICS-LABS"
966
+ ],
967
+ "supervisor": {
968
+ "name": "Dylan Mistry",
969
+ "email": "dylan.mistry@northwind.example"
970
+ }
971
+ }
972
+ }
973
+ task-entitlement-evaluate: {
974
+ "decision": "allow",
975
+ "policy": {
976
+ "id": "POL-ANALYTICS-LABS",
977
+ "benefitCode": "BEN-ANALYTICS-LABS",
978
+ "description": "Early access to analytics beta features.",
979
+ "requiredTier": "PLATINUM",
980
+ "minAccountAgeDays": 1460,
981
+ "requiresComplianceClearance": true,
982
+ "slaMinutes": 120
983
+ },
984
+ "customer": {
985
+ "id": "CUST-104233",
986
+ "name": "Sofia Anders",
987
+ "tier": "PLATINUM",
988
+ "accountAgeDays": 2190,
989
+ "complianceFlags": [],
990
+ "benefits": [
991
+ "BEN-TRAVEL-PLUS",
992
+ "BEN-PRIORITY-SUPPORT",
993
+ "BEN-ANALYTICS-LABS"
994
+ ],
995
+ "supervisor": {
996
+ "name": "Dylan Mistry",
997
+ "email": "dylan.mistry@northwind.example"
998
+ }
999
+ },
1000
+ "slaMinutes": 120,
1001
+ "rationale": [
1002
+ "Customer tier PLATINUM satisfies required tier PLATINUM",
1003
+ "Account age 2190 days exceeds minimum 1460 days",
1004
+ "No compliance holds found for customer",
1005
+ "Entitlement approved according to policy requirements"
1006
+ ],
1007
+ "violations": []
1008
+ }
1009
+ task-entitlement-notify-supervisor: {
1010
+ "notified": true,
1011
+ "channel": "email",
1012
+ "supervisor": {
1013
+ "name": "Dylan Mistry",
1014
+ "email": "dylan.mistry@northwind.example"
1015
+ },
1016
+ "messageId": "notif-1759728938202",
1017
+ "timestamp": "2025-10-06T05:35:38.202Z"
1018
+ }
1019
+
1020
+ ✅ Demo completed successfully!
1021
+
1022
+ ```