@fluentcommerce/ai-skills 0.1.0 → 0.3.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.
Potentially problematic release.
This version of @fluentcommerce/ai-skills might be problematic. Click here for more details.
- package/README.md +866 -622
- package/bin/cli.mjs +2112 -1973
- package/content/cli/agents/fluent-cli/agent.json +149 -149
- package/content/cli/agents/fluent-cli.md +132 -132
- package/content/cli/skills/fluent-bootstrap/SKILL.md +214 -181
- package/content/cli/skills/fluent-cli-index/SKILL.md +1 -1
- package/content/cli/skills/fluent-cli-mcp-cicd/SKILL.md +117 -1
- package/content/cli/skills/fluent-cli-reference/SKILL.md +1040 -1031
- package/content/cli/skills/fluent-cli-retailer/SKILL.md +27 -2
- package/content/cli/skills/fluent-cli-settings/SKILL.md +21 -1
- package/content/cli/skills/fluent-connect/SKILL.md +937 -886
- package/content/cli/skills/fluent-module-deploy/SKILL.md +63 -5
- package/content/cli/skills/fluent-profile/SKILL.md +73 -0
- package/content/cli/skills/fluent-workflow/SKILL.md +360 -310
- package/content/dev/agents/fluent-backend-dev/AGENT.md +58 -0
- package/content/dev/agents/fluent-backend-dev/agent.json +69 -0
- package/content/dev/agents/fluent-backend-dev.md +287 -0
- package/content/dev/agents/fluent-dev/AGENT.md +98 -0
- package/content/dev/agents/fluent-dev/agent.json +14 -2
- package/content/dev/agents/fluent-dev.md +194 -525
- package/content/dev/agents/fluent-frontend-dev/AGENT.md +63 -0
- package/content/dev/agents/fluent-frontend-dev/agent.json +52 -0
- package/content/dev/agents/fluent-frontend-dev.md +323 -0
- package/content/dev/skills/fluent-archive/SKILL.md +234 -0
- package/content/dev/skills/fluent-build/SKILL.md +312 -192
- package/content/dev/skills/fluent-connection-analysis/SKILL.md +422 -386
- package/content/dev/skills/fluent-custom-code/SKILL.md +15 -9
- package/content/dev/skills/fluent-data-module-scaffold/SKILL.md +19 -2
- package/content/dev/skills/fluent-e2e-test/SKILL.md +501 -394
- package/content/dev/skills/fluent-event-api/SKILL.md +962 -945
- package/content/dev/skills/fluent-feature-explain/SKILL.md +680 -603
- package/content/dev/skills/fluent-feature-plan/PLAN_TEMPLATE.md +27 -2
- package/content/dev/skills/fluent-feature-plan/SKILL.md +478 -227
- package/content/dev/skills/fluent-feature-status/SKILL.md +335 -0
- package/content/dev/skills/fluent-feedback/SKILL.md +221 -0
- package/content/dev/skills/fluent-implementation-map/SKILL.md +644 -0
- package/content/dev/skills/fluent-job-batch/SKILL.md +10 -0
- package/content/dev/skills/fluent-module-scaffold/SKILL.md +64 -2
- package/content/dev/skills/fluent-module-validate/SKILL.md +778 -775
- package/content/dev/skills/fluent-mystique-analyze/SKILL.md +817 -0
- package/content/dev/skills/fluent-mystique-builder/COMPONENT_TEMPLATE.md +81 -0
- package/content/dev/skills/fluent-mystique-builder/README.md +63 -0
- package/content/dev/skills/fluent-mystique-builder/SKILL.md +1294 -0
- package/content/dev/skills/fluent-mystique-builder/components/INDEX.md +92 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.accordion.md +48 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.fulfilmentpack.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.multiparcel.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.returnitems.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.field.wavepick.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.action.inline.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.activity.entity.md +25 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.analytics.viz.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.column.md +111 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.json.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.jsoneditor.md +54 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.locationId.md +51 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.attribute.retailerId.md +52 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.bar.md +57 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.download.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.compatibility.md +60 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.inline.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.button.print.pick.md +61 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.buttons.add.reject.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.attribute.md +73 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.attributes.grid.md +40 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.image.md +37 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.map.point.md +24 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.multi.md +79 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.card.product.md +27 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.md +34 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.area.wrapper.feed.md +98 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.md +52 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.bar.wrapper.source.md +104 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.md +28 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.gauge.wrapper.threshold.md +118 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.chart.line.md +32 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.conditional.md +62 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.dashboard.threshold.md +65 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.daterange.wrapper.forwarder.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.drawer.button.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.event.detail.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.events.search.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.daterange.md +83 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.filterComplex.md +106 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.intrange.md +82 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.field.multistring.md +50 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.filterPanel.md +53 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.json.editor.md +22 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.json.viewer.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.customAction.md +79 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.md +116 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.bppmetrics.md +69 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.feed.md +65 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.list.wrapper.source.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.addItem.md +60 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.modal.button.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mutation.inline.md +88 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.attributes.md +83 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.collapsible.text.md +33 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.mystique.link.md +30 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.order.itemDetails.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.order.shipmentDetails.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.filter.select.md +87 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.refresh.md +48 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.column.md +71 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.header.md +61 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.section.md +59 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.md +45 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.page.wizard.summary.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.progress.circular.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.provider.graphql.md +71 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.quantity.list.md +87 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.repeater.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.reports.ipuipc.md +54 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.return.rowExpansion.md +19 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcode.md +21 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.barcodeFilter.md +72 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.scanner.camera.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.settingForm.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.drawer.button.md +19 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.profile.modal.button.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.sourcing.strategy.modal.button.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.stepper.md +20 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tab.content.md +56 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.card.md +64 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tabs.md +69 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.tile.metric.md +73 -0
- package/content/dev/skills/fluent-mystique-builder/components/fc.workflow.provider.md +77 -0
- package/content/dev/skills/fluent-mystique-builder/validate-docs.ps1 +260 -0
- package/content/dev/skills/fluent-mystique-scaffold/SKILL.md +1830 -0
- package/content/dev/skills/fluent-mystique-validate/SKILL.md +646 -0
- package/content/dev/skills/fluent-pre-deploy-check/SKILL.md +1144 -1108
- package/content/dev/skills/fluent-retailer-config/SKILL.md +1162 -1111
- package/content/dev/skills/fluent-rollback/SKILL.md +387 -0
- package/content/dev/skills/fluent-rule-scaffold/SKILL.md +515 -385
- package/content/dev/skills/fluent-scope-decompose/SKILL.md +1123 -1021
- package/content/dev/skills/fluent-session-audit-export/SKILL.md +880 -632
- package/content/dev/skills/fluent-session-summary/SKILL.md +320 -195
- package/content/dev/skills/fluent-settings/SKILL.md +160 -1
- package/content/dev/skills/fluent-source-onboard/SKILL.md +31 -3
- package/content/dev/skills/fluent-sourcing/SKILL.md +1185 -0
- package/content/dev/skills/fluent-system-monitoring/SKILL.md +771 -767
- package/content/dev/skills/fluent-test-data/SKILL.md +514 -513
- package/content/dev/skills/fluent-trace/SKILL.md +1169 -1143
- package/content/dev/skills/fluent-transition-api/SKILL.md +364 -346
- package/content/dev/skills/fluent-use-case-discover/SKILL.md +593 -0
- package/content/dev/skills/fluent-use-case-discover/SPEC_TEMPLATE.md +281 -0
- package/content/dev/skills/fluent-version-manage/SKILL.md +53 -2
- package/content/dev/skills/fluent-workflow-analyzer/SKILL.md +995 -959
- package/content/dev/skills/fluent-workflow-builder/SKILL.md +668 -319
- package/content/dev/skills/fluent-workflow-deploy/SKILL.md +480 -267
- package/content/dev/skills/fluent-workspace-tree/SKILL.md +281 -0
- package/content/mcp-extn/agents/fluent-mcp.md +133 -69
- package/content/mcp-extn/skills/fluent-mcp-tools/SKILL.md +812 -461
- package/content/mcp-official/agents/fluent-mcp-core.md +91 -91
- package/content/mcp-official/skills/fluent-mcp-core/SKILL.md +94 -94
- package/content/rfl/skills/fluent-rfl-assess/SKILL.md +172 -172
- package/docs/CAPABILITY_MAP.md +106 -77
- package/docs/DEPLOYMENT_PROMOTION_RUNBOOK.md +218 -0
- package/docs/DESIGN-implementation-map.md +698 -0
- package/docs/DEV_WORKFLOW.md +814 -802
- package/docs/FLOW_RUN.md +142 -142
- package/docs/GETTING_STARTED.md +427 -0
- package/docs/USE_CASES.md +909 -52
- package/metadata.json +184 -156
- package/package.json +3 -2
|
@@ -1,461 +1,812 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fluent-mcp-tools
|
|
3
|
-
description: Fluent Commerce MCP tools reference. Use when working with the Fluent MCP extension server for event dispatch, event flow forensics, GraphQL operations, batch ingestion, or webhook validation. Triggers on "mcp tools", "send fluent event", "event flow inspect", "trace event payloads", "fluent graphql", "batch ingestion".
|
|
4
|
-
user-invocable: true
|
|
5
|
-
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
|
-
argument-hint: <operation> [entity-type] [entity-ref]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Fluent MCP Tools
|
|
10
|
-
|
|
11
|
-
Quick reference for Fluent Commerce MCP extension server tools.
|
|
12
|
-
|
|
13
|
-
## When to Use
|
|
14
|
-
|
|
15
|
-
- Sending events to Fluent Commerce (order lifecycle, fulfilment transitions)
|
|
16
|
-
- Retrieving UI/user-action transitions from workflow trigger contexts
|
|
17
|
-
- Running GraphQL queries or mutations
|
|
18
|
-
- Bulk data operations via batch ingestion
|
|
19
|
-
- Validating inbound webhook payloads
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- `
|
|
94
|
-
- `
|
|
95
|
-
- `
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- `
|
|
99
|
-
- `
|
|
100
|
-
- `
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
Use `
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
314
|
-
| `
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
1
|
+
---
|
|
2
|
+
name: fluent-mcp-tools
|
|
3
|
+
description: Fluent Commerce MCP tools reference. Use when working with the Fluent MCP extension server for event dispatch, event flow forensics, GraphQL operations, batch ingestion, or webhook validation. Triggers on "mcp tools", "send fluent event", "event flow inspect", "trace event payloads", "fluent graphql", "batch ingestion".
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
6
|
+
argument-hint: <operation> [entity-type] [entity-ref]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Fluent MCP Tools
|
|
10
|
+
|
|
11
|
+
Quick reference for Fluent Commerce MCP extension server tools.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Sending events to Fluent Commerce (order lifecycle, fulfilment transitions)
|
|
16
|
+
- Retrieving UI/user-action transitions from workflow trigger contexts
|
|
17
|
+
- Running GraphQL queries or mutations
|
|
18
|
+
- Bulk data operations via batch ingestion
|
|
19
|
+
- Validating inbound webhook payloads
|
|
20
|
+
- Creating, updating, and retrieving entities (Order, Fulfilment, Location, etc.)
|
|
21
|
+
- Deploying, diffing, and simulating workflows
|
|
22
|
+
- Managing settings (upsert, bulk upsert)
|
|
23
|
+
- Discovering and validating environment configuration
|
|
24
|
+
- Asserting entity state in E2E test sequences
|
|
25
|
+
- Monitoring event processing health via Prometheus metrics
|
|
26
|
+
|
|
27
|
+
This skill is the canonical MCP tool contract reference. Other skills should link here for payload syntax and limits instead of redefining tool schemas.
|
|
28
|
+
|
|
29
|
+
**Tool count: 36** — Diagnostics (3), Events (5), GraphQL (4), Batch (5), Orchestration (2), Metrics (5), Entity (3), Workflow (3), Settings (2), Environment (2), Test (1), Webhook (1).
|
|
30
|
+
|
|
31
|
+
## Diagnostics
|
|
32
|
+
|
|
33
|
+
### `config.validate`
|
|
34
|
+
|
|
35
|
+
No parameters. Validates auth/base URL/retailer configuration and reports readiness for API tools. Run this first.
|
|
36
|
+
|
|
37
|
+
### `health.ping`
|
|
38
|
+
|
|
39
|
+
No parameters. Quick diagnostics: confirms SDK adapter connection and config readiness when calls fail.
|
|
40
|
+
|
|
41
|
+
### `connection.test`
|
|
42
|
+
|
|
43
|
+
No parameters. Comprehensive connectivity test — authenticates, executes a `me` query, and returns:
|
|
44
|
+
- **User:** id, username, email, type, status, roles, permissions
|
|
45
|
+
- **Retailer:** id, ref, tradingName, primaryEmail
|
|
46
|
+
- **Location:** id, ref, name, type
|
|
47
|
+
|
|
48
|
+
More thorough than `health.ping` — verifies the GraphQL endpoint end-to-end. Use when first connecting, debugging auth issues, or verifying retailer/location context.
|
|
49
|
+
|
|
50
|
+
## Event API Semantics
|
|
51
|
+
|
|
52
|
+
For event data model, types, categories, statuses, execution model, event contracts, and query patterns — see `/fluent-event-api`. This skill focuses on MCP tool syntax and payload contracts only.
|
|
53
|
+
|
|
54
|
+
## Event Operations
|
|
55
|
+
|
|
56
|
+
### Recommended Flow
|
|
57
|
+
|
|
58
|
+
1. `config.validate` - Verify connection
|
|
59
|
+
2. `event.build` - Preview payload
|
|
60
|
+
3. `event.send` (dryRun: true) - Validate without sending
|
|
61
|
+
4. `event.send` (dryRun: false) - Actually send
|
|
62
|
+
5. `event.list` / `event.get` - Verify delivery
|
|
63
|
+
6. `event.flowInspect` - One-call runtime forensics for root entity
|
|
64
|
+
|
|
65
|
+
### Common Events
|
|
66
|
+
|
|
67
|
+
| Event | Entity Type | Description |
|
|
68
|
+
|-------|-------------|-------------|
|
|
69
|
+
| `ConfirmValidation` | ORDER | Confirm order passed validation |
|
|
70
|
+
| `ConfirmAllocation` | FULFILMENT | Confirm stock allocation |
|
|
71
|
+
| `CreateInvoice` | FULFILMENT | Invoice created |
|
|
72
|
+
| `ConfirmPick` | FULFILMENT | Items picked (attrs: pickedAt, pickedItems) |
|
|
73
|
+
| `ConfirmShipment` | FULFILMENT | Shipment dispatched (attrs: trackingNumber, carrierRef) |
|
|
74
|
+
| `ConfirmDelivery` | FULFILMENT | Delivery completed (attrs: deliveredAt) |
|
|
75
|
+
| `CancelOrder` | ORDER | Cancel an order |
|
|
76
|
+
|
|
77
|
+
### Runtime Forensics (`event.flowInspect`)
|
|
78
|
+
|
|
79
|
+
Use `event.flowInspect` when you need the full runtime evidence bundle in one call for any entity type.
|
|
80
|
+
|
|
81
|
+
> **MANDATORY: Always use compact mode first.** Call with default parameters (no `compact: false`). The ~2-3k token compact summary is sufficient for 90% of use cases. Only add targeted detail flags (`includeRuleDetails`, `includeCustomLogs`, `includeSnapshots`, `includeCrossEntity`) one at a time when compact findings reveal specific issues. Setting `compact: false` returns ~24-30k tokens and WILL fill context — use only as a last resort after identifying exactly what raw data you need.
|
|
82
|
+
|
|
83
|
+
**Compact mode (default `compact: true`):** Returns a pre-analyzed summary (~2-3k tokens) with an `analysis` section containing anomaly findings, status flow, failed webhook endpoints, and slowest rulesets. Audit arrays are stripped to essentials.
|
|
84
|
+
|
|
85
|
+
Collects ORCHESTRATION events (plus ORCHESTRATION_AUDIT when `includeAudit=true`, and SCHEDULED when `includeScheduled=true`) for a root entity, then extracts:
|
|
86
|
+
|
|
87
|
+
**Always included (both modes):**
|
|
88
|
+
- **Orchestration timeline** — status/entity type counts, top event names
|
|
89
|
+
- **Auto-recommendations** — contextual findings based on status counts, webhook failures, exceptions
|
|
90
|
+
- **Totals** — raw event counts for all categories
|
|
91
|
+
|
|
92
|
+
**Compact mode additions (`compact: true`):**
|
|
93
|
+
- `analysis.statusFlow` — ordered unique statuses seen (e.g., `["CREATED", "BOOKED", "SHIPPED"]`)
|
|
94
|
+
- `analysis.findings[]` — anomaly detection: NO_MATCH (CRITICAL), FAILED (HIGH), webhook errors (HIGH), exceptions (HIGH), PENDING (MEDIUM), slow rulesets (MEDIUM)
|
|
95
|
+
- `analysis.failedWebhookEndpoints` — URLs that returned >= 400
|
|
96
|
+
- `analysis.slowestRulesets` — top 3 slowest
|
|
97
|
+
- `analysis.timespan` — first/last event timestamps with durationMs
|
|
98
|
+
- `audit.webhookActions` — **only failures** (responseCode >= 400)
|
|
99
|
+
- `audit.mutationActions` — **top 5 by queryName** (name + count only, no payloads)
|
|
100
|
+
- `audit.sendEventActions` — count + scheduledCount only
|
|
101
|
+
- `diagnostics.inspectedEvents` — summary (id, name, status, closeMatchCount)
|
|
102
|
+
|
|
103
|
+
**Full mode additions (`compact: false`):**
|
|
104
|
+
- **Mutation payloads** — full GraphQL mutations with `input`, `response`, `durationMs`
|
|
105
|
+
- **Webhook diagnostics** — all webhooks with `Request Endpoint`, `Response code`, `Response Body`
|
|
106
|
+
- **Scheduled dispatches** — future-dated SendEvent evidence with full event payload
|
|
107
|
+
- **Ruleset durations** — all rulesets ranked by processing time
|
|
108
|
+
- **Cross-entity events** — full events array per child entity type
|
|
109
|
+
|
|
110
|
+
**Default-on flags:**
|
|
111
|
+
- `compact: true` — pre-analyzed summary response
|
|
112
|
+
- `includeAudit: true` — parse ORCHESTRATION_AUDIT action evidence
|
|
113
|
+
- `includeExceptions: true` — rule exceptions with class, message, ruleset context
|
|
114
|
+
- `includeNoMatchDetails: true` — enhanced NO_MATCH diagnostics from ruleSet audit events
|
|
115
|
+
- `includeEventDetails: true` — compact orchestration events in response (full mode only)
|
|
116
|
+
- `includeScheduled: true` — separate SCHEDULED event fetch
|
|
117
|
+
|
|
118
|
+
**Opt-in flags (default false):**
|
|
119
|
+
- `includeRuleDetails: true` — per-rule execution trace (full mode only)
|
|
120
|
+
- `includeCustomLogs: true` — custom plugin log messages (full mode only)
|
|
121
|
+
- `includeSnapshots: true` — entity state snapshots (full mode only)
|
|
122
|
+
- `includeCrossEntity: true` — fetches child entity events
|
|
123
|
+
|
|
124
|
+
**Drilldown control:**
|
|
125
|
+
- `inspectStatuses: ["NO_MATCH", "PENDING", "FAILED"]` — auto-fetches `event.get` for these statuses
|
|
126
|
+
- `maxDrilldowns: 50` — cap on individual event.get calls
|
|
127
|
+
- `actionSampleLimit: 100` — max rows per extraction section
|
|
128
|
+
|
|
129
|
+
**Response sections (compact mode):**
|
|
130
|
+
|
|
131
|
+
| Section | Key Fields | Condition |
|
|
132
|
+
|---------|------------|-----------|
|
|
133
|
+
| `totals` | orchestrationCount, auditCount, all category counts | Always |
|
|
134
|
+
| `analysis` | statusFlow, entityTypes, timespan, failedWebhookEndpoints, slowestRulesets, findings[] | Always (compact only) |
|
|
135
|
+
| `orchestration` | statusCounts, entityTypeCounts, topNames (top 10) | Always |
|
|
136
|
+
| `audit.webhookActions` | Only failures (responseCode >= 400) | When includeAudit and failures exist |
|
|
137
|
+
| `audit.mutationActions` | Top 5 queryName + count | When includeAudit and mutations exist |
|
|
138
|
+
| `audit.sendEventActions` | { count, scheduledCount } | When includeAudit |
|
|
139
|
+
| `audit.exceptions` | id, ruleset, rule, exceptionClass, message | When includeExceptions |
|
|
140
|
+
| `diagnostics.inspectedEvents` | eventId, name, eventStatus, closeMatchCount | When inspectStatuses has entries |
|
|
141
|
+
|
|
142
|
+
**Response sections (full mode, compact: false):**
|
|
143
|
+
|
|
144
|
+
| Section | Key Fields | Condition |
|
|
145
|
+
|---------|------------|-----------|
|
|
146
|
+
| `totals` | orchestrationCount, auditCount, all category counts | Always |
|
|
147
|
+
| `orchestration` | statusCounts, entityTypeCounts, topNames (top 30), events? | Always |
|
|
148
|
+
| `scheduled` | SCHEDULED events with compact view | When includeScheduled and events exist |
|
|
149
|
+
| `audit.mutationActions` | queryName, queryType, input, response, durationMs | When includeAudit |
|
|
150
|
+
| `audit.webhookActions` | endpoint, responseCode, responseBody | When includeAudit |
|
|
151
|
+
| `audit.sendEventActions` | eventName, futureDated, scheduledOn, event payload | When includeAudit |
|
|
152
|
+
| `audit.rulesetDurations` | name, durationMs (sorted slowest first) | When includeAudit |
|
|
153
|
+
| `audit.exceptions` | id, ruleset, rule, exceptionClass, message | When includeExceptions |
|
|
154
|
+
| `audit.snapshots` | status, items, attributes, customer, toAddress, deliveryType | When includeSnapshots |
|
|
155
|
+
| `audit.customLogs` | source, logs[] (from LogCollection) | When includeCustomLogs |
|
|
156
|
+
| `audit.ruleEvents` | name, ruleSet, props, durationMs | When includeRuleDetails |
|
|
157
|
+
| `diagnostics.inspectedEvents` | closeMatches, entityStatus, message, full event | When inspectStatuses has entries |
|
|
158
|
+
| `diagnostics.noMatchAuditDetails` | rulesetName, entityStatus, message, closeMatches | When includeNoMatchDetails |
|
|
159
|
+
| `crossEntity` | entityType, orchestrationCount, statusCounts, events | When includeCrossEntity |
|
|
160
|
+
|
|
161
|
+
Example (compact — the default, recommended first call):
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"rootEntityRef": "E2E_MULTI_202602221343",
|
|
166
|
+
"rootEntityType": "ORDER"
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Example (entity-agnostic by ref only):
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"rootEntityRef": "STORE-001",
|
|
175
|
+
"includeScheduled": false
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Example (deep analysis with all sections):
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"rootEntityRef": "ORD-001",
|
|
184
|
+
"rootEntityType": "ORDER",
|
|
185
|
+
"includeRuleDetails": true,
|
|
186
|
+
"includeCustomLogs": true,
|
|
187
|
+
"includeSnapshots": true,
|
|
188
|
+
"includeCrossEntity": true
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Example (lightweight — minimal output):
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"rootEntityRef": "ORD-001",
|
|
197
|
+
"rootEntityType": "ORDER",
|
|
198
|
+
"includeEventDetails": false,
|
|
199
|
+
"includeScheduled": false,
|
|
200
|
+
"includeExceptions": false,
|
|
201
|
+
"includeNoMatchDetails": false,
|
|
202
|
+
"maxDrilldowns": 0
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## GraphQL Operations
|
|
207
|
+
|
|
208
|
+
### Single Query
|
|
209
|
+
Use `graphql.query` for one-off queries with manual pagination.
|
|
210
|
+
|
|
211
|
+
### Auto-Paginated Query
|
|
212
|
+
Use `graphql.queryAll` when you need ALL records. Automatically follows cursors.
|
|
213
|
+
|
|
214
|
+
### Batch Mutations
|
|
215
|
+
Use `graphql.batchMutate` for bulk updates (up to 50 mutations per request).
|
|
216
|
+
|
|
217
|
+
### Schema Discovery
|
|
218
|
+
Use `graphql.introspect` to discover mutations, input types, and field requirements:
|
|
219
|
+
- `listMutations: true` - Get all mutation names
|
|
220
|
+
- `mutation: 'updateOrder'` - Inspect specific mutation
|
|
221
|
+
- `type: 'UpdateOrderInput'` - See input type fields
|
|
222
|
+
|
|
223
|
+
## Batch Ingestion
|
|
224
|
+
|
|
225
|
+
### Flow
|
|
226
|
+
1. `batch.create` - Create job (name, entityType, action)
|
|
227
|
+
2. `batch.send` - Send records (jobId, payload)
|
|
228
|
+
3. `batch.status` - Poll until terminal state
|
|
229
|
+
4. `batch.batchStatus` - Check a specific batch inside a job (jobId + batchId). Use for troubleshooting partial failures within multi-batch jobs.
|
|
230
|
+
5. `batch.results` - Get per-record outcomes
|
|
231
|
+
|
|
232
|
+
## Event Analytics
|
|
233
|
+
|
|
234
|
+
### Metrics Tools
|
|
235
|
+
|
|
236
|
+
#### Health Check (Single Call)
|
|
237
|
+
|
|
238
|
+
Use `metrics.healthCheck` for a one-call health assessment. Runs multiple Prometheus queries locally, applies anomaly thresholds, and returns findings + recommendations. Falls back to Event API if Prometheus is unavailable.
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{ "window": "1h", "includeTopEvents": true }
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
For custom PromQL queries, use `metrics.query`. For pre-aggregated Event API rankings, use `metrics.topEvents`.
|
|
245
|
+
|
|
246
|
+
#### SLO Report (Managed Services)
|
|
247
|
+
|
|
248
|
+
Use `metrics.sloReport` when you need an operational KPI snapshot in one call:
|
|
249
|
+
- failure/no-match/pending rates
|
|
250
|
+
- p95 runtime + p95 inflight latency
|
|
251
|
+
- threshold findings + recommendations
|
|
252
|
+
- optional top failing events
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"window": "1h",
|
|
257
|
+
"includeTopFailingEvents": true,
|
|
258
|
+
"topN": 10
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
`metrics.sloReport` is preferred for release checks and incident triage handoffs where you need explicit SLI fields, not just raw PromQL output.
|
|
263
|
+
|
|
264
|
+
#### Label Discovery (Metric -> Labels)
|
|
265
|
+
|
|
266
|
+
Use `metrics.labelCatalog` before writing grouped PromQL to discover valid labels for a metric:
|
|
267
|
+
- samples live series via `last_over_time(metric[window])`
|
|
268
|
+
- extracts label keys + cardinality + sample values
|
|
269
|
+
- merges known Fluent label hints for common metrics
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"metric": "core_event_received_total",
|
|
274
|
+
"window": "1h",
|
|
275
|
+
"maxValuesPerLabel": 10
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Recommended workflow:
|
|
280
|
+
1. `metrics.labelCatalog` (discover labels)
|
|
281
|
+
2. `metrics.query` (write correct `sum by (...)` / `histogram_quantile(...)`)
|
|
282
|
+
3. `metrics.sloReport` (operational KPI snapshot)
|
|
283
|
+
|
|
284
|
+
#### Prometheus Metrics
|
|
285
|
+
Use `metrics.query` to execute PromQL queries via the Fluent GraphQL `metricInstant` / `metricRange` proxy:
|
|
286
|
+
- **Instant**: Evaluate at a single point in time — `{ query: "sum(rubix_event_runtime_seconds_count)", type: "instant" }`
|
|
287
|
+
- **Range**: Evaluate over a time window — `{ query: "...", type: "range", start: "ISO", end: "ISO", step: "1h" }`
|
|
288
|
+
|
|
289
|
+
The MCP tool routes PromQL through the GraphQL API (not raw Prometheus REST endpoints, which are not exposed by the platform). The `time`, `start`, and `end` parameters accept ISO-8601 timestamps (mapped to GraphQL `DateTime` type).
|
|
290
|
+
|
|
291
|
+
Access is permission-gated. If metrics calls fail for auth/authorization, verify the user/token has `METRICS_VIEW`.
|
|
292
|
+
|
|
293
|
+
#### Counter Delta Pattern (`last_over_time`)
|
|
294
|
+
|
|
295
|
+
For accurate daily/hourly counter deltas over wider windows, use:
|
|
296
|
+
|
|
297
|
+
```promql
|
|
298
|
+
(last_over_time(metric[window]) - metric offset <period>)
|
|
299
|
+
or
|
|
300
|
+
last_over_time(metric[window])
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Use this when offset samples can be missing (scrape gaps, resets). For short-window trend estimates, `increase()`/`rate()` is usually sufficient.
|
|
304
|
+
|
|
305
|
+
#### Label Hygiene (Critical)
|
|
306
|
+
|
|
307
|
+
Do not assume labels are shared across all metrics. Common mappings:
|
|
308
|
+
|
|
309
|
+
| Metric | Key Labels |
|
|
310
|
+
|---|---|
|
|
311
|
+
| `core_event_received_total` | `account_id`, `retailer_id`, `event_name`, `entity_type`, `source` |
|
|
312
|
+
| `rubix_event_runtime_seconds_count` | `account_id`, `retailer_id`, `event_name`, `entity_type`, `source`, `status` |
|
|
313
|
+
| `rubix_event_inflight_latency_seconds_count` | `account_id`, `retailer_id`, `event_name`, `entity_type`, `source` |
|
|
314
|
+
| `rubix_event_runtime_seconds_bucket` | `account_id`, `retailer_id`, `event_name`, `entity_type`, `source`, `status`, `le` |
|
|
315
|
+
|
|
316
|
+
Example pitfall: `status` is **not** a label on `core_event_received_total`; including it in `sum by (...)` will produce misleading/null label outputs.
|
|
317
|
+
|
|
318
|
+
#### Event Volume Analytics
|
|
319
|
+
Use `metrics.topEvents` for aggregate event analytics within a time window:
|
|
320
|
+
- Paginates through `event.list` results, groups by (name + entityType + status)
|
|
321
|
+
- Returns top-N rankings, failure rates, and status breakdown
|
|
322
|
+
- Supports `eventStatus` filter for server-side pre-filtering (e.g., `"FAILED"`, `"NO_MATCH"`)
|
|
323
|
+
- Example: `{ from: "2026-02-22T07:00:00Z", topN: 20 }`
|
|
324
|
+
- Example (failures only): `{ from: "2026-02-22T07:00:00Z", eventStatus: "FAILED", topN: 10 }`
|
|
325
|
+
|
|
326
|
+
For event model/filter semantics → `/fluent-event-api`.
|
|
327
|
+
For diagnostic decision trees → `/fluent-trace`.
|
|
328
|
+
|
|
329
|
+
### Event Analysis via Filters
|
|
330
|
+
Use `event.list` with targeted filters (`eventStatus`, `category`, `eventType`, `from`/`to`) to find patterns. Combine with `graphql.query` to correlate entity state with event history.
|
|
331
|
+
|
|
332
|
+
### Status/Category Alias Normalization
|
|
333
|
+
|
|
334
|
+
When translating user input into `event.list` filters, normalize common aliases:
|
|
335
|
+
|
|
336
|
+
| User/doc term | Canonical filter value |
|
|
337
|
+
|---|---|
|
|
338
|
+
| `ERROR` | `FAILED` |
|
|
339
|
+
| `PROCESSING` | `PENDING` (or `SCHEDULED` depending on lifecycle stage) |
|
|
340
|
+
| `ORDER_WORKFLOW` | `ORDER WORKFLOW` |
|
|
341
|
+
|
|
342
|
+
Prefer canonical values in requests; keep aliases only for interpretation.
|
|
343
|
+
|
|
344
|
+
## JOB/BATCH Entities vs Batch Ingestion
|
|
345
|
+
|
|
346
|
+
The MCP `batch.*` tools and JOB/BATCH workflow entities are **different concepts** that share terminology:
|
|
347
|
+
|
|
348
|
+
| Concept | What It Is | MCP Tools | Event API |
|
|
349
|
+
|---------|-----------|-----------|-----------|
|
|
350
|
+
| **Batch Ingestion** | Data loading mechanism (bulk create/update entities) | `batch.create`, `batch.send`, `batch.status`, `batch.results` | Not event-driven; uses dedicated ingestion API |
|
|
351
|
+
| **JOB/BATCH Entities** | Workflow-driven processing entities (orchestrated execution) | Query via `graphql.query`, trace via `event.list` | `entityType=JOB` or `entityType=BATCH`; linked by `rootEntityType=JOB` |
|
|
352
|
+
|
|
353
|
+
### Diagnosing JOB/BATCH Workflow Issues
|
|
354
|
+
|
|
355
|
+
JOB and BATCH are orchestratable entities with their own workflows. To trace them:
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
event.list({ "context.entityType": "JOB", "context.entityRef": "<JOB_REF>", "count": 100 })
|
|
359
|
+
event.list({ "context.entityType": "BATCH", "context.rootEntityRef": "<JOB_REF>", "count": 100 })
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
BATCH entities link to their parent JOB via `rootEntityType=JOB` / `rootEntityRef`. The `BATCH_COMPLETE` event signals batch processing completion.
|
|
363
|
+
|
|
364
|
+
For event model semantics and query patterns → `/fluent-event-api`.
|
|
365
|
+
For diagnostic decision trees → `/fluent-trace`.
|
|
366
|
+
|
|
367
|
+
## Orchestration
|
|
368
|
+
|
|
369
|
+
### Rule Registry
|
|
370
|
+
|
|
371
|
+
Use `plugin.list` to fetch all registered orchestration rules (standard + custom) with metadata from `GET /orchestration/rest/v1/plugin`. Returns rule name, description, accepted entity types, produced events, and parameters.
|
|
372
|
+
|
|
373
|
+
- List all rules: `{}` (no params)
|
|
374
|
+
- Filter by name: `{ "name": "SendEvent" }` (case-insensitive substring match)
|
|
375
|
+
|
|
376
|
+
### Workflow Transitions
|
|
377
|
+
|
|
378
|
+
Use `workflow.transitions` to discover available user actions at any entity state
|
|
379
|
+
(backed by `POST /api/v4.1/transition`).
|
|
380
|
+
|
|
381
|
+
**When to use:**
|
|
382
|
+
- Discover what events can be fired at a given status without reading workflow JSON
|
|
383
|
+
- Build dynamic E2E test sequences that adapt to workflow changes
|
|
384
|
+
- Validate that expected user actions exist after deployment
|
|
385
|
+
- Get required attributes for each action (avoids missing-attribute errors on `event.send`)
|
|
386
|
+
|
|
387
|
+
**Example — ORDER at a specific status:**
|
|
388
|
+
|
|
389
|
+
```json
|
|
390
|
+
{
|
|
391
|
+
"triggers": [
|
|
392
|
+
{
|
|
393
|
+
"type": "ORDER",
|
|
394
|
+
"subtype": "HD",
|
|
395
|
+
"status": "CREATED",
|
|
396
|
+
"retailerId": "5",
|
|
397
|
+
"flexType": "ORDER::HD"
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Example — Module-scoped trigger:**
|
|
404
|
+
|
|
405
|
+
```json
|
|
406
|
+
{
|
|
407
|
+
"triggers": [
|
|
408
|
+
{
|
|
409
|
+
"type": "MANIFEST",
|
|
410
|
+
"subtype": "DEFAULT",
|
|
411
|
+
"status": "PENDING",
|
|
412
|
+
"module": "servicepoint",
|
|
413
|
+
"flexType": "CARRIER::DEFAULT",
|
|
414
|
+
"retailerId": "2"
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Integration with event.send:** The `eventName` from each `userAction` maps directly to
|
|
421
|
+
`event.send`'s `name` parameter. The `attributes[]` tell you what to include in `event.send`'s
|
|
422
|
+
`attributes` parameter.
|
|
423
|
+
|
|
424
|
+
Notes:
|
|
425
|
+
- `retailerId` is required per trigger (falls back to `FLUENT_RETAILER_ID`)
|
|
426
|
+
- `module`, `flexType`, `status` are optional filters
|
|
427
|
+
- Response includes `userActions` with `eventName`, `context`, and `attributes`
|
|
428
|
+
|
|
429
|
+
### Strict User Action Contract (Anti-Hallucination)
|
|
430
|
+
|
|
431
|
+
Use these guardrails whenever interpreting `workflow.transitions`:
|
|
432
|
+
1. Treat `userActions[].eventName` as the only valid event to send (never infer from labels).
|
|
433
|
+
2. Treat `userActions[].attributes` as the runtime contract for payload shape (do not invent keys).
|
|
434
|
+
3. If an expected action is missing, retry with `module: "all"` before concluding configuration is broken.
|
|
435
|
+
4. If it appears under `module: "all"` but not under a target module, fix `context[].modules` and `fc.mystique.apps`.
|
|
436
|
+
5. Validate trigger scope alignment: `type`, `subtype`, and `flexType` must match the workflow branch.
|
|
437
|
+
6. Do not invent undocumented user-action schema fields; keep to `eventName`, `context`, `attributes`.
|
|
438
|
+
|
|
439
|
+
For canonical schema authoring and diagnostics, cross-check `/fluent-workflow-builder` and `/fluent-transition-api`.
|
|
440
|
+
|
|
441
|
+
### Workflow Analysis Flow
|
|
442
|
+
|
|
443
|
+
For end-to-end workflow understanding:
|
|
444
|
+
1. Download workflow JSON (via Fluent CLI or `workflow_download`)
|
|
445
|
+
2. `plugin.list` — look up rules referenced in rulesets to understand what each does
|
|
446
|
+
3. `workflow.transitions` — query user actions for each entity state to see what UI buttons appear
|
|
447
|
+
|
|
448
|
+
## Agentic Operations
|
|
449
|
+
|
|
450
|
+
Tools for agent-driven workflows: type-safe entity CRUD, workflow deployment, settings management, environment introspection, and state assertions.
|
|
451
|
+
|
|
452
|
+
### Entity Lifecycle
|
|
453
|
+
|
|
454
|
+
#### `entity.create`
|
|
455
|
+
|
|
456
|
+
Type-safe entity creation with built-in validation and gotcha knowledge.
|
|
457
|
+
|
|
458
|
+
| Parameter | Type | Required | Default | Description |
|
|
459
|
+
|-----------|------|----------|---------|-------------|
|
|
460
|
+
| `entityType` | string | yes | — | Entity type. Supported: ORDER, FULFILMENT, FULFILMENT_CHOICE, LOCATION, PRODUCT, INVENTORY_POSITION, INVENTORY_QUANTITY, NETWORK, VIRTUAL_CATALOGUE, WAVE, ARTICLE, CUSTOMER |
|
|
461
|
+
| `data` | object | yes | — | Entity creation input fields (matches GraphQL create input type) |
|
|
462
|
+
| `returnFields` | string[] | no | type defaults | Fields to return after creation |
|
|
463
|
+
| `dryRun` | boolean | no | false | If true, build and validate mutation without executing |
|
|
464
|
+
|
|
465
|
+
**Key behaviors:**
|
|
466
|
+
- Validates required fields BEFORE sending (e.g., Location needs `openingSchedule`)
|
|
467
|
+
- Encodes compound key rules (ProductKey needs `ref` + `catalogue.ref`)
|
|
468
|
+
- Auto-resolves `retailerId` from config for retailer-scoped entities
|
|
469
|
+
- Returns the executed mutation string for audit trail
|
|
470
|
+
|
|
471
|
+
**Gotchas encoded:**
|
|
472
|
+
- No create inputs have a `status` field (auto-set to CREATED)
|
|
473
|
+
- Customer has NO `ref` field — `username` is the identifier
|
|
474
|
+
- Network uses `name` not `ref` in create; `retailers` is a plural array
|
|
475
|
+
- Location requires `openingSchedule` (even for 24/7, use `allHours: true`)
|
|
476
|
+
- Product `gtin` has 20-char max
|
|
477
|
+
- Settings `context` is plain String, `contextId` is separate Int
|
|
478
|
+
|
|
479
|
+
```json
|
|
480
|
+
{
|
|
481
|
+
"entityType": "ORDER",
|
|
482
|
+
"data": {
|
|
483
|
+
"ref": "TEST-ORDER-001",
|
|
484
|
+
"type": "HD",
|
|
485
|
+
"retailer": { "id": 5 }
|
|
486
|
+
},
|
|
487
|
+
"dryRun": true
|
|
488
|
+
}
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
#### `entity.update`
|
|
492
|
+
|
|
493
|
+
Status-aware entity updates with optional transition validation.
|
|
494
|
+
|
|
495
|
+
| Parameter | Type | Required | Default | Description |
|
|
496
|
+
|-----------|------|----------|---------|-------------|
|
|
497
|
+
| `entityType` | string | yes | — | Entity type |
|
|
498
|
+
| `id` | string | yes | — | Entity ID |
|
|
499
|
+
| `fields` | object | yes | — | Fields to update |
|
|
500
|
+
| `returnFields` | string[] | no | type defaults | Fields to return after update |
|
|
501
|
+
| `validateTransition` | boolean | no | false | If true and status is changing, validates via `workflow.transitions` first |
|
|
502
|
+
|
|
503
|
+
```json
|
|
504
|
+
{
|
|
505
|
+
"entityType": "ORDER",
|
|
506
|
+
"id": "36",
|
|
507
|
+
"fields": { "status": "BOOKED" },
|
|
508
|
+
"validateTransition": true
|
|
509
|
+
}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
#### `entity.get`
|
|
513
|
+
|
|
514
|
+
Unified entity lookup by ID or ref with optional edge inclusion.
|
|
515
|
+
|
|
516
|
+
| Parameter | Type | Required | Default | Description |
|
|
517
|
+
|-----------|------|----------|---------|-------------|
|
|
518
|
+
| `entityType` | string | yes | — | Entity type |
|
|
519
|
+
| `id` | string | no | — | Entity ID (preferred lookup) |
|
|
520
|
+
| `ref` | string | no | — | Entity ref (fallback; not available for CUSTOMER) |
|
|
521
|
+
| `fields` | string[] | no | type defaults | Fields to return |
|
|
522
|
+
| `includeEdges` | string[] | no | — | Related entity edges to include (e.g., `fulfilments`, `items`, `attributes`) |
|
|
523
|
+
|
|
524
|
+
Either `id` or `ref` must be provided.
|
|
525
|
+
|
|
526
|
+
```json
|
|
527
|
+
{
|
|
528
|
+
"entityType": "ORDER",
|
|
529
|
+
"ref": "HD-001",
|
|
530
|
+
"includeEdges": ["fulfilments", "items"]
|
|
531
|
+
}
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### Workflow Management
|
|
535
|
+
|
|
536
|
+
#### `workflow.upload`
|
|
537
|
+
|
|
538
|
+
Deploy a workflow JSON definition to the Fluent environment via REST API.
|
|
539
|
+
|
|
540
|
+
| Parameter | Type | Required | Default | Description |
|
|
541
|
+
|-----------|------|----------|---------|-------------|
|
|
542
|
+
| `workflow` | string \| object | yes | — | Workflow JSON (as object or JSON string) |
|
|
543
|
+
| `retailerId` | string | no | from config | Target retailer ID |
|
|
544
|
+
| `validate` | boolean | no | true | Validate structure before uploading |
|
|
545
|
+
| `dryRun` | boolean | no | false | Validate only, do not deploy |
|
|
546
|
+
|
|
547
|
+
**Validation checks:** `name` present, at least one status defined, all rulesets have name/triggers/rules.
|
|
548
|
+
|
|
549
|
+
> For production deployments, prefer `fluent module install` via CLI which bundles workflows with settings, rules, and data in a versioned module. Use this tool for interactive editing, hotfixes, or when CLI is unavailable.
|
|
550
|
+
|
|
551
|
+
#### `workflow.diff`
|
|
552
|
+
|
|
553
|
+
Compare two workflow JSON definitions. Pure local computation — no API calls.
|
|
554
|
+
|
|
555
|
+
| Parameter | Type | Required | Default | Description |
|
|
556
|
+
|-----------|------|----------|---------|-------------|
|
|
557
|
+
| `base` | string \| object | yes | — | Base workflow (before) |
|
|
558
|
+
| `target` | string \| object | yes | — | Target workflow (after) |
|
|
559
|
+
| `format` | `"summary"` \| `"detailed"` \| `"mermaid"` | no | `"summary"` | Output format |
|
|
560
|
+
|
|
561
|
+
**Risk assessment:** Removing rulesets = HIGH, adding = LOW, modifying props = MEDIUM.
|
|
562
|
+
|
|
563
|
+
Formats:
|
|
564
|
+
- `summary` — change counts and risk level
|
|
565
|
+
- `detailed` — per-ruleset change breakdown
|
|
566
|
+
- `mermaid` — `stateDiagram-v2` with color-coded added/removed/modified states
|
|
567
|
+
|
|
568
|
+
#### `workflow.simulate`
|
|
569
|
+
|
|
570
|
+
Static prediction of workflow event outcomes. Pure local computation — no API calls.
|
|
571
|
+
|
|
572
|
+
| Parameter | Type | Required | Default | Description |
|
|
573
|
+
|-----------|------|----------|---------|-------------|
|
|
574
|
+
| `workflow` | string \| object | yes | — | Workflow JSON |
|
|
575
|
+
| `currentStatus` | string | yes | — | Current entity status to simulate from |
|
|
576
|
+
| `eventName` | string | no | — | Event name filter (if omitted, returns all matching rulesets) |
|
|
577
|
+
| `entityType` | string | no | — | Entity type filter |
|
|
578
|
+
| `entitySubtype` | string | no | — | Entity subtype filter |
|
|
579
|
+
|
|
580
|
+
**What it does:**
|
|
581
|
+
- Finds rulesets whose triggers match `currentStatus` (+ optional `eventName`)
|
|
582
|
+
- Extracts SetState rules → predicted next status
|
|
583
|
+
- Extracts SendEvent rules → predicted follow-on events
|
|
584
|
+
- Extracts SendWebhook rules → webhook side effects
|
|
585
|
+
- Identifies custom rules that cannot be statically predicted
|
|
586
|
+
|
|
587
|
+
**Important limitations (always disclosed in response):**
|
|
588
|
+
- STATIC ONLY: Cannot evaluate runtime conditions, entity attributes, or settings values
|
|
589
|
+
- CUSTOM RULES OPAQUE: Java plugin rules may conditionally execute
|
|
590
|
+
- NO CROSS-ENTITY: Does not follow SendEvent chains into child entity workflows
|
|
591
|
+
- Use `workflow.transitions` for AUTHORITATIVE live validation
|
|
592
|
+
|
|
593
|
+
```json
|
|
594
|
+
{
|
|
595
|
+
"workflow": { "name": "ORDER::HD", "rulesets": [...] },
|
|
596
|
+
"currentStatus": "CREATED",
|
|
597
|
+
"eventName": "ConfirmValidation"
|
|
598
|
+
}
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Settings Management
|
|
602
|
+
|
|
603
|
+
#### `setting.upsert`
|
|
604
|
+
|
|
605
|
+
Create or update a Fluent Commerce setting. Upsert semantics — queries by name + context + contextId first, creates if missing, updates if exists.
|
|
606
|
+
|
|
607
|
+
| Parameter | Type | Required | Default | Description |
|
|
608
|
+
|-----------|------|----------|---------|-------------|
|
|
609
|
+
| `name` | string | yes | — | Setting key/name |
|
|
610
|
+
| `value` | string | yes | — | Setting value (for small values). Mutually exclusive with `lobValue` |
|
|
611
|
+
| `lobValue` | string | no | — | Large object value (for JSON payloads > 4KB) |
|
|
612
|
+
| `context` | string | yes | — | Scope: `RETAILER`, `ACCOUNT`, `LOCATION`, `NETWORK`, `AGENT`, `CUSTOMER` |
|
|
613
|
+
| `contextId` | integer | no | from config | Context ID (e.g., retailer ID). Falls back to `FLUENT_RETAILER_ID` for RETAILER context |
|
|
614
|
+
|
|
615
|
+
**Key gotchas:**
|
|
616
|
+
- `context` is a plain String (`"RETAILER"`), NOT an object
|
|
617
|
+
- `contextId` is a separate Int field
|
|
618
|
+
- For large JSON values (>4KB), use `lobValue` instead of `value`
|
|
619
|
+
- Returns `created: true/false` and `previousValue` for audit trail
|
|
620
|
+
|
|
621
|
+
```json
|
|
622
|
+
{
|
|
623
|
+
"name": "WEBHOOK_ORDER_URL",
|
|
624
|
+
"value": "https://example.com/webhook",
|
|
625
|
+
"context": "RETAILER"
|
|
626
|
+
}
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
#### `setting.bulkUpsert`
|
|
630
|
+
|
|
631
|
+
Batch create or update multiple settings in one call.
|
|
632
|
+
|
|
633
|
+
| Parameter | Type | Required | Default | Description |
|
|
634
|
+
|-----------|------|----------|---------|-------------|
|
|
635
|
+
| `settings` | array | yes | — | Array of setting objects (min 1, max 50). Each has: `name`, `value`, `context`, optional `lobValue`, `contextId` |
|
|
636
|
+
|
|
637
|
+
Processes sequentially with individual error handling. Returns `created`, `updated`, `failed` counts plus per-setting results.
|
|
638
|
+
|
|
639
|
+
```json
|
|
640
|
+
{
|
|
641
|
+
"settings": [
|
|
642
|
+
{ "name": "WEBHOOK_ORDER_URL", "value": "https://...", "context": "RETAILER" },
|
|
643
|
+
{ "name": "WEBHOOK_FULFILMENT_URL", "value": "https://...", "context": "RETAILER" }
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
### Environment Introspection
|
|
649
|
+
|
|
650
|
+
#### `environment.discover`
|
|
651
|
+
|
|
652
|
+
Full environment snapshot in one call.
|
|
653
|
+
|
|
654
|
+
| Parameter | Type | Required | Default | Description |
|
|
655
|
+
|-----------|------|----------|---------|-------------|
|
|
656
|
+
| `include` | string[] | no | `["retailer", "locations", "networks", "catalogues"]` | Sections to include. Valid: `retailer`, `locations`, `networks`, `catalogues`, `workflows`, `settings`, `modules`, `users` |
|
|
657
|
+
|
|
658
|
+
Returns everything an agent needs: retailer details, locations with type/status, networks with associated locations, catalogues (inventory + product + virtual), deployed workflows, settings, modules, and authenticated user info.
|
|
659
|
+
|
|
660
|
+
**Limitations:**
|
|
661
|
+
- Locations and settings return first 100 items only (use `graphql.queryAll` for complete list)
|
|
662
|
+
- Workflows section uses transition API probe — use `fluent workflow list` via CLI for definitive workflow listing
|
|
663
|
+
|
|
664
|
+
```json
|
|
665
|
+
{
|
|
666
|
+
"include": ["retailer", "locations", "networks", "catalogues", "settings", "workflows"]
|
|
667
|
+
}
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
#### `environment.validate`
|
|
671
|
+
|
|
672
|
+
Pre-flight environment validation before E2E tests or deployments.
|
|
673
|
+
|
|
674
|
+
| Parameter | Type | Required | Default | Description |
|
|
675
|
+
|-----------|------|----------|---------|-------------|
|
|
676
|
+
| `checks` | string[] | no | `["auth", "retailer", "locations"]` | Checks to run. Valid: `auth`, `retailer`, `locations`, `inventory`, `workflows`, `settings`, `modules` |
|
|
677
|
+
|
|
678
|
+
Returns pass/fail per check with severity (`info`, `warning`, `error`) and actionable messages.
|
|
679
|
+
|
|
680
|
+
**Checks performed:**
|
|
681
|
+
- `auth` — token valid, permissions sufficient
|
|
682
|
+
- `retailer` — exists, active
|
|
683
|
+
- `locations` — at least one warehouse/store exists
|
|
684
|
+
- `inventory` — at least one product with stock > 0
|
|
685
|
+
- `workflows` — key workflows deployed (ORDER, FULFILMENT)
|
|
686
|
+
- `settings` — settings exist in environment
|
|
687
|
+
- `modules` — modules deployed (via plugin registry)
|
|
688
|
+
|
|
689
|
+
```json
|
|
690
|
+
{
|
|
691
|
+
"checks": ["auth", "retailer", "locations", "inventory", "workflows"]
|
|
692
|
+
}
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
### Testing
|
|
696
|
+
|
|
697
|
+
#### `test.assert`
|
|
698
|
+
|
|
699
|
+
Assert entity state matches expectations with optional polling. Deep assertion on entity fields, attributes, and edge counts/statuses.
|
|
700
|
+
|
|
701
|
+
| Parameter | Type | Required | Default | Description |
|
|
702
|
+
|-----------|------|----------|---------|-------------|
|
|
703
|
+
| `entityType` | string | yes | — | Entity type (ORDER, FULFILMENT, etc.) |
|
|
704
|
+
| `id` | string | no | — | Entity ID (preferred) |
|
|
705
|
+
| `ref` | string | no | — | Entity ref (fallback) |
|
|
706
|
+
| `assertions` | object | yes | — | Assertion conditions (see below) |
|
|
707
|
+
| `poll` | boolean | no | false | Enable polling mode (retry until pass or timeout) |
|
|
708
|
+
| `timeoutMs` | integer | no | 60000 | Polling timeout in ms (min 1000, max 300000) |
|
|
709
|
+
| `intervalMs` | integer | no | 5000 | Polling interval in ms (min 1000, max 30000) |
|
|
710
|
+
|
|
711
|
+
**Assertion fields:**
|
|
712
|
+
- `status` — exact match on entity status
|
|
713
|
+
- `type` — exact match on entity type
|
|
714
|
+
- `subtype` — exact match on entity subtype
|
|
715
|
+
- `attributes` — key-value pairs that must be present
|
|
716
|
+
- `edges` — per-edge assertions with `minCount`, `maxCount`, `status`
|
|
717
|
+
|
|
718
|
+
**Polling mode:** Set `poll: true` to retry until assertions pass or timeout. Useful after sending events when state changes are async.
|
|
719
|
+
|
|
720
|
+
```json
|
|
721
|
+
{
|
|
722
|
+
"entityType": "ORDER",
|
|
723
|
+
"ref": "HD-001",
|
|
724
|
+
"assertions": {
|
|
725
|
+
"status": "BOOKED",
|
|
726
|
+
"edges": {
|
|
727
|
+
"fulfilments": { "minCount": 1, "status": "CREATED" }
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
"poll": true,
|
|
731
|
+
"timeoutMs": 30000
|
|
732
|
+
}
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
## Webhook Validation
|
|
736
|
+
|
|
737
|
+
### `webhook.validate`
|
|
738
|
+
|
|
739
|
+
Validate a Fluent Commerce webhook payload and optionally verify its signature.
|
|
740
|
+
|
|
741
|
+
| Parameter | Type | Required | Default | Description |
|
|
742
|
+
|-----------|------|----------|---------|-------------|
|
|
743
|
+
| `payload` | object | yes | — | Webhook payload. Must include `name`, `id`, `retailerId` for basic validation |
|
|
744
|
+
| `rawBody` | string | no | — | Exact raw HTTP request body for signature verification (avoids false negatives from JSON re-serialization) |
|
|
745
|
+
| `signature` | string | no | — | X-Fluent-Signature header value (base64). Required for signature validation |
|
|
746
|
+
| `publicKey` | string | no | — | Fluent public key (PEM format). Required when `signature` is provided |
|
|
747
|
+
| `algorithm` | `"SHA512withRSA"` \| `"MD5withRSA"` | no | `"SHA512withRSA"` | Signature algorithm |
|
|
748
|
+
|
|
749
|
+
**Two modes:**
|
|
750
|
+
1. **Basic validation** (no signature): Checks required fields present
|
|
751
|
+
2. **Signature validation**: Verifies X-Fluent-Signature against the body using the public key
|
|
752
|
+
|
|
753
|
+
```json
|
|
754
|
+
{
|
|
755
|
+
"payload": { "name": "OrderCreated", "id": "123", "retailerId": "1" },
|
|
756
|
+
"signature": "<base64-sig>",
|
|
757
|
+
"publicKey": "<PEM-key>"
|
|
758
|
+
}
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
## Response Optimization
|
|
762
|
+
|
|
763
|
+
High-volume tools support response shaping to reduce token consumption:
|
|
764
|
+
|
|
765
|
+
### event.list — Field Projection
|
|
766
|
+
|
|
767
|
+
Pass `fields` (array of strings) to return only selected fields per event. Reduces token usage by 7-8x for typical queries.
|
|
768
|
+
|
|
769
|
+
```json
|
|
770
|
+
{
|
|
771
|
+
"context.entityRef": "ORDER_REF",
|
|
772
|
+
"context.entityType": "ORDER",
|
|
773
|
+
"count": 50,
|
|
774
|
+
"fields": ["id", "name", "eventStatus", "category", "generatedOn", "context.entityRef", "context.entityType"]
|
|
775
|
+
}
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
Common field sets by use case:
|
|
779
|
+
- **Trace/debug:** `["id", "name", "eventStatus", "category", "context.entityRef", "context.entityType", "generatedOn", "source", "context.sourceEvents"]`
|
|
780
|
+
- **E2E status check:** `["id", "name", "eventStatus", "context.entityRef"]`
|
|
781
|
+
- **Exception analysis:** `["id", "name", "eventStatus", "category", "attributes", "context.entityRef", "generatedOn"]`
|
|
782
|
+
|
|
783
|
+
Omit `fields` for full event data (when you need attributes, source, timing, etc.).
|
|
784
|
+
|
|
785
|
+
### plugin.list — Compact Mode
|
|
786
|
+
|
|
787
|
+
Pass `compact: true` to return only `ruleInfo` (name, description, entity types) per rule, stripping `parameters` and `eventAttributes`. Reduces token usage by 40-60x for unfiltered queries.
|
|
788
|
+
|
|
789
|
+
```json
|
|
790
|
+
{ "compact": true }
|
|
791
|
+
{ "name": "SendEvent", "compact": true }
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
Use full mode (default) when you need rule parameters or event attribute contracts.
|
|
795
|
+
|
|
796
|
+
## Pagination Pattern
|
|
797
|
+
|
|
798
|
+
Fluent uses Relay-style connections. Cursors live on each **edge**, not on pageInfo:
|
|
799
|
+
|
|
800
|
+
```graphql
|
|
801
|
+
{
|
|
802
|
+
orders(first: 50, after: $cursor) {
|
|
803
|
+
edges {
|
|
804
|
+
cursor
|
|
805
|
+
node { id ref status }
|
|
806
|
+
}
|
|
807
|
+
pageInfo { hasNextPage }
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
Take cursor from the LAST edge, pass as `after` in next call.
|