@flowapt/flowiq-cli 0.2.8 → 0.2.9
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/README.md +14 -2
- package/TEAM-GUIDE.md +1 -0
- package/package.json +1 -1
- package/src/commands/agent-config.js +4 -1
- package/src/index.js +2 -0
package/README.md
CHANGED
|
@@ -552,13 +552,25 @@ Set an allowlisted set of the active agent's config fields (the prompt-builder
|
|
|
552
552
|
flowiq agent config <organization_id> # show current
|
|
553
553
|
flowiq agent config <organization_id> --use-settings-prompt --model gpt-5.4-mini \
|
|
554
554
|
--rename Zara --tool woo_order_build=true --tool view_cart_tool=true --discount true
|
|
555
|
+
flowiq agent config <organization_id> --test-contact-number 27000000001 --test-contact-name "QA Bot"
|
|
555
556
|
```
|
|
556
557
|
|
|
557
558
|
Settable: `settings.use_settings_prompt`, `settings.model`, agent `--rename`,
|
|
558
559
|
the tool-flag columns (`woo_order_build`, `woo_tip_field`, `woo_order_note_field`,
|
|
559
560
|
`view_cart_tool`, `restock_tool`, `block_tool_status`, `postal_code_tool_status`,
|
|
560
|
-
`shopify_products_web_chat`),
|
|
561
|
-
|
|
561
|
+
`shopify_products_web_chat`), `discount.enabled`, and the `flowiq test` contact
|
|
562
|
+
(`settings.test_contact_number` / `settings.test_contact_name`). Anything else is
|
|
563
|
+
rejected; every change is reported before → after.
|
|
564
|
+
|
|
565
|
+
**Test contact (`--test-contact-number` / `--test-contact-name`, v0.2.9).**
|
|
566
|
+
This is the contact `flowiq test` drives the live agent through (read by
|
|
567
|
+
`api/cli/agent-test.js` as `settings.test_contact_number`). ⚠ **Use a clearly
|
|
568
|
+
FAKE number.** Whatever you set becomes the `whatsapp_id` the test harness looks
|
|
569
|
+
up or creates in the org — point it at a real customer's number and your tests
|
|
570
|
+
route through *their* contact record and force `bot_status=true` on it. If that
|
|
571
|
+
number already maps to an existing contact, the command prints a `⚠` warning
|
|
572
|
+
naming it. Pass `--test-contact-number ""` (empty) to clear the override — the
|
|
573
|
+
harness then falls back to a synthetic per-agent `test_<agent_id>` contact.
|
|
562
574
|
|
|
563
575
|
### Agent updates — `flowiq agent-updates pull|list|resolve` (alias `au`)
|
|
564
576
|
|
package/TEAM-GUIDE.md
CHANGED
|
@@ -75,6 +75,7 @@ you have installed.
|
|
|
75
75
|
| See an org's agents / create one | `flowiq agent list <org_id>` / `flowiq agent create <org_id> --name "…"` |
|
|
76
76
|
| Change agent model / tool flags | `flowiq agent config <org_id> --model … --tool view_cart_tool=true` |
|
|
77
77
|
| Talk to the live agent safely (no real WhatsApp ever sent) | `flowiq test send <org_id> "hi, do you sell X?"` |
|
|
78
|
+
| Set which contact `flowiq test` uses (use a FAKE number!) | `flowiq agent config <org_id> --test-contact-number 27000000001 --test-contact-name "QA Bot"` |
|
|
78
79
|
| Send a template broadcast to a CSV of people | `flowiq bc map <org_id> --template … --csv …` → `flowiq bc send … ` (dry-run) → `… --commit` |
|
|
79
80
|
| Tag every repeat buyer (e.g. 2+ orders in the last 60 days) | `flowiq seg plan <org_id> --tag-prefix repeat-60d --min-orders 2 --window 60d` → `flowiq seg apply <org_id> repeat-60d` (dry run) → `… --commit` |
|
|
80
81
|
| Tag everyone who bought a product (accurate, windowable) | `flowiq seg plan <org_id> --tag-prefix whey --bought "Whey" --window 90d` → `flowiq seg apply … --commit` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowapt/flowiq-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Command-line tool for FlowIQ staff: round-trip agent prompts, questionnaires, fine-tuning, pin-board tasks, webhooks, templates, agent-updates, chat exports, and live agent testing without ever touching service-role credentials.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,8 @@ export async function config(orgId, opts = {}) {
|
|
|
41
41
|
const settings = {};
|
|
42
42
|
if (opts.useSettingsPrompt !== undefined) settings.use_settings_prompt = parseBool(opts.useSettingsPrompt, "--use-settings-prompt");
|
|
43
43
|
if (opts.model !== undefined) settings.model = opts.model;
|
|
44
|
+
if (opts.testContactNumber !== undefined) settings.test_contact_number = opts.testContactNumber;
|
|
45
|
+
if (opts.testContactName !== undefined) settings.test_contact_name = opts.testContactName;
|
|
44
46
|
if (Object.keys(settings).length) body.settings = settings;
|
|
45
47
|
if (opts.rename !== undefined) body.name = opts.rename;
|
|
46
48
|
if (opts.discount !== undefined) body.discount_enabled = parseBool(opts.discount, "--discount");
|
|
@@ -73,7 +75,7 @@ export async function config(orgId, opts = {}) {
|
|
|
73
75
|
}
|
|
74
76
|
console.log(`${resp.organization_name} → agent ${resp.agent_id}${resp.is_active === false ? " [NON-active]" : ""}`);
|
|
75
77
|
printSnapshot("current", resp.current);
|
|
76
|
-
console.log("\n(pass --use-settings-prompt / --model / --rename / --tool / --discount to change)");
|
|
78
|
+
console.log("\n(pass --use-settings-prompt / --model / --rename / --tool / --discount / --test-contact-number / --test-contact-name to change)");
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -93,4 +95,5 @@ export async function config(orgId, opts = {}) {
|
|
|
93
95
|
const a = resp.after?.[k];
|
|
94
96
|
console.log(` ${k.padEnd(30)} ${b === null || b === undefined ? "(unset)" : b} → ${a === null || a === undefined ? "(unset)" : a}`);
|
|
95
97
|
}
|
|
98
|
+
for (const w of resp.warnings || []) console.log(` ⚠ ${w}`);
|
|
96
99
|
}
|
package/src/index.js
CHANGED
|
@@ -227,6 +227,8 @@ export function run(argv) {
|
|
|
227
227
|
.option("--rename <name>", "rename the agent")
|
|
228
228
|
.option("--tool <flag=bool>", "toggle a tool flag (repeatable): woo_order_build/woo_tip_field/woo_order_note_field/view_cart_tool/restock_tool/block_tool_status/postal_code_tool_status/shopify_products_web_chat", agentConfigCmd.collectTool, [])
|
|
229
229
|
.option("--discount [bool]", "agent.discount.enabled (true if bare)")
|
|
230
|
+
.option("--test-contact-number <number>", "settings.test_contact_number — the contact `flowiq test` uses (use a FAKE number; \"\" clears it → synthetic fallback)")
|
|
231
|
+
.option("--test-contact-name <name>", "settings.test_contact_name — display name for the test contact (\"\" clears it)")
|
|
230
232
|
.action((orgId, opts) => agentConfigCmd.config(orgId, opts));
|
|
231
233
|
|
|
232
234
|
// agent-updates (pending client change-requests + chat context; pull + resolve)
|