@fluentcommerce/fluent-mcp-extn 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/settings-tools.js +9 -5
- package/docs/E2E_TESTING.md +12 -12
- package/docs/TOOL_REFERENCE.md +2 -2
- package/package.json +1 -1
package/dist/settings-tools.js
CHANGED
|
@@ -424,12 +424,14 @@ export async function handleSettingGet(args, ctx) {
|
|
|
424
424
|
// If outputFile is provided and exactly one setting matches, write to file
|
|
425
425
|
if (parsed.outputFile && settings.length === 1) {
|
|
426
426
|
const setting = settings[0];
|
|
427
|
-
const
|
|
428
|
-
//
|
|
427
|
+
const raw = setting.lobValue ?? setting.value ?? "";
|
|
428
|
+
// lobValue may be a parsed object (valueType: JSON) or a string — normalize to string
|
|
429
|
+
const content = typeof raw === "string" ? raw : JSON.stringify(raw, null, 2);
|
|
430
|
+
// Try to pretty-print JSON content (if it's a JSON string, reformat)
|
|
429
431
|
let fileContent = content;
|
|
430
432
|
try {
|
|
431
|
-
const
|
|
432
|
-
fileContent = JSON.stringify(
|
|
433
|
+
const obj = JSON.parse(content);
|
|
434
|
+
fileContent = JSON.stringify(obj, null, 2);
|
|
433
435
|
}
|
|
434
436
|
catch {
|
|
435
437
|
// Not JSON — write as-is
|
|
@@ -462,7 +464,9 @@ export async function handleSettingGet(args, ctx) {
|
|
|
462
464
|
fs.mkdirSync(outputDir, { recursive: true });
|
|
463
465
|
const savedFiles = [];
|
|
464
466
|
for (const setting of settings) {
|
|
465
|
-
const
|
|
467
|
+
const raw = setting.lobValue ?? setting.value ?? "";
|
|
468
|
+
// lobValue may be a parsed object (valueType: JSON) or a string — normalize to string
|
|
469
|
+
const content = typeof raw === "string" ? raw : JSON.stringify(raw, null, 2);
|
|
466
470
|
let fileContent = content;
|
|
467
471
|
try {
|
|
468
472
|
const p = JSON.parse(content);
|
package/docs/E2E_TESTING.md
CHANGED
|
@@ -235,8 +235,8 @@ Discovery-first single order lifecycle test. Creates an order with
|
|
|
235
235
|
**How to run:**
|
|
236
236
|
|
|
237
237
|
```bash
|
|
238
|
-
npx tsx scripts/e2e-full-order.ts --profile
|
|
239
|
-
FLUENT_PROFILE=
|
|
238
|
+
npx tsx scripts/e2e-full-order.ts --profile YOUR_PROFILE --retailer 2
|
|
239
|
+
FLUENT_PROFILE=YOUR_PROFILE FLUENT_RETAILER_ID=2 npx tsx scripts/e2e-full-order.ts
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
**Environment:** requires `FLUENT_PROFILE` + `FLUENT_RETAILER_ID`, or `--profile`
|
|
@@ -269,7 +269,7 @@ MULTI order type workflow and includes workflow transition discovery.
|
|
|
269
269
|
npx tsx scripts/e2e-full-multi.ts
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
**Environment:** defaults to `FLUENT_BASE_URL=https
|
|
272
|
+
**Environment:** defaults to `FLUENT_BASE_URL=https://<account>.test.api.fluentretail.com`
|
|
273
273
|
and `FLUENT_RETAILER_ID=2`. Override with env vars. Requires OAuth or profile
|
|
274
274
|
credentials.
|
|
275
275
|
|
|
@@ -296,7 +296,7 @@ Comprehensive smoke test for all 11 agentic tools against a live environment.
|
|
|
296
296
|
**How to run:**
|
|
297
297
|
|
|
298
298
|
```bash
|
|
299
|
-
npx tsx scripts/e2e-agentic.ts --profile
|
|
299
|
+
npx tsx scripts/e2e-agentic.ts --profile YOUR_PROFILE
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
**Environment:** requires `FLUENT_PROFILE` or `--profile` flag. Defaults to
|
|
@@ -322,7 +322,7 @@ responses.
|
|
|
322
322
|
**How to run:**
|
|
323
323
|
|
|
324
324
|
```bash
|
|
325
|
-
npx tsx scripts/e2e-response-shaping.ts --profile
|
|
325
|
+
npx tsx scripts/e2e-response-shaping.ts --profile YOUR_PROFILE
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
**Environment:** requires `FLUENT_PROFILE` or `--profile`. Uses default budget
|
|
@@ -347,7 +347,7 @@ per-event drilldowns via `event.get`.
|
|
|
347
347
|
**How to run:**
|
|
348
348
|
|
|
349
349
|
```bash
|
|
350
|
-
npx tsx scripts/run-flow-inspect.ts <ROOT_ENTITY_REF> --profile
|
|
350
|
+
npx tsx scripts/run-flow-inspect.ts <ROOT_ENTITY_REF> --profile YOUR_PROFILE
|
|
351
351
|
npx tsx scripts/run-flow-inspect.ts HD-001 --root-type ORDER --profile HMDEV
|
|
352
352
|
npx tsx scripts/run-flow-inspect.ts HD-001 --root-id 12345 --light --no-drilldown
|
|
353
353
|
npx tsx scripts/run-flow-inspect.ts HD-001 --drilldown-classes webhook,mutation --drilldown-limit 20
|
|
@@ -357,7 +357,7 @@ npx tsx scripts/run-flow-inspect.ts HD-001 --drilldown-classes webhook,mutation
|
|
|
357
357
|
|
|
358
358
|
| Flag | Default | Description |
|
|
359
359
|
|------|---------|-------------|
|
|
360
|
-
| `--profile <name>` |
|
|
360
|
+
| `--profile <name>` | - | Fluent CLI profile |
|
|
361
361
|
| `--root-type <type>` | any | Root entity type (ORDER, FULFILMENT, etc.) |
|
|
362
362
|
| `--root-id <id>` | - | Root entity ID for disambiguation |
|
|
363
363
|
| `--out <path>` | `accounts/<profile>/analysis/EVENT_FLOW_INSPECT_<ref>.json` | Raw output path |
|
|
@@ -394,7 +394,7 @@ mutations, sendEvent actions, scheduled actions, and ruleset durations.
|
|
|
394
394
|
**How to run:**
|
|
395
395
|
|
|
396
396
|
```bash
|
|
397
|
-
npx tsx scripts/order-event-inspect.ts <ORDER_REF> --profile
|
|
397
|
+
npx tsx scripts/order-event-inspect.ts <ORDER_REF> --profile YOUR_PROFILE
|
|
398
398
|
npx tsx scripts/order-event-inspect.ts HD-001 --profile HMDEV --out /tmp/inspect.json
|
|
399
399
|
```
|
|
400
400
|
|
|
@@ -411,16 +411,16 @@ and entity ref.
|
|
|
411
411
|
|
|
412
412
|
```bash
|
|
413
413
|
# Fetch specific events by ID
|
|
414
|
-
npx tsx scripts/check-event-status.ts --event-id <uuid> --profile
|
|
414
|
+
npx tsx scripts/check-event-status.ts --event-id <uuid> --profile YOUR_PROFILE
|
|
415
415
|
|
|
416
416
|
# List events by name
|
|
417
|
-
npx tsx scripts/check-event-status.ts --event-name ConfirmValidation --profile
|
|
417
|
+
npx tsx scripts/check-event-status.ts --event-name ConfirmValidation --profile YOUR_PROFILE
|
|
418
418
|
|
|
419
419
|
# List events by entity ref
|
|
420
|
-
npx tsx scripts/check-event-status.ts --entity-ref HD-001 --profile
|
|
420
|
+
npx tsx scripts/check-event-status.ts --entity-ref HD-001 --profile YOUR_PROFILE
|
|
421
421
|
|
|
422
422
|
# Combine filters
|
|
423
|
-
npx tsx scripts/check-event-status.ts --event-name ConfirmValidation --entity-ref HD-001 --count 20 --profile
|
|
423
|
+
npx tsx scripts/check-event-status.ts --event-name ConfirmValidation --entity-ref HD-001 --count 20 --profile YOUR_PROFILE
|
|
424
424
|
```
|
|
425
425
|
|
|
426
426
|
**Options:**
|
package/docs/TOOL_REFERENCE.md
CHANGED
|
@@ -1575,7 +1575,7 @@ Uses the GraphQL `settings(name:)` query. Returns metadata inline (name, context
|
|
|
1575
1575
|
{
|
|
1576
1576
|
"name": "fc.mystique.manifest.oms",
|
|
1577
1577
|
"context": "ACCOUNT",
|
|
1578
|
-
"outputFile": "./accounts
|
|
1578
|
+
"outputFile": "./accounts/<PROFILE>/manifests/backups/fc.mystique.manifest.oms.json"
|
|
1579
1579
|
}
|
|
1580
1580
|
```
|
|
1581
1581
|
|
|
@@ -1593,7 +1593,7 @@ Uses the GraphQL `settings(name:)` query. Returns metadata inline (name, context
|
|
|
1593
1593
|
```json
|
|
1594
1594
|
{
|
|
1595
1595
|
"name": "fc.mystique.manifest.%",
|
|
1596
|
-
"outputFile": "./accounts
|
|
1596
|
+
"outputFile": "./accounts/<PROFILE>/manifests/backups/"
|
|
1597
1597
|
}
|
|
1598
1598
|
```
|
|
1599
1599
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentcommerce/fluent-mcp-extn",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "MCP (Model Context Protocol) extension server for Fluent Commerce. Exposes event dispatch, transition actions, GraphQL execution, Prometheus metrics, batch ingestion, and webhook validation as MCP tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|