octwin-cli 0.8.11 → 0.8.13
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 +60 -0
- package/README.md +8 -5
- package/dist/index.js +616 -416
- package/dist/lib/args-check.js +55 -0
- package/dist/lib/chat-line.js +44 -0
- package/dist/lib/outcome.js +11 -0
- package/dist/lib/template-check.js +4 -2
- package/package.json +2 -2
- package/templates/starter/flows/tools/browse.flow.yaml +7 -0
- package/templates/starter/flows/tools/browse.locale.ar.yaml +1 -0
- package/templates/starter/manifest.yaml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,66 @@ 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
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.8.13] - 2026-09-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **`octwin records archive <id>` / `restore <id>`.** Archive is how a record leaves use — test data
|
|
14
|
+
included: it drops out of every list, count and report and fires the entity's `on.archived`
|
|
15
|
+
reactions, exactly like the console's Archive; `restore` undoes it. There is no delete, on the
|
|
16
|
+
platform or here, and `octwin records --help` now says so.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **`octwin chat` said the AI Agent wrote every message.** A reminder that fired mid `--script` (a
|
|
20
|
+
`schedule_notify`, a reaction) printed as `← <body>`, was taken for the turn's reply, and ended
|
|
21
|
+
the turn on it — so the real reply looked lost while `octwin logs` showed the flow had worked.
|
|
22
|
+
Each line now says who sent it: `← [notify] …` (not the turn's answer — the wait for the real
|
|
23
|
+
reply goes on), `← [operator: Name] …` (a person in Live chat), `← [platform] …` (a handoff
|
|
24
|
+
joining or returning); plain `← …` is the AI Agent. After the last turn the stream stays open
|
|
25
|
+
3 s more, so a late message prints (marked "after the last turn") instead of reaching a closed
|
|
26
|
+
connection. Needs a platform that stamps `source: 'notify'` on web renders; an older one just
|
|
27
|
+
prints notifies unlabelled, as before.
|
|
28
|
+
- **The "no such template" hint named a file the platform never loads.** It said
|
|
29
|
+
`templates/<name>.yaml`; pack templates load only as `templates/<name>.template.yaml`, so a
|
|
30
|
+
template saved as the hint said was silently ignored.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- **`octwin validate` runs the platform's FULL check by default — and needs no login for it.** The
|
|
34
|
+
offline checks are a subset, and a subset that passes read as "deploy will pass": it passed a pack
|
|
35
|
+
the full check refused (a scaffold flow left behind with Arabic copy only, in a pack that ships
|
|
36
|
+
English). Now `validate` runs the offline checks, then the full one: through your workspace when you
|
|
37
|
+
have a token AND a `--project` (which also confirms the project exists), otherwise through the
|
|
38
|
+
platform's public validate route with no credential. When it cannot reach the full check — no url,
|
|
39
|
+
offline, rate-limited, an older platform — the LAST line says *"only the OFFLINE check ran — a
|
|
40
|
+
PARTIAL check"* and why, and it exits 0 as before. `--remote` now means "the full check is
|
|
41
|
+
required" (not reaching it is an error); the new `--offline` runs only the subset.
|
|
42
|
+
- **The scaffold's example `browse` flow says it is an example.** Its header, its copy file and its
|
|
43
|
+
`manifest.yaml` line now say to replace it, or delete the flow, every `browse.locale.*.yaml` and the
|
|
44
|
+
`flows:` line together — a leftover never loads, but a second language makes it fail validation.
|
|
45
|
+
|
|
46
|
+
## [0.8.12] - 2026-09-25
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
- **The package pointed its `homepage` at npm — the page it is rendered on.** It is
|
|
50
|
+
<https://octwin.ai> now, and the README's Links section gains the platform, the guides and the
|
|
51
|
+
marketplace. The README describes Octwin at length and linked only to npm and nodejs.org.
|
|
52
|
+
- **`octwin usage` with a project-pinned token reports that project.** The platform now treats a
|
|
53
|
+
token's project pin as a ceiling on every route, so a pinned token is refused on the
|
|
54
|
+
workspace-wide rollup. `usage` asks `whoami` for the pin and reads the project view instead of
|
|
55
|
+
printing a 403 — which is what its help text (`project if pinned, else workspace`) always said.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
- **`octwin chat` sat out its whole 45-second wait on every message during a live handoff, and
|
|
59
|
+
read as hung.** While a person holds the conversation (or one has been asked for) the AI Agent
|
|
60
|
+
deliberately answers nothing, and the CLI could not tell that from a slow pack. The platform now
|
|
61
|
+
says so with a `held` event on the web stream; `chat` prints
|
|
62
|
+
*"⏸ a person is holding this conversation — the AI Agent will not reply…"* (or *"waiting for a
|
|
63
|
+
person to join…"*), still collects any operator line replayed by that message, and returns. A
|
|
64
|
+
held turn is not a failure: it exits 0, and `--script` carries on to the next line, so the
|
|
65
|
+
customer's side of a handoff can be scripted. Needs a platform that sends `held`; an older one
|
|
66
|
+
behaves as before. Reported in `xpeng-egypt/FEEDBACK.md`, session 3.
|
|
67
|
+
|
|
8
68
|
## [0.8.11] - 2026-09-07
|
|
9
69
|
|
|
10
70
|
### Fixed
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/octwin-cli)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
|
|
9
|
-
Octwin is a pack-pluggable conversational-agent platform for WhatsApp and web. A **pack** is a
|
|
9
|
+
[Octwin](https://octwin.ai) is a pack-pluggable conversational-agent platform for WhatsApp and web. A **pack** is a
|
|
10
10
|
self-contained bot domain — its agent, conversation flows, prompts, and data model — declared
|
|
11
11
|
entirely in YAML. `octwin-cli` lets you build a **pure-YAML pack** in your own repo and deploy it
|
|
12
12
|
to a running Octwin platform to test live on your own tenant: no platform checkout, no build step,
|
|
@@ -65,15 +65,15 @@ octwin status # "✓ live and current" once it's warm
|
|
|
65
65
|
| Command | What it does |
|
|
66
66
|
| --- | --- |
|
|
67
67
|
| `octwin init <dir>` | Scaffold a new pure-YAML pack into `<dir>` (writes a starter `manifest.yaml`, flow, prompt, `.gitignore` and `README.md` — pack content only). Options: `--id`, `--description`, `--display-name`. |
|
|
68
|
-
| `octwin validate` |
|
|
68
|
+
| `octwin validate` | Fast offline checks (structure + pure-YAML rules + the checks the pulled KB drives), then — **by default, with no login needed** — **the same validation the platform runs to load your pack**. Without a token and a `--project` it asks the platform's public validate route; with both it goes through your workspace and also confirms the project exists. When it cannot reach the platform, the LAST line says *"only the OFFLINE check ran — a PARTIAL check"* and why. `--remote` makes the full check required (not reaching it is an error); `--offline` runs only the subset. The full check covers every declaration file (`xrm.yaml`, `scheduling.yaml`, `worklist.yaml`, `roles.yaml`, `automation.yaml`, `integrations.yaml`, `surveys.yaml`, `taps.yaml`, `commands.yaml`, `journeys/`, `messages.<lang>.yaml`), the cross-file checks between them, and the **flow lint** — conventions the schema can't express, like an `assign:` whose value is a quoted literal or a `$t()` key with no namespace. These need template expansion and the platform's own schemas, which only the server has, so an offline ✓ does not cover them. A full-check ✓ and a successful deploy are the same answer by construction, not by convention. |
|
|
69
69
|
| `octwin login` | Sign in to a platform URL **and make it the default target** (both stored in `~/.octwin/credentials.json`). With no `--token` it prints a link to approve in the console, then collects a 30-day token itself — nothing is pasted. The wait is bounded and resumable: run it again to keep waiting on the same request. `--url`, `--token`, `--wait <seconds>`, `--json`. |
|
|
70
70
|
| `octwin whoami` | Verify the saved/passed token is valid for a tenant. `--url`, `--tenant`. |
|
|
71
71
|
| `octwin deploy` | Upload + install the pack onto your tenant's project. `--seed` also runs the pack's demo seed. Says **nothing** about the public marketplace unless asked: `--request-listing` submits the pack for operator review (needs `listing.public: true` in the manifest too), `--withdraw-listing` retracts. Reports the **listing verdict** whenever one exists. |
|
|
72
72
|
| `octwin status` | Report what the platform has live for this pack — installed version, the **content sha** the instance loaded vs. the one the catalog holds (a redeploy of the *same* version changes it), its flows, and whether it is live on the public marketplace. |
|
|
73
73
|
| `octwin pull <packId>` | Write a **deployed** pack's source back to disk — the inverse of `deploy`, and how a pack pushed from one machine is recovered. Defaults to the version installed on the target project; `--version` overrides, `--dir` defaults to `./<packId>`, a non-empty dir needs `--force`. You may pull a pack your tenant **owns**. |
|
|
74
|
-
| `octwin chat "msg"` | Drive a turn through the dev web channel and print **every render with its tap ids**. `--as <handle>` picks the test user; `--tap "<tap-id>"` presses a rendered button/list row; `--json` dumps the raw envelopes. |
|
|
74
|
+
| `octwin chat "msg"` | Drive a turn through the dev web channel and print **every render with its tap ids**. `--as <handle>` picks the test user; `--tap "<tap-id>"` presses a rendered button/list row; `--json` dumps the raw envelopes. Each reply line says who sent it: plain `← …` is the AI Agent, `← [notify] …` a reminder or notification (never taken for the turn's reply), `← [operator: Name] …` a person in Live chat, `← [platform] …` a handoff line. |
|
|
75
75
|
| `octwin logs` | List recent conversations (handle, status, last activity; `--as` filters), or show one conversation's full event timeline — including what each turn rendered. `--json` for raw payloads. |
|
|
76
|
-
| `octwin records` | Inspect the pack's XRM data (needs a `records:read` token). No args = list entities. |
|
|
76
|
+
| `octwin records` | Inspect the pack's XRM data (needs a `records:read` token). No args = list entities. Writes (`records:write`): `create`, `patch`, `stage`, `note`, and `archive <id>` / `restore <id>` — there is no delete; archive takes a record (test data too) out of every list and count, and restore brings it back. |
|
|
77
77
|
| `octwin work` | The work inbox: worked records across queues, one item + its timeline and decisions, or `--queues` for queue keys + open counts. Casework is one shape of it — the command spans every entity a pack works. |
|
|
78
78
|
| `octwin projects` | The `--project <slug>` values this token can name, with the plan's project cap. `--archived` includes archived ones. A `pack:deploy` token reaches it — it names a project in every other command, so this turns "guess the slug" into "read the list". |
|
|
79
79
|
| `octwin agents` | The agent roster with each agent's **effective** model / history window and **which layer set it** (project override → platform default → pack manifest) — an operator platform default can override what your manifest declares. `--prompt` prints the exact system prompt the LLM sees. Needs `agents:read`. |
|
|
@@ -88,7 +88,7 @@ octwin status # "✓ live and current" once it's warm
|
|
|
88
88
|
| `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. |
|
|
89
89
|
| `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`. |
|
|
90
90
|
| `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. |
|
|
91
|
-
| `octwin test` | Alias for `octwin validate --remote` — the platform's full
|
|
91
|
+
| `octwin test` | Alias for `octwin validate --remote` — the platform's full check, required (a skipped full check is an error). |
|
|
92
92
|
| `octwin feedback` | Submit this pack's `FEEDBACK.md` to the platform team, with the pack version, your CLI version and the `content_hash` of the capability reference you pulled — the two facts that separate a real platform gap from something already fixed or a stale KB. |
|
|
93
93
|
| `octwin help` | Show usage. Every subcommand also answers `--help`. |
|
|
94
94
|
|
|
@@ -238,6 +238,9 @@ declaration files — read its `INDEX.md` rather than this paragraph.)
|
|
|
238
238
|
|
|
239
239
|
## Links
|
|
240
240
|
|
|
241
|
+
- **Octwin:** <https://octwin.ai> — the platform this CLI deploys to
|
|
242
|
+
- **Guides & playbooks:** <https://octwin.ai/artifacts> — how each capability works, end to end
|
|
243
|
+
- **Marketplace:** <https://octwin.ai/packs> — published packs you can read before writing your own
|
|
241
244
|
- **npm:** <https://www.npmjs.com/package/octwin-cli>
|
|
242
245
|
- **Command help:** `octwin help` (each subcommand also answers `--help`)
|
|
243
246
|
- **Changelog:** [CHANGELOG.md](./CHANGELOG.md)
|