octwin-cli 0.1.21 → 0.5.1

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
@@ -61,7 +61,7 @@ octwin status # "✓ live and current" once it's warm
61
61
  | Command | What it does |
62
62
  | --- | --- |
63
63
  | `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). The platform re-validates the full manifest/flow schema on deploy. |
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. |
65
65
  | `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
66
  | `octwin whoami` | Verify the saved/passed token is valid for a tenant. `--url`, `--tenant`. |
67
67
  | `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`. |
@@ -71,6 +71,7 @@ octwin status # "✓ live and current" once it's warm
71
71
  | `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. |
72
72
  | `octwin records` | Inspect the pack's XRM data (needs a `records:read` token). No args = list entities. |
73
73
  | `octwin cases` | Inspect casework (support tickets): the inbox, one case + its timeline and decisions, or `--queues` for queue keys + open counts. |
74
+ | `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". |
74
75
  | `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`. |
75
76
  | `octwin orders` | The orders a conversation produced. No args = the list; with a `reference_id` = line items, the subtotal/tax/shipping/discount/total breakdown, `payment_ref`, and the allowed transitions. Needs `orders:read` + the `orders` plan feature. |
76
77
  | `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`. |
@@ -79,8 +80,29 @@ octwin status # "✓ live and current" once it's warm
79
80
  | `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`. |
80
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. |
81
82
  | `octwin test` | Alias for `octwin validate --remote` — the platform's full manifest + flow-DSL check. |
83
+ | `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. |
82
84
  | `octwin help` | Show usage. Every subcommand also answers `--help`. |
83
85
 
86
+ ### Writing, not just reading
87
+
88
+ Every read command above has a write half behind a **leading verb**, so `octwin cases` reads and
89
+ `octwin cases note <id> "…"` writes. Each needs the matching `:write` scope — `octwin <cmd> --help`
90
+ lists the verbs and their exact flags.
91
+
92
+ | Command | Verbs |
93
+ | --- | --- |
94
+ | `octwin records` | `create <entity> --set k=v` · `patch <id> --entity <e>` · `stage <id> --to <s>` · `note <id> "…"` · `tasks` · `task complete <id>` |
95
+ | `octwin cases` | `assign <id> --to user:<uuid>\|none` · `note` · `transition <id> --to <status>` · `decide <id> --action <a> [--dry-run]` |
96
+ | `octwin orders` | `transition <ref> --to <status>` · `refund <ref> --force` |
97
+ | `octwin catalog` | `availability <sku> --to "in stock"` · `stock <sku> [--set-on-hand n]` |
98
+ | `octwin scheduling` | `rules --resource <id>` · `rule add\|rm` · `exception add\|rm` |
99
+ | `octwin agents` | `set <ref> [--model m] [--enable-tool t] [--disable-tool t]` |
100
+
101
+ `--set k=v` coerces JSON scalars (`--set rating=4.5` sends a number); `--fields-json` takes anything
102
+ nested. Destructive verbs want `--force` rather than a prompt — the CLI is non-interactive by
103
+ design. `cases decide --dry-run` previews the customer-facing copy and the resulting status without
104
+ committing, and needs only `cases:read`.
105
+
84
106
  Every command that talks to the platform accepts `--dir <path>` (the pack directory; defaults to
85
107
  the current directory) plus the target overrides `--url` / `--tenant` / `--project` / `--token`.
86
108
 
@@ -168,9 +190,10 @@ text only.
168
190
 
169
191
  ## What a pack may contain
170
192
 
171
- A pack is **pure declarative data** — `.yaml` / `.yml` / `.md` / `.sql` / `.json` only. Executable
172
- code (`.ts`/`.js`), HTTP routes, DB clients, and custom primitives are **not** allowed (this is what
173
- makes an external pack safe to run on a shared platform; the server enforces it on deploy). For
193
+ A pack is **pure declarative data** — `.yaml` / `.yml` / `.md` / `.json` only. Executable
194
+ code (`.ts`/`.js`), HTTP routes, DB clients, custom primitives and **`.sql`** are **not** allowed
195
+ (this is what makes an external pack safe to run on a shared platform; the server enforces it on
196
+ deploy, and so does `octwin validate`). For
174
197
  domain records, use Octwin's first-class storage modules — **XRM** (records with stage pipelines),
175
198
  **catalog** (products), or **casework** (tickets) — declared in `xrm.yaml` and `worklist.yaml`, so a
176
199
  pack needs **no database of its own**. (Casework rides `worklist.yaml`'s `work.<entity>` block;