@flowapt/flowiq-cli 0.9.4 → 0.9.6

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 CHANGED
@@ -1607,7 +1607,7 @@ flowiq agent create <new_org_id> --name "Zara" --make-active
1607
1607
  flowiq prompts pull <new_org_id> # edit → push
1608
1608
  ```
1609
1609
  (No `agent config` step any more — since 29 Aug 2026 a new agent is born on the
1610
- house default: `gpt-5.6-luna`, `reasoning_effort high`, `use_settings_prompt` ON.)
1610
+ house default: `gpt-6-luna` (since 23 Sep 2026; was `gpt-5.6-luna`), `reasoning_effort high`, `use_settings_prompt` ON.)
1611
1611
 
1612
1612
  #### Feature flags — `flowiq org flags show|list|set|unset|keys` (v0.7.0)
1613
1613
 
@@ -1666,7 +1666,7 @@ flowiq agent create <organization_id> --name "Zara" \
1666
1666
  seeds its prompt into a single "Main" section, and — with `--make-active` — sets
1667
1667
  it as the org's `active_whatsapp_agent`.
1668
1668
 
1669
- **Since 29 Aug 2026 a new agent is born configured** — `gpt-5.6-luna`,
1669
+ **Since 29 Aug 2026 a new agent is born configured** — `gpt-6-luna` (since 23 Sep 2026; was `gpt-5.6-luna`),
1670
1670
  `reasoning_effort high`, `use_settings_prompt` ON — the same house default the
1671
1671
  web UI's create button writes. You no longer have to follow `create` with an
1672
1672
  `agent config --model … --use-settings-prompt`; that step used to be the "silent
@@ -1684,7 +1684,7 @@ on the org's **active** agent. To target a **different** agent, pass `--agent <i
1684
1684
  ```bash
1685
1685
  flowiq prompts pull <org> --agent <agent_id> # pull a NON-active agent's prompt
1686
1686
  flowiq prompts push <slug> # pushes back to that same agent (id is in the file)
1687
- flowiq agent config <org> --agent <agent_id> --model gpt-5.6-luna
1687
+ flowiq agent config <org> --agent <agent_id> --model gpt-6-luna
1688
1688
  ```
1689
1689
 
1690
1690
  `pull` records the agent id in the JSON, so `push` always writes back to the exact
@@ -1702,10 +1702,10 @@ Set an allowlisted set of the active agent's config fields (the prompt-builder
1702
1702
 
1703
1703
  ```bash
1704
1704
  flowiq agent config <organization_id> # show current
1705
- flowiq agent config <organization_id> --use-settings-prompt --model gpt-5.6-luna \
1705
+ flowiq agent config <organization_id> --use-settings-prompt --model gpt-6-luna \
1706
1706
  --rename Zara --tool woo_order_build=true --tool view_cart_tool=true --discount true
1707
1707
  flowiq agent config <organization_id> --test-contact-number 27000000001 --test-contact-name "QA Bot"
1708
- flowiq agent config <organization_id> --model gpt-5.6-luna --reasoning-effort high
1708
+ flowiq agent config <organization_id> --model gpt-6-luna --reasoning-effort high # the house pairing (23 Sep 2026)
1709
1709
  flowiq agent config <organization_id> --model claude-sonnet-5 --reasoning-effort medium # Claude (needs the org's Claude key; warns if missing)
1710
1710
  flowiq agent config <organization_id> --disable-base-tool get_product_info
1711
1711
  flowiq agent config <organization_id> --enable-base-tool get_product_info
@@ -1845,9 +1845,13 @@ flowiq plans status <plan_id> --to sent --commit
1845
1845
  timestamps instead of the send date (SAST day start) — "what did a client
1846
1846
  submit today", "what has moved since Friday", which `--since` cannot answer.
1847
1847
  - **`show`** prints the plan the way the dialog does: message copy, the
1848
- second message sent when a button is tapped, buttons with their URLs, the
1849
- creative (file name + link), audience, template link, the response to the
1850
- client, internal notes and the notes thread.
1848
+ second message sent when a button is tapped (named by the button's text),
1849
+ buttons with their targets, the creative (file name + link), audience,
1850
+ template link, the response to the client, internal notes and the notes
1851
+ thread. A marketing plan carries 0-10 buttons in any mix WhatsApp allows:
1852
+ `quick_reply`, `url` (up to 2, `→ link`), `phone` (1, `→ call +27…`) and
1853
+ `copy_code` (1, `→ code SPRING20`); each quick reply may have its own
1854
+ follow-up message (`slide2a`, `slide2b`, `slide2c` … by button position).
1851
1855
  - **`status`** is a dry run until `--commit`. `--comment` is the response the
1852
1856
  **client reads**; `--internal` is staff-only. `approved` and `rejected`
1853
1857
  record you as the reviewer; `rejected` requires `--comment`. Every commit is
@@ -1894,6 +1898,12 @@ flowiq test cleanup <organization_id> --confirm # delete the stress contact
1894
1898
  `--agent <id>` targets a specific (non-active) agent. `test stress cleanup` is
1895
1899
  destructive and requires `--confirm`.
1896
1900
 
1901
+ `test clear` (and `--clear` on `send`, and the clear between scenario turns) hides the
1902
+ messages (`memory_cutoff`) AND sets aside the agent's remembered tool results
1903
+ (`more_data.tool_usage_history`, which the agent reads as TOOL USAGE HISTORY) under
1904
+ `more_data.tool_usage_history_cleared`, so a cleared test really starts fresh. Since 0.9.6;
1905
+ before that earlier tool results and escalation reasons leaked into "cleared" tests.
1906
+
1897
1907
  ### Guide — `flowiq guide`
1898
1908
 
1899
1909
  Read the bundled docs in the terminal — no digging through node_modules.
package/TEAM-GUIDE.md CHANGED
@@ -107,15 +107,16 @@ When you see it, run `npm i -g @flowapt/flowiq-cli` — a stale version also mea
107
107
  | Ask a client's WooCommerce store anything (read-only) | `flowiq woo get <org_id> orders --q status=completed --all` |
108
108
  | Pull every matching record, not just the first page | add `--all` (bounded — it prints `⚠ TRUNCATED` if it stops early, so a partial answer never looks complete) |
109
109
  | Feed store data into jq / a file | stdout is the payload only, banner goes to stderr: `flowiq shopify get <org> orders.json \| jq -r '.orders[].name'` · or `--out ./orders.json` |
110
- | See an org's agents / create one | `flowiq agent list <org_id>` / `flowiq agent create <org_id> --name "…"` — a new agent arrives ready to work (gpt-5.6-luna, high reasoning, prompt switched ON); no follow-up `agent config` needed |
110
+ | See an org's agents / create one | `flowiq agent list <org_id>` / `flowiq agent create <org_id> --name "…"` — a new agent arrives ready to work (gpt-6-luna, high reasoning, prompt switched ON); no follow-up `agent config` needed |
111
111
  | Change agent model / tool flags | `flowiq agent config <org_id> --model … --tool view_cart_tool=true` |
112
- | Set the house model + reasoning tier | `flowiq agent config <org_id> --model gpt-5.6-luna --reasoning-effort high` |
112
+ | Set the house model + reasoning tier | `flowiq agent config <org_id> --model gpt-6-luna --reasoning-effort high` |
113
113
  | Run the agent on Claude (org needs a Claude key in Settings → Integrations) | `flowiq agent config <org_id> --model claude-sonnet-5 --reasoning-effort medium` |
114
114
  | Remove a conflicting built-in tool from one agent | `flowiq agent config <org_id> --disable-base-tool get_product_info` (repeatable; safety/delivery tools cannot be disabled) |
115
115
  | Agent says an in-stock product "isn't showing" | `flowiq agent config <org_id> --tool collapse_product_variants=true` — the search cap counts VARIANT rows until this is on |
116
116
  | Agent can't quote ANY price / "I can't pull the live menu" | `flowiq agent config <org_id> --tool product_lookup=true` — name-based fuzzy lookup that works without embeddings or a live OpenAI key (semantic `get_product_info` needs both) |
117
117
  | Client wants leads/requests emailed to their team instead of a human escalation | `flowiq agent config <org_id> --tool email_request_tool=true`, then set the recipient list in Agents → Tool Library → Email Request to Team (no CLI path for the addresses yet) |
118
118
  | Talk to the live agent safely (no real WhatsApp ever sent) | `flowiq test send <org_id> "hi, do you sell X?"` |
119
+ | Start a test chat from scratch (agent forgets the earlier test messages AND its earlier tool results) | `flowiq test clear <org_id>` (or `flowiq test send <org_id> "…" --clear`) |
119
120
  | **Tell the team what shipped** (the FlowIQ team update email) | `flowiq updates draft` → enrich the JSON (screenshots via `flowiq updates asset`, a *For the team* note per headline) → `flowiq updates preview <file> --open` → `flowiq updates send <file> --test` → `flowiq updates send <file> --yes` |
120
121
  | Can I use `flowiq updates`? | Yes: `status`, `uncovered`, `draft`, `preview` and `send --test` (a copy to yourself) work for everyone. Only the real `send --yes` to the whole team is Matt's; anyone else gets a 403 there |
121
122
  | Which changelog rows has nobody emailed the team about yet? | `flowiq updates status` / `flowiq updates uncovered` — anything left 20h+ goes out automatically at 08:30 SAST as a plain digest |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowapt/flowiq-cli",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
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": {
@@ -146,7 +146,8 @@ export async function clear(orgId, opts = {}) {
146
146
  let resp;
147
147
  try { resp = await clearConv(orgId, opts.agent); }
148
148
  catch (e) { console.error(`Clear failed: ${e.message}`); process.exit(1); }
149
- console.log(`Cleared web conversation for contact ${resp.contact_id} (history hidden via memory_cutoff; onboarding/disclaimer state NOT reset).`);
149
+ const tools = Number(resp.tools_cleared || 0);
150
+ console.log(`Cleared web conversation for contact ${resp.contact_id} (history hidden via memory_cutoff; ${tools} remembered tool result(s) set aside in more_data.tool_usage_history_cleared; onboarding/disclaimer state NOT reset).`);
150
151
  }
151
152
 
152
153
  // ---------- phase 2: stress + extract ----------
@@ -71,6 +71,9 @@ export async function create(orgId, opts = {}) {
71
71
  console.log(` active: ${resp.is_active ? "yes (set as the org's active agent)" : "no"}`);
72
72
  console.log(` seeded prompt: ${resp.seeded_prompt ? "yes (single \"Main\" section)" : "no (default settings)"}`);
73
73
  if (resp.warning) console.log(` ⚠ ${resp.warning}`);
74
- console.log("\nNext: `agent config " + orgId + " --agent " + resp.agent_id + " --use-settings-prompt --model gpt-5.4-mini`");
75
- console.log(" then `prompts pull " + orgId + " --agent " + resp.agent_id + "` to author the full prompt.");
74
+ // The agent is born on the house default (the server's DEFAULT_SETTINGS), so no
75
+ // `agent config` step is needed; the old hint told people to set gpt-5.4-mini,
76
+ // which DOWNGRADED a new agent (fixed 23 Sep 2026).
77
+ console.log("\nNext: `prompts pull " + orgId + " --agent " + resp.agent_id + "` to author the full prompt.");
78
+ console.log(" (No `agent config` needed: it is born on the house model, high reasoning, prompt switched on.)");
76
79
  }
@@ -95,6 +95,5 @@ export async function create(opts = {}) {
95
95
  console.log("");
96
96
  console.log("Next steps:");
97
97
  console.log(` flowiq agent create ${resp.id} --name "<AgentName>" --make-active`);
98
- console.log(` flowiq agent config ${resp.id} --model gpt-5.4-mini --use-settings-prompt`);
99
98
  console.log(` flowiq prompts pull ${resp.id} # then edit + push`);
100
99
  }
@@ -182,7 +182,9 @@ export async function show(planId, opts = {}) {
182
182
  if (more.slides && typeof more.slides === "object") {
183
183
  for (const [key, slide] of Object.entries(more.slides)) {
184
184
  if (!slide || typeof slide !== "object") continue;
185
- console.log(`\n${key}${slide.triggered_by ? ` (after ${slide.triggered_by})` : ""}`);
185
+ const idx = /^button_(\d+)$/.exec(slide.triggered_by ?? "")?.[1];
186
+ const tapped = idx !== undefined && Array.isArray(more.buttons) ? more.buttons[Number(idx)]?.text : null;
187
+ console.log(`\n${key}${tapped ? ` (sent when "${tapped}" is tapped)` : slide.triggered_by ? ` (after ${slide.triggered_by})` : ""}`);
186
188
  if (slide.message) console.log(indent(slide.message));
187
189
  if (slide.media_url) console.log(` media: ${slide.media_url}`);
188
190
  }
@@ -191,7 +193,11 @@ export async function show(planId, opts = {}) {
191
193
  const buttons = Array.isArray(more.buttons) ? more.buttons : [];
192
194
  if (buttons.length) {
193
195
  console.log("\nButtons");
194
- for (const b of buttons) console.log(` [${b?.type ?? "?"}] ${b?.text ?? ""}${b?.url ? ` → ${b.url}` : ""}`);
196
+ // Marketing plans carry 0-10 buttons: quick_reply, url, phone, copy_code (app src/lib/broadcastPlanButtons.ts).
197
+ for (const b of buttons) {
198
+ const target = b?.url ? ` → ${b.url}` : b?.phone_number ? ` → call ${b.phone_number}` : b?.code ? ` → code ${b.code}` : "";
199
+ console.log(` [${b?.type ?? "?"}] ${b?.text ?? ""}${target}`);
200
+ }
195
201
  }
196
202
 
197
203
  console.log("\nCreative");
package/src/index.js CHANGED
@@ -492,8 +492,8 @@ export function run(argv) {
492
492
  .description("Set allowlisted agent config (no write flags = show current; defaults to the active agent)")
493
493
  .option("--agent <id>", "target a specific agent instead of the org's active one")
494
494
  .option("--use-settings-prompt [bool]", "settings.use_settings_prompt (true if bare)")
495
- .option("--model <model>", "settings.model (e.g. gpt-5.4-mini)")
496
- .option("--reasoning-effort <level>", "settings.reasoning_effort — low|medium|high|xhigh|max (\"\" clears it; max = GPT-6 and Claude only); pairs with reasoning models (e.g. gpt-5.6-luna + high, gpt-6-luna + high, claude-sonnet-5 + medium)")
495
+ .option("--model <model>", "settings.model (e.g. gpt-6-luna, the house default)")
496
+ .option("--reasoning-effort <level>", "settings.reasoning_effort — low|medium|high|xhigh|max (\"\" clears it; max = GPT-6 and Claude only); pairs with reasoning models (e.g. gpt-6-luna + high, gpt-6-luna + high, claude-sonnet-5 + medium)")
497
497
  .option("--rename <name>", "rename the agent")
498
498
  .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/ticket_tool_status/product_lookup/email_request_tool/collapse_product_variants", agentConfigCmd.collectTool, [])
499
499
  .option("--discount [bool]", "agent.discount.enabled (true if bare)")