@koda-sl/baker-cli 0.170.0 → 0.173.0-dev.11e26a37c.1276eb11

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
@@ -2673,7 +2673,7 @@ Permissions enforced server-side:
2673
2673
 
2674
2674
  ### `baker mcp connected | list | add | remove`
2675
2675
 
2676
- See every third-party tool a chat can reach (managed integrations + custom servers) and manage **custom MCP servers** point the agent at any remote HTTPS MCP endpoint. Registered tools appear as `mcp__<name>__*` on the next chat message.
2676
+ See everything a chat can reach managed integrations, custom servers, and connected platforms — and manage **custom MCP servers** by pointing the agent at any remote HTTPS MCP endpoint. Registered tools appear as `mcp__<name>__*` on the next chat message.
2677
2677
 
2678
2678
  ```bash
2679
2679
  baker mcp connected
@@ -2684,6 +2684,7 @@ baker mcp add --name mine --url https://my.dev/mcp --scope user
2684
2684
  baker mcp remove --name weather
2685
2685
  ```
2686
2686
 
2687
+ - `connected` returns three lists. `managed` and `custom` are MCP tools the agent calls directly; `platforms` are the accounts the company signed in to (HubSpot, Google Ads, GA4, Search Console, Tag Manager, LinkedIn Ads), each with its login and the resources it may read. A platform has **no** `mcp__*` tools — it is read through its own command family — so it is listed here to keep the agent from concluding a working connection is missing.
2687
2688
  - `--url` must be the **full MCP endpoint** (commonly ending in `/mcp`), HTTPS and public; loopback / private / cloud-metadata hosts are rejected. A bare domain frequently accepts the OAuth sign-in and then serves no tools, so every address is handshake-checked after it changes: `connected` and `list` report `usable: false` plus a `problem` (and a `suggestedAddress` when the server advertises a better endpoint) for a server that isn't serving tools, or `lastCheck: failed` when the last check only hit an outage — that one may work anyway, and a later turn re-checks it automatically. Repointing a server at a different host clears its saved sign-in: a token belongs to the host that issued it, so the server has to be connected again.
2688
2689
  - Scope is two independent choices — audience (just you / everyone) × level (this company / whole org):
2689
2690
  - `--scope company` (default) — everyone in this company.
@@ -2694,6 +2695,52 @@ baker mcp remove --name weather
2694
2695
 
2695
2696
  ---
2696
2697
 
2698
+ ### `baker facts list | record`
2699
+
2700
+ What the company's own people said about their business, settled with them in the guided Setup: what counts as a win, who buys, where leads land, which channels have worked before, how they want to be talked to, and their red lines. Each entry carries where it came from — a machine check, a human answer, a call, or the agent.
2701
+
2702
+ Read it before writing anything customer-facing. Record what the user tells you mid-conversation so it reaches Setup instead of dying in a paragraph.
2703
+
2704
+ ```bash
2705
+ baker facts list # settled and contested entries
2706
+ baker facts list --full # plus unanswered questions and unconfirmed suggestions
2707
+ baker facts record --key crm --value salesforce --quote "we moved off HubSpot in March"
2708
+ ```
2709
+
2710
+ **`list` flags:**
2711
+
2712
+ | Flag | Description |
2713
+ |----------|-----------------------------------------------------------------|
2714
+ | `--full` | Include unanswered questions and unconfirmed suggestions |
2715
+
2716
+ **`record` flags:**
2717
+
2718
+ | Flag | Description |
2719
+ |----------------|-------------------------------------------------------------------------|
2720
+ | `--key` | Which question this answers (see `baker facts list --full`) — required |
2721
+ | `--value` | The answer, in the user's own terms — required |
2722
+ | `--quote` | What the user actually said, shown when they confirm it |
2723
+ | `--selections` | Comma-separated option values, for questions that take a set |
2724
+
2725
+ **Response:**
2726
+
2727
+ ```json
2728
+ {
2729
+ "ok": true,
2730
+ "data": {
2731
+ "facts": [
2732
+ { "key": "crm", "question": "Where do your leads land?", "value": "hubspot", "source": "answered", "settled": true }
2733
+ ],
2734
+ "missing": ["target-customer"]
2735
+ },
2736
+ "meta": { "count": 1 }
2737
+ }
2738
+ ```
2739
+
2740
+ `record` always files a **suggestion**, never a settled answer — a human confirms it in Setup. Keys that are checked against the company's own systems (conversion tracking) are refused: nothing said in a conversation can satisfy them.
2741
+
2742
+ ---
2743
+
2697
2744
  ### `baker history list`
2698
2745
 
2699
2746
  Unified account history (audit log) — everything that changed on the account, newest first: publishes, chat lifecycle, backlog actions, team changes, setup links, tag and schedule changes, executed ad-platform writes, followed advertisers, media (images, videos, testimonials), creative generations, reports, domains, integrations, and API keys. Read-only.
@@ -2730,9 +2777,9 @@ baker history list --category ads --full # ad writes with raw metadata
2730
2777
 
2731
2778
  ---
2732
2779
 
2733
- ### `baker hubspot forms list | view` · `baker hubspot meetings list | view`
2780
+ ### `baker hubspot forms list | view | submissions` · `baker hubspot workflows list` · `baker hubspot pipelines list` · `baker hubspot contacts summary | lookup` · `baker hubspot meetings list | view`
2734
2781
 
2735
- Read-only view of the company's **connected HubSpot account** — the forms and meeting links (calendars) that live there, plus the settings inside HubSpot that decide how each behaves once placed in a Form. Fetched from HubSpot live on every call; nothing is cached.
2782
+ Read-only view of the company's **connected HubSpot account** — the forms and meeting links (calendars) that live there, the leads those forms received, and the workflows, deal pipelines, and contact records a lead runs through afterwards. Fetched from HubSpot live on every call; nothing is cached and nothing is ever written back.
2736
2783
 
2737
2784
  The reason this exists: a form's **post-submit action** (inline thank-you vs redirect to a URL), its embed version, its consent mode, and a calendar's booking fields are *not* persisted onto the flow node when a form is picked. They cannot be read from `_data.json` or `baker flows show` — only from here.
2738
2785
 
@@ -2743,6 +2790,12 @@ baker hubspot forms list --embed-type legacy # only legacy-embed forms
2743
2790
  baker hubspot forms view <formId> # fields, consent mode, full configuration
2744
2791
  baker hubspot forms view <formId> --full # + the raw HubSpot payload
2745
2792
  baker hubspot forms view <formId> --as-node # the form.external blob for a flow node
2793
+ baker hubspot forms submissions <formId> # how many leads it received, and when
2794
+ baker hubspot forms submissions <formId> --days 90 --full
2795
+ baker hubspot workflows list --enabled-only # what runs after a lead is captured
2796
+ baker hubspot pipelines list # where a lead lands, and the stages after it
2797
+ baker hubspot contacts summary --days 30 # are recent leads being worked? (counts only)
2798
+ baker hubspot contacts lookup lead@example.com # was this one lead picked up?
2746
2799
  baker hubspot meetings list # every calendar + whether booking redirects
2747
2800
  baker hubspot meetings view <slug> # booking-form fields for one calendar
2748
2801
  baker hubspot meetings view <slug> --as-node # the form.external blob for a flow node
@@ -2750,9 +2803,16 @@ baker hubspot meetings view <slug> --as-node # the form.external blob for a f
2750
2803
 
2751
2804
  **`forms list` flags:** `--search <text>` (name substring), `--redirecting-only`, `--embed-type legacy|v4|unknown`. Rows carry only what it takes to choose; `portalId` is returned once on `data`, not per row.
2752
2805
  **`forms view`:** positional `<formId>`; `--full` adds the untouched HubSpot payload; `--as-node` returns the resource blob instead of the readable view.
2806
+ **`forms submissions`:** positional `<formId>`; `--days <1-365>` (default 30) sets the window; `--full` adds each submission's field values. The default response is counts and dates only — `total`, `inWindow`, `lastSubmittedAt`, and per-day counts — because submissions carry the lead's own contact details. `truncated: true` means the page budget ran out before the window was covered, so `inWindow` is a floor rather than an exact count.
2807
+ **`workflows list` flags:** `--search <text>`, `--enabled-only`. Disabled workflows are listed too — a form wired to one that is off looks connected and does nothing.
2808
+ **`pipelines list`:** no flags; stages come back in the order they run in HubSpot.
2809
+ **`contacts summary` flags:** `--days <1-365>` (default 30) over contact creation date. Returns counts only — total contacts, how many have an owner, and the lifecycle-stage split — never a name or an email. `truncated: true` means the page budget ran out, so the counts are floors.
2810
+ **`contacts lookup`:** positional `<email>`; returns that contact's lifecycle stage, owner, the account (company) it was filed under, and associated deals with their stage. `dealsReadable: false` / `companyReadable: false` mean the connection does not cover deals or accounts, so an empty `deals` or a null `company` is unknown rather than absent. `found: false` means no contact with that email — the lead never reached the CRM, which is a finding rather than an error.
2753
2811
  **`meetings list` flags:** `--search <text>`, `--redirecting-only`.
2754
2812
  **`meetings view`:** positional `<slug>` — the only reliable source for a calendar's booking fields (HubSpot omits `customParams` from the list endpoint, so `fieldCount: null` there means unknown, not zero); `--as-node` as above.
2755
2813
 
2814
+ **`HUBSPOT_RECONNECT_REQUIRED`** is returned when HubSpot is connected but that account never granted access to what the command needs — a HubSpot grant is fixed at the moment the user approves it, so an account connected before a capability shipped cannot serve it. It is not the same as `NO_HUBSPOT_CONNECTION`: the connection works, and only the user can widen it by reconnecting from Brain → Integrations → Tools. The error carries a `fix` describing exactly that.
2815
+
2756
2816
  **`--as-node`** returns exactly the object a flow node's `form.external` expects, so an agent can wire a HubSpot step by editing the flow's `_data.json` instead of interrupting the user with the `request_flow_input` approval form. It includes two fields the dashboard picker omits and the renderer needs: `configuration.postSubmitAction` (drives post-submit redirect suppression) and `region` (selects the v4 embed host — without it a v4 form on a eu1/ap1 portal loads the wrong script host).
2757
2817
 
2758
2818
  **Response:**
@@ -7,9 +7,9 @@ import {
7
7
  __toESM
8
8
  } from "./chunk-RK67WL4O.js";
9
9
 
10
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js
10
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js
11
11
  var require_safe_stable_stringify = __commonJS({
12
- "../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(exports, module) {
12
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js"(exports, module) {
13
13
  "use strict";
14
14
  var { hasOwnProperty } = Object.prototype;
15
15
  var stringify = configure2();
@@ -1075,7 +1075,7 @@ function resolveAdaptFormats(params) {
1075
1075
  return params.formats ?? [];
1076
1076
  }
1077
1077
 
1078
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/esm/wrapper.js
1078
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/esm/wrapper.js
1079
1079
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1080
1080
  var configure = import__.default.configure;
1081
1081
  var wrapper_default = import__.default;
@@ -8028,4 +8028,4 @@ export {
8028
8028
  defaultRegistry,
8029
8029
  createEngineFromEnv
8030
8030
  };
8031
- //# sourceMappingURL=chunk-CG6OTNUU.js.map
8031
+ //# sourceMappingURL=chunk-K424D3CY.js.map