octwin-cli 0.7.3 → 0.8.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.
- package/CHANGELOG.md +44 -0
- package/README.md +12 -0
- package/dist/index.js +1163 -261
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,50 @@ Format: [Keep a Changelog](https://keepachangelog.com/) — newest first, bucket
|
|
|
5
5
|
**Added · Changed · Deprecated · Removed · Fixed · Security**. The platform-wide view lives in the
|
|
6
6
|
repo root [`CHANGELOG.md`](../../CHANGELOG.md); this file is the CLI-only cut that ships with the package.
|
|
7
7
|
|
|
8
|
+
## [0.8.0] - 2026-08-27
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Five new command families, closing the gap between what a token reaches and what the CLI can
|
|
12
|
+
ask.** A **Full CLI access** token spans the whole scope registry, and four of those domains had
|
|
13
|
+
no command at all — so the reach existed and there was nothing to type.
|
|
14
|
+
- `octwin automation [campaigns]` — every job the pack's declaration produced, with status,
|
|
15
|
+
interval and last result (matched / acted / errors), under a health line whose counts come from
|
|
16
|
+
SQL rather than from filtering the page (the job list is capped server-side, so a client-side
|
|
17
|
+
count would depend on the cap). Writes: `run` · `pause` · `resume` · `send <campaignId>`.
|
|
18
|
+
- `octwin integrations` — what the pack **declares** beside what is actually **configured**, in
|
|
19
|
+
one view, because a connection declared and never configured is the commonest reason an
|
|
20
|
+
integration silently never fires and neither list alone can show it. Plus
|
|
21
|
+
`preflight <key>` (diagnosis, no outbound call, `integrations:read`), `test <key>` (a live call,
|
|
22
|
+
`integrations:write`, exits 1 on failure), `deliveries [id]`, `retry|cancel|send-now <id>`,
|
|
23
|
+
and `events` for what arrived inbound.
|
|
24
|
+
- `octwin journeys [id] [--funnel|--overview|--goals|--trends|--cost|--definition] [--stage <id>]`
|
|
25
|
+
— the declared journeys, measured. Same flag grammar as `octwin analytics` on purpose: a journey
|
|
26
|
+
funnel and an entity funnel are the same question about different subjects. `--definition` is
|
|
27
|
+
the one view that works with no traffic.
|
|
28
|
+
- `octwin performance [--detail]` — the project's business indicators, each with its delta against
|
|
29
|
+
the previous window and the `why` naming the declaration it came from. Needs `records:read`, not
|
|
30
|
+
a `performance:*` scope (there is none), so a read-only token already reaches it.
|
|
31
|
+
- `octwin usage` — model calls, tokens and cost, by model / kind / agent / channel; project when
|
|
32
|
+
one is pinned, workspace otherwise. Needs no particular scope. **Model spend only** —
|
|
33
|
+
WhatsApp/Meta message billing is operator-only and outside the token scope registry, which the
|
|
34
|
+
output says rather than leaving as an absence.
|
|
35
|
+
- **`octwin automation run|pause|resume|send` accept the declaration KEY.** The routes take a UUID
|
|
36
|
+
and answer a bare *"Malformed identifier in the URL"* 400 for anything else — but the key
|
|
37
|
+
(`cart_recovery_nudge`) is what the list prints and what the author wrote in their own YAML. The
|
|
38
|
+
key is now resolved against the list route, and an unknown one fails naming the keys that exist.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- **A body-less write sent `content-type: application/json` and no body, so Fastify answered a bare
|
|
42
|
+
`400 Bad Request`.** `apiSend` set the header unconditionally; every caller until now passed an
|
|
43
|
+
object, so the branch was dead and the bug latent. The first body-less POST (`automation run`) hit
|
|
44
|
+
it immediately. The header is now omitted when there is no body — rather than each caller learning
|
|
45
|
+
to pass `{}`, which is the per-site divergence that helper exists to prevent.
|
|
46
|
+
- **Four URLs were exempt from the route guard.** `cli-routes.test.ts` reads a template literal in
|
|
47
|
+
the first argument position, so `apiGet(base, t)` — a bare identifier — was never checked. That
|
|
48
|
+
covered the `scheduling` engine-state and `agents` roster calls, and would have covered the new
|
|
49
|
+
`journeys`, `performance` and `usage` ones. All now spelled as literals: the guard checks **62**
|
|
50
|
+
URLs, up from 45.
|
|
51
|
+
|
|
8
52
|
## [0.7.3] - 2026-08-26
|
|
9
53
|
|
|
10
54
|
### Changed
|
package/README.md
CHANGED
|
@@ -80,6 +80,11 @@ octwin status # "✓ live and current" once it's warm
|
|
|
80
80
|
| `octwin analytics` | Stage-by-stage conversion for **any** entity declared with a `pipeline:` (`--overview` / `--milestones` / `--trends` / `--cost`; `--stage <id>` lists the records currently at a stage). Needs `records:read`. |
|
|
81
81
|
| `octwin catalog` | Commerce products with price / availability / stock, plus the WhatsApp catalog binding. `--readiness` runs the Meta Graph checklist. Needs `catalog:read` + the `catalog` plan feature. |
|
|
82
82
|
| `octwin scheduling` | The scheduling engine's state, or `--slots <resourceRecordId>` for the slots one bookable resource actually computes — how you verify the availability rules `deploy --seed` created. Needs `scheduling:read`. |
|
|
83
|
+
| `octwin automation` | The jobs your pack's automation declaration produced — status, interval and each one's **last result** (matched / acted / errors) — under a health line counted in SQL. `campaigns` lists the campaigns. Jobs are derived from declarations, so there is no `create`. Needs `automation:read`. |
|
|
84
|
+
| `octwin integrations` | What the pack **declares** beside what is actually **configured**, and it flags the gap: a connection declared and never configured is the commonest reason an integration silently never fires, and neither list alone shows it. `preflight <key>` diagnoses without calling out (`integrations:read`); `deliveries [id]` is the outbound log; `events` is what arrived inbound. Needs `integrations:read`. |
|
|
85
|
+
| `octwin journeys` | The customer journeys your pack declares, measured: `--funnel` (default) · `--overview` · `--goals` · `--trends` · `--cost` · `--definition` (what was declared, works with no traffic), plus `--stage <id>` for the runs sitting at a stage now. Same flag grammar as `octwin analytics` — a journey funnel and an entity funnel are the same question about different subjects. Needs `journeys:read`. |
|
|
86
|
+
| `octwin performance` | The project's business indicators — value produced, conversion, duration — each with its delta against the previous window and a `why` naming the declaration it came from. `--detail` adds the breakdown. Needs `records:read`, **not** a `performance:*` scope (there is none). |
|
|
87
|
+
| `octwin usage` | Model calls, tokens and cost, by model / kind / agent / channel. Project when one is pinned, workspace otherwise. Needs no particular scope. **Model spend only** — WhatsApp/Meta message billing is operator-only and no API token can read it. |
|
|
83
88
|
| `octwin media generate "<prompt>"` | AI-generate an image, store it as a public asset, and print its `MEDIA-` handle + serve URL. `--out` downloads the bytes (WhatsApp renders only `.png`/`.jpg`); `--json`. Pairs with `octwin chat --media` to drive media-collect flows. Needs `media:generate`. |
|
|
84
89
|
| `octwin platform-kb pull` | Pull the platform's capability reference into `.octwin/platform-kb/` for the **`octwin-pack`** Claude Code authoring plugin: guides as markdown, plus **one JSON file per capability** (`primitives/record_list.json`, `render-intents/carousel.json`, `declarations/xrm.json`, …) and **three maps** — `INDEX.md` (the corpus, by family and size), `SYMBOLS.md` (every name → its exact file; grep this), `OUTLINE.md` (every heading with its line number). **No token needed** — the reference is served anonymously. `--if-stale` skips the download when your copy is current (cheap enough for every session); `--check` writes nothing and exits 0 current / 2 stale / 1 could-not-tell. |
|
|
85
90
|
| `octwin test` | Alias for `octwin validate --remote` — the platform's full manifest + flow-DSL check. |
|
|
@@ -100,6 +105,8 @@ lists the verbs and their exact flags.
|
|
|
100
105
|
| `octwin catalog` | `availability <sku> --to "in stock"` · `stock <sku> [--set-on-hand n]` |
|
|
101
106
|
| `octwin scheduling` | `rules --resource <id>` · `rule add\|rm` · `exception add\|rm` |
|
|
102
107
|
| `octwin agents` | `set <ref> [--model m] [--enable-tool t] [--disable-tool t]` |
|
|
108
|
+
| `octwin automation` | `run <jobId>` · `pause\|resume <jobId>` · `send <campaignId>` — the id may be the declaration **key** the list prints; the CLI resolves it to the uuid the route wants |
|
|
109
|
+
| `octwin integrations` | `test <key>` (a live call to the connection's `health:` operation) · `retry\|cancel\|send-now <deliveryId>` |
|
|
103
110
|
|
|
104
111
|
`--set k=v` coerces JSON scalars (`--set rating=4.5` sends a number); `--fields-json` takes anything
|
|
105
112
|
nested. Destructive verbs want `--force` rather than a prompt — the CLI is non-interactive by
|
|
@@ -134,6 +141,11 @@ octwin orders # then: octwin orders <reference_i
|
|
|
134
141
|
octwin analytics # then: octwin analytics <entity> [--stage <id>]
|
|
135
142
|
octwin catalog # products + stock + the WhatsApp binding
|
|
136
143
|
octwin scheduling --slots <resourceRecordId> # the slots your availability rules compute
|
|
144
|
+
octwin automation # did your declared jobs run, and what did they touch
|
|
145
|
+
octwin integrations # declared vs configured — the silent-never-fires check
|
|
146
|
+
octwin journeys # then: octwin journeys <id> [--overview|--goals|--cost]
|
|
147
|
+
octwin performance # value, conversion and duration, each with its `why`
|
|
148
|
+
octwin usage # what your testing actually cost in model spend
|
|
137
149
|
```
|
|
138
150
|
|
|
139
151
|
Three things worth knowing when you read the output:
|