octwin-cli 0.5.1 → 0.6.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 CHANGED
@@ -5,6 +5,26 @@ 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.6.0] - 2026-08-09
9
+
10
+ ### Changed
11
+ - **`octwin cases` is now `octwin work`, and it works again.** The platform's work-inbox
12
+ consolidation (2026-08-08) replaced the case-only surface with `/work` over every entity a pack
13
+ declares worked, and renamed the scopes to `work:read`/`work:write` — which left every `octwin
14
+ cases` call a silent 404 in a published CLI. The command family is renamed to match the platform:
15
+ `octwin work [recordId] [--queues]`, with writes `assign` / `note` / `decide` (the declared
16
+ operator actions, `--dry-run` previews) and `stage <id> --to <s>` riding the one platform-wide
17
+ stage verb (`POST …/xrm/records/:id/stage`, needs `records:write`). `transition` is gone with the
18
+ route it called.
19
+ - **`octwin orders transition` rides the same stage verb.** `POST …/orders/:ref/transition` was
20
+ retired server-side in the same consolidation; the CLI now resolves the order's record id from the
21
+ detail read and moves the stage through `…/xrm/records/:id/stage` (scope: `records:write`).
22
+
23
+ ### Added
24
+ - **A route guard so this cannot rot silently again**: `src/lib/cli-routes.test.ts` extracts every
25
+ `/api/self/**` URL the CLI builds and asserts it (method included) against the platform's dumped
26
+ route table — the gap that let both breakages above ship.
27
+
8
28
  ## [0.5.1] - 2026-08-01
9
29
 
10
30
  ### Fixed
@@ -237,7 +257,7 @@ repo root [`CHANGELOG.md`](../../CHANGELOG.md); this file is the CLI-only cut th
237
257
  **flags → env (`PACK_PLATFORM_URL`/`PACK_TENANT`/`PACK_PROJECT`/`PACK_TOKEN`) → saved login**.
238
258
  An existing credentials file simply has no `default_url` until the next `octwin login` — which is
239
259
  exactly what the "no platform url" error now tells you to run. CI is unaffected (it passes
240
- `PACK_PLATFORM_URL` + `PACK_TOKEN` as env and never had a `pack.json`).
260
+ `PACK_PLATFORM_URL` + `PACK_TOKEN` as env and never had a `pack.json` — that file is retired).
241
261
 
242
262
  ## [0.1.17] - 2026-07-27
243
263
 
package/README.md CHANGED
@@ -36,6 +36,9 @@ octwin <command>
36
36
 
37
37
  ```bash
38
38
  # 1. Scaffold a standalone pure-YAML pack (this is your repo)
39
+ # `--id` is a BARE name — the platform prefixes your workspace at deploy, so
40
+ # `my-pack` published by `acme` becomes `acme.my-pack` in the catalog. Take the
41
+ # obvious name; ids only collide within a workspace.
39
42
  octwin init ./my-pack --id my-pack --description "My business bot"
40
43
  cd ./my-pack
41
44
  git init && git add -A && git commit -m "init pack"
@@ -61,7 +64,7 @@ octwin status # "✓ live and current" once it's warm
61
64
  | Command | What it does |
62
65
  | --- | --- |
63
66
  | `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`. |
64
- | `octwin validate` | Check the pack locally (structure + pure-YAML rules). `--remote` additionally runs the platform's **flow lint** — conventions the schema can't express, like an `assign:` whose value is a quoted literal, or a `$t()` key with no namespace. The lint needs a template-expanded `FlowDef`, which only the server builds, so it is a `--remote`-only check; a local does not cover it. |
67
+ | `octwin validate` | Check the pack locally (structure + pure-YAML rules). `--remote` runs **the same validation the platform runs to load your pack** — 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 a local does not cover them. A `--remote` and a successful deploy are now the same answer by construction, not by convention. |
65
68
  | `octwin login` | Save a deploy token for a platform URL **and make that URL the default target** (both stored in `~/.octwin/credentials.json`). `--url`, `--token`. |
66
69
  | `octwin whoami` | Verify the saved/passed token is valid for a tenant. `--url`, `--tenant`. |
67
70
  | `octwin deploy` | Upload + install the pack onto your tenant's project. `--seed` also runs the pack's demo seed. Reports the **marketplace-listing verdict** when the manifest carries `listing.public: true`. |
@@ -78,7 +81,7 @@ octwin status # "✓ live and current" once it's warm
78
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. |
79
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`. |
80
83
  | `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`); `--size`; `--json`. Pairs with `octwin chat --media` to drive media-collect flows. Needs `media:generate`. |
81
- | `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 an **`INDEX.md`** mapping every entry to its file — so a lookup is a small targeted read, not a whole catalog. |
84
+ | `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. |
82
85
  | `octwin test` | Alias for `octwin validate --remote` — the platform's full manifest + flow-DSL check. |
83
86
  | `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. |
84
87
  | `octwin help` | Show usage. Every subcommand also answers `--help`. |