jaz-clio 5.52.3 → 5.53.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/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  <p align="center"><b>Jaz accounting on the command line, and inside any AI agent.</b></p>
11
11
 
12
- 369 tools · 68 command groups · 7 skills · 13 calculators · 12 close playbooks · 159 field-tested API rules.
12
+ 369 tools · 69 command groups · 7 skills · 13 calculators · 12 close playbooks · 159 field-tested API rules.
13
13
 
14
14
  ```bash
15
15
  npm install -g jaz-clio
@@ -50,7 +50,7 @@ clio magic create --file receipt.pdf # AI extracts, drafts the
50
50
  clio invoices search --query 'status:unpaid AND $500+' # structured per-entity search
51
51
  ```
52
52
 
53
- 68 command groups, 16 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
53
+ 69 command groups, 16 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
54
54
 
55
55
  ### Foreign currency
56
56
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill whenever you call, debug, or review code that touches the Jaz
6
6
  REST API. Covers field names, response shapes, 159 production gotchas, error
@@ -185,7 +185,7 @@ The rest of this skill — field names, gotchas, error catalog, dependency order
185
185
  51. **Filter operator reference** — An operator the target type does not declare is now rejected with a 400 naming it, not ignored, so use the exact set. String: `eq`, `neq`, `contains`, `notContains`, `in` (array, max 100), `likeIn` (array, max 100), `reg` (substring array, max 100 — a term match despite the name, not a regex), `startWith`, `notStartWith`, `endWith`, `notEndWith`, `isNull`, `isBlank`, `isNotBlank` (each takes the **string** `"true"`/`"false"`, not a bool). Numeric: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `inRange`/`notInRange` (exactly 2 values, low then high). Date (YYYY-MM-DD): `eq`, `gt`, `gte`, `lt`, `lte`, `between`/`notBetween` (exactly 2 values), `isNull`, `isNotNull`. DateTime (RFC3339): `eq`, `gt`, `gte`, `lt`, `lte`, `between`, converted to epoch ms internally. Boolean: `eq`. JSON: `jsonIn`, `jsonNotIn`. Logical: `and`/`or` objects everywhere; `andGroup`/`orGroup` arrays on invoices, bills, journals, cashflow transactions, payments, batch payments and the order family (orders, quotes, requests, line items) — **not** on credit notes. `not` exists only on contacts, items, tags, custom fields, tax profiles and nano classifiers; it is **not** available on invoices, bills or journals.
186
186
  52. **Date format asymmetry (CRITICAL)** — Request dates: `YYYY-MM-DD` strings (all create/update and DateExpression filters). Request datetimes: RFC3339 strings (DateTimeExpression filters for `createdAt`, `updatedAt`, `approvedAt`, `submittedAt`). **ALL response dates**: `int64` epoch milliseconds — including `valueDate`, `createdAt`, `updatedAt`, `approvedAt`, `submittedAt`, `matchDate`. Convert: `new Date(epochMs).toISOString().slice(0,10)`. **Timezone convention**: ALL business dates (`valueDate`, `dueDate`, `startDate`, `endDate`, etc.) are in the **organization's timezone** — never UTC. The epoch ms stored in the DB represents the org-local date (no timezone conversion is ever needed). Only audit timestamps (`createdAt`, `updatedAt`, `action_at`) are UTC.
187
187
  53. **Field aliases on create endpoints** — Middleware transparently maps: `issueDate`/`date` → `valueDate` (invoices, bills, credit notes, journals). `name` → `tagName` (tags) or `internalName` (items). `paymentDate` → `valueDate`, `bankAccountResourceId` → `accountResourceId` (payments). `paymentAmount` → `refundAmount`, `paymentMethod` → `refundMethod` (credit note refunds). `accountType` → `classificationType`, `currencyCode` → `currency` (CoA). Canonical names always work; aliases are convenience only.
188
- 54. **All search/list responses are flat** — every search and list endpoint returns `{ totalElements, totalPages, data: [...] }` directly (no outer `data` wrapper). Access the array via `response.data`, pagination via `response.totalElements`. **Four exceptions**: (a) `GET /bank-accounts` returns a plain array `[{...}]` (see Rule 18), (b) `GET /invoices/:id` returns a flat object `{...}` (no `data` wrapper) — unlike `GET /bills/:id`, `GET /contacts/:id`, `GET /journals/:id` which wrap in `{ data: {...} }`. Normalize the invoice GET response before use. (c) **The empty-result envelope on the scheduled-\* handlers changes shape**: when the upstream search block comes back null, eight handlers short-circuit to `{ "data": [], "pagination": { "total": 0 } }` — no `totalElements`, no `totalPages`, and a third pagination key name. The SAME endpoint returns the normal flat envelope the moment one row exists. Affected: list AND attachment-list on scheduled invoices, scheduled bills, scheduled journals, scheduled subscriptions. **Never read `totalElements` on a scheduled-\* response without falling back to `pagination.total`** — `response.totalElements ?? response.pagination?.total ?? 0` — and count rows off `data.length`, which is correct in both shapes. (d) **`GET /organization-report-template` returns its rows under `reportTemplates`, not `data`, and carries no counts** — measured 2026-09-06 against an org holding 12 templates, where `data` was `[]` and `totalElements` `0`. The `list_organization_report_templates` tool normalizes it, so read `.data` as usual; the raw endpoint does not. Its own `/search` sibling IS conventional. The endpoint also ignores `limit`/`offset` entirely (probed at 1, 3 and 100 — 12 rows every time), so it returns everything in one response.
188
+ 54. **All search/list responses are flat** — every search and list endpoint returns `{ totalElements, totalPages, data: [...] }` directly (no outer `data` wrapper). Access the array via `response.data`, pagination via `response.totalElements`. **Four exceptions**: (a) `GET /bank-accounts` returns a plain array `[{...}]` (see Rule 18), (b) `GET /invoices/:id` returns a flat object `{...}` (no `data` wrapper) — unlike `GET /bills/:id`, `GET /contacts/:id`, `GET /journals/:id` which wrap in `{ data: {...} }`. Normalize the invoice GET response before use. (c) **The empty-result envelope on the scheduled-\* handlers changes shape**: when the upstream search block comes back null, eight handlers short-circuit to `{ "data": [], "pagination": { "total": 0 } }` — no `totalElements`, no `totalPages`, and a third pagination key name. The SAME endpoint returns the normal flat envelope the moment one row exists. Affected: list AND attachment-list on scheduled invoices, scheduled bills, scheduled journals, scheduled subscriptions. **Never read `totalElements` on a scheduled-\* response without falling back to `pagination.total`** — `response.totalElements ?? response.pagination?.total ?? 0` — and count rows off `data.length`, which is correct in both shapes. (d) **`GET /organization-report-template` returns its rows under `reportTemplates`, not `data`, and carries no counts** — measured 2026-09-06 against an org holding 12 templates, where `data` was `[]` and `totalElements` `0`. The `list_organization_report_templates` tool normalizes it, so read `.data` as usual; the raw endpoint does not. Its `/search` sibling returns a **bare array** with no envelope, the same shape as exception (a) above. So the two halves of one family disagree with each other. Both are normalized for you by the tools, so read `.data` as usual. The endpoint also ignores `limit`/`offset` entirely (probed at 1, 3 and 100 — 12 rows every time), so it returns everything in one response.
189
189
  55. **Scheduled endpoints support date aliases** — `txnDateAliases` middleware (mapping `issueDate`/`date` → `valueDate`) now applies to all scheduled create/update endpoints: `POST/PUT /scheduled/invoices`, `POST/PUT /scheduled/bills`, `POST/PUT /scheduled/journals`, `POST/PUT /scheduled/subscriptions`.
190
190
  56. **Kebab-case URL aliases** — `capsuleTypes` endpoints also accept kebab-case paths: `/capsule-types` (list, search, CRUD). `moveTransactionCapsules` also accepts `/move-transaction-capsules`. Both camelCase and kebab-case work identically.
191
191
 
@@ -548,7 +548,7 @@ All search endpoints return:
548
548
  }
549
549
  ```
550
550
 
551
- **Exception**: `GET /organization-report-template` returns its rows under a `reportTemplates` key, not `data` (measured 2026-09-06). Its `/search` sibling is conventional. The tools normalize the list — read `.data` on both.
551
+ **Exception**: `GET /organization-report-template` returns its rows under a `reportTemplates` key, not `data` (measured 2026-09-06). Its `/search` sibling returns a **bare array** with no envelope (measured 2026-09-07). The tools normalize the list — read `.data` on both.
552
552
 
553
553
  ---
554
554
 
@@ -28,7 +28,7 @@ All search endpoints share this identical structure:
28
28
 
29
29
  **Response shape**: `{ totalElements, totalPages, data: [...] }` — all search/list endpoints return this flat structure directly (no outer `data` wrapper).
30
30
 
31
- > **Exception**: the two halves of this family answer differently upstream. `POST /organization-report-template/search` returns a normal `{data, totalElements}` envelope; `GET /organization-report-template` returns its rows under a **`reportTemplates`** key with no counts. Measured 2026-09-06 — an earlier note here said both returned a plain array, and neither does. The tools normalize the list, so you always read `.data`.
31
+ > **Exception**: the two halves of this family answer differently upstream. `POST /organization-report-template/search` returns a **bare array** with no envelope; `GET /organization-report-template` returns its rows under a **`reportTemplates`** key with no counts. Measured 2026-09-07 — the two halves disagree with each other and with the house style. The tools normalize the list, so you always read `.data`.
32
32
 
33
33
  ---
34
34
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-cli
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill when running Clio CLI commands, building shell scripts with
6
6
  Clio, debugging auth issues, understanding --json output, paginating results,
@@ -8,7 +8,7 @@ description: >-
8
8
  precedence, output formats, entity resolution, and common workflow patterns.
9
9
  Also use when the user asks how to use clio, what commands are available, or
10
10
  how to automate accounting tasks from the command line. Covers all
11
- 68 command groups and 369 tools, including employee-expense claims.
11
+ 69 command groups and 369 tools, including employee-expense claims.
12
12
  license: MIT
13
13
  compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
14
14
  ---
@@ -17,7 +17,7 @@ compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
17
17
 
18
18
  > **Audience note:** for power users and CI/automation. Load this skill only when you're scripting from a terminal, building shell pipelines, or debugging from `clio --json` output. For day-to-day accounting inside Claude Desktop / Cowork, the MCP tools cover the common flows without dropping to the CLI.
19
19
 
20
- You are working with **Clio** (`jaz-clio`) — the CLI for the Jaz accounting platform. 68 command groups, 13 calculators, 12 job blueprints, 369 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
20
+ You are working with **Clio** (`jaz-clio`) — the CLI for the Jaz accounting platform. 69 command groups, 13 calculators, 12 job blueprints, 369 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
21
21
 
22
22
  ## When to Use This Skill
23
23
 
@@ -1,6 +1,6 @@
1
1
  # Clio Command Catalog
2
2
 
3
- Complete reference for all 68 command groups. Organized by domain.
3
+ Complete reference for all 69 command groups. Organized by domain.
4
4
 
5
5
  ---
6
6
 
@@ -399,6 +399,25 @@ What the organization can be billed for. No create/update/delete upstream; maint
399
399
 
400
400
  No free-text `--query`: the endpoint rejects it (`The query field is not supported for this entity`). Filters here are **plain strings, not expression objects** — `PurchaseItemFilter` declares them as bare `string`, so there is no `contains`. `purchaseResourceId` and `resourceId` also exist upstream and are reachable via `--filter`.
401
401
 
402
+ ### `clio pseudo-sql` (alias: `sql`) — Read-only SQL over the curated reporting tables (6 tools)
403
+ A restricted SQL subset against Jaz's curated reporting schema, **not** the customer's database. SELECT only, single statement, 16384-char cap — the engine rejects DML, so there is no write verb.
404
+
405
+ | Subcommand | Key flags |
406
+ |------------|-----------|
407
+ | `preview [query]` | `--input <file>` |
408
+ | `export [query]` | `--input <file>`, `--out <abs-path>`, `--download`, `--no-wait`, `--timeout <s>` |
409
+ | `export-status <jobId>` | — |
410
+ | `schema [table]` | — |
411
+ | `syntax` | — |
412
+
413
+ The query comes from a positional argument, `--input <file>`, or stdin (`cat q.sql | clio sql preview`) — pick one; passing two is refused.
414
+
415
+ `preview` caps at 100 rows upstream and renders at most 8 columns (use `--json` for all). Its `truncated` flag means MORE ROWS MATCH, not that the returned rows were cut.
416
+
417
+ `export` waits for the job by default and prints a pre-signed URL that expires in ~15 minutes; `--out` (absolute paths only) or `--download` writes the CSV instead. `--no-wait` returns the jobId for `export-status` and cannot be combined with `--out`/`--download`/`--timeout`, which it would otherwise ignore. Anything other than a delivered file exits non-zero, including a COMPLETED job whose download failed.
418
+
419
+ `schema <table>` scopes the catalog to one table plus the joins touching it, and recomputes its counts. Table and column names come from here, syntax rules from `syntax` — both served by one endpoint.
420
+
402
421
  ### `clio inventory` (alias: `inv`) — Inventory tracking
403
422
  | Subcommand | Key flags |
404
423
  |------------|-----------|
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill when migrating accounting data into Jaz — importing from Xero,
6
6
  QuickBooks, Sage, MYOB, or Excel exports. Covers the full conversion pipeline:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-kit
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill when an accountant, bookkeeper, or owner is running real books
6
6
  in Jaz across one or more organizations from the terminal — setting up a
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-pseudo-sql
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill when answering ad-hoc data questions that aren't covered by
6
6
  download_export (canonical reports — anomaly, audit, aging, P&L, BS, GL,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-jobs
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill for recurring accounting workflows — month/quarter/year-end
6
6
  close, bank reconciliation, GST/VAT filing, payment runs, credit control,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-recipes
3
- version: 5.52.3
3
+ version: 5.53.0
4
4
  description: >-
5
5
  Use this skill when modeling complex multi-step accounting transactions —
6
6
  anything that spans multiple periods, involves changing amounts, or requires